Line data Source code
1 :
2 : /* Python wrapper functions auto-generated by pidl */
3 : #define PY_SSIZE_T_CLEAN 1 /* We use Py_ssize_t for PyArg_ParseTupleAndKeywords */
4 : #include "lib/replace/system/python.h"
5 : #include "python/py3compat.h"
6 : #include "includes.h"
7 : #include "python/modules.h"
8 : #include <pytalloc.h>
9 : #include "librpc/rpc/pyrpc.h"
10 : #include "librpc/rpc/pyrpc_util.h"
11 : #include "bin/default/librpc/gen_ndr/ndr_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 45932 : static inline unsigned long long ndr_sizeof2uintmax(size_t var_size)
33 : {
34 45932 : switch (var_size) {
35 0 : case 8:
36 0 : return UINT64_MAX;
37 40556 : case 4:
38 40556 : 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 = 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 = pytalloc_get_ptr(py_obj);
145 0 : if (value == NULL) {
146 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: 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 = 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 = pytalloc_get_ptr(py_obj);
194 0 : if (value == NULL) {
195 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: 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: (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 = 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 = pytalloc_get_ptr(py_obj);
277 0 : if (value == NULL) {
278 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: 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 = 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 = pytalloc_get_ptr(py_obj);
336 0 : if (value == NULL) {
337 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: 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: (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 : return -1;
363 : }
364 0 : test_str = PyBytes_AS_STRING(unicode);
365 0 : } else if (PyBytes_Check(PyList_GET_ITEM(value, pszStrings_cntr_0))) {
366 0 : test_str = PyBytes_AS_STRING(PyList_GET_ITEM(value, pszStrings_cntr_0));
367 : } else {
368 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(PyList_GET_ITEM(value, pszStrings_cntr_0))->tp_name);
369 0 : return -1;
370 : }
371 0 : talloc_str = talloc_strdup(object->pszStrings, test_str);
372 0 : if (unicode != NULL) {
373 0 : Py_DECREF(unicode);
374 : }
375 0 : if (talloc_str == NULL) {
376 0 : PyErr_NoMemory();
377 0 : return -1;
378 : }
379 0 : (object->pszStrings)[pszStrings_cntr_0] = talloc_str;
380 : }
381 : }
382 : }
383 : }
384 0 : return 0;
385 : }
386 :
387 : static PyGetSetDef py_DNS_RPC_UTF8_STRING_LIST_getsetters[] = {
388 : {
389 : .name = discard_const_p(char, "dwCount"),
390 : .get = py_DNS_RPC_UTF8_STRING_LIST_get_dwCount,
391 : .set = py_DNS_RPC_UTF8_STRING_LIST_set_dwCount,
392 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
393 : },
394 : {
395 : .name = discard_const_p(char, "pszStrings"),
396 : .get = py_DNS_RPC_UTF8_STRING_LIST_get_pszStrings,
397 : .set = py_DNS_RPC_UTF8_STRING_LIST_set_pszStrings,
398 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
399 : },
400 : { .name = NULL }
401 : };
402 :
403 0 : static PyObject *py_DNS_RPC_UTF8_STRING_LIST_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
404 : {
405 0 : return pytalloc_new(struct DNS_RPC_UTF8_STRING_LIST, type);
406 : }
407 :
408 :
409 : static PyTypeObject DNS_RPC_UTF8_STRING_LIST_Type = {
410 : PyVarObject_HEAD_INIT(NULL, 0)
411 : .tp_name = "dnsserver.DNS_RPC_UTF8_STRING_LIST",
412 : .tp_getset = py_DNS_RPC_UTF8_STRING_LIST_getsetters,
413 : .tp_methods = NULL,
414 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
415 : .tp_new = py_DNS_RPC_UTF8_STRING_LIST_new,
416 : };
417 :
418 :
419 0 : static PyObject *py_DNS_RPC_NAME_AND_PARAM_get_dwParam(PyObject *obj, void *closure)
420 : {
421 0 : struct DNS_RPC_NAME_AND_PARAM *object = pytalloc_get_ptr(obj);
422 0 : PyObject *py_dwParam;
423 0 : py_dwParam = PyLong_FromUnsignedLongLong((uint32_t)(object->dwParam));
424 0 : return py_dwParam;
425 : }
426 :
427 799 : static int py_DNS_RPC_NAME_AND_PARAM_set_dwParam(PyObject *py_obj, PyObject *value, void *closure)
428 : {
429 799 : struct DNS_RPC_NAME_AND_PARAM *object = pytalloc_get_ptr(py_obj);
430 799 : if (value == NULL) {
431 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwParam");
432 0 : return -1;
433 : }
434 : {
435 799 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwParam));
436 799 : if (PyLong_Check(value)) {
437 0 : unsigned long long test_var;
438 799 : test_var = PyLong_AsUnsignedLongLong(value);
439 799 : if (PyErr_Occurred() != NULL) {
440 0 : return -1;
441 : }
442 799 : if (test_var > uint_max) {
443 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
444 : PyLong_Type.tp_name, uint_max, test_var);
445 0 : return -1;
446 : }
447 799 : object->dwParam = test_var;
448 : } else {
449 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
450 : PyLong_Type.tp_name);
451 0 : return -1;
452 : }
453 : }
454 799 : return 0;
455 : }
456 :
457 0 : static PyObject *py_DNS_RPC_NAME_AND_PARAM_get_pszNodeName(PyObject *obj, void *closure)
458 : {
459 0 : struct DNS_RPC_NAME_AND_PARAM *object = pytalloc_get_ptr(obj);
460 0 : PyObject *py_pszNodeName;
461 0 : if (object->pszNodeName == NULL) {
462 0 : Py_RETURN_NONE;
463 : }
464 0 : if (object->pszNodeName == NULL) {
465 0 : py_pszNodeName = Py_None;
466 0 : Py_INCREF(py_pszNodeName);
467 : } else {
468 0 : if (object->pszNodeName == NULL) {
469 0 : py_pszNodeName = Py_None;
470 0 : Py_INCREF(py_pszNodeName);
471 : } else {
472 0 : py_pszNodeName = PyUnicode_Decode(object->pszNodeName, strlen(object->pszNodeName), "utf-8", "ignore");
473 : }
474 : }
475 0 : return py_pszNodeName;
476 : }
477 :
478 799 : static int py_DNS_RPC_NAME_AND_PARAM_set_pszNodeName(PyObject *py_obj, PyObject *value, void *closure)
479 : {
480 799 : struct DNS_RPC_NAME_AND_PARAM *object = pytalloc_get_ptr(py_obj);
481 799 : if (value == NULL) {
482 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszNodeName");
483 0 : return -1;
484 : }
485 799 : if (value == Py_None) {
486 0 : object->pszNodeName = NULL;
487 : } else {
488 799 : object->pszNodeName = NULL;
489 : {
490 0 : const char *test_str;
491 0 : const char *talloc_str;
492 799 : PyObject *unicode = NULL;
493 799 : if (PyUnicode_Check(value)) {
494 799 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
495 799 : if (unicode == NULL) {
496 0 : return -1;
497 : }
498 799 : test_str = PyBytes_AS_STRING(unicode);
499 0 : } else if (PyBytes_Check(value)) {
500 0 : test_str = PyBytes_AS_STRING(value);
501 : } else {
502 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
503 0 : return -1;
504 : }
505 799 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
506 799 : if (unicode != NULL) {
507 441 : Py_DECREF(unicode);
508 : }
509 799 : if (talloc_str == NULL) {
510 0 : PyErr_NoMemory();
511 0 : return -1;
512 : }
513 799 : object->pszNodeName = talloc_str;
514 : }
515 : }
516 799 : return 0;
517 : }
518 :
519 : static PyGetSetDef py_DNS_RPC_NAME_AND_PARAM_getsetters[] = {
520 : {
521 : .name = discard_const_p(char, "dwParam"),
522 : .get = py_DNS_RPC_NAME_AND_PARAM_get_dwParam,
523 : .set = py_DNS_RPC_NAME_AND_PARAM_set_dwParam,
524 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
525 : },
526 : {
527 : .name = discard_const_p(char, "pszNodeName"),
528 : .get = py_DNS_RPC_NAME_AND_PARAM_get_pszNodeName,
529 : .set = py_DNS_RPC_NAME_AND_PARAM_set_pszNodeName,
530 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
531 : },
532 : { .name = NULL }
533 : };
534 :
535 799 : static PyObject *py_DNS_RPC_NAME_AND_PARAM_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
536 : {
537 799 : return pytalloc_new(struct DNS_RPC_NAME_AND_PARAM, type);
538 : }
539 :
540 :
541 : static PyTypeObject DNS_RPC_NAME_AND_PARAM_Type = {
542 : PyVarObject_HEAD_INIT(NULL, 0)
543 : .tp_name = "dnsserver.DNS_RPC_NAME_AND_PARAM",
544 : .tp_getset = py_DNS_RPC_NAME_AND_PARAM_getsetters,
545 : .tp_methods = NULL,
546 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
547 : .tp_new = py_DNS_RPC_NAME_AND_PARAM_new,
548 : };
549 :
550 :
551 0 : static PyObject *py_DNS_RPC_NAME_get_len(PyObject *obj, void *closure)
552 : {
553 0 : struct DNS_RPC_NAME *object = pytalloc_get_ptr(obj);
554 0 : PyObject *py_len;
555 0 : py_len = PyLong_FromLong((uint16_t)(object->len));
556 0 : return py_len;
557 : }
558 :
559 2805 : static int py_DNS_RPC_NAME_set_len(PyObject *py_obj, PyObject *value, void *closure)
560 : {
561 2805 : struct DNS_RPC_NAME *object = pytalloc_get_ptr(py_obj);
562 2805 : if (value == NULL) {
563 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->len");
564 0 : return -1;
565 : }
566 : {
567 2805 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->len));
568 2805 : if (PyLong_Check(value)) {
569 0 : unsigned long long test_var;
570 2805 : test_var = PyLong_AsUnsignedLongLong(value);
571 2805 : if (PyErr_Occurred() != NULL) {
572 0 : return -1;
573 : }
574 2805 : if (test_var > uint_max) {
575 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
576 : PyLong_Type.tp_name, uint_max, test_var);
577 0 : return -1;
578 : }
579 2805 : object->len = test_var;
580 : } else {
581 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
582 : PyLong_Type.tp_name);
583 0 : return -1;
584 : }
585 : }
586 2805 : return 0;
587 : }
588 :
589 516 : static PyObject *py_DNS_RPC_NAME_get_str(PyObject *obj, void *closure)
590 : {
591 516 : struct DNS_RPC_NAME *object = pytalloc_get_ptr(obj);
592 0 : PyObject *py_str;
593 516 : if (object->str == NULL) {
594 0 : py_str = Py_None;
595 0 : Py_INCREF(py_str);
596 : } else {
597 516 : py_str = PyUnicode_Decode(object->str, strlen(object->str), "utf-8", "ignore");
598 : }
599 516 : return py_str;
600 : }
601 :
602 2805 : static int py_DNS_RPC_NAME_set_str(PyObject *py_obj, PyObject *value, void *closure)
603 : {
604 2805 : struct DNS_RPC_NAME *object = pytalloc_get_ptr(py_obj);
605 2805 : if (value == NULL) {
606 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->str");
607 0 : return -1;
608 : }
609 : {
610 0 : const char *test_str;
611 0 : const char *talloc_str;
612 2805 : PyObject *unicode = NULL;
613 2805 : if (PyUnicode_Check(value)) {
614 2805 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
615 2805 : if (unicode == NULL) {
616 0 : return -1;
617 : }
618 2805 : test_str = PyBytes_AS_STRING(unicode);
619 0 : } else if (PyBytes_Check(value)) {
620 0 : test_str = PyBytes_AS_STRING(value);
621 : } else {
622 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
623 0 : return -1;
624 : }
625 2805 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
626 2805 : if (unicode != NULL) {
627 2083 : Py_DECREF(unicode);
628 : }
629 2805 : if (talloc_str == NULL) {
630 0 : PyErr_NoMemory();
631 0 : return -1;
632 : }
633 2805 : object->str = talloc_str;
634 : }
635 2805 : return 0;
636 : }
637 :
638 : static PyGetSetDef py_DNS_RPC_NAME_getsetters[] = {
639 : {
640 : .name = discard_const_p(char, "len"),
641 : .get = py_DNS_RPC_NAME_get_len,
642 : .set = py_DNS_RPC_NAME_set_len,
643 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
644 : },
645 : {
646 : .name = discard_const_p(char, "str"),
647 : .get = py_DNS_RPC_NAME_get_str,
648 : .set = py_DNS_RPC_NAME_set_str,
649 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
650 : },
651 : { .name = NULL }
652 : };
653 :
654 1790 : static PyObject *py_DNS_RPC_NAME_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
655 : {
656 1790 : return pytalloc_new(struct DNS_RPC_NAME, type);
657 : }
658 :
659 0 : static PyObject *py_DNS_RPC_NAME_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
660 : {
661 0 : struct DNS_RPC_NAME *object = pytalloc_get_ptr(py_obj);
662 0 : PyObject *ret = NULL;
663 0 : DATA_BLOB blob;
664 0 : enum ndr_err_code err;
665 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
666 0 : if (tmp_ctx == NULL) {
667 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
668 0 : return NULL;
669 : }
670 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_NAME);
671 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
672 0 : TALLOC_FREE(tmp_ctx);
673 0 : PyErr_SetNdrError(err);
674 0 : return NULL;
675 : }
676 :
677 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
678 0 : TALLOC_FREE(tmp_ctx);
679 0 : return ret;
680 : }
681 :
682 0 : static PyObject *py_DNS_RPC_NAME_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
683 : {
684 0 : struct DNS_RPC_NAME *object = pytalloc_get_ptr(py_obj);
685 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
686 0 : Py_ssize_t blob_length = 0;
687 0 : enum ndr_err_code err;
688 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
689 0 : PyObject *allow_remaining_obj = NULL;
690 0 : bool allow_remaining = false;
691 :
692 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
693 : discard_const_p(char *, kwnames),
694 : &blob.data, &blob_length,
695 : &allow_remaining_obj)) {
696 0 : return NULL;
697 : }
698 0 : blob.length = blob_length;
699 :
700 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
701 0 : allow_remaining = true;
702 : }
703 :
704 0 : if (allow_remaining) {
705 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_NAME);
706 : } else {
707 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);
708 : }
709 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
710 0 : PyErr_SetNdrError(err);
711 0 : return NULL;
712 : }
713 :
714 0 : Py_RETURN_NONE;
715 : }
716 :
717 0 : static PyObject *py_DNS_RPC_NAME_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
718 : {
719 0 : struct DNS_RPC_NAME *object = pytalloc_get_ptr(py_obj);
720 0 : PyObject *ret;
721 0 : char *retstr;
722 :
723 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);
724 0 : ret = PyUnicode_FromString(retstr);
725 0 : talloc_free(retstr);
726 :
727 0 : return ret;
728 : }
729 :
730 : static PyMethodDef py_DNS_RPC_NAME_methods[] = {
731 : { "__ndr_pack__", (PyCFunction)py_DNS_RPC_NAME_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
732 : { "__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" },
733 : { "__ndr_print__", (PyCFunction)py_DNS_RPC_NAME_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
734 : { NULL, NULL, 0, NULL }
735 : };
736 :
737 :
738 : static PyTypeObject DNS_RPC_NAME_Type = {
739 : PyVarObject_HEAD_INIT(NULL, 0)
740 : .tp_name = "dnsserver.DNS_RPC_NAME",
741 : .tp_getset = py_DNS_RPC_NAME_getsetters,
742 : .tp_methods = py_DNS_RPC_NAME_methods,
743 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
744 : .tp_new = py_DNS_RPC_NAME_new,
745 : };
746 :
747 :
748 0 : static PyObject *py_DNS_RPC_NODE_get_wLength(PyObject *obj, void *closure)
749 : {
750 0 : struct DNS_RPC_NODE *object = pytalloc_get_ptr(obj);
751 0 : PyObject *py_wLength;
752 0 : py_wLength = PyLong_FromLong((uint16_t)(object->wLength));
753 0 : return py_wLength;
754 : }
755 :
756 0 : static int py_DNS_RPC_NODE_set_wLength(PyObject *py_obj, PyObject *value, void *closure)
757 : {
758 0 : struct DNS_RPC_NODE *object = pytalloc_get_ptr(py_obj);
759 0 : if (value == NULL) {
760 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->wLength");
761 0 : return -1;
762 : }
763 : {
764 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wLength));
765 0 : if (PyLong_Check(value)) {
766 0 : unsigned long long test_var;
767 0 : test_var = PyLong_AsUnsignedLongLong(value);
768 0 : if (PyErr_Occurred() != NULL) {
769 0 : return -1;
770 : }
771 0 : if (test_var > uint_max) {
772 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
773 : PyLong_Type.tp_name, uint_max, test_var);
774 0 : return -1;
775 : }
776 0 : object->wLength = test_var;
777 : } else {
778 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
779 : PyLong_Type.tp_name);
780 0 : return -1;
781 : }
782 : }
783 0 : return 0;
784 : }
785 :
786 0 : static PyObject *py_DNS_RPC_NODE_get_wRecordCount(PyObject *obj, void *closure)
787 : {
788 0 : struct DNS_RPC_NODE *object = pytalloc_get_ptr(obj);
789 0 : PyObject *py_wRecordCount;
790 0 : py_wRecordCount = PyLong_FromLong((uint16_t)(object->wRecordCount));
791 0 : return py_wRecordCount;
792 : }
793 :
794 0 : static int py_DNS_RPC_NODE_set_wRecordCount(PyObject *py_obj, PyObject *value, void *closure)
795 : {
796 0 : struct DNS_RPC_NODE *object = pytalloc_get_ptr(py_obj);
797 0 : if (value == NULL) {
798 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->wRecordCount");
799 0 : return -1;
800 : }
801 : {
802 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wRecordCount));
803 0 : if (PyLong_Check(value)) {
804 0 : unsigned long long test_var;
805 0 : test_var = PyLong_AsUnsignedLongLong(value);
806 0 : if (PyErr_Occurred() != NULL) {
807 0 : return -1;
808 : }
809 0 : if (test_var > uint_max) {
810 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
811 : PyLong_Type.tp_name, uint_max, test_var);
812 0 : return -1;
813 : }
814 0 : object->wRecordCount = test_var;
815 : } else {
816 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
817 : PyLong_Type.tp_name);
818 0 : return -1;
819 : }
820 : }
821 0 : return 0;
822 : }
823 :
824 0 : static PyObject *py_DNS_RPC_NODE_get_dwFlags(PyObject *obj, void *closure)
825 : {
826 0 : struct DNS_RPC_NODE *object = pytalloc_get_ptr(obj);
827 0 : PyObject *py_dwFlags;
828 0 : py_dwFlags = PyLong_FromUnsignedLongLong((uint32_t)(object->dwFlags));
829 0 : return py_dwFlags;
830 : }
831 :
832 0 : static int py_DNS_RPC_NODE_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
833 : {
834 0 : struct DNS_RPC_NODE *object = pytalloc_get_ptr(py_obj);
835 0 : if (value == NULL) {
836 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwFlags");
837 0 : return -1;
838 : }
839 : {
840 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwFlags));
841 0 : if (PyLong_Check(value)) {
842 0 : unsigned long long test_var;
843 0 : test_var = PyLong_AsUnsignedLongLong(value);
844 0 : if (PyErr_Occurred() != NULL) {
845 0 : return -1;
846 : }
847 0 : if (test_var > uint_max) {
848 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
849 : PyLong_Type.tp_name, uint_max, test_var);
850 0 : return -1;
851 : }
852 0 : object->dwFlags = test_var;
853 : } else {
854 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
855 : PyLong_Type.tp_name);
856 0 : return -1;
857 : }
858 : }
859 0 : return 0;
860 : }
861 :
862 0 : static PyObject *py_DNS_RPC_NODE_get_dwChildCount(PyObject *obj, void *closure)
863 : {
864 0 : struct DNS_RPC_NODE *object = pytalloc_get_ptr(obj);
865 0 : PyObject *py_dwChildCount;
866 0 : py_dwChildCount = PyLong_FromUnsignedLongLong((uint32_t)(object->dwChildCount));
867 0 : return py_dwChildCount;
868 : }
869 :
870 0 : static int py_DNS_RPC_NODE_set_dwChildCount(PyObject *py_obj, PyObject *value, void *closure)
871 : {
872 0 : struct DNS_RPC_NODE *object = pytalloc_get_ptr(py_obj);
873 0 : if (value == NULL) {
874 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwChildCount");
875 0 : return -1;
876 : }
877 : {
878 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwChildCount));
879 0 : if (PyLong_Check(value)) {
880 0 : unsigned long long test_var;
881 0 : test_var = PyLong_AsUnsignedLongLong(value);
882 0 : if (PyErr_Occurred() != NULL) {
883 0 : return -1;
884 : }
885 0 : if (test_var > uint_max) {
886 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
887 : PyLong_Type.tp_name, uint_max, test_var);
888 0 : return -1;
889 : }
890 0 : object->dwChildCount = test_var;
891 : } else {
892 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
893 : PyLong_Type.tp_name);
894 0 : return -1;
895 : }
896 : }
897 0 : return 0;
898 : }
899 :
900 0 : static PyObject *py_DNS_RPC_NODE_get_dnsNodeName(PyObject *obj, void *closure)
901 : {
902 0 : struct DNS_RPC_NODE *object = pytalloc_get_ptr(obj);
903 0 : PyObject *py_dnsNodeName;
904 0 : py_dnsNodeName = pytalloc_reference_ex(&DNS_RPC_NAME_Type, pytalloc_get_mem_ctx(obj), &object->dnsNodeName);
905 0 : return py_dnsNodeName;
906 : }
907 :
908 0 : static int py_DNS_RPC_NODE_set_dnsNodeName(PyObject *py_obj, PyObject *value, void *closure)
909 : {
910 0 : struct DNS_RPC_NODE *object = pytalloc_get_ptr(py_obj);
911 0 : if (value == NULL) {
912 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dnsNodeName");
913 0 : return -1;
914 : }
915 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, value, return -1;);
916 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
917 0 : PyErr_NoMemory();
918 0 : return -1;
919 : }
920 0 : object->dnsNodeName = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(value);
921 0 : return 0;
922 : }
923 :
924 : static PyGetSetDef py_DNS_RPC_NODE_getsetters[] = {
925 : {
926 : .name = discard_const_p(char, "wLength"),
927 : .get = py_DNS_RPC_NODE_get_wLength,
928 : .set = py_DNS_RPC_NODE_set_wLength,
929 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
930 : },
931 : {
932 : .name = discard_const_p(char, "wRecordCount"),
933 : .get = py_DNS_RPC_NODE_get_wRecordCount,
934 : .set = py_DNS_RPC_NODE_set_wRecordCount,
935 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
936 : },
937 : {
938 : .name = discard_const_p(char, "dwFlags"),
939 : .get = py_DNS_RPC_NODE_get_dwFlags,
940 : .set = py_DNS_RPC_NODE_set_dwFlags,
941 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
942 : },
943 : {
944 : .name = discard_const_p(char, "dwChildCount"),
945 : .get = py_DNS_RPC_NODE_get_dwChildCount,
946 : .set = py_DNS_RPC_NODE_set_dwChildCount,
947 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
948 : },
949 : {
950 : .name = discard_const_p(char, "dnsNodeName"),
951 : .get = py_DNS_RPC_NODE_get_dnsNodeName,
952 : .set = py_DNS_RPC_NODE_set_dnsNodeName,
953 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_NAME")
954 : },
955 : { .name = NULL }
956 : };
957 :
958 0 : static PyObject *py_DNS_RPC_NODE_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
959 : {
960 0 : return pytalloc_new(struct DNS_RPC_NODE, type);
961 : }
962 :
963 :
964 : static PyTypeObject DNS_RPC_NODE_Type = {
965 : PyVarObject_HEAD_INIT(NULL, 0)
966 : .tp_name = "dnsserver.DNS_RPC_NODE",
967 : .tp_getset = py_DNS_RPC_NODE_getsetters,
968 : .tp_methods = NULL,
969 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
970 : .tp_new = py_DNS_RPC_NODE_new,
971 : };
972 :
973 :
974 0 : static PyObject *py_DNS_RPC_RECORD_SOA_get_dwSerialNo(PyObject *obj, void *closure)
975 : {
976 0 : struct DNS_RPC_RECORD_SOA *object = pytalloc_get_ptr(obj);
977 0 : PyObject *py_dwSerialNo;
978 0 : py_dwSerialNo = PyLong_FromUnsignedLongLong((uint32_t)(object->dwSerialNo));
979 0 : return py_dwSerialNo;
980 : }
981 :
982 0 : static int py_DNS_RPC_RECORD_SOA_set_dwSerialNo(PyObject *py_obj, PyObject *value, void *closure)
983 : {
984 0 : struct DNS_RPC_RECORD_SOA *object = pytalloc_get_ptr(py_obj);
985 0 : if (value == NULL) {
986 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwSerialNo");
987 0 : return -1;
988 : }
989 : {
990 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwSerialNo));
991 0 : if (PyLong_Check(value)) {
992 0 : unsigned long long test_var;
993 0 : test_var = PyLong_AsUnsignedLongLong(value);
994 0 : if (PyErr_Occurred() != NULL) {
995 0 : return -1;
996 : }
997 0 : if (test_var > uint_max) {
998 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
999 : PyLong_Type.tp_name, uint_max, test_var);
1000 0 : return -1;
1001 : }
1002 0 : object->dwSerialNo = test_var;
1003 : } else {
1004 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1005 : PyLong_Type.tp_name);
1006 0 : return -1;
1007 : }
1008 : }
1009 0 : return 0;
1010 : }
1011 :
1012 0 : static PyObject *py_DNS_RPC_RECORD_SOA_get_dwRefresh(PyObject *obj, void *closure)
1013 : {
1014 0 : struct DNS_RPC_RECORD_SOA *object = pytalloc_get_ptr(obj);
1015 0 : PyObject *py_dwRefresh;
1016 0 : py_dwRefresh = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRefresh));
1017 0 : return py_dwRefresh;
1018 : }
1019 :
1020 0 : static int py_DNS_RPC_RECORD_SOA_set_dwRefresh(PyObject *py_obj, PyObject *value, void *closure)
1021 : {
1022 0 : struct DNS_RPC_RECORD_SOA *object = pytalloc_get_ptr(py_obj);
1023 0 : if (value == NULL) {
1024 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRefresh");
1025 0 : return -1;
1026 : }
1027 : {
1028 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRefresh));
1029 0 : if (PyLong_Check(value)) {
1030 0 : unsigned long long test_var;
1031 0 : test_var = PyLong_AsUnsignedLongLong(value);
1032 0 : if (PyErr_Occurred() != NULL) {
1033 0 : return -1;
1034 : }
1035 0 : if (test_var > uint_max) {
1036 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1037 : PyLong_Type.tp_name, uint_max, test_var);
1038 0 : return -1;
1039 : }
1040 0 : object->dwRefresh = test_var;
1041 : } else {
1042 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1043 : PyLong_Type.tp_name);
1044 0 : return -1;
1045 : }
1046 : }
1047 0 : return 0;
1048 : }
1049 :
1050 0 : static PyObject *py_DNS_RPC_RECORD_SOA_get_dwRetry(PyObject *obj, void *closure)
1051 : {
1052 0 : struct DNS_RPC_RECORD_SOA *object = pytalloc_get_ptr(obj);
1053 0 : PyObject *py_dwRetry;
1054 0 : py_dwRetry = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRetry));
1055 0 : return py_dwRetry;
1056 : }
1057 :
1058 0 : static int py_DNS_RPC_RECORD_SOA_set_dwRetry(PyObject *py_obj, PyObject *value, void *closure)
1059 : {
1060 0 : struct DNS_RPC_RECORD_SOA *object = pytalloc_get_ptr(py_obj);
1061 0 : if (value == NULL) {
1062 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRetry");
1063 0 : return -1;
1064 : }
1065 : {
1066 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRetry));
1067 0 : if (PyLong_Check(value)) {
1068 0 : unsigned long long test_var;
1069 0 : test_var = PyLong_AsUnsignedLongLong(value);
1070 0 : if (PyErr_Occurred() != NULL) {
1071 0 : return -1;
1072 : }
1073 0 : if (test_var > uint_max) {
1074 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1075 : PyLong_Type.tp_name, uint_max, test_var);
1076 0 : return -1;
1077 : }
1078 0 : object->dwRetry = test_var;
1079 : } else {
1080 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1081 : PyLong_Type.tp_name);
1082 0 : return -1;
1083 : }
1084 : }
1085 0 : return 0;
1086 : }
1087 :
1088 0 : static PyObject *py_DNS_RPC_RECORD_SOA_get_dwExpire(PyObject *obj, void *closure)
1089 : {
1090 0 : struct DNS_RPC_RECORD_SOA *object = pytalloc_get_ptr(obj);
1091 0 : PyObject *py_dwExpire;
1092 0 : py_dwExpire = PyLong_FromUnsignedLongLong((uint32_t)(object->dwExpire));
1093 0 : return py_dwExpire;
1094 : }
1095 :
1096 0 : static int py_DNS_RPC_RECORD_SOA_set_dwExpire(PyObject *py_obj, PyObject *value, void *closure)
1097 : {
1098 0 : struct DNS_RPC_RECORD_SOA *object = pytalloc_get_ptr(py_obj);
1099 0 : if (value == NULL) {
1100 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwExpire");
1101 0 : return -1;
1102 : }
1103 : {
1104 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwExpire));
1105 0 : if (PyLong_Check(value)) {
1106 0 : unsigned long long test_var;
1107 0 : test_var = PyLong_AsUnsignedLongLong(value);
1108 0 : if (PyErr_Occurred() != NULL) {
1109 0 : return -1;
1110 : }
1111 0 : if (test_var > uint_max) {
1112 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1113 : PyLong_Type.tp_name, uint_max, test_var);
1114 0 : return -1;
1115 : }
1116 0 : object->dwExpire = test_var;
1117 : } else {
1118 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1119 : PyLong_Type.tp_name);
1120 0 : return -1;
1121 : }
1122 : }
1123 0 : return 0;
1124 : }
1125 :
1126 0 : static PyObject *py_DNS_RPC_RECORD_SOA_get_dwMinimumTtl(PyObject *obj, void *closure)
1127 : {
1128 0 : struct DNS_RPC_RECORD_SOA *object = pytalloc_get_ptr(obj);
1129 0 : PyObject *py_dwMinimumTtl;
1130 0 : py_dwMinimumTtl = PyLong_FromUnsignedLongLong((uint32_t)(object->dwMinimumTtl));
1131 0 : return py_dwMinimumTtl;
1132 : }
1133 :
1134 0 : static int py_DNS_RPC_RECORD_SOA_set_dwMinimumTtl(PyObject *py_obj, PyObject *value, void *closure)
1135 : {
1136 0 : struct DNS_RPC_RECORD_SOA *object = pytalloc_get_ptr(py_obj);
1137 0 : if (value == NULL) {
1138 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwMinimumTtl");
1139 0 : return -1;
1140 : }
1141 : {
1142 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwMinimumTtl));
1143 0 : if (PyLong_Check(value)) {
1144 0 : unsigned long long test_var;
1145 0 : test_var = PyLong_AsUnsignedLongLong(value);
1146 0 : if (PyErr_Occurred() != NULL) {
1147 0 : return -1;
1148 : }
1149 0 : if (test_var > uint_max) {
1150 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1151 : PyLong_Type.tp_name, uint_max, test_var);
1152 0 : return -1;
1153 : }
1154 0 : object->dwMinimumTtl = test_var;
1155 : } else {
1156 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1157 : PyLong_Type.tp_name);
1158 0 : return -1;
1159 : }
1160 : }
1161 0 : return 0;
1162 : }
1163 :
1164 0 : static PyObject *py_DNS_RPC_RECORD_SOA_get_NamePrimaryServer(PyObject *obj, void *closure)
1165 : {
1166 0 : struct DNS_RPC_RECORD_SOA *object = pytalloc_get_ptr(obj);
1167 0 : PyObject *py_NamePrimaryServer;
1168 0 : py_NamePrimaryServer = pytalloc_reference_ex(&DNS_RPC_NAME_Type, pytalloc_get_mem_ctx(obj), &object->NamePrimaryServer);
1169 0 : return py_NamePrimaryServer;
1170 : }
1171 :
1172 0 : static int py_DNS_RPC_RECORD_SOA_set_NamePrimaryServer(PyObject *py_obj, PyObject *value, void *closure)
1173 : {
1174 0 : struct DNS_RPC_RECORD_SOA *object = pytalloc_get_ptr(py_obj);
1175 0 : if (value == NULL) {
1176 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->NamePrimaryServer");
1177 0 : return -1;
1178 : }
1179 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, value, return -1;);
1180 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
1181 0 : PyErr_NoMemory();
1182 0 : return -1;
1183 : }
1184 0 : object->NamePrimaryServer = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(value);
1185 0 : return 0;
1186 : }
1187 :
1188 0 : static PyObject *py_DNS_RPC_RECORD_SOA_get_ZoneAdministratorEmail(PyObject *obj, void *closure)
1189 : {
1190 0 : struct DNS_RPC_RECORD_SOA *object = pytalloc_get_ptr(obj);
1191 0 : PyObject *py_ZoneAdministratorEmail;
1192 0 : py_ZoneAdministratorEmail = pytalloc_reference_ex(&DNS_RPC_NAME_Type, pytalloc_get_mem_ctx(obj), &object->ZoneAdministratorEmail);
1193 0 : return py_ZoneAdministratorEmail;
1194 : }
1195 :
1196 0 : static int py_DNS_RPC_RECORD_SOA_set_ZoneAdministratorEmail(PyObject *py_obj, PyObject *value, void *closure)
1197 : {
1198 0 : struct DNS_RPC_RECORD_SOA *object = pytalloc_get_ptr(py_obj);
1199 0 : if (value == NULL) {
1200 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ZoneAdministratorEmail");
1201 0 : return -1;
1202 : }
1203 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, value, return -1;);
1204 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
1205 0 : PyErr_NoMemory();
1206 0 : return -1;
1207 : }
1208 0 : object->ZoneAdministratorEmail = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(value);
1209 0 : return 0;
1210 : }
1211 :
1212 : static PyGetSetDef py_DNS_RPC_RECORD_SOA_getsetters[] = {
1213 : {
1214 : .name = discard_const_p(char, "dwSerialNo"),
1215 : .get = py_DNS_RPC_RECORD_SOA_get_dwSerialNo,
1216 : .set = py_DNS_RPC_RECORD_SOA_set_dwSerialNo,
1217 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
1218 : },
1219 : {
1220 : .name = discard_const_p(char, "dwRefresh"),
1221 : .get = py_DNS_RPC_RECORD_SOA_get_dwRefresh,
1222 : .set = py_DNS_RPC_RECORD_SOA_set_dwRefresh,
1223 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
1224 : },
1225 : {
1226 : .name = discard_const_p(char, "dwRetry"),
1227 : .get = py_DNS_RPC_RECORD_SOA_get_dwRetry,
1228 : .set = py_DNS_RPC_RECORD_SOA_set_dwRetry,
1229 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
1230 : },
1231 : {
1232 : .name = discard_const_p(char, "dwExpire"),
1233 : .get = py_DNS_RPC_RECORD_SOA_get_dwExpire,
1234 : .set = py_DNS_RPC_RECORD_SOA_set_dwExpire,
1235 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
1236 : },
1237 : {
1238 : .name = discard_const_p(char, "dwMinimumTtl"),
1239 : .get = py_DNS_RPC_RECORD_SOA_get_dwMinimumTtl,
1240 : .set = py_DNS_RPC_RECORD_SOA_set_dwMinimumTtl,
1241 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
1242 : },
1243 : {
1244 : .name = discard_const_p(char, "NamePrimaryServer"),
1245 : .get = py_DNS_RPC_RECORD_SOA_get_NamePrimaryServer,
1246 : .set = py_DNS_RPC_RECORD_SOA_set_NamePrimaryServer,
1247 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_NAME")
1248 : },
1249 : {
1250 : .name = discard_const_p(char, "ZoneAdministratorEmail"),
1251 : .get = py_DNS_RPC_RECORD_SOA_get_ZoneAdministratorEmail,
1252 : .set = py_DNS_RPC_RECORD_SOA_set_ZoneAdministratorEmail,
1253 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_NAME")
1254 : },
1255 : { .name = NULL }
1256 : };
1257 :
1258 0 : static PyObject *py_DNS_RPC_RECORD_SOA_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1259 : {
1260 0 : return pytalloc_new(struct DNS_RPC_RECORD_SOA, type);
1261 : }
1262 :
1263 :
1264 : static PyTypeObject DNS_RPC_RECORD_SOA_Type = {
1265 : PyVarObject_HEAD_INIT(NULL, 0)
1266 : .tp_name = "dnsserver.DNS_RPC_RECORD_SOA",
1267 : .tp_getset = py_DNS_RPC_RECORD_SOA_getsetters,
1268 : .tp_methods = NULL,
1269 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1270 : .tp_new = py_DNS_RPC_RECORD_SOA_new,
1271 : };
1272 :
1273 :
1274 43 : static PyObject *py_DNS_RPC_RECORD_NAME_PREFERENCE_get_wPreference(PyObject *obj, void *closure)
1275 : {
1276 43 : struct DNS_RPC_RECORD_NAME_PREFERENCE *object = pytalloc_get_ptr(obj);
1277 0 : PyObject *py_wPreference;
1278 43 : py_wPreference = PyLong_FromLong((uint16_t)(object->wPreference));
1279 43 : return py_wPreference;
1280 : }
1281 :
1282 436 : static int py_DNS_RPC_RECORD_NAME_PREFERENCE_set_wPreference(PyObject *py_obj, PyObject *value, void *closure)
1283 : {
1284 436 : struct DNS_RPC_RECORD_NAME_PREFERENCE *object = pytalloc_get_ptr(py_obj);
1285 436 : if (value == NULL) {
1286 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->wPreference");
1287 0 : return -1;
1288 : }
1289 : {
1290 436 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wPreference));
1291 436 : if (PyLong_Check(value)) {
1292 0 : unsigned long long test_var;
1293 436 : test_var = PyLong_AsUnsignedLongLong(value);
1294 436 : if (PyErr_Occurred() != NULL) {
1295 3 : return -1;
1296 : }
1297 433 : if (test_var > uint_max) {
1298 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1299 : PyLong_Type.tp_name, uint_max, test_var);
1300 0 : return -1;
1301 : }
1302 433 : object->wPreference = test_var;
1303 : } else {
1304 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1305 : PyLong_Type.tp_name);
1306 0 : return -1;
1307 : }
1308 : }
1309 433 : return 0;
1310 : }
1311 :
1312 909 : static PyObject *py_DNS_RPC_RECORD_NAME_PREFERENCE_get_nameExchange(PyObject *obj, void *closure)
1313 : {
1314 909 : struct DNS_RPC_RECORD_NAME_PREFERENCE *object = pytalloc_get_ptr(obj);
1315 0 : PyObject *py_nameExchange;
1316 909 : py_nameExchange = pytalloc_reference_ex(&DNS_RPC_NAME_Type, pytalloc_get_mem_ctx(obj), &object->nameExchange);
1317 909 : return py_nameExchange;
1318 : }
1319 :
1320 0 : static int py_DNS_RPC_RECORD_NAME_PREFERENCE_set_nameExchange(PyObject *py_obj, PyObject *value, void *closure)
1321 : {
1322 0 : struct DNS_RPC_RECORD_NAME_PREFERENCE *object = pytalloc_get_ptr(py_obj);
1323 0 : if (value == NULL) {
1324 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->nameExchange");
1325 0 : return -1;
1326 : }
1327 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, value, return -1;);
1328 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
1329 0 : PyErr_NoMemory();
1330 0 : return -1;
1331 : }
1332 0 : object->nameExchange = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(value);
1333 0 : return 0;
1334 : }
1335 :
1336 : static PyGetSetDef py_DNS_RPC_RECORD_NAME_PREFERENCE_getsetters[] = {
1337 : {
1338 : .name = discard_const_p(char, "wPreference"),
1339 : .get = py_DNS_RPC_RECORD_NAME_PREFERENCE_get_wPreference,
1340 : .set = py_DNS_RPC_RECORD_NAME_PREFERENCE_set_wPreference,
1341 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
1342 : },
1343 : {
1344 : .name = discard_const_p(char, "nameExchange"),
1345 : .get = py_DNS_RPC_RECORD_NAME_PREFERENCE_get_nameExchange,
1346 : .set = py_DNS_RPC_RECORD_NAME_PREFERENCE_set_nameExchange,
1347 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_NAME")
1348 : },
1349 : { .name = NULL }
1350 : };
1351 :
1352 436 : static PyObject *py_DNS_RPC_RECORD_NAME_PREFERENCE_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1353 : {
1354 436 : return pytalloc_new(struct DNS_RPC_RECORD_NAME_PREFERENCE, type);
1355 : }
1356 :
1357 :
1358 : static PyTypeObject DNS_RPC_RECORD_NAME_PREFERENCE_Type = {
1359 : PyVarObject_HEAD_INIT(NULL, 0)
1360 : .tp_name = "dnsserver.DNS_RPC_RECORD_NAME_PREFERENCE",
1361 : .tp_getset = py_DNS_RPC_RECORD_NAME_PREFERENCE_getsetters,
1362 : .tp_methods = NULL,
1363 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1364 : .tp_new = py_DNS_RPC_RECORD_NAME_PREFERENCE_new,
1365 : };
1366 :
1367 :
1368 68 : static PyObject *py_DNS_RPC_RECORD_STRING_get_count(PyObject *obj, void *closure)
1369 : {
1370 68 : struct DNS_RPC_RECORD_STRING *object = pytalloc_get_ptr(obj);
1371 0 : PyObject *py_count;
1372 68 : py_count = PyLong_FromLong((uint16_t)(object->count));
1373 68 : return py_count;
1374 : }
1375 :
1376 371 : static int py_DNS_RPC_RECORD_STRING_set_count(PyObject *py_obj, PyObject *value, void *closure)
1377 : {
1378 371 : struct DNS_RPC_RECORD_STRING *object = pytalloc_get_ptr(py_obj);
1379 371 : if (value == NULL) {
1380 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
1381 0 : return -1;
1382 : }
1383 : {
1384 371 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
1385 371 : if (PyLong_Check(value)) {
1386 0 : unsigned long long test_var;
1387 371 : test_var = PyLong_AsUnsignedLongLong(value);
1388 371 : if (PyErr_Occurred() != NULL) {
1389 0 : return -1;
1390 : }
1391 371 : if (test_var > uint_max) {
1392 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1393 : PyLong_Type.tp_name, uint_max, test_var);
1394 0 : return -1;
1395 : }
1396 371 : object->count = test_var;
1397 : } else {
1398 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1399 : PyLong_Type.tp_name);
1400 0 : return -1;
1401 : }
1402 : }
1403 371 : return 0;
1404 : }
1405 :
1406 89 : static PyObject *py_DNS_RPC_RECORD_STRING_get_str(PyObject *obj, void *closure)
1407 : {
1408 89 : struct DNS_RPC_RECORD_STRING *object = pytalloc_get_ptr(obj);
1409 0 : PyObject *py_str;
1410 89 : py_str = PyList_New(object->count);
1411 89 : if (py_str == NULL) {
1412 0 : return NULL;
1413 : }
1414 : {
1415 : int str_cntr_0;
1416 288 : for (str_cntr_0 = 0; str_cntr_0 < (object->count); str_cntr_0++) {
1417 0 : PyObject *py_str_0;
1418 199 : py_str_0 = pytalloc_reference_ex(&DNS_RPC_NAME_Type, object->str, &(object->str)[str_cntr_0]);
1419 199 : PyList_SetItem(py_str, str_cntr_0, py_str_0);
1420 : }
1421 : }
1422 89 : return py_str;
1423 : }
1424 :
1425 371 : static int py_DNS_RPC_RECORD_STRING_set_str(PyObject *py_obj, PyObject *value, void *closure)
1426 : {
1427 371 : struct DNS_RPC_RECORD_STRING *object = pytalloc_get_ptr(py_obj);
1428 371 : if (value == NULL) {
1429 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->str");
1430 0 : return -1;
1431 : }
1432 371 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
1433 : {
1434 0 : int str_cntr_0;
1435 371 : object->str = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->str, PyList_GET_SIZE(value));
1436 371 : if (!object->str) { return -1; }
1437 371 : talloc_set_name_const(object->str, "ARRAY: object->str");
1438 765 : for (str_cntr_0 = 0; str_cntr_0 < PyList_GET_SIZE(value); str_cntr_0++) {
1439 394 : if (PyList_GET_ITEM(value, str_cntr_0) == NULL) {
1440 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->str)[str_cntr_0]");
1441 0 : return -1;
1442 : }
1443 394 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, PyList_GET_ITEM(value, str_cntr_0), return -1;);
1444 394 : if (talloc_reference(object->str, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, str_cntr_0))) == NULL) {
1445 0 : PyErr_NoMemory();
1446 0 : return -1;
1447 : }
1448 394 : (object->str)[str_cntr_0] = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(PyList_GET_ITEM(value, str_cntr_0));
1449 : }
1450 : }
1451 371 : return 0;
1452 : }
1453 :
1454 : static PyGetSetDef py_DNS_RPC_RECORD_STRING_getsetters[] = {
1455 : {
1456 : .name = discard_const_p(char, "count"),
1457 : .get = py_DNS_RPC_RECORD_STRING_get_count,
1458 : .set = py_DNS_RPC_RECORD_STRING_set_count,
1459 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
1460 : },
1461 : {
1462 : .name = discard_const_p(char, "str"),
1463 : .get = py_DNS_RPC_RECORD_STRING_get_str,
1464 : .set = py_DNS_RPC_RECORD_STRING_set_str,
1465 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_NAME")
1466 : },
1467 : { .name = NULL }
1468 : };
1469 :
1470 371 : static PyObject *py_DNS_RPC_RECORD_STRING_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1471 : {
1472 371 : return pytalloc_new(struct DNS_RPC_RECORD_STRING, type);
1473 : }
1474 :
1475 :
1476 : static PyTypeObject DNS_RPC_RECORD_STRING_Type = {
1477 : PyVarObject_HEAD_INIT(NULL, 0)
1478 : .tp_name = "dnsserver.DNS_RPC_RECORD_STRING",
1479 : .tp_getset = py_DNS_RPC_RECORD_STRING_getsetters,
1480 : .tp_methods = NULL,
1481 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1482 : .tp_new = py_DNS_RPC_RECORD_STRING_new,
1483 : };
1484 :
1485 :
1486 85 : static PyObject *py_DNS_RPC_RECORD_SRV_get_wPriority(PyObject *obj, void *closure)
1487 : {
1488 85 : struct DNS_RPC_RECORD_SRV *object = pytalloc_get_ptr(obj);
1489 0 : PyObject *py_wPriority;
1490 85 : py_wPriority = PyLong_FromLong((uint16_t)(object->wPriority));
1491 85 : return py_wPriority;
1492 : }
1493 :
1494 591 : static int py_DNS_RPC_RECORD_SRV_set_wPriority(PyObject *py_obj, PyObject *value, void *closure)
1495 : {
1496 591 : struct DNS_RPC_RECORD_SRV *object = pytalloc_get_ptr(py_obj);
1497 591 : if (value == NULL) {
1498 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->wPriority");
1499 0 : return -1;
1500 : }
1501 : {
1502 591 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wPriority));
1503 591 : if (PyLong_Check(value)) {
1504 0 : unsigned long long test_var;
1505 591 : test_var = PyLong_AsUnsignedLongLong(value);
1506 591 : if (PyErr_Occurred() != NULL) {
1507 0 : return -1;
1508 : }
1509 591 : if (test_var > uint_max) {
1510 3 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1511 : PyLong_Type.tp_name, uint_max, test_var);
1512 3 : return -1;
1513 : }
1514 588 : object->wPriority = test_var;
1515 : } else {
1516 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1517 : PyLong_Type.tp_name);
1518 0 : return -1;
1519 : }
1520 : }
1521 588 : return 0;
1522 : }
1523 :
1524 83 : static PyObject *py_DNS_RPC_RECORD_SRV_get_wWeight(PyObject *obj, void *closure)
1525 : {
1526 83 : struct DNS_RPC_RECORD_SRV *object = pytalloc_get_ptr(obj);
1527 0 : PyObject *py_wWeight;
1528 83 : py_wWeight = PyLong_FromLong((uint16_t)(object->wWeight));
1529 83 : return py_wWeight;
1530 : }
1531 :
1532 588 : static int py_DNS_RPC_RECORD_SRV_set_wWeight(PyObject *py_obj, PyObject *value, void *closure)
1533 : {
1534 588 : struct DNS_RPC_RECORD_SRV *object = pytalloc_get_ptr(py_obj);
1535 588 : if (value == NULL) {
1536 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->wWeight");
1537 0 : return -1;
1538 : }
1539 : {
1540 588 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wWeight));
1541 588 : if (PyLong_Check(value)) {
1542 0 : unsigned long long test_var;
1543 588 : test_var = PyLong_AsUnsignedLongLong(value);
1544 588 : if (PyErr_Occurred() != NULL) {
1545 0 : return -1;
1546 : }
1547 588 : if (test_var > uint_max) {
1548 3 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1549 : PyLong_Type.tp_name, uint_max, test_var);
1550 3 : return -1;
1551 : }
1552 585 : object->wWeight = test_var;
1553 : } else {
1554 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1555 : PyLong_Type.tp_name);
1556 0 : return -1;
1557 : }
1558 : }
1559 585 : return 0;
1560 : }
1561 :
1562 83 : static PyObject *py_DNS_RPC_RECORD_SRV_get_wPort(PyObject *obj, void *closure)
1563 : {
1564 83 : struct DNS_RPC_RECORD_SRV *object = pytalloc_get_ptr(obj);
1565 0 : PyObject *py_wPort;
1566 83 : py_wPort = PyLong_FromLong((uint16_t)(object->wPort));
1567 83 : return py_wPort;
1568 : }
1569 :
1570 585 : static int py_DNS_RPC_RECORD_SRV_set_wPort(PyObject *py_obj, PyObject *value, void *closure)
1571 : {
1572 585 : struct DNS_RPC_RECORD_SRV *object = pytalloc_get_ptr(py_obj);
1573 585 : if (value == NULL) {
1574 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->wPort");
1575 0 : return -1;
1576 : }
1577 : {
1578 585 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wPort));
1579 585 : if (PyLong_Check(value)) {
1580 0 : unsigned long long test_var;
1581 585 : test_var = PyLong_AsUnsignedLongLong(value);
1582 585 : if (PyErr_Occurred() != NULL) {
1583 0 : return -1;
1584 : }
1585 585 : if (test_var > uint_max) {
1586 3 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1587 : PyLong_Type.tp_name, uint_max, test_var);
1588 3 : return -1;
1589 : }
1590 582 : object->wPort = test_var;
1591 : } else {
1592 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1593 : PyLong_Type.tp_name);
1594 0 : return -1;
1595 : }
1596 : }
1597 582 : return 0;
1598 : }
1599 :
1600 1247 : static PyObject *py_DNS_RPC_RECORD_SRV_get_nameTarget(PyObject *obj, void *closure)
1601 : {
1602 1247 : struct DNS_RPC_RECORD_SRV *object = pytalloc_get_ptr(obj);
1603 0 : PyObject *py_nameTarget;
1604 1247 : py_nameTarget = pytalloc_reference_ex(&DNS_RPC_NAME_Type, pytalloc_get_mem_ctx(obj), &object->nameTarget);
1605 1247 : return py_nameTarget;
1606 : }
1607 :
1608 0 : static int py_DNS_RPC_RECORD_SRV_set_nameTarget(PyObject *py_obj, PyObject *value, void *closure)
1609 : {
1610 0 : struct DNS_RPC_RECORD_SRV *object = pytalloc_get_ptr(py_obj);
1611 0 : if (value == NULL) {
1612 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->nameTarget");
1613 0 : return -1;
1614 : }
1615 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, value, return -1;);
1616 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
1617 0 : PyErr_NoMemory();
1618 0 : return -1;
1619 : }
1620 0 : object->nameTarget = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(value);
1621 0 : return 0;
1622 : }
1623 :
1624 : static PyGetSetDef py_DNS_RPC_RECORD_SRV_getsetters[] = {
1625 : {
1626 : .name = discard_const_p(char, "wPriority"),
1627 : .get = py_DNS_RPC_RECORD_SRV_get_wPriority,
1628 : .set = py_DNS_RPC_RECORD_SRV_set_wPriority,
1629 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
1630 : },
1631 : {
1632 : .name = discard_const_p(char, "wWeight"),
1633 : .get = py_DNS_RPC_RECORD_SRV_get_wWeight,
1634 : .set = py_DNS_RPC_RECORD_SRV_set_wWeight,
1635 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
1636 : },
1637 : {
1638 : .name = discard_const_p(char, "wPort"),
1639 : .get = py_DNS_RPC_RECORD_SRV_get_wPort,
1640 : .set = py_DNS_RPC_RECORD_SRV_set_wPort,
1641 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
1642 : },
1643 : {
1644 : .name = discard_const_p(char, "nameTarget"),
1645 : .get = py_DNS_RPC_RECORD_SRV_get_nameTarget,
1646 : .set = py_DNS_RPC_RECORD_SRV_set_nameTarget,
1647 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_NAME")
1648 : },
1649 : { .name = NULL }
1650 : };
1651 :
1652 591 : static PyObject *py_DNS_RPC_RECORD_SRV_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1653 : {
1654 591 : return pytalloc_new(struct DNS_RPC_RECORD_SRV, type);
1655 : }
1656 :
1657 :
1658 : static PyTypeObject DNS_RPC_RECORD_SRV_Type = {
1659 : PyVarObject_HEAD_INIT(NULL, 0)
1660 : .tp_name = "dnsserver.DNS_RPC_RECORD_SRV",
1661 : .tp_getset = py_DNS_RPC_RECORD_SRV_getsetters,
1662 : .tp_methods = NULL,
1663 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1664 : .tp_new = py_DNS_RPC_RECORD_SRV_new,
1665 : };
1666 :
1667 766 : static PyObject *py_import_DNS_RPC_RECORD_DATA(TALLOC_CTX *mem_ctx, int level, union DNS_RPC_RECORD_DATA *in)
1668 : {
1669 0 : PyObject *ret;
1670 :
1671 766 : switch (level) {
1672 0 : case DNS_TYPE_TOMBSTONE:
1673 0 : ret = PyLong_FromUnsignedLongLong(in->EntombedTime);
1674 0 : return ret;
1675 :
1676 29 : case DNS_TYPE_A:
1677 29 : ret = PyString_FromStringOrNULL(in->ipv4);
1678 29 : return ret;
1679 :
1680 39 : case DNS_TYPE_NS:
1681 39 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
1682 39 : return ret;
1683 :
1684 0 : case DNS_TYPE_MD:
1685 0 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
1686 0 : return ret;
1687 :
1688 0 : case DNS_TYPE_MF:
1689 0 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
1690 0 : return ret;
1691 :
1692 45 : case DNS_TYPE_CNAME:
1693 45 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
1694 45 : return ret;
1695 :
1696 0 : case DNS_TYPE_SOA:
1697 0 : ret = pytalloc_reference_ex(&DNS_RPC_RECORD_SOA_Type, mem_ctx, &in->soa);
1698 0 : return ret;
1699 :
1700 0 : case DNS_TYPE_MB:
1701 0 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
1702 0 : return ret;
1703 :
1704 0 : case DNS_TYPE_MG:
1705 0 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
1706 0 : return ret;
1707 :
1708 0 : case DNS_TYPE_MR:
1709 0 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
1710 0 : return ret;
1711 :
1712 39 : case DNS_TYPE_PTR:
1713 39 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->ptr);
1714 39 : return ret;
1715 :
1716 0 : case DNS_TYPE_HINFO:
1717 0 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->hinfo);
1718 0 : return ret;
1719 :
1720 86 : case DNS_TYPE_MX:
1721 86 : ret = pytalloc_reference_ex(&DNS_RPC_RECORD_NAME_PREFERENCE_Type, mem_ctx, &in->mx);
1722 86 : return ret;
1723 :
1724 157 : case DNS_TYPE_TXT:
1725 157 : ret = pytalloc_reference_ex(&DNS_RPC_RECORD_STRING_Type, mem_ctx, &in->txt);
1726 157 : return ret;
1727 :
1728 37 : case DNS_TYPE_AAAA:
1729 37 : ret = PyString_FromStringOrNULL(in->ipv6);
1730 37 : return ret;
1731 :
1732 334 : case DNS_TYPE_SRV:
1733 334 : ret = pytalloc_reference_ex(&DNS_RPC_RECORD_SRV_Type, mem_ctx, &in->srv);
1734 334 : return ret;
1735 :
1736 0 : case DNS_TYPE_DNAME:
1737 0 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
1738 0 : return ret;
1739 :
1740 : }
1741 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
1742 0 : return NULL;
1743 : }
1744 :
1745 4215 : static union DNS_RPC_RECORD_DATA *py_export_DNS_RPC_RECORD_DATA(TALLOC_CTX *mem_ctx, int level, PyObject *in)
1746 : {
1747 4215 : union DNS_RPC_RECORD_DATA *ret = talloc_zero(mem_ctx, union DNS_RPC_RECORD_DATA);
1748 4215 : switch (level) {
1749 0 : case DNS_TYPE_TOMBSTONE:
1750 0 : if (in == NULL) {
1751 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->EntombedTime");
1752 0 : talloc_free(ret); return NULL;
1753 : }
1754 : {
1755 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->EntombedTime));
1756 0 : if (PyLong_Check(in)) {
1757 0 : unsigned long long test_var;
1758 0 : test_var = PyLong_AsUnsignedLongLong(in);
1759 0 : if (PyErr_Occurred() != NULL) {
1760 0 : talloc_free(ret); return NULL;
1761 : }
1762 0 : if (test_var > uint_max) {
1763 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1764 : PyLong_Type.tp_name, uint_max, test_var);
1765 0 : talloc_free(ret); return NULL;
1766 : }
1767 0 : ret->EntombedTime = test_var;
1768 : } else {
1769 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1770 : PyLong_Type.tp_name);
1771 0 : talloc_free(ret); return NULL;
1772 : }
1773 : }
1774 0 : break;
1775 :
1776 673 : case DNS_TYPE_A:
1777 673 : if (in == NULL) {
1778 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ipv4");
1779 0 : talloc_free(ret); return NULL;
1780 : }
1781 : {
1782 0 : const char *test_str;
1783 0 : const char *talloc_str;
1784 673 : PyObject *unicode = NULL;
1785 673 : if (PyUnicode_Check(in)) {
1786 673 : unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
1787 673 : if (unicode == NULL) {
1788 0 : talloc_free(ret); return NULL;
1789 : }
1790 673 : test_str = PyBytes_AS_STRING(unicode);
1791 0 : } else if (PyBytes_Check(in)) {
1792 0 : test_str = PyBytes_AS_STRING(in);
1793 : } else {
1794 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
1795 0 : talloc_free(ret); return NULL;
1796 : }
1797 673 : talloc_str = talloc_strdup(mem_ctx, test_str);
1798 673 : if (unicode != NULL) {
1799 506 : Py_DECREF(unicode);
1800 : }
1801 673 : if (talloc_str == NULL) {
1802 0 : PyErr_NoMemory();
1803 0 : talloc_free(ret); return NULL;
1804 : }
1805 673 : ret->ipv4 = talloc_str;
1806 : }
1807 673 : break;
1808 :
1809 480 : case DNS_TYPE_NS:
1810 480 : if (in == NULL) {
1811 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->name");
1812 0 : talloc_free(ret); return NULL;
1813 : }
1814 480 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1815 480 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1816 0 : PyErr_NoMemory();
1817 0 : talloc_free(ret); return NULL;
1818 : }
1819 480 : ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1820 480 : break;
1821 :
1822 0 : case DNS_TYPE_MD:
1823 0 : if (in == NULL) {
1824 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->name");
1825 0 : talloc_free(ret); return NULL;
1826 : }
1827 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1828 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1829 0 : PyErr_NoMemory();
1830 0 : talloc_free(ret); return NULL;
1831 : }
1832 0 : ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1833 0 : break;
1834 :
1835 0 : case DNS_TYPE_MF:
1836 0 : if (in == NULL) {
1837 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->name");
1838 0 : talloc_free(ret); return NULL;
1839 : }
1840 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1841 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1842 0 : PyErr_NoMemory();
1843 0 : talloc_free(ret); return NULL;
1844 : }
1845 0 : ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1846 0 : break;
1847 :
1848 442 : case DNS_TYPE_CNAME:
1849 442 : if (in == NULL) {
1850 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->name");
1851 0 : talloc_free(ret); return NULL;
1852 : }
1853 442 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1854 442 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1855 0 : PyErr_NoMemory();
1856 0 : talloc_free(ret); return NULL;
1857 : }
1858 442 : ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1859 442 : break;
1860 :
1861 0 : case DNS_TYPE_SOA:
1862 0 : if (in == NULL) {
1863 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->soa");
1864 0 : talloc_free(ret); return NULL;
1865 : }
1866 0 : PY_CHECK_TYPE(&DNS_RPC_RECORD_SOA_Type, in, talloc_free(ret); return NULL;);
1867 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1868 0 : PyErr_NoMemory();
1869 0 : talloc_free(ret); return NULL;
1870 : }
1871 0 : ret->soa = *(struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(in);
1872 0 : break;
1873 :
1874 0 : case DNS_TYPE_MB:
1875 0 : if (in == NULL) {
1876 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->name");
1877 0 : talloc_free(ret); return NULL;
1878 : }
1879 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1880 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1881 0 : PyErr_NoMemory();
1882 0 : talloc_free(ret); return NULL;
1883 : }
1884 0 : ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1885 0 : break;
1886 :
1887 0 : case DNS_TYPE_MG:
1888 0 : if (in == NULL) {
1889 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->name");
1890 0 : talloc_free(ret); return NULL;
1891 : }
1892 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1893 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1894 0 : PyErr_NoMemory();
1895 0 : talloc_free(ret); return NULL;
1896 : }
1897 0 : ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1898 0 : break;
1899 :
1900 0 : case DNS_TYPE_MR:
1901 0 : if (in == NULL) {
1902 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->name");
1903 0 : talloc_free(ret); return NULL;
1904 : }
1905 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1906 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1907 0 : PyErr_NoMemory();
1908 0 : talloc_free(ret); return NULL;
1909 : }
1910 0 : ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1911 0 : break;
1912 :
1913 474 : case DNS_TYPE_PTR:
1914 474 : if (in == NULL) {
1915 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ptr");
1916 0 : talloc_free(ret); return NULL;
1917 : }
1918 474 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1919 474 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1920 0 : PyErr_NoMemory();
1921 0 : talloc_free(ret); return NULL;
1922 : }
1923 474 : ret->ptr = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1924 474 : break;
1925 :
1926 0 : case DNS_TYPE_HINFO:
1927 0 : if (in == NULL) {
1928 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->hinfo");
1929 0 : talloc_free(ret); return NULL;
1930 : }
1931 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1932 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1933 0 : PyErr_NoMemory();
1934 0 : talloc_free(ret); return NULL;
1935 : }
1936 0 : ret->hinfo = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1937 0 : break;
1938 :
1939 433 : case DNS_TYPE_MX:
1940 433 : if (in == NULL) {
1941 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->mx");
1942 0 : talloc_free(ret); return NULL;
1943 : }
1944 433 : PY_CHECK_TYPE(&DNS_RPC_RECORD_NAME_PREFERENCE_Type, in, talloc_free(ret); return NULL;);
1945 433 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1946 0 : PyErr_NoMemory();
1947 0 : talloc_free(ret); return NULL;
1948 : }
1949 433 : ret->mx = *(struct DNS_RPC_RECORD_NAME_PREFERENCE *)pytalloc_get_ptr(in);
1950 433 : break;
1951 :
1952 371 : case DNS_TYPE_TXT:
1953 371 : if (in == NULL) {
1954 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->txt");
1955 0 : talloc_free(ret); return NULL;
1956 : }
1957 371 : PY_CHECK_TYPE(&DNS_RPC_RECORD_STRING_Type, in, talloc_free(ret); return NULL;);
1958 371 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1959 0 : PyErr_NoMemory();
1960 0 : talloc_free(ret); return NULL;
1961 : }
1962 371 : ret->txt = *(struct DNS_RPC_RECORD_STRING *)pytalloc_get_ptr(in);
1963 371 : break;
1964 :
1965 760 : case DNS_TYPE_AAAA:
1966 760 : if (in == NULL) {
1967 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ipv6");
1968 0 : talloc_free(ret); return NULL;
1969 : }
1970 : {
1971 0 : const char *test_str;
1972 0 : const char *talloc_str;
1973 760 : PyObject *unicode = NULL;
1974 760 : if (PyUnicode_Check(in)) {
1975 760 : unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
1976 760 : if (unicode == NULL) {
1977 0 : talloc_free(ret); return NULL;
1978 : }
1979 760 : test_str = PyBytes_AS_STRING(unicode);
1980 0 : } else if (PyBytes_Check(in)) {
1981 0 : test_str = PyBytes_AS_STRING(in);
1982 : } else {
1983 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
1984 0 : talloc_free(ret); return NULL;
1985 : }
1986 760 : talloc_str = talloc_strdup(mem_ctx, test_str);
1987 760 : if (unicode != NULL) {
1988 562 : Py_DECREF(unicode);
1989 : }
1990 760 : if (talloc_str == NULL) {
1991 0 : PyErr_NoMemory();
1992 0 : talloc_free(ret); return NULL;
1993 : }
1994 760 : ret->ipv6 = talloc_str;
1995 : }
1996 760 : break;
1997 :
1998 582 : case DNS_TYPE_SRV:
1999 582 : if (in == NULL) {
2000 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->srv");
2001 0 : talloc_free(ret); return NULL;
2002 : }
2003 582 : PY_CHECK_TYPE(&DNS_RPC_RECORD_SRV_Type, in, talloc_free(ret); return NULL;);
2004 582 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
2005 0 : PyErr_NoMemory();
2006 0 : talloc_free(ret); return NULL;
2007 : }
2008 582 : ret->srv = *(struct DNS_RPC_RECORD_SRV *)pytalloc_get_ptr(in);
2009 582 : break;
2010 :
2011 0 : case DNS_TYPE_DNAME:
2012 0 : if (in == NULL) {
2013 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->name");
2014 0 : talloc_free(ret); return NULL;
2015 : }
2016 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
2017 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
2018 0 : PyErr_NoMemory();
2019 0 : talloc_free(ret); return NULL;
2020 : }
2021 0 : ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
2022 0 : break;
2023 :
2024 0 : default:
2025 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
2026 0 : talloc_free(ret);
2027 0 : ret = NULL;
2028 : }
2029 :
2030 4215 : return ret;
2031 : }
2032 :
2033 766 : static PyObject *py_DNS_RPC_RECORD_DATA_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2034 : {
2035 766 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
2036 766 : PyObject *mem_ctx_obj = NULL;
2037 766 : TALLOC_CTX *mem_ctx = NULL;
2038 766 : int level = 0;
2039 766 : PyObject *in_obj = NULL;
2040 766 : union DNS_RPC_RECORD_DATA *in = NULL;
2041 :
2042 766 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
2043 : discard_const_p(char *, kwnames),
2044 : &mem_ctx_obj,
2045 : &level,
2046 : &in_obj)) {
2047 0 : return NULL;
2048 : }
2049 766 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
2050 766 : if (mem_ctx == NULL) {
2051 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
2052 0 : return NULL;
2053 : }
2054 766 : in = (union DNS_RPC_RECORD_DATA *)pytalloc_get_ptr(in_obj);
2055 766 : if (in == NULL) {
2056 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union DNS_RPC_RECORD_DATA!");
2057 0 : return NULL;
2058 : }
2059 :
2060 766 : return py_import_DNS_RPC_RECORD_DATA(mem_ctx, level, in);
2061 : }
2062 :
2063 4215 : static PyObject *py_DNS_RPC_RECORD_DATA_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2064 : {
2065 4215 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
2066 4215 : PyObject *mem_ctx_obj = NULL;
2067 4215 : TALLOC_CTX *mem_ctx = NULL;
2068 4215 : int level = 0;
2069 4215 : PyObject *in = NULL;
2070 4215 : union DNS_RPC_RECORD_DATA *out = NULL;
2071 :
2072 4215 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
2073 : discard_const_p(char *, kwnames),
2074 : &mem_ctx_obj,
2075 : &level,
2076 : &in)) {
2077 0 : return NULL;
2078 : }
2079 4215 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
2080 4215 : if (mem_ctx == NULL) {
2081 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
2082 0 : return NULL;
2083 : }
2084 :
2085 4215 : out = py_export_DNS_RPC_RECORD_DATA(mem_ctx, level, in);
2086 4215 : if (out == NULL) {
2087 0 : return NULL;
2088 : }
2089 :
2090 4215 : return pytalloc_GenericObject_reference(out);
2091 : }
2092 :
2093 : static PyMethodDef py_DNS_RPC_RECORD_DATA_methods[] = {
2094 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DNS_RPC_RECORD_DATA_import),
2095 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
2096 : "T.__import__(mem_ctx, level, in) => ret." },
2097 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DNS_RPC_RECORD_DATA_export),
2098 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
2099 : "T.__export__(mem_ctx, level, in) => ret." },
2100 : { NULL, NULL, 0, NULL }
2101 : };
2102 :
2103 0 : static PyObject *py_DNS_RPC_RECORD_DATA_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2104 : {
2105 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
2106 0 : return NULL;
2107 : }
2108 :
2109 :
2110 : static PyTypeObject DNS_RPC_RECORD_DATA_Type = {
2111 : PyVarObject_HEAD_INIT(NULL, 0)
2112 : .tp_name = "dnsserver.DNS_RPC_RECORD_DATA",
2113 : .tp_getset = NULL,
2114 : .tp_methods = py_DNS_RPC_RECORD_DATA_methods,
2115 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2116 : .tp_new = py_DNS_RPC_RECORD_DATA_new,
2117 : };
2118 :
2119 :
2120 0 : static PyObject *py_DNS_RPC_RECORD_get_wDataLength(PyObject *obj, void *closure)
2121 : {
2122 0 : struct DNS_RPC_RECORD *object = pytalloc_get_ptr(obj);
2123 0 : PyObject *py_wDataLength;
2124 0 : py_wDataLength = PyLong_FromLong((uint16_t)(object->wDataLength));
2125 0 : return py_wDataLength;
2126 : }
2127 :
2128 0 : static int py_DNS_RPC_RECORD_set_wDataLength(PyObject *py_obj, PyObject *value, void *closure)
2129 : {
2130 0 : struct DNS_RPC_RECORD *object = pytalloc_get_ptr(py_obj);
2131 0 : if (value == NULL) {
2132 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->wDataLength");
2133 0 : return -1;
2134 : }
2135 : {
2136 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wDataLength));
2137 0 : if (PyLong_Check(value)) {
2138 0 : unsigned long long test_var;
2139 0 : test_var = PyLong_AsUnsignedLongLong(value);
2140 0 : if (PyErr_Occurred() != NULL) {
2141 0 : return -1;
2142 : }
2143 0 : if (test_var > uint_max) {
2144 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2145 : PyLong_Type.tp_name, uint_max, test_var);
2146 0 : return -1;
2147 : }
2148 0 : object->wDataLength = test_var;
2149 : } else {
2150 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2151 : PyLong_Type.tp_name);
2152 0 : return -1;
2153 : }
2154 : }
2155 0 : return 0;
2156 : }
2157 :
2158 830 : static PyObject *py_DNS_RPC_RECORD_get_wType(PyObject *obj, void *closure)
2159 : {
2160 830 : struct DNS_RPC_RECORD *object = pytalloc_get_ptr(obj);
2161 0 : PyObject *py_wType;
2162 830 : py_wType = PyLong_FromLong((uint16_t)(object->wType));
2163 830 : return py_wType;
2164 : }
2165 :
2166 4227 : static int py_DNS_RPC_RECORD_set_wType(PyObject *py_obj, PyObject *value, void *closure)
2167 : {
2168 4227 : struct DNS_RPC_RECORD *object = pytalloc_get_ptr(py_obj);
2169 4227 : if (value == NULL) {
2170 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->wType");
2171 0 : return -1;
2172 : }
2173 : {
2174 4227 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wType));
2175 4227 : if (PyLong_Check(value)) {
2176 0 : unsigned long long test_var;
2177 4227 : test_var = PyLong_AsUnsignedLongLong(value);
2178 4227 : if (PyErr_Occurred() != NULL) {
2179 0 : return -1;
2180 : }
2181 4227 : if (test_var > uint_max) {
2182 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2183 : PyLong_Type.tp_name, uint_max, test_var);
2184 0 : return -1;
2185 : }
2186 4227 : object->wType = test_var;
2187 : } else {
2188 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2189 : PyLong_Type.tp_name);
2190 0 : return -1;
2191 : }
2192 : }
2193 4227 : return 0;
2194 : }
2195 :
2196 218 : static PyObject *py_DNS_RPC_RECORD_get_dwFlags(PyObject *obj, void *closure)
2197 : {
2198 218 : struct DNS_RPC_RECORD *object = pytalloc_get_ptr(obj);
2199 0 : PyObject *py_dwFlags;
2200 218 : py_dwFlags = PyLong_FromUnsignedLongLong((uint32_t)(object->dwFlags));
2201 218 : return py_dwFlags;
2202 : }
2203 :
2204 4325 : static int py_DNS_RPC_RECORD_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
2205 : {
2206 4325 : struct DNS_RPC_RECORD *object = pytalloc_get_ptr(py_obj);
2207 4325 : if (value == NULL) {
2208 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwFlags");
2209 0 : return -1;
2210 : }
2211 : {
2212 4325 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwFlags));
2213 4325 : if (PyLong_Check(value)) {
2214 0 : unsigned long long test_var;
2215 4325 : test_var = PyLong_AsUnsignedLongLong(value);
2216 4325 : if (PyErr_Occurred() != NULL) {
2217 0 : return -1;
2218 : }
2219 4325 : if (test_var > uint_max) {
2220 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2221 : PyLong_Type.tp_name, uint_max, test_var);
2222 0 : return -1;
2223 : }
2224 4325 : object->dwFlags = test_var;
2225 : } else {
2226 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2227 : PyLong_Type.tp_name);
2228 0 : return -1;
2229 : }
2230 : }
2231 4325 : return 0;
2232 : }
2233 :
2234 218 : static PyObject *py_DNS_RPC_RECORD_get_dwSerial(PyObject *obj, void *closure)
2235 : {
2236 218 : struct DNS_RPC_RECORD *object = pytalloc_get_ptr(obj);
2237 0 : PyObject *py_dwSerial;
2238 218 : py_dwSerial = PyLong_FromUnsignedLongLong((uint32_t)(object->dwSerial));
2239 218 : return py_dwSerial;
2240 : }
2241 :
2242 4325 : static int py_DNS_RPC_RECORD_set_dwSerial(PyObject *py_obj, PyObject *value, void *closure)
2243 : {
2244 4325 : struct DNS_RPC_RECORD *object = pytalloc_get_ptr(py_obj);
2245 4325 : if (value == NULL) {
2246 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwSerial");
2247 0 : return -1;
2248 : }
2249 : {
2250 4325 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwSerial));
2251 4325 : if (PyLong_Check(value)) {
2252 0 : unsigned long long test_var;
2253 4325 : test_var = PyLong_AsUnsignedLongLong(value);
2254 4325 : if (PyErr_Occurred() != NULL) {
2255 0 : return -1;
2256 : }
2257 4325 : if (test_var > uint_max) {
2258 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2259 : PyLong_Type.tp_name, uint_max, test_var);
2260 0 : return -1;
2261 : }
2262 4325 : object->dwSerial = test_var;
2263 : } else {
2264 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2265 : PyLong_Type.tp_name);
2266 0 : return -1;
2267 : }
2268 : }
2269 4325 : return 0;
2270 : }
2271 :
2272 218 : static PyObject *py_DNS_RPC_RECORD_get_dwTtlSeconds(PyObject *obj, void *closure)
2273 : {
2274 218 : struct DNS_RPC_RECORD *object = pytalloc_get_ptr(obj);
2275 0 : PyObject *py_dwTtlSeconds;
2276 218 : py_dwTtlSeconds = PyLong_FromUnsignedLongLong((uint32_t)(object->dwTtlSeconds));
2277 218 : return py_dwTtlSeconds;
2278 : }
2279 :
2280 4329 : static int py_DNS_RPC_RECORD_set_dwTtlSeconds(PyObject *py_obj, PyObject *value, void *closure)
2281 : {
2282 4329 : struct DNS_RPC_RECORD *object = pytalloc_get_ptr(py_obj);
2283 4329 : if (value == NULL) {
2284 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwTtlSeconds");
2285 0 : return -1;
2286 : }
2287 : {
2288 4329 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwTtlSeconds));
2289 4329 : if (PyLong_Check(value)) {
2290 0 : unsigned long long test_var;
2291 4329 : test_var = PyLong_AsUnsignedLongLong(value);
2292 4329 : if (PyErr_Occurred() != NULL) {
2293 0 : return -1;
2294 : }
2295 4329 : if (test_var > uint_max) {
2296 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2297 : PyLong_Type.tp_name, uint_max, test_var);
2298 0 : return -1;
2299 : }
2300 4329 : object->dwTtlSeconds = test_var;
2301 : } else {
2302 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2303 : PyLong_Type.tp_name);
2304 0 : return -1;
2305 : }
2306 : }
2307 4329 : return 0;
2308 : }
2309 :
2310 94 : static PyObject *py_DNS_RPC_RECORD_get_dwTimeStamp(PyObject *obj, void *closure)
2311 : {
2312 94 : struct DNS_RPC_RECORD *object = pytalloc_get_ptr(obj);
2313 0 : PyObject *py_dwTimeStamp;
2314 94 : py_dwTimeStamp = PyLong_FromUnsignedLongLong((uint32_t)(object->dwTimeStamp));
2315 94 : return py_dwTimeStamp;
2316 : }
2317 :
2318 104 : static int py_DNS_RPC_RECORD_set_dwTimeStamp(PyObject *py_obj, PyObject *value, void *closure)
2319 : {
2320 104 : struct DNS_RPC_RECORD *object = pytalloc_get_ptr(py_obj);
2321 104 : if (value == NULL) {
2322 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwTimeStamp");
2323 0 : return -1;
2324 : }
2325 : {
2326 104 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwTimeStamp));
2327 104 : if (PyLong_Check(value)) {
2328 0 : unsigned long long test_var;
2329 104 : test_var = PyLong_AsUnsignedLongLong(value);
2330 104 : if (PyErr_Occurred() != NULL) {
2331 0 : return -1;
2332 : }
2333 104 : if (test_var > uint_max) {
2334 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2335 : PyLong_Type.tp_name, uint_max, test_var);
2336 0 : return -1;
2337 : }
2338 104 : object->dwTimeStamp = test_var;
2339 : } else {
2340 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2341 : PyLong_Type.tp_name);
2342 0 : return -1;
2343 : }
2344 : }
2345 104 : return 0;
2346 : }
2347 :
2348 0 : static PyObject *py_DNS_RPC_RECORD_get_dwReserved(PyObject *obj, void *closure)
2349 : {
2350 0 : struct DNS_RPC_RECORD *object = pytalloc_get_ptr(obj);
2351 0 : PyObject *py_dwReserved;
2352 0 : py_dwReserved = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved));
2353 0 : return py_dwReserved;
2354 : }
2355 :
2356 8 : static int py_DNS_RPC_RECORD_set_dwReserved(PyObject *py_obj, PyObject *value, void *closure)
2357 : {
2358 8 : struct DNS_RPC_RECORD *object = pytalloc_get_ptr(py_obj);
2359 8 : if (value == NULL) {
2360 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved");
2361 0 : return -1;
2362 : }
2363 : {
2364 8 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved));
2365 8 : if (PyLong_Check(value)) {
2366 0 : unsigned long long test_var;
2367 8 : test_var = PyLong_AsUnsignedLongLong(value);
2368 8 : if (PyErr_Occurred() != NULL) {
2369 0 : return -1;
2370 : }
2371 8 : if (test_var > uint_max) {
2372 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2373 : PyLong_Type.tp_name, uint_max, test_var);
2374 0 : return -1;
2375 : }
2376 8 : object->dwReserved = test_var;
2377 : } else {
2378 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2379 : PyLong_Type.tp_name);
2380 0 : return -1;
2381 : }
2382 : }
2383 8 : return 0;
2384 : }
2385 :
2386 766 : static PyObject *py_DNS_RPC_RECORD_get_data(PyObject *obj, void *closure)
2387 : {
2388 766 : struct DNS_RPC_RECORD *object = pytalloc_get_ptr(obj);
2389 0 : PyObject *py_data;
2390 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");
2391 766 : if (py_data == NULL) {
2392 0 : return NULL;
2393 : }
2394 766 : return py_data;
2395 : }
2396 :
2397 4215 : static int py_DNS_RPC_RECORD_set_data(PyObject *py_obj, PyObject *value, void *closure)
2398 : {
2399 4215 : struct DNS_RPC_RECORD *object = pytalloc_get_ptr(py_obj);
2400 4215 : if (value == NULL) {
2401 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->data");
2402 0 : return -1;
2403 : }
2404 : {
2405 0 : union DNS_RPC_RECORD_DATA *data_switch_1;
2406 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");
2407 4215 : if (data_switch_1 == NULL) {
2408 0 : return -1;
2409 : }
2410 4215 : object->data = *data_switch_1;
2411 : }
2412 4215 : return 0;
2413 : }
2414 :
2415 : static PyGetSetDef py_DNS_RPC_RECORD_getsetters[] = {
2416 : {
2417 : .name = discard_const_p(char, "wDataLength"),
2418 : .get = py_DNS_RPC_RECORD_get_wDataLength,
2419 : .set = py_DNS_RPC_RECORD_set_wDataLength,
2420 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
2421 : },
2422 : {
2423 : .name = discard_const_p(char, "wType"),
2424 : .get = py_DNS_RPC_RECORD_get_wType,
2425 : .set = py_DNS_RPC_RECORD_set_wType,
2426 : .doc = discard_const_p(char, "PIDL-generated element of base type dns_record_type")
2427 : },
2428 : {
2429 : .name = discard_const_p(char, "dwFlags"),
2430 : .get = py_DNS_RPC_RECORD_get_dwFlags,
2431 : .set = py_DNS_RPC_RECORD_set_dwFlags,
2432 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
2433 : },
2434 : {
2435 : .name = discard_const_p(char, "dwSerial"),
2436 : .get = py_DNS_RPC_RECORD_get_dwSerial,
2437 : .set = py_DNS_RPC_RECORD_set_dwSerial,
2438 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
2439 : },
2440 : {
2441 : .name = discard_const_p(char, "dwTtlSeconds"),
2442 : .get = py_DNS_RPC_RECORD_get_dwTtlSeconds,
2443 : .set = py_DNS_RPC_RECORD_set_dwTtlSeconds,
2444 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
2445 : },
2446 : {
2447 : .name = discard_const_p(char, "dwTimeStamp"),
2448 : .get = py_DNS_RPC_RECORD_get_dwTimeStamp,
2449 : .set = py_DNS_RPC_RECORD_set_dwTimeStamp,
2450 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
2451 : },
2452 : {
2453 : .name = discard_const_p(char, "dwReserved"),
2454 : .get = py_DNS_RPC_RECORD_get_dwReserved,
2455 : .set = py_DNS_RPC_RECORD_set_dwReserved,
2456 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
2457 : },
2458 : {
2459 : .name = discard_const_p(char, "data"),
2460 : .get = py_DNS_RPC_RECORD_get_data,
2461 : .set = py_DNS_RPC_RECORD_set_data,
2462 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_RECORD_DATA")
2463 : },
2464 : { .name = NULL }
2465 : };
2466 :
2467 4227 : static PyObject *py_DNS_RPC_RECORD_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2468 : {
2469 4227 : return pytalloc_new(struct DNS_RPC_RECORD, type);
2470 : }
2471 :
2472 0 : static PyObject *py_DNS_RPC_RECORD_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
2473 : {
2474 0 : struct DNS_RPC_RECORD *object = pytalloc_get_ptr(py_obj);
2475 0 : PyObject *ret = NULL;
2476 0 : DATA_BLOB blob;
2477 0 : enum ndr_err_code err;
2478 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
2479 0 : if (tmp_ctx == NULL) {
2480 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
2481 0 : return NULL;
2482 : }
2483 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_RECORD);
2484 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
2485 0 : TALLOC_FREE(tmp_ctx);
2486 0 : PyErr_SetNdrError(err);
2487 0 : return NULL;
2488 : }
2489 :
2490 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
2491 0 : TALLOC_FREE(tmp_ctx);
2492 0 : return ret;
2493 : }
2494 :
2495 0 : static PyObject *py_DNS_RPC_RECORD_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
2496 : {
2497 0 : struct DNS_RPC_RECORD *object = pytalloc_get_ptr(py_obj);
2498 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
2499 0 : Py_ssize_t blob_length = 0;
2500 0 : enum ndr_err_code err;
2501 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
2502 0 : PyObject *allow_remaining_obj = NULL;
2503 0 : bool allow_remaining = false;
2504 :
2505 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
2506 : discard_const_p(char *, kwnames),
2507 : &blob.data, &blob_length,
2508 : &allow_remaining_obj)) {
2509 0 : return NULL;
2510 : }
2511 0 : blob.length = blob_length;
2512 :
2513 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
2514 0 : allow_remaining = true;
2515 : }
2516 :
2517 0 : if (allow_remaining) {
2518 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_RECORD);
2519 : } else {
2520 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);
2521 : }
2522 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
2523 0 : PyErr_SetNdrError(err);
2524 0 : return NULL;
2525 : }
2526 :
2527 0 : Py_RETURN_NONE;
2528 : }
2529 :
2530 0 : static PyObject *py_DNS_RPC_RECORD_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
2531 : {
2532 0 : struct DNS_RPC_RECORD *object = pytalloc_get_ptr(py_obj);
2533 0 : PyObject *ret;
2534 0 : char *retstr;
2535 :
2536 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);
2537 0 : ret = PyUnicode_FromString(retstr);
2538 0 : talloc_free(retstr);
2539 :
2540 0 : return ret;
2541 : }
2542 :
2543 : static PyMethodDef py_DNS_RPC_RECORD_methods[] = {
2544 : { "__ndr_pack__", (PyCFunction)py_DNS_RPC_RECORD_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
2545 : { "__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" },
2546 : { "__ndr_print__", (PyCFunction)py_DNS_RPC_RECORD_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
2547 : { NULL, NULL, 0, NULL }
2548 : };
2549 :
2550 :
2551 : static PyTypeObject DNS_RPC_RECORD_Type = {
2552 : PyVarObject_HEAD_INIT(NULL, 0)
2553 : .tp_name = "dnsserver.DNS_RPC_RECORD",
2554 : .tp_getset = py_DNS_RPC_RECORD_getsetters,
2555 : .tp_methods = py_DNS_RPC_RECORD_methods,
2556 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2557 : .tp_new = py_DNS_RPC_RECORD_new,
2558 : };
2559 :
2560 :
2561 0 : static PyObject *py_DNS_RPC_RECORD_BUF_get_wContextLength(PyObject *obj, void *closure)
2562 : {
2563 0 : struct DNS_RPC_RECORD_BUF *object = pytalloc_get_ptr(obj);
2564 0 : PyObject *py_wContextLength;
2565 0 : py_wContextLength = PyLong_FromUnsignedLongLong((uint32_t)(object->wContextLength));
2566 0 : return py_wContextLength;
2567 : }
2568 :
2569 0 : static int py_DNS_RPC_RECORD_BUF_set_wContextLength(PyObject *py_obj, PyObject *value, void *closure)
2570 : {
2571 0 : struct DNS_RPC_RECORD_BUF *object = pytalloc_get_ptr(py_obj);
2572 0 : if (value == NULL) {
2573 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->wContextLength");
2574 0 : return -1;
2575 : }
2576 : {
2577 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wContextLength));
2578 0 : if (PyLong_Check(value)) {
2579 0 : unsigned long long test_var;
2580 0 : test_var = PyLong_AsUnsignedLongLong(value);
2581 0 : if (PyErr_Occurred() != NULL) {
2582 0 : return -1;
2583 : }
2584 0 : if (test_var > uint_max) {
2585 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2586 : PyLong_Type.tp_name, uint_max, test_var);
2587 0 : return -1;
2588 : }
2589 0 : object->wContextLength = test_var;
2590 : } else {
2591 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2592 : PyLong_Type.tp_name);
2593 0 : return -1;
2594 : }
2595 : }
2596 0 : return 0;
2597 : }
2598 :
2599 0 : static PyObject *py_DNS_RPC_RECORD_BUF_get_rec(PyObject *obj, void *closure)
2600 : {
2601 0 : struct DNS_RPC_RECORD_BUF *object = pytalloc_get_ptr(obj);
2602 0 : PyObject *py_rec;
2603 0 : py_rec = pytalloc_reference_ex(&DNS_RPC_RECORD_Type, pytalloc_get_mem_ctx(obj), &object->rec);
2604 0 : return py_rec;
2605 : }
2606 :
2607 4204 : static int py_DNS_RPC_RECORD_BUF_set_rec(PyObject *py_obj, PyObject *value, void *closure)
2608 : {
2609 4204 : struct DNS_RPC_RECORD_BUF *object = pytalloc_get_ptr(py_obj);
2610 4204 : if (value == NULL) {
2611 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->rec");
2612 0 : return -1;
2613 : }
2614 4204 : PY_CHECK_TYPE(&DNS_RPC_RECORD_Type, value, return -1;);
2615 4204 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
2616 0 : PyErr_NoMemory();
2617 0 : return -1;
2618 : }
2619 4204 : object->rec = *(struct DNS_RPC_RECORD *)pytalloc_get_ptr(value);
2620 4204 : return 0;
2621 : }
2622 :
2623 : static PyGetSetDef py_DNS_RPC_RECORD_BUF_getsetters[] = {
2624 : {
2625 : .name = discard_const_p(char, "wContextLength"),
2626 : .get = py_DNS_RPC_RECORD_BUF_get_wContextLength,
2627 : .set = py_DNS_RPC_RECORD_BUF_set_wContextLength,
2628 : .doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
2629 : },
2630 : {
2631 : .name = discard_const_p(char, "rec"),
2632 : .get = py_DNS_RPC_RECORD_BUF_get_rec,
2633 : .set = py_DNS_RPC_RECORD_BUF_set_rec,
2634 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_RECORD")
2635 : },
2636 : { .name = NULL }
2637 : };
2638 :
2639 4204 : static PyObject *py_DNS_RPC_RECORD_BUF_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2640 : {
2641 4204 : return pytalloc_new(struct DNS_RPC_RECORD_BUF, type);
2642 : }
2643 :
2644 :
2645 : static PyTypeObject DNS_RPC_RECORD_BUF_Type = {
2646 : PyVarObject_HEAD_INIT(NULL, 0)
2647 : .tp_name = "dnsserver.DNS_RPC_RECORD_BUF",
2648 : .tp_getset = py_DNS_RPC_RECORD_BUF_getsetters,
2649 : .tp_methods = NULL,
2650 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2651 : .tp_new = py_DNS_RPC_RECORD_BUF_new,
2652 : };
2653 :
2654 :
2655 4 : static PyObject *py_IP4_ARRAY_get_AddrCount(PyObject *obj, void *closure)
2656 : {
2657 4 : struct IP4_ARRAY *object = pytalloc_get_ptr(obj);
2658 0 : PyObject *py_AddrCount;
2659 4 : py_AddrCount = PyLong_FromUnsignedLongLong((uint32_t)(object->AddrCount));
2660 4 : return py_AddrCount;
2661 : }
2662 :
2663 0 : static int py_IP4_ARRAY_set_AddrCount(PyObject *py_obj, PyObject *value, void *closure)
2664 : {
2665 0 : struct IP4_ARRAY *object = pytalloc_get_ptr(py_obj);
2666 0 : if (value == NULL) {
2667 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->AddrCount");
2668 0 : return -1;
2669 : }
2670 : {
2671 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->AddrCount));
2672 0 : if (PyLong_Check(value)) {
2673 0 : unsigned long long test_var;
2674 0 : test_var = PyLong_AsUnsignedLongLong(value);
2675 0 : if (PyErr_Occurred() != NULL) {
2676 0 : return -1;
2677 : }
2678 0 : if (test_var > uint_max) {
2679 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2680 : PyLong_Type.tp_name, uint_max, test_var);
2681 0 : return -1;
2682 : }
2683 0 : object->AddrCount = test_var;
2684 : } else {
2685 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2686 : PyLong_Type.tp_name);
2687 0 : return -1;
2688 : }
2689 : }
2690 0 : return 0;
2691 : }
2692 :
2693 4 : static PyObject *py_IP4_ARRAY_get_AddrArray(PyObject *obj, void *closure)
2694 : {
2695 4 : struct IP4_ARRAY *object = pytalloc_get_ptr(obj);
2696 0 : PyObject *py_AddrArray;
2697 4 : py_AddrArray = PyList_New(object->AddrCount);
2698 4 : if (py_AddrArray == NULL) {
2699 0 : return NULL;
2700 : }
2701 : {
2702 : int AddrArray_cntr_0;
2703 8 : for (AddrArray_cntr_0 = 0; AddrArray_cntr_0 < (object->AddrCount); AddrArray_cntr_0++) {
2704 0 : PyObject *py_AddrArray_0;
2705 4 : py_AddrArray_0 = PyLong_FromUnsignedLongLong((uint32_t)((object->AddrArray)[AddrArray_cntr_0]));
2706 4 : PyList_SetItem(py_AddrArray, AddrArray_cntr_0, py_AddrArray_0);
2707 : }
2708 : }
2709 4 : return py_AddrArray;
2710 : }
2711 :
2712 0 : static int py_IP4_ARRAY_set_AddrArray(PyObject *py_obj, PyObject *value, void *closure)
2713 : {
2714 0 : struct IP4_ARRAY *object = pytalloc_get_ptr(py_obj);
2715 0 : if (value == NULL) {
2716 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->AddrArray");
2717 0 : return -1;
2718 : }
2719 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
2720 : {
2721 0 : int AddrArray_cntr_0;
2722 0 : object->AddrArray = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->AddrArray, PyList_GET_SIZE(value));
2723 0 : if (!object->AddrArray) { return -1; }
2724 0 : talloc_set_name_const(object->AddrArray, "ARRAY: object->AddrArray");
2725 0 : for (AddrArray_cntr_0 = 0; AddrArray_cntr_0 < PyList_GET_SIZE(value); AddrArray_cntr_0++) {
2726 0 : if (PyList_GET_ITEM(value, AddrArray_cntr_0) == NULL) {
2727 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->AddrArray)[AddrArray_cntr_0]");
2728 0 : return -1;
2729 : }
2730 : {
2731 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->AddrArray)[AddrArray_cntr_0]));
2732 0 : if (PyLong_Check(PyList_GET_ITEM(value, AddrArray_cntr_0))) {
2733 0 : unsigned long long test_var;
2734 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, AddrArray_cntr_0));
2735 0 : if (PyErr_Occurred() != NULL) {
2736 0 : return -1;
2737 : }
2738 0 : if (test_var > uint_max) {
2739 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2740 : PyLong_Type.tp_name, uint_max, test_var);
2741 0 : return -1;
2742 : }
2743 0 : (object->AddrArray)[AddrArray_cntr_0] = test_var;
2744 : } else {
2745 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2746 : PyLong_Type.tp_name);
2747 0 : return -1;
2748 : }
2749 : }
2750 : }
2751 : }
2752 0 : return 0;
2753 : }
2754 :
2755 : static PyGetSetDef py_IP4_ARRAY_getsetters[] = {
2756 : {
2757 : .name = discard_const_p(char, "AddrCount"),
2758 : .get = py_IP4_ARRAY_get_AddrCount,
2759 : .set = py_IP4_ARRAY_set_AddrCount,
2760 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
2761 : },
2762 : {
2763 : .name = discard_const_p(char, "AddrArray"),
2764 : .get = py_IP4_ARRAY_get_AddrArray,
2765 : .set = py_IP4_ARRAY_set_AddrArray,
2766 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
2767 : },
2768 : { .name = NULL }
2769 : };
2770 :
2771 0 : static PyObject *py_IP4_ARRAY_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2772 : {
2773 0 : return pytalloc_new(struct IP4_ARRAY, type);
2774 : }
2775 :
2776 :
2777 : static PyTypeObject IP4_ARRAY_Type = {
2778 : PyVarObject_HEAD_INIT(NULL, 0)
2779 : .tp_name = "dnsserver.IP4_ARRAY",
2780 : .tp_getset = py_IP4_ARRAY_getsetters,
2781 : .tp_methods = NULL,
2782 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2783 : .tp_new = py_IP4_ARRAY_new,
2784 : };
2785 :
2786 :
2787 10 : static PyObject *py_DNS_ADDR_get_MaxSa(PyObject *obj, void *closure)
2788 : {
2789 10 : struct DNS_ADDR *object = pytalloc_get_ptr(obj);
2790 0 : PyObject *py_MaxSa;
2791 10 : py_MaxSa = PyList_New(32);
2792 10 : if (py_MaxSa == NULL) {
2793 0 : return NULL;
2794 : }
2795 : {
2796 : int MaxSa_cntr_0;
2797 330 : for (MaxSa_cntr_0 = 0; MaxSa_cntr_0 < (32); MaxSa_cntr_0++) {
2798 0 : PyObject *py_MaxSa_0;
2799 320 : py_MaxSa_0 = PyLong_FromLong((uint16_t)((object->MaxSa)[MaxSa_cntr_0]));
2800 320 : PyList_SetItem(py_MaxSa, MaxSa_cntr_0, py_MaxSa_0);
2801 : }
2802 : }
2803 10 : return py_MaxSa;
2804 : }
2805 :
2806 0 : static int py_DNS_ADDR_set_MaxSa(PyObject *py_obj, PyObject *value, void *closure)
2807 : {
2808 0 : struct DNS_ADDR *object = pytalloc_get_ptr(py_obj);
2809 0 : if (value == NULL) {
2810 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->MaxSa");
2811 0 : return -1;
2812 : }
2813 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
2814 : {
2815 0 : int MaxSa_cntr_0;
2816 0 : if (ARRAY_SIZE(object->MaxSa) != PyList_GET_SIZE(value)) {
2817 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));
2818 0 : return -1;
2819 : }
2820 0 : for (MaxSa_cntr_0 = 0; MaxSa_cntr_0 < PyList_GET_SIZE(value); MaxSa_cntr_0++) {
2821 0 : if (PyList_GET_ITEM(value, MaxSa_cntr_0) == NULL) {
2822 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->MaxSa)[MaxSa_cntr_0]");
2823 0 : return -1;
2824 : }
2825 : {
2826 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->MaxSa)[MaxSa_cntr_0]));
2827 0 : if (PyLong_Check(PyList_GET_ITEM(value, MaxSa_cntr_0))) {
2828 0 : unsigned long long test_var;
2829 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, MaxSa_cntr_0));
2830 0 : if (PyErr_Occurred() != NULL) {
2831 0 : return -1;
2832 : }
2833 0 : if (test_var > uint_max) {
2834 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2835 : PyLong_Type.tp_name, uint_max, test_var);
2836 0 : return -1;
2837 : }
2838 0 : (object->MaxSa)[MaxSa_cntr_0] = test_var;
2839 : } else {
2840 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2841 : PyLong_Type.tp_name);
2842 0 : return -1;
2843 : }
2844 : }
2845 : }
2846 : }
2847 0 : return 0;
2848 : }
2849 :
2850 0 : static PyObject *py_DNS_ADDR_get_DnsAddrUserDword(PyObject *obj, void *closure)
2851 : {
2852 0 : struct DNS_ADDR *object = pytalloc_get_ptr(obj);
2853 0 : PyObject *py_DnsAddrUserDword;
2854 0 : py_DnsAddrUserDword = PyList_New(8);
2855 0 : if (py_DnsAddrUserDword == NULL) {
2856 0 : return NULL;
2857 : }
2858 : {
2859 : int DnsAddrUserDword_cntr_0;
2860 0 : for (DnsAddrUserDword_cntr_0 = 0; DnsAddrUserDword_cntr_0 < (8); DnsAddrUserDword_cntr_0++) {
2861 0 : PyObject *py_DnsAddrUserDword_0;
2862 0 : py_DnsAddrUserDword_0 = PyLong_FromUnsignedLongLong((uint32_t)((object->DnsAddrUserDword)[DnsAddrUserDword_cntr_0]));
2863 0 : PyList_SetItem(py_DnsAddrUserDword, DnsAddrUserDword_cntr_0, py_DnsAddrUserDword_0);
2864 : }
2865 : }
2866 0 : return py_DnsAddrUserDword;
2867 : }
2868 :
2869 0 : static int py_DNS_ADDR_set_DnsAddrUserDword(PyObject *py_obj, PyObject *value, void *closure)
2870 : {
2871 0 : struct DNS_ADDR *object = pytalloc_get_ptr(py_obj);
2872 0 : if (value == NULL) {
2873 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->DnsAddrUserDword");
2874 0 : return -1;
2875 : }
2876 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
2877 : {
2878 0 : int DnsAddrUserDword_cntr_0;
2879 0 : if (ARRAY_SIZE(object->DnsAddrUserDword) != PyList_GET_SIZE(value)) {
2880 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));
2881 0 : return -1;
2882 : }
2883 0 : for (DnsAddrUserDword_cntr_0 = 0; DnsAddrUserDword_cntr_0 < PyList_GET_SIZE(value); DnsAddrUserDword_cntr_0++) {
2884 0 : if (PyList_GET_ITEM(value, DnsAddrUserDword_cntr_0) == NULL) {
2885 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->DnsAddrUserDword)[DnsAddrUserDword_cntr_0]");
2886 0 : return -1;
2887 : }
2888 : {
2889 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->DnsAddrUserDword)[DnsAddrUserDword_cntr_0]));
2890 0 : if (PyLong_Check(PyList_GET_ITEM(value, DnsAddrUserDword_cntr_0))) {
2891 0 : unsigned long long test_var;
2892 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, DnsAddrUserDword_cntr_0));
2893 0 : if (PyErr_Occurred() != NULL) {
2894 0 : return -1;
2895 : }
2896 0 : if (test_var > uint_max) {
2897 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2898 : PyLong_Type.tp_name, uint_max, test_var);
2899 0 : return -1;
2900 : }
2901 0 : (object->DnsAddrUserDword)[DnsAddrUserDword_cntr_0] = test_var;
2902 : } else {
2903 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2904 : PyLong_Type.tp_name);
2905 0 : return -1;
2906 : }
2907 : }
2908 : }
2909 : }
2910 0 : return 0;
2911 : }
2912 :
2913 : static PyGetSetDef py_DNS_ADDR_getsetters[] = {
2914 : {
2915 : .name = discard_const_p(char, "MaxSa"),
2916 : .get = py_DNS_ADDR_get_MaxSa,
2917 : .set = py_DNS_ADDR_set_MaxSa,
2918 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
2919 : },
2920 : {
2921 : .name = discard_const_p(char, "DnsAddrUserDword"),
2922 : .get = py_DNS_ADDR_get_DnsAddrUserDword,
2923 : .set = py_DNS_ADDR_set_DnsAddrUserDword,
2924 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
2925 : },
2926 : { .name = NULL }
2927 : };
2928 :
2929 0 : static PyObject *py_DNS_ADDR_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2930 : {
2931 0 : return pytalloc_new(struct DNS_ADDR, type);
2932 : }
2933 :
2934 :
2935 : static PyTypeObject DNS_ADDR_Type = {
2936 : PyVarObject_HEAD_INIT(NULL, 0)
2937 : .tp_name = "dnsserver.DNS_ADDR",
2938 : .tp_getset = py_DNS_ADDR_getsetters,
2939 : .tp_methods = NULL,
2940 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2941 : .tp_new = py_DNS_ADDR_new,
2942 : };
2943 :
2944 :
2945 0 : static PyObject *py_DNS_ADDR_ARRAY_get_MaxCount(PyObject *obj, void *closure)
2946 : {
2947 0 : struct DNS_ADDR_ARRAY *object = pytalloc_get_ptr(obj);
2948 0 : PyObject *py_MaxCount;
2949 0 : py_MaxCount = PyLong_FromUnsignedLongLong((uint32_t)(object->MaxCount));
2950 0 : return py_MaxCount;
2951 : }
2952 :
2953 0 : static int py_DNS_ADDR_ARRAY_set_MaxCount(PyObject *py_obj, PyObject *value, void *closure)
2954 : {
2955 0 : struct DNS_ADDR_ARRAY *object = pytalloc_get_ptr(py_obj);
2956 0 : if (value == NULL) {
2957 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->MaxCount");
2958 0 : return -1;
2959 : }
2960 : {
2961 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->MaxCount));
2962 0 : if (PyLong_Check(value)) {
2963 0 : unsigned long long test_var;
2964 0 : test_var = PyLong_AsUnsignedLongLong(value);
2965 0 : if (PyErr_Occurred() != NULL) {
2966 0 : return -1;
2967 : }
2968 0 : if (test_var > uint_max) {
2969 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2970 : PyLong_Type.tp_name, uint_max, test_var);
2971 0 : return -1;
2972 : }
2973 0 : object->MaxCount = test_var;
2974 : } else {
2975 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2976 : PyLong_Type.tp_name);
2977 0 : return -1;
2978 : }
2979 : }
2980 0 : return 0;
2981 : }
2982 :
2983 2 : static PyObject *py_DNS_ADDR_ARRAY_get_AddrCount(PyObject *obj, void *closure)
2984 : {
2985 2 : struct DNS_ADDR_ARRAY *object = pytalloc_get_ptr(obj);
2986 0 : PyObject *py_AddrCount;
2987 2 : py_AddrCount = PyLong_FromUnsignedLongLong((uint32_t)(object->AddrCount));
2988 2 : return py_AddrCount;
2989 : }
2990 :
2991 0 : static int py_DNS_ADDR_ARRAY_set_AddrCount(PyObject *py_obj, PyObject *value, void *closure)
2992 : {
2993 0 : struct DNS_ADDR_ARRAY *object = pytalloc_get_ptr(py_obj);
2994 0 : if (value == NULL) {
2995 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->AddrCount");
2996 0 : return -1;
2997 : }
2998 : {
2999 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->AddrCount));
3000 0 : if (PyLong_Check(value)) {
3001 0 : unsigned long long test_var;
3002 0 : test_var = PyLong_AsUnsignedLongLong(value);
3003 0 : if (PyErr_Occurred() != NULL) {
3004 0 : return -1;
3005 : }
3006 0 : if (test_var > uint_max) {
3007 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3008 : PyLong_Type.tp_name, uint_max, test_var);
3009 0 : return -1;
3010 : }
3011 0 : object->AddrCount = test_var;
3012 : } else {
3013 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3014 : PyLong_Type.tp_name);
3015 0 : return -1;
3016 : }
3017 : }
3018 0 : return 0;
3019 : }
3020 :
3021 0 : static PyObject *py_DNS_ADDR_ARRAY_get_Tag(PyObject *obj, void *closure)
3022 : {
3023 0 : struct DNS_ADDR_ARRAY *object = pytalloc_get_ptr(obj);
3024 0 : PyObject *py_Tag;
3025 0 : py_Tag = PyLong_FromUnsignedLongLong((uint32_t)(object->Tag));
3026 0 : return py_Tag;
3027 : }
3028 :
3029 0 : static int py_DNS_ADDR_ARRAY_set_Tag(PyObject *py_obj, PyObject *value, void *closure)
3030 : {
3031 0 : struct DNS_ADDR_ARRAY *object = pytalloc_get_ptr(py_obj);
3032 0 : if (value == NULL) {
3033 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->Tag");
3034 0 : return -1;
3035 : }
3036 : {
3037 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Tag));
3038 0 : if (PyLong_Check(value)) {
3039 0 : unsigned long long test_var;
3040 0 : test_var = PyLong_AsUnsignedLongLong(value);
3041 0 : if (PyErr_Occurred() != NULL) {
3042 0 : return -1;
3043 : }
3044 0 : if (test_var > uint_max) {
3045 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3046 : PyLong_Type.tp_name, uint_max, test_var);
3047 0 : return -1;
3048 : }
3049 0 : object->Tag = test_var;
3050 : } else {
3051 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3052 : PyLong_Type.tp_name);
3053 0 : return -1;
3054 : }
3055 : }
3056 0 : return 0;
3057 : }
3058 :
3059 0 : static PyObject *py_DNS_ADDR_ARRAY_get_Family(PyObject *obj, void *closure)
3060 : {
3061 0 : struct DNS_ADDR_ARRAY *object = pytalloc_get_ptr(obj);
3062 0 : PyObject *py_Family;
3063 0 : py_Family = PyLong_FromLong((uint16_t)(object->Family));
3064 0 : return py_Family;
3065 : }
3066 :
3067 0 : static int py_DNS_ADDR_ARRAY_set_Family(PyObject *py_obj, PyObject *value, void *closure)
3068 : {
3069 0 : struct DNS_ADDR_ARRAY *object = pytalloc_get_ptr(py_obj);
3070 0 : if (value == NULL) {
3071 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->Family");
3072 0 : return -1;
3073 : }
3074 : {
3075 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Family));
3076 0 : if (PyLong_Check(value)) {
3077 0 : unsigned long long test_var;
3078 0 : test_var = PyLong_AsUnsignedLongLong(value);
3079 0 : if (PyErr_Occurred() != NULL) {
3080 0 : return -1;
3081 : }
3082 0 : if (test_var > uint_max) {
3083 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3084 : PyLong_Type.tp_name, uint_max, test_var);
3085 0 : return -1;
3086 : }
3087 0 : object->Family = test_var;
3088 : } else {
3089 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3090 : PyLong_Type.tp_name);
3091 0 : return -1;
3092 : }
3093 : }
3094 0 : return 0;
3095 : }
3096 :
3097 0 : static PyObject *py_DNS_ADDR_ARRAY_get_WordReserved(PyObject *obj, void *closure)
3098 : {
3099 0 : struct DNS_ADDR_ARRAY *object = pytalloc_get_ptr(obj);
3100 0 : PyObject *py_WordReserved;
3101 0 : py_WordReserved = PyLong_FromLong((uint16_t)(object->WordReserved));
3102 0 : return py_WordReserved;
3103 : }
3104 :
3105 0 : static int py_DNS_ADDR_ARRAY_set_WordReserved(PyObject *py_obj, PyObject *value, void *closure)
3106 : {
3107 0 : struct DNS_ADDR_ARRAY *object = pytalloc_get_ptr(py_obj);
3108 0 : if (value == NULL) {
3109 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->WordReserved");
3110 0 : return -1;
3111 : }
3112 : {
3113 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->WordReserved));
3114 0 : if (PyLong_Check(value)) {
3115 0 : unsigned long long test_var;
3116 0 : test_var = PyLong_AsUnsignedLongLong(value);
3117 0 : if (PyErr_Occurred() != NULL) {
3118 0 : return -1;
3119 : }
3120 0 : if (test_var > uint_max) {
3121 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3122 : PyLong_Type.tp_name, uint_max, test_var);
3123 0 : return -1;
3124 : }
3125 0 : object->WordReserved = test_var;
3126 : } else {
3127 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3128 : PyLong_Type.tp_name);
3129 0 : return -1;
3130 : }
3131 : }
3132 0 : return 0;
3133 : }
3134 :
3135 0 : static PyObject *py_DNS_ADDR_ARRAY_get_Flags(PyObject *obj, void *closure)
3136 : {
3137 0 : struct DNS_ADDR_ARRAY *object = pytalloc_get_ptr(obj);
3138 0 : PyObject *py_Flags;
3139 0 : py_Flags = PyLong_FromUnsignedLongLong((uint32_t)(object->Flags));
3140 0 : return py_Flags;
3141 : }
3142 :
3143 0 : static int py_DNS_ADDR_ARRAY_set_Flags(PyObject *py_obj, PyObject *value, void *closure)
3144 : {
3145 0 : struct DNS_ADDR_ARRAY *object = pytalloc_get_ptr(py_obj);
3146 0 : if (value == NULL) {
3147 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->Flags");
3148 0 : return -1;
3149 : }
3150 : {
3151 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Flags));
3152 0 : if (PyLong_Check(value)) {
3153 0 : unsigned long long test_var;
3154 0 : test_var = PyLong_AsUnsignedLongLong(value);
3155 0 : if (PyErr_Occurred() != NULL) {
3156 0 : return -1;
3157 : }
3158 0 : if (test_var > uint_max) {
3159 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3160 : PyLong_Type.tp_name, uint_max, test_var);
3161 0 : return -1;
3162 : }
3163 0 : object->Flags = test_var;
3164 : } else {
3165 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3166 : PyLong_Type.tp_name);
3167 0 : return -1;
3168 : }
3169 : }
3170 0 : return 0;
3171 : }
3172 :
3173 0 : static PyObject *py_DNS_ADDR_ARRAY_get_MatchFlag(PyObject *obj, void *closure)
3174 : {
3175 0 : struct DNS_ADDR_ARRAY *object = pytalloc_get_ptr(obj);
3176 0 : PyObject *py_MatchFlag;
3177 0 : py_MatchFlag = PyLong_FromUnsignedLongLong((uint32_t)(object->MatchFlag));
3178 0 : return py_MatchFlag;
3179 : }
3180 :
3181 0 : static int py_DNS_ADDR_ARRAY_set_MatchFlag(PyObject *py_obj, PyObject *value, void *closure)
3182 : {
3183 0 : struct DNS_ADDR_ARRAY *object = pytalloc_get_ptr(py_obj);
3184 0 : if (value == NULL) {
3185 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->MatchFlag");
3186 0 : return -1;
3187 : }
3188 : {
3189 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->MatchFlag));
3190 0 : if (PyLong_Check(value)) {
3191 0 : unsigned long long test_var;
3192 0 : test_var = PyLong_AsUnsignedLongLong(value);
3193 0 : if (PyErr_Occurred() != NULL) {
3194 0 : return -1;
3195 : }
3196 0 : if (test_var > uint_max) {
3197 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3198 : PyLong_Type.tp_name, uint_max, test_var);
3199 0 : return -1;
3200 : }
3201 0 : object->MatchFlag = test_var;
3202 : } else {
3203 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3204 : PyLong_Type.tp_name);
3205 0 : return -1;
3206 : }
3207 : }
3208 0 : return 0;
3209 : }
3210 :
3211 0 : static PyObject *py_DNS_ADDR_ARRAY_get_Reserved1(PyObject *obj, void *closure)
3212 : {
3213 0 : struct DNS_ADDR_ARRAY *object = pytalloc_get_ptr(obj);
3214 0 : PyObject *py_Reserved1;
3215 0 : py_Reserved1 = PyLong_FromUnsignedLongLong((uint32_t)(object->Reserved1));
3216 0 : return py_Reserved1;
3217 : }
3218 :
3219 0 : static int py_DNS_ADDR_ARRAY_set_Reserved1(PyObject *py_obj, PyObject *value, void *closure)
3220 : {
3221 0 : struct DNS_ADDR_ARRAY *object = pytalloc_get_ptr(py_obj);
3222 0 : if (value == NULL) {
3223 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->Reserved1");
3224 0 : return -1;
3225 : }
3226 : {
3227 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Reserved1));
3228 0 : if (PyLong_Check(value)) {
3229 0 : unsigned long long test_var;
3230 0 : test_var = PyLong_AsUnsignedLongLong(value);
3231 0 : if (PyErr_Occurred() != NULL) {
3232 0 : return -1;
3233 : }
3234 0 : if (test_var > uint_max) {
3235 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3236 : PyLong_Type.tp_name, uint_max, test_var);
3237 0 : return -1;
3238 : }
3239 0 : object->Reserved1 = test_var;
3240 : } else {
3241 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3242 : PyLong_Type.tp_name);
3243 0 : return -1;
3244 : }
3245 : }
3246 0 : return 0;
3247 : }
3248 :
3249 0 : static PyObject *py_DNS_ADDR_ARRAY_get_Reserved2(PyObject *obj, void *closure)
3250 : {
3251 0 : struct DNS_ADDR_ARRAY *object = pytalloc_get_ptr(obj);
3252 0 : PyObject *py_Reserved2;
3253 0 : py_Reserved2 = PyLong_FromUnsignedLongLong((uint32_t)(object->Reserved2));
3254 0 : return py_Reserved2;
3255 : }
3256 :
3257 0 : static int py_DNS_ADDR_ARRAY_set_Reserved2(PyObject *py_obj, PyObject *value, void *closure)
3258 : {
3259 0 : struct DNS_ADDR_ARRAY *object = pytalloc_get_ptr(py_obj);
3260 0 : if (value == NULL) {
3261 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->Reserved2");
3262 0 : return -1;
3263 : }
3264 : {
3265 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Reserved2));
3266 0 : if (PyLong_Check(value)) {
3267 0 : unsigned long long test_var;
3268 0 : test_var = PyLong_AsUnsignedLongLong(value);
3269 0 : if (PyErr_Occurred() != NULL) {
3270 0 : return -1;
3271 : }
3272 0 : if (test_var > uint_max) {
3273 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3274 : PyLong_Type.tp_name, uint_max, test_var);
3275 0 : return -1;
3276 : }
3277 0 : object->Reserved2 = test_var;
3278 : } else {
3279 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3280 : PyLong_Type.tp_name);
3281 0 : return -1;
3282 : }
3283 : }
3284 0 : return 0;
3285 : }
3286 :
3287 10 : static PyObject *py_DNS_ADDR_ARRAY_get_AddrArray(PyObject *obj, void *closure)
3288 : {
3289 10 : struct DNS_ADDR_ARRAY *object = pytalloc_get_ptr(obj);
3290 0 : PyObject *py_AddrArray;
3291 10 : py_AddrArray = PyList_New(object->AddrCount);
3292 10 : if (py_AddrArray == NULL) {
3293 0 : return NULL;
3294 : }
3295 : {
3296 : int AddrArray_cntr_0;
3297 30 : for (AddrArray_cntr_0 = 0; AddrArray_cntr_0 < (object->AddrCount); AddrArray_cntr_0++) {
3298 0 : PyObject *py_AddrArray_0;
3299 20 : py_AddrArray_0 = pytalloc_reference_ex(&DNS_ADDR_Type, object->AddrArray, &(object->AddrArray)[AddrArray_cntr_0]);
3300 20 : PyList_SetItem(py_AddrArray, AddrArray_cntr_0, py_AddrArray_0);
3301 : }
3302 : }
3303 10 : return py_AddrArray;
3304 : }
3305 :
3306 0 : static int py_DNS_ADDR_ARRAY_set_AddrArray(PyObject *py_obj, PyObject *value, void *closure)
3307 : {
3308 0 : struct DNS_ADDR_ARRAY *object = pytalloc_get_ptr(py_obj);
3309 0 : if (value == NULL) {
3310 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->AddrArray");
3311 0 : return -1;
3312 : }
3313 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
3314 : {
3315 0 : int AddrArray_cntr_0;
3316 0 : object->AddrArray = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->AddrArray, PyList_GET_SIZE(value));
3317 0 : if (!object->AddrArray) { return -1; }
3318 0 : talloc_set_name_const(object->AddrArray, "ARRAY: object->AddrArray");
3319 0 : for (AddrArray_cntr_0 = 0; AddrArray_cntr_0 < PyList_GET_SIZE(value); AddrArray_cntr_0++) {
3320 0 : if (PyList_GET_ITEM(value, AddrArray_cntr_0) == NULL) {
3321 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->AddrArray)[AddrArray_cntr_0]");
3322 0 : return -1;
3323 : }
3324 0 : PY_CHECK_TYPE(&DNS_ADDR_Type, PyList_GET_ITEM(value, AddrArray_cntr_0), return -1;);
3325 0 : if (talloc_reference(object->AddrArray, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, AddrArray_cntr_0))) == NULL) {
3326 0 : PyErr_NoMemory();
3327 0 : return -1;
3328 : }
3329 0 : (object->AddrArray)[AddrArray_cntr_0] = *(struct DNS_ADDR *)pytalloc_get_ptr(PyList_GET_ITEM(value, AddrArray_cntr_0));
3330 : }
3331 : }
3332 0 : return 0;
3333 : }
3334 :
3335 : static PyGetSetDef py_DNS_ADDR_ARRAY_getsetters[] = {
3336 : {
3337 : .name = discard_const_p(char, "MaxCount"),
3338 : .get = py_DNS_ADDR_ARRAY_get_MaxCount,
3339 : .set = py_DNS_ADDR_ARRAY_set_MaxCount,
3340 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3341 : },
3342 : {
3343 : .name = discard_const_p(char, "AddrCount"),
3344 : .get = py_DNS_ADDR_ARRAY_get_AddrCount,
3345 : .set = py_DNS_ADDR_ARRAY_set_AddrCount,
3346 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3347 : },
3348 : {
3349 : .name = discard_const_p(char, "Tag"),
3350 : .get = py_DNS_ADDR_ARRAY_get_Tag,
3351 : .set = py_DNS_ADDR_ARRAY_set_Tag,
3352 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3353 : },
3354 : {
3355 : .name = discard_const_p(char, "Family"),
3356 : .get = py_DNS_ADDR_ARRAY_get_Family,
3357 : .set = py_DNS_ADDR_ARRAY_set_Family,
3358 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
3359 : },
3360 : {
3361 : .name = discard_const_p(char, "WordReserved"),
3362 : .get = py_DNS_ADDR_ARRAY_get_WordReserved,
3363 : .set = py_DNS_ADDR_ARRAY_set_WordReserved,
3364 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
3365 : },
3366 : {
3367 : .name = discard_const_p(char, "Flags"),
3368 : .get = py_DNS_ADDR_ARRAY_get_Flags,
3369 : .set = py_DNS_ADDR_ARRAY_set_Flags,
3370 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3371 : },
3372 : {
3373 : .name = discard_const_p(char, "MatchFlag"),
3374 : .get = py_DNS_ADDR_ARRAY_get_MatchFlag,
3375 : .set = py_DNS_ADDR_ARRAY_set_MatchFlag,
3376 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3377 : },
3378 : {
3379 : .name = discard_const_p(char, "Reserved1"),
3380 : .get = py_DNS_ADDR_ARRAY_get_Reserved1,
3381 : .set = py_DNS_ADDR_ARRAY_set_Reserved1,
3382 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3383 : },
3384 : {
3385 : .name = discard_const_p(char, "Reserved2"),
3386 : .get = py_DNS_ADDR_ARRAY_get_Reserved2,
3387 : .set = py_DNS_ADDR_ARRAY_set_Reserved2,
3388 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3389 : },
3390 : {
3391 : .name = discard_const_p(char, "AddrArray"),
3392 : .get = py_DNS_ADDR_ARRAY_get_AddrArray,
3393 : .set = py_DNS_ADDR_ARRAY_set_AddrArray,
3394 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR")
3395 : },
3396 : { .name = NULL }
3397 : };
3398 :
3399 0 : static PyObject *py_DNS_ADDR_ARRAY_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3400 : {
3401 0 : return pytalloc_new(struct DNS_ADDR_ARRAY, type);
3402 : }
3403 :
3404 :
3405 : static PyTypeObject DNS_ADDR_ARRAY_Type = {
3406 : PyVarObject_HEAD_INIT(NULL, 0)
3407 : .tp_name = "dnsserver.DNS_ADDR_ARRAY",
3408 : .tp_getset = py_DNS_ADDR_ARRAY_getsetters,
3409 : .tp_methods = NULL,
3410 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3411 : .tp_new = py_DNS_ADDR_ARRAY_new,
3412 : };
3413 :
3414 :
3415 0 : static PyObject *py_DNS_RPC_IP_VALIDATE_get_dwRpcStructureVersion(PyObject *obj, void *closure)
3416 : {
3417 0 : struct DNS_RPC_IP_VALIDATE *object = pytalloc_get_ptr(obj);
3418 0 : PyObject *py_dwRpcStructureVersion;
3419 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
3420 0 : return py_dwRpcStructureVersion;
3421 : }
3422 :
3423 0 : static int py_DNS_RPC_IP_VALIDATE_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
3424 : {
3425 0 : struct DNS_RPC_IP_VALIDATE *object = pytalloc_get_ptr(py_obj);
3426 0 : if (value == NULL) {
3427 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
3428 0 : return -1;
3429 : }
3430 : {
3431 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
3432 0 : if (PyLong_Check(value)) {
3433 0 : unsigned long long test_var;
3434 0 : test_var = PyLong_AsUnsignedLongLong(value);
3435 0 : if (PyErr_Occurred() != NULL) {
3436 0 : return -1;
3437 : }
3438 0 : if (test_var > uint_max) {
3439 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3440 : PyLong_Type.tp_name, uint_max, test_var);
3441 0 : return -1;
3442 : }
3443 0 : object->dwRpcStructureVersion = test_var;
3444 : } else {
3445 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3446 : PyLong_Type.tp_name);
3447 0 : return -1;
3448 : }
3449 : }
3450 0 : return 0;
3451 : }
3452 :
3453 0 : static PyObject *py_DNS_RPC_IP_VALIDATE_get_dwReserved0(PyObject *obj, void *closure)
3454 : {
3455 0 : struct DNS_RPC_IP_VALIDATE *object = pytalloc_get_ptr(obj);
3456 0 : PyObject *py_dwReserved0;
3457 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
3458 0 : return py_dwReserved0;
3459 : }
3460 :
3461 0 : static int py_DNS_RPC_IP_VALIDATE_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
3462 : {
3463 0 : struct DNS_RPC_IP_VALIDATE *object = pytalloc_get_ptr(py_obj);
3464 0 : if (value == NULL) {
3465 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
3466 0 : return -1;
3467 : }
3468 : {
3469 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
3470 0 : if (PyLong_Check(value)) {
3471 0 : unsigned long long test_var;
3472 0 : test_var = PyLong_AsUnsignedLongLong(value);
3473 0 : if (PyErr_Occurred() != NULL) {
3474 0 : return -1;
3475 : }
3476 0 : if (test_var > uint_max) {
3477 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3478 : PyLong_Type.tp_name, uint_max, test_var);
3479 0 : return -1;
3480 : }
3481 0 : object->dwReserved0 = test_var;
3482 : } else {
3483 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3484 : PyLong_Type.tp_name);
3485 0 : return -1;
3486 : }
3487 : }
3488 0 : return 0;
3489 : }
3490 :
3491 0 : static PyObject *py_DNS_RPC_IP_VALIDATE_get_dwContext(PyObject *obj, void *closure)
3492 : {
3493 0 : struct DNS_RPC_IP_VALIDATE *object = pytalloc_get_ptr(obj);
3494 0 : PyObject *py_dwContext;
3495 0 : py_dwContext = PyLong_FromUnsignedLongLong((uint32_t)(object->dwContext));
3496 0 : return py_dwContext;
3497 : }
3498 :
3499 0 : static int py_DNS_RPC_IP_VALIDATE_set_dwContext(PyObject *py_obj, PyObject *value, void *closure)
3500 : {
3501 0 : struct DNS_RPC_IP_VALIDATE *object = pytalloc_get_ptr(py_obj);
3502 0 : if (value == NULL) {
3503 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwContext");
3504 0 : return -1;
3505 : }
3506 : {
3507 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwContext));
3508 0 : if (PyLong_Check(value)) {
3509 0 : unsigned long long test_var;
3510 0 : test_var = PyLong_AsUnsignedLongLong(value);
3511 0 : if (PyErr_Occurred() != NULL) {
3512 0 : return -1;
3513 : }
3514 0 : if (test_var > uint_max) {
3515 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3516 : PyLong_Type.tp_name, uint_max, test_var);
3517 0 : return -1;
3518 : }
3519 0 : object->dwContext = test_var;
3520 : } else {
3521 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3522 : PyLong_Type.tp_name);
3523 0 : return -1;
3524 : }
3525 : }
3526 0 : return 0;
3527 : }
3528 :
3529 0 : static PyObject *py_DNS_RPC_IP_VALIDATE_get_dwReserved1(PyObject *obj, void *closure)
3530 : {
3531 0 : struct DNS_RPC_IP_VALIDATE *object = pytalloc_get_ptr(obj);
3532 0 : PyObject *py_dwReserved1;
3533 0 : py_dwReserved1 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved1));
3534 0 : return py_dwReserved1;
3535 : }
3536 :
3537 0 : static int py_DNS_RPC_IP_VALIDATE_set_dwReserved1(PyObject *py_obj, PyObject *value, void *closure)
3538 : {
3539 0 : struct DNS_RPC_IP_VALIDATE *object = pytalloc_get_ptr(py_obj);
3540 0 : if (value == NULL) {
3541 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved1");
3542 0 : return -1;
3543 : }
3544 : {
3545 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved1));
3546 0 : if (PyLong_Check(value)) {
3547 0 : unsigned long long test_var;
3548 0 : test_var = PyLong_AsUnsignedLongLong(value);
3549 0 : if (PyErr_Occurred() != NULL) {
3550 0 : return -1;
3551 : }
3552 0 : if (test_var > uint_max) {
3553 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3554 : PyLong_Type.tp_name, uint_max, test_var);
3555 0 : return -1;
3556 : }
3557 0 : object->dwReserved1 = test_var;
3558 : } else {
3559 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3560 : PyLong_Type.tp_name);
3561 0 : return -1;
3562 : }
3563 : }
3564 0 : return 0;
3565 : }
3566 :
3567 0 : static PyObject *py_DNS_RPC_IP_VALIDATE_get_pszContextName(PyObject *obj, void *closure)
3568 : {
3569 0 : struct DNS_RPC_IP_VALIDATE *object = pytalloc_get_ptr(obj);
3570 0 : PyObject *py_pszContextName;
3571 0 : if (object->pszContextName == NULL) {
3572 0 : Py_RETURN_NONE;
3573 : }
3574 0 : if (object->pszContextName == NULL) {
3575 0 : py_pszContextName = Py_None;
3576 0 : Py_INCREF(py_pszContextName);
3577 : } else {
3578 0 : if (object->pszContextName == NULL) {
3579 0 : py_pszContextName = Py_None;
3580 0 : Py_INCREF(py_pszContextName);
3581 : } else {
3582 0 : py_pszContextName = PyUnicode_Decode(object->pszContextName, strlen(object->pszContextName), "utf-8", "ignore");
3583 : }
3584 : }
3585 0 : return py_pszContextName;
3586 : }
3587 :
3588 0 : static int py_DNS_RPC_IP_VALIDATE_set_pszContextName(PyObject *py_obj, PyObject *value, void *closure)
3589 : {
3590 0 : struct DNS_RPC_IP_VALIDATE *object = pytalloc_get_ptr(py_obj);
3591 0 : if (value == NULL) {
3592 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszContextName");
3593 0 : return -1;
3594 : }
3595 0 : if (value == Py_None) {
3596 0 : object->pszContextName = NULL;
3597 : } else {
3598 0 : object->pszContextName = NULL;
3599 : {
3600 0 : const char *test_str;
3601 0 : const char *talloc_str;
3602 0 : PyObject *unicode = NULL;
3603 0 : if (PyUnicode_Check(value)) {
3604 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
3605 0 : if (unicode == NULL) {
3606 0 : return -1;
3607 : }
3608 0 : test_str = PyBytes_AS_STRING(unicode);
3609 0 : } else if (PyBytes_Check(value)) {
3610 0 : test_str = PyBytes_AS_STRING(value);
3611 : } else {
3612 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
3613 0 : return -1;
3614 : }
3615 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
3616 0 : if (unicode != NULL) {
3617 0 : Py_DECREF(unicode);
3618 : }
3619 0 : if (talloc_str == NULL) {
3620 0 : PyErr_NoMemory();
3621 0 : return -1;
3622 : }
3623 0 : object->pszContextName = talloc_str;
3624 : }
3625 : }
3626 0 : return 0;
3627 : }
3628 :
3629 0 : static PyObject *py_DNS_RPC_IP_VALIDATE_get_aipValidateAddrs(PyObject *obj, void *closure)
3630 : {
3631 0 : struct DNS_RPC_IP_VALIDATE *object = pytalloc_get_ptr(obj);
3632 0 : PyObject *py_aipValidateAddrs;
3633 0 : if (object->aipValidateAddrs == NULL) {
3634 0 : Py_RETURN_NONE;
3635 : }
3636 0 : if (object->aipValidateAddrs == NULL) {
3637 0 : py_aipValidateAddrs = Py_None;
3638 0 : Py_INCREF(py_aipValidateAddrs);
3639 : } else {
3640 0 : py_aipValidateAddrs = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipValidateAddrs, object->aipValidateAddrs);
3641 : }
3642 0 : return py_aipValidateAddrs;
3643 : }
3644 :
3645 0 : static int py_DNS_RPC_IP_VALIDATE_set_aipValidateAddrs(PyObject *py_obj, PyObject *value, void *closure)
3646 : {
3647 0 : struct DNS_RPC_IP_VALIDATE *object = pytalloc_get_ptr(py_obj);
3648 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipValidateAddrs));
3649 0 : if (value == NULL) {
3650 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipValidateAddrs");
3651 0 : return -1;
3652 : }
3653 0 : if (value == Py_None) {
3654 0 : object->aipValidateAddrs = NULL;
3655 : } else {
3656 0 : object->aipValidateAddrs = NULL;
3657 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
3658 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
3659 0 : PyErr_NoMemory();
3660 0 : return -1;
3661 : }
3662 0 : object->aipValidateAddrs = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
3663 : }
3664 0 : return 0;
3665 : }
3666 :
3667 : static PyGetSetDef py_DNS_RPC_IP_VALIDATE_getsetters[] = {
3668 : {
3669 : .name = discard_const_p(char, "dwRpcStructureVersion"),
3670 : .get = py_DNS_RPC_IP_VALIDATE_get_dwRpcStructureVersion,
3671 : .set = py_DNS_RPC_IP_VALIDATE_set_dwRpcStructureVersion,
3672 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3673 : },
3674 : {
3675 : .name = discard_const_p(char, "dwReserved0"),
3676 : .get = py_DNS_RPC_IP_VALIDATE_get_dwReserved0,
3677 : .set = py_DNS_RPC_IP_VALIDATE_set_dwReserved0,
3678 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3679 : },
3680 : {
3681 : .name = discard_const_p(char, "dwContext"),
3682 : .get = py_DNS_RPC_IP_VALIDATE_get_dwContext,
3683 : .set = py_DNS_RPC_IP_VALIDATE_set_dwContext,
3684 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3685 : },
3686 : {
3687 : .name = discard_const_p(char, "dwReserved1"),
3688 : .get = py_DNS_RPC_IP_VALIDATE_get_dwReserved1,
3689 : .set = py_DNS_RPC_IP_VALIDATE_set_dwReserved1,
3690 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3691 : },
3692 : {
3693 : .name = discard_const_p(char, "pszContextName"),
3694 : .get = py_DNS_RPC_IP_VALIDATE_get_pszContextName,
3695 : .set = py_DNS_RPC_IP_VALIDATE_set_pszContextName,
3696 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
3697 : },
3698 : {
3699 : .name = discard_const_p(char, "aipValidateAddrs"),
3700 : .get = py_DNS_RPC_IP_VALIDATE_get_aipValidateAddrs,
3701 : .set = py_DNS_RPC_IP_VALIDATE_set_aipValidateAddrs,
3702 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
3703 : },
3704 : { .name = NULL }
3705 : };
3706 :
3707 0 : static PyObject *py_DNS_RPC_IP_VALIDATE_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3708 : {
3709 0 : return pytalloc_new(struct DNS_RPC_IP_VALIDATE, type);
3710 : }
3711 :
3712 :
3713 : static PyTypeObject DNS_RPC_IP_VALIDATE_Type = {
3714 : PyVarObject_HEAD_INIT(NULL, 0)
3715 : .tp_name = "dnsserver.DNS_RPC_IP_VALIDATE",
3716 : .tp_getset = py_DNS_RPC_IP_VALIDATE_getsetters,
3717 : .tp_methods = NULL,
3718 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3719 : .tp_new = py_DNS_RPC_IP_VALIDATE_new,
3720 : };
3721 :
3722 :
3723 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwVersion(PyObject *obj, void *closure)
3724 : {
3725 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
3726 0 : PyObject *py_dwVersion;
3727 1 : py_dwVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwVersion));
3728 1 : return py_dwVersion;
3729 : }
3730 :
3731 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwVersion(PyObject *py_obj, PyObject *value, void *closure)
3732 : {
3733 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
3734 0 : if (value == NULL) {
3735 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwVersion");
3736 0 : return -1;
3737 : }
3738 : {
3739 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwVersion));
3740 0 : if (PyLong_Check(value)) {
3741 0 : unsigned long long test_var;
3742 0 : test_var = PyLong_AsUnsignedLongLong(value);
3743 0 : if (PyErr_Occurred() != NULL) {
3744 0 : return -1;
3745 : }
3746 0 : if (test_var > uint_max) {
3747 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3748 : PyLong_Type.tp_name, uint_max, test_var);
3749 0 : return -1;
3750 : }
3751 0 : object->dwVersion = test_var;
3752 : } else {
3753 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3754 : PyLong_Type.tp_name);
3755 0 : return -1;
3756 : }
3757 : }
3758 0 : return 0;
3759 : }
3760 :
3761 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fBootMethod(PyObject *obj, void *closure)
3762 : {
3763 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
3764 0 : PyObject *py_fBootMethod;
3765 1 : py_fBootMethod = PyLong_FromLong((uint16_t)(object->fBootMethod));
3766 1 : return py_fBootMethod;
3767 : }
3768 :
3769 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fBootMethod(PyObject *py_obj, PyObject *value, void *closure)
3770 : {
3771 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
3772 0 : if (value == NULL) {
3773 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fBootMethod");
3774 0 : return -1;
3775 : }
3776 : {
3777 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fBootMethod));
3778 0 : if (PyLong_Check(value)) {
3779 0 : unsigned long long test_var;
3780 0 : test_var = PyLong_AsUnsignedLongLong(value);
3781 0 : if (PyErr_Occurred() != NULL) {
3782 0 : return -1;
3783 : }
3784 0 : if (test_var > uint_max) {
3785 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3786 : PyLong_Type.tp_name, uint_max, test_var);
3787 0 : return -1;
3788 : }
3789 0 : object->fBootMethod = test_var;
3790 : } else {
3791 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3792 : PyLong_Type.tp_name);
3793 0 : return -1;
3794 : }
3795 : }
3796 0 : return 0;
3797 : }
3798 :
3799 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fAdminConfigured(PyObject *obj, void *closure)
3800 : {
3801 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
3802 0 : PyObject *py_fAdminConfigured;
3803 1 : py_fAdminConfigured = PyLong_FromLong((uint16_t)(object->fAdminConfigured));
3804 1 : return py_fAdminConfigured;
3805 : }
3806 :
3807 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fAdminConfigured(PyObject *py_obj, PyObject *value, void *closure)
3808 : {
3809 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
3810 0 : if (value == NULL) {
3811 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAdminConfigured");
3812 0 : return -1;
3813 : }
3814 : {
3815 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAdminConfigured));
3816 0 : if (PyLong_Check(value)) {
3817 0 : unsigned long long test_var;
3818 0 : test_var = PyLong_AsUnsignedLongLong(value);
3819 0 : if (PyErr_Occurred() != NULL) {
3820 0 : return -1;
3821 : }
3822 0 : if (test_var > uint_max) {
3823 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3824 : PyLong_Type.tp_name, uint_max, test_var);
3825 0 : return -1;
3826 : }
3827 0 : object->fAdminConfigured = test_var;
3828 : } else {
3829 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3830 : PyLong_Type.tp_name);
3831 0 : return -1;
3832 : }
3833 : }
3834 0 : return 0;
3835 : }
3836 :
3837 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fAllowUpdate(PyObject *obj, void *closure)
3838 : {
3839 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
3840 0 : PyObject *py_fAllowUpdate;
3841 1 : py_fAllowUpdate = PyLong_FromLong((uint16_t)(object->fAllowUpdate));
3842 1 : return py_fAllowUpdate;
3843 : }
3844 :
3845 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
3846 : {
3847 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
3848 0 : if (value == NULL) {
3849 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAllowUpdate");
3850 0 : return -1;
3851 : }
3852 : {
3853 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAllowUpdate));
3854 0 : if (PyLong_Check(value)) {
3855 0 : unsigned long long test_var;
3856 0 : test_var = PyLong_AsUnsignedLongLong(value);
3857 0 : if (PyErr_Occurred() != NULL) {
3858 0 : return -1;
3859 : }
3860 0 : if (test_var > uint_max) {
3861 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3862 : PyLong_Type.tp_name, uint_max, test_var);
3863 0 : return -1;
3864 : }
3865 0 : object->fAllowUpdate = test_var;
3866 : } else {
3867 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3868 : PyLong_Type.tp_name);
3869 0 : return -1;
3870 : }
3871 : }
3872 0 : return 0;
3873 : }
3874 :
3875 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fDsAvailable(PyObject *obj, void *closure)
3876 : {
3877 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
3878 0 : PyObject *py_fDsAvailable;
3879 1 : py_fDsAvailable = PyLong_FromLong((uint16_t)(object->fDsAvailable));
3880 1 : return py_fDsAvailable;
3881 : }
3882 :
3883 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fDsAvailable(PyObject *py_obj, PyObject *value, void *closure)
3884 : {
3885 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
3886 0 : if (value == NULL) {
3887 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fDsAvailable");
3888 0 : return -1;
3889 : }
3890 : {
3891 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDsAvailable));
3892 0 : if (PyLong_Check(value)) {
3893 0 : unsigned long long test_var;
3894 0 : test_var = PyLong_AsUnsignedLongLong(value);
3895 0 : if (PyErr_Occurred() != NULL) {
3896 0 : return -1;
3897 : }
3898 0 : if (test_var > uint_max) {
3899 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3900 : PyLong_Type.tp_name, uint_max, test_var);
3901 0 : return -1;
3902 : }
3903 0 : object->fDsAvailable = test_var;
3904 : } else {
3905 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3906 : PyLong_Type.tp_name);
3907 0 : return -1;
3908 : }
3909 : }
3910 0 : return 0;
3911 : }
3912 :
3913 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_pszServerName(PyObject *obj, void *closure)
3914 : {
3915 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
3916 0 : PyObject *py_pszServerName;
3917 1 : if (object->pszServerName == NULL) {
3918 0 : Py_RETURN_NONE;
3919 : }
3920 1 : if (object->pszServerName == NULL) {
3921 0 : py_pszServerName = Py_None;
3922 0 : Py_INCREF(py_pszServerName);
3923 : } else {
3924 1 : if (object->pszServerName == NULL) {
3925 0 : py_pszServerName = Py_None;
3926 0 : Py_INCREF(py_pszServerName);
3927 : } else {
3928 1 : py_pszServerName = PyUnicode_Decode(object->pszServerName, strlen(object->pszServerName), "utf-8", "ignore");
3929 : }
3930 : }
3931 1 : return py_pszServerName;
3932 : }
3933 :
3934 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_pszServerName(PyObject *py_obj, PyObject *value, void *closure)
3935 : {
3936 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
3937 0 : if (value == NULL) {
3938 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszServerName");
3939 0 : return -1;
3940 : }
3941 0 : if (value == Py_None) {
3942 0 : object->pszServerName = NULL;
3943 : } else {
3944 0 : object->pszServerName = NULL;
3945 : {
3946 0 : const char *test_str;
3947 0 : const char *talloc_str;
3948 0 : PyObject *unicode = NULL;
3949 0 : if (PyUnicode_Check(value)) {
3950 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
3951 0 : if (unicode == NULL) {
3952 0 : return -1;
3953 : }
3954 0 : test_str = PyBytes_AS_STRING(unicode);
3955 0 : } else if (PyBytes_Check(value)) {
3956 0 : test_str = PyBytes_AS_STRING(value);
3957 : } else {
3958 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
3959 0 : return -1;
3960 : }
3961 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
3962 0 : if (unicode != NULL) {
3963 0 : Py_DECREF(unicode);
3964 : }
3965 0 : if (talloc_str == NULL) {
3966 0 : PyErr_NoMemory();
3967 0 : return -1;
3968 : }
3969 0 : object->pszServerName = talloc_str;
3970 : }
3971 : }
3972 0 : return 0;
3973 : }
3974 :
3975 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_pszDsContainer(PyObject *obj, void *closure)
3976 : {
3977 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
3978 0 : PyObject *py_pszDsContainer;
3979 1 : if (object->pszDsContainer == NULL) {
3980 0 : Py_RETURN_NONE;
3981 : }
3982 1 : if (object->pszDsContainer == NULL) {
3983 0 : py_pszDsContainer = Py_None;
3984 0 : Py_INCREF(py_pszDsContainer);
3985 : } else {
3986 1 : if (object->pszDsContainer == NULL) {
3987 0 : py_pszDsContainer = Py_None;
3988 0 : Py_INCREF(py_pszDsContainer);
3989 : } else {
3990 1 : py_pszDsContainer = PyUnicode_Decode(object->pszDsContainer, strlen(object->pszDsContainer), "utf-8", "ignore");
3991 : }
3992 : }
3993 1 : return py_pszDsContainer;
3994 : }
3995 :
3996 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_pszDsContainer(PyObject *py_obj, PyObject *value, void *closure)
3997 : {
3998 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
3999 0 : if (value == NULL) {
4000 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDsContainer");
4001 0 : return -1;
4002 : }
4003 0 : if (value == Py_None) {
4004 0 : object->pszDsContainer = NULL;
4005 : } else {
4006 0 : object->pszDsContainer = NULL;
4007 : {
4008 0 : const char *test_str;
4009 0 : const char *talloc_str;
4010 0 : PyObject *unicode = NULL;
4011 0 : if (PyUnicode_Check(value)) {
4012 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
4013 0 : if (unicode == NULL) {
4014 0 : return -1;
4015 : }
4016 0 : test_str = PyBytes_AS_STRING(unicode);
4017 0 : } else if (PyBytes_Check(value)) {
4018 0 : test_str = PyBytes_AS_STRING(value);
4019 : } else {
4020 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
4021 0 : return -1;
4022 : }
4023 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
4024 0 : if (unicode != NULL) {
4025 0 : Py_DECREF(unicode);
4026 : }
4027 0 : if (talloc_str == NULL) {
4028 0 : PyErr_NoMemory();
4029 0 : return -1;
4030 : }
4031 0 : object->pszDsContainer = talloc_str;
4032 : }
4033 : }
4034 0 : return 0;
4035 : }
4036 :
4037 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_aipServerAddrs(PyObject *obj, void *closure)
4038 : {
4039 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4040 0 : PyObject *py_aipServerAddrs;
4041 1 : if (object->aipServerAddrs == NULL) {
4042 0 : Py_RETURN_NONE;
4043 : }
4044 1 : if (object->aipServerAddrs == NULL) {
4045 0 : py_aipServerAddrs = Py_None;
4046 0 : Py_INCREF(py_aipServerAddrs);
4047 : } else {
4048 1 : py_aipServerAddrs = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipServerAddrs, object->aipServerAddrs);
4049 : }
4050 1 : return py_aipServerAddrs;
4051 : }
4052 :
4053 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_aipServerAddrs(PyObject *py_obj, PyObject *value, void *closure)
4054 : {
4055 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4056 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipServerAddrs));
4057 0 : if (value == NULL) {
4058 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipServerAddrs");
4059 0 : return -1;
4060 : }
4061 0 : if (value == Py_None) {
4062 0 : object->aipServerAddrs = NULL;
4063 : } else {
4064 0 : object->aipServerAddrs = NULL;
4065 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
4066 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
4067 0 : PyErr_NoMemory();
4068 0 : return -1;
4069 : }
4070 0 : object->aipServerAddrs = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
4071 : }
4072 0 : return 0;
4073 : }
4074 :
4075 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_aipListenAddrs(PyObject *obj, void *closure)
4076 : {
4077 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4078 0 : PyObject *py_aipListenAddrs;
4079 1 : if (object->aipListenAddrs == NULL) {
4080 0 : Py_RETURN_NONE;
4081 : }
4082 1 : if (object->aipListenAddrs == NULL) {
4083 0 : py_aipListenAddrs = Py_None;
4084 0 : Py_INCREF(py_aipListenAddrs);
4085 : } else {
4086 1 : py_aipListenAddrs = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipListenAddrs, object->aipListenAddrs);
4087 : }
4088 1 : return py_aipListenAddrs;
4089 : }
4090 :
4091 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_aipListenAddrs(PyObject *py_obj, PyObject *value, void *closure)
4092 : {
4093 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4094 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipListenAddrs));
4095 0 : if (value == NULL) {
4096 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipListenAddrs");
4097 0 : return -1;
4098 : }
4099 0 : if (value == Py_None) {
4100 0 : object->aipListenAddrs = NULL;
4101 : } else {
4102 0 : object->aipListenAddrs = NULL;
4103 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
4104 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
4105 0 : PyErr_NoMemory();
4106 0 : return -1;
4107 : }
4108 0 : object->aipListenAddrs = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
4109 : }
4110 0 : return 0;
4111 : }
4112 :
4113 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_aipForwarders(PyObject *obj, void *closure)
4114 : {
4115 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4116 0 : PyObject *py_aipForwarders;
4117 1 : if (object->aipForwarders == NULL) {
4118 1 : Py_RETURN_NONE;
4119 : }
4120 0 : if (object->aipForwarders == NULL) {
4121 0 : py_aipForwarders = Py_None;
4122 0 : Py_INCREF(py_aipForwarders);
4123 : } else {
4124 0 : py_aipForwarders = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipForwarders, object->aipForwarders);
4125 : }
4126 0 : return py_aipForwarders;
4127 : }
4128 :
4129 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_aipForwarders(PyObject *py_obj, PyObject *value, void *closure)
4130 : {
4131 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4132 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipForwarders));
4133 0 : if (value == NULL) {
4134 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipForwarders");
4135 0 : return -1;
4136 : }
4137 0 : if (value == Py_None) {
4138 0 : object->aipForwarders = NULL;
4139 : } else {
4140 0 : object->aipForwarders = NULL;
4141 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
4142 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
4143 0 : PyErr_NoMemory();
4144 0 : return -1;
4145 : }
4146 0 : object->aipForwarders = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
4147 : }
4148 0 : return 0;
4149 : }
4150 :
4151 0 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_pExtension1(PyObject *obj, void *closure)
4152 : {
4153 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4154 0 : PyObject *py_pExtension1;
4155 0 : if (object->pExtension1 == NULL) {
4156 0 : Py_RETURN_NONE;
4157 : }
4158 0 : if (object->pExtension1 == NULL) {
4159 0 : py_pExtension1 = Py_None;
4160 0 : Py_INCREF(py_pExtension1);
4161 : } else {
4162 0 : py_pExtension1 = PyLong_FromUnsignedLongLong((uint32_t)(*object->pExtension1));
4163 : }
4164 0 : return py_pExtension1;
4165 : }
4166 :
4167 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_pExtension1(PyObject *py_obj, PyObject *value, void *closure)
4168 : {
4169 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4170 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->pExtension1));
4171 0 : if (value == NULL) {
4172 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pExtension1");
4173 0 : return -1;
4174 : }
4175 0 : if (value == Py_None) {
4176 0 : object->pExtension1 = NULL;
4177 : } else {
4178 0 : object->pExtension1 = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pExtension1);
4179 0 : if (object->pExtension1 == NULL) {
4180 0 : PyErr_NoMemory();
4181 0 : return -1;
4182 : }
4183 : {
4184 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->pExtension1));
4185 0 : if (PyLong_Check(value)) {
4186 0 : unsigned long long test_var;
4187 0 : test_var = PyLong_AsUnsignedLongLong(value);
4188 0 : if (PyErr_Occurred() != NULL) {
4189 0 : return -1;
4190 : }
4191 0 : if (test_var > uint_max) {
4192 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4193 : PyLong_Type.tp_name, uint_max, test_var);
4194 0 : return -1;
4195 : }
4196 0 : *object->pExtension1 = test_var;
4197 : } else {
4198 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4199 : PyLong_Type.tp_name);
4200 0 : return -1;
4201 : }
4202 : }
4203 : }
4204 0 : return 0;
4205 : }
4206 :
4207 0 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_pExtension2(PyObject *obj, void *closure)
4208 : {
4209 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4210 0 : PyObject *py_pExtension2;
4211 0 : if (object->pExtension2 == NULL) {
4212 0 : Py_RETURN_NONE;
4213 : }
4214 0 : if (object->pExtension2 == NULL) {
4215 0 : py_pExtension2 = Py_None;
4216 0 : Py_INCREF(py_pExtension2);
4217 : } else {
4218 0 : py_pExtension2 = PyLong_FromUnsignedLongLong((uint32_t)(*object->pExtension2));
4219 : }
4220 0 : return py_pExtension2;
4221 : }
4222 :
4223 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_pExtension2(PyObject *py_obj, PyObject *value, void *closure)
4224 : {
4225 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4226 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->pExtension2));
4227 0 : if (value == NULL) {
4228 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pExtension2");
4229 0 : return -1;
4230 : }
4231 0 : if (value == Py_None) {
4232 0 : object->pExtension2 = NULL;
4233 : } else {
4234 0 : object->pExtension2 = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pExtension2);
4235 0 : if (object->pExtension2 == NULL) {
4236 0 : PyErr_NoMemory();
4237 0 : return -1;
4238 : }
4239 : {
4240 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->pExtension2));
4241 0 : if (PyLong_Check(value)) {
4242 0 : unsigned long long test_var;
4243 0 : test_var = PyLong_AsUnsignedLongLong(value);
4244 0 : if (PyErr_Occurred() != NULL) {
4245 0 : return -1;
4246 : }
4247 0 : if (test_var > uint_max) {
4248 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4249 : PyLong_Type.tp_name, uint_max, test_var);
4250 0 : return -1;
4251 : }
4252 0 : *object->pExtension2 = test_var;
4253 : } else {
4254 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4255 : PyLong_Type.tp_name);
4256 0 : return -1;
4257 : }
4258 : }
4259 : }
4260 0 : return 0;
4261 : }
4262 :
4263 0 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_pExtension3(PyObject *obj, void *closure)
4264 : {
4265 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4266 0 : PyObject *py_pExtension3;
4267 0 : if (object->pExtension3 == NULL) {
4268 0 : Py_RETURN_NONE;
4269 : }
4270 0 : if (object->pExtension3 == NULL) {
4271 0 : py_pExtension3 = Py_None;
4272 0 : Py_INCREF(py_pExtension3);
4273 : } else {
4274 0 : py_pExtension3 = PyLong_FromUnsignedLongLong((uint32_t)(*object->pExtension3));
4275 : }
4276 0 : return py_pExtension3;
4277 : }
4278 :
4279 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_pExtension3(PyObject *py_obj, PyObject *value, void *closure)
4280 : {
4281 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4282 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->pExtension3));
4283 0 : if (value == NULL) {
4284 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pExtension3");
4285 0 : return -1;
4286 : }
4287 0 : if (value == Py_None) {
4288 0 : object->pExtension3 = NULL;
4289 : } else {
4290 0 : object->pExtension3 = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pExtension3);
4291 0 : if (object->pExtension3 == NULL) {
4292 0 : PyErr_NoMemory();
4293 0 : return -1;
4294 : }
4295 : {
4296 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->pExtension3));
4297 0 : if (PyLong_Check(value)) {
4298 0 : unsigned long long test_var;
4299 0 : test_var = PyLong_AsUnsignedLongLong(value);
4300 0 : if (PyErr_Occurred() != NULL) {
4301 0 : return -1;
4302 : }
4303 0 : if (test_var > uint_max) {
4304 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4305 : PyLong_Type.tp_name, uint_max, test_var);
4306 0 : return -1;
4307 : }
4308 0 : *object->pExtension3 = test_var;
4309 : } else {
4310 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4311 : PyLong_Type.tp_name);
4312 0 : return -1;
4313 : }
4314 : }
4315 : }
4316 0 : return 0;
4317 : }
4318 :
4319 0 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_pExtension4(PyObject *obj, void *closure)
4320 : {
4321 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4322 0 : PyObject *py_pExtension4;
4323 0 : if (object->pExtension4 == NULL) {
4324 0 : Py_RETURN_NONE;
4325 : }
4326 0 : if (object->pExtension4 == NULL) {
4327 0 : py_pExtension4 = Py_None;
4328 0 : Py_INCREF(py_pExtension4);
4329 : } else {
4330 0 : py_pExtension4 = PyLong_FromUnsignedLongLong((uint32_t)(*object->pExtension4));
4331 : }
4332 0 : return py_pExtension4;
4333 : }
4334 :
4335 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_pExtension4(PyObject *py_obj, PyObject *value, void *closure)
4336 : {
4337 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4338 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->pExtension4));
4339 0 : if (value == NULL) {
4340 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pExtension4");
4341 0 : return -1;
4342 : }
4343 0 : if (value == Py_None) {
4344 0 : object->pExtension4 = NULL;
4345 : } else {
4346 0 : object->pExtension4 = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pExtension4);
4347 0 : if (object->pExtension4 == NULL) {
4348 0 : PyErr_NoMemory();
4349 0 : return -1;
4350 : }
4351 : {
4352 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->pExtension4));
4353 0 : if (PyLong_Check(value)) {
4354 0 : unsigned long long test_var;
4355 0 : test_var = PyLong_AsUnsignedLongLong(value);
4356 0 : if (PyErr_Occurred() != NULL) {
4357 0 : return -1;
4358 : }
4359 0 : if (test_var > uint_max) {
4360 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4361 : PyLong_Type.tp_name, uint_max, test_var);
4362 0 : return -1;
4363 : }
4364 0 : *object->pExtension4 = test_var;
4365 : } else {
4366 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4367 : PyLong_Type.tp_name);
4368 0 : return -1;
4369 : }
4370 : }
4371 : }
4372 0 : return 0;
4373 : }
4374 :
4375 0 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_pExtension5(PyObject *obj, void *closure)
4376 : {
4377 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4378 0 : PyObject *py_pExtension5;
4379 0 : if (object->pExtension5 == NULL) {
4380 0 : Py_RETURN_NONE;
4381 : }
4382 0 : if (object->pExtension5 == NULL) {
4383 0 : py_pExtension5 = Py_None;
4384 0 : Py_INCREF(py_pExtension5);
4385 : } else {
4386 0 : py_pExtension5 = PyLong_FromUnsignedLongLong((uint32_t)(*object->pExtension5));
4387 : }
4388 0 : return py_pExtension5;
4389 : }
4390 :
4391 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_pExtension5(PyObject *py_obj, PyObject *value, void *closure)
4392 : {
4393 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4394 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->pExtension5));
4395 0 : if (value == NULL) {
4396 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pExtension5");
4397 0 : return -1;
4398 : }
4399 0 : if (value == Py_None) {
4400 0 : object->pExtension5 = NULL;
4401 : } else {
4402 0 : object->pExtension5 = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pExtension5);
4403 0 : if (object->pExtension5 == NULL) {
4404 0 : PyErr_NoMemory();
4405 0 : return -1;
4406 : }
4407 : {
4408 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->pExtension5));
4409 0 : if (PyLong_Check(value)) {
4410 0 : unsigned long long test_var;
4411 0 : test_var = PyLong_AsUnsignedLongLong(value);
4412 0 : if (PyErr_Occurred() != NULL) {
4413 0 : return -1;
4414 : }
4415 0 : if (test_var > uint_max) {
4416 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4417 : PyLong_Type.tp_name, uint_max, test_var);
4418 0 : return -1;
4419 : }
4420 0 : *object->pExtension5 = test_var;
4421 : } else {
4422 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4423 : PyLong_Type.tp_name);
4424 0 : return -1;
4425 : }
4426 : }
4427 : }
4428 0 : return 0;
4429 : }
4430 :
4431 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwLogLevel(PyObject *obj, void *closure)
4432 : {
4433 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4434 0 : PyObject *py_dwLogLevel;
4435 1 : py_dwLogLevel = PyLong_FromUnsignedLongLong((uint32_t)(object->dwLogLevel));
4436 1 : return py_dwLogLevel;
4437 : }
4438 :
4439 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwLogLevel(PyObject *py_obj, PyObject *value, void *closure)
4440 : {
4441 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4442 0 : if (value == NULL) {
4443 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwLogLevel");
4444 0 : return -1;
4445 : }
4446 : {
4447 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLogLevel));
4448 0 : if (PyLong_Check(value)) {
4449 0 : unsigned long long test_var;
4450 0 : test_var = PyLong_AsUnsignedLongLong(value);
4451 0 : if (PyErr_Occurred() != NULL) {
4452 0 : return -1;
4453 : }
4454 0 : if (test_var > uint_max) {
4455 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4456 : PyLong_Type.tp_name, uint_max, test_var);
4457 0 : return -1;
4458 : }
4459 0 : object->dwLogLevel = test_var;
4460 : } else {
4461 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4462 : PyLong_Type.tp_name);
4463 0 : return -1;
4464 : }
4465 : }
4466 0 : return 0;
4467 : }
4468 :
4469 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwDebugLevel(PyObject *obj, void *closure)
4470 : {
4471 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4472 0 : PyObject *py_dwDebugLevel;
4473 1 : py_dwDebugLevel = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDebugLevel));
4474 1 : return py_dwDebugLevel;
4475 : }
4476 :
4477 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwDebugLevel(PyObject *py_obj, PyObject *value, void *closure)
4478 : {
4479 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4480 0 : if (value == NULL) {
4481 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDebugLevel");
4482 0 : return -1;
4483 : }
4484 : {
4485 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDebugLevel));
4486 0 : if (PyLong_Check(value)) {
4487 0 : unsigned long long test_var;
4488 0 : test_var = PyLong_AsUnsignedLongLong(value);
4489 0 : if (PyErr_Occurred() != NULL) {
4490 0 : return -1;
4491 : }
4492 0 : if (test_var > uint_max) {
4493 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4494 : PyLong_Type.tp_name, uint_max, test_var);
4495 0 : return -1;
4496 : }
4497 0 : object->dwDebugLevel = test_var;
4498 : } else {
4499 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4500 : PyLong_Type.tp_name);
4501 0 : return -1;
4502 : }
4503 : }
4504 0 : return 0;
4505 : }
4506 :
4507 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwForwardTimeout(PyObject *obj, void *closure)
4508 : {
4509 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4510 0 : PyObject *py_dwForwardTimeout;
4511 1 : py_dwForwardTimeout = PyLong_FromUnsignedLongLong((uint32_t)(object->dwForwardTimeout));
4512 1 : return py_dwForwardTimeout;
4513 : }
4514 :
4515 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwForwardTimeout(PyObject *py_obj, PyObject *value, void *closure)
4516 : {
4517 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4518 0 : if (value == NULL) {
4519 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwForwardTimeout");
4520 0 : return -1;
4521 : }
4522 : {
4523 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwForwardTimeout));
4524 0 : if (PyLong_Check(value)) {
4525 0 : unsigned long long test_var;
4526 0 : test_var = PyLong_AsUnsignedLongLong(value);
4527 0 : if (PyErr_Occurred() != NULL) {
4528 0 : return -1;
4529 : }
4530 0 : if (test_var > uint_max) {
4531 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4532 : PyLong_Type.tp_name, uint_max, test_var);
4533 0 : return -1;
4534 : }
4535 0 : object->dwForwardTimeout = test_var;
4536 : } else {
4537 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4538 : PyLong_Type.tp_name);
4539 0 : return -1;
4540 : }
4541 : }
4542 0 : return 0;
4543 : }
4544 :
4545 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwRpcProtocol(PyObject *obj, void *closure)
4546 : {
4547 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4548 0 : PyObject *py_dwRpcProtocol;
4549 1 : py_dwRpcProtocol = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcProtocol));
4550 1 : return py_dwRpcProtocol;
4551 : }
4552 :
4553 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwRpcProtocol(PyObject *py_obj, PyObject *value, void *closure)
4554 : {
4555 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4556 0 : if (value == NULL) {
4557 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcProtocol");
4558 0 : return -1;
4559 : }
4560 : {
4561 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcProtocol));
4562 0 : if (PyLong_Check(value)) {
4563 0 : unsigned long long test_var;
4564 0 : test_var = PyLong_AsUnsignedLongLong(value);
4565 0 : if (PyErr_Occurred() != NULL) {
4566 0 : return -1;
4567 : }
4568 0 : if (test_var > uint_max) {
4569 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4570 : PyLong_Type.tp_name, uint_max, test_var);
4571 0 : return -1;
4572 : }
4573 0 : object->dwRpcProtocol = test_var;
4574 : } else {
4575 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4576 : PyLong_Type.tp_name);
4577 0 : return -1;
4578 : }
4579 : }
4580 0 : return 0;
4581 : }
4582 :
4583 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwNameCheckFlag(PyObject *obj, void *closure)
4584 : {
4585 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4586 0 : PyObject *py_dwNameCheckFlag;
4587 1 : py_dwNameCheckFlag = PyLong_FromUnsignedLongLong((uint32_t)(object->dwNameCheckFlag));
4588 1 : return py_dwNameCheckFlag;
4589 : }
4590 :
4591 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwNameCheckFlag(PyObject *py_obj, PyObject *value, void *closure)
4592 : {
4593 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4594 0 : if (value == NULL) {
4595 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwNameCheckFlag");
4596 0 : return -1;
4597 : }
4598 : {
4599 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwNameCheckFlag));
4600 0 : if (PyLong_Check(value)) {
4601 0 : unsigned long long test_var;
4602 0 : test_var = PyLong_AsUnsignedLongLong(value);
4603 0 : if (PyErr_Occurred() != NULL) {
4604 0 : return -1;
4605 : }
4606 0 : if (test_var > uint_max) {
4607 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4608 : PyLong_Type.tp_name, uint_max, test_var);
4609 0 : return -1;
4610 : }
4611 0 : object->dwNameCheckFlag = test_var;
4612 : } else {
4613 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4614 : PyLong_Type.tp_name);
4615 0 : return -1;
4616 : }
4617 : }
4618 0 : return 0;
4619 : }
4620 :
4621 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_cAddressAnswerLimit(PyObject *obj, void *closure)
4622 : {
4623 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4624 0 : PyObject *py_cAddressAnswerLimit;
4625 1 : py_cAddressAnswerLimit = PyLong_FromUnsignedLongLong((uint32_t)(object->cAddressAnswerLimit));
4626 1 : return py_cAddressAnswerLimit;
4627 : }
4628 :
4629 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_cAddressAnswerLimit(PyObject *py_obj, PyObject *value, void *closure)
4630 : {
4631 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4632 0 : if (value == NULL) {
4633 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->cAddressAnswerLimit");
4634 0 : return -1;
4635 : }
4636 : {
4637 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->cAddressAnswerLimit));
4638 0 : if (PyLong_Check(value)) {
4639 0 : unsigned long long test_var;
4640 0 : test_var = PyLong_AsUnsignedLongLong(value);
4641 0 : if (PyErr_Occurred() != NULL) {
4642 0 : return -1;
4643 : }
4644 0 : if (test_var > uint_max) {
4645 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4646 : PyLong_Type.tp_name, uint_max, test_var);
4647 0 : return -1;
4648 : }
4649 0 : object->cAddressAnswerLimit = test_var;
4650 : } else {
4651 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4652 : PyLong_Type.tp_name);
4653 0 : return -1;
4654 : }
4655 : }
4656 0 : return 0;
4657 : }
4658 :
4659 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwRecursionRetry(PyObject *obj, void *closure)
4660 : {
4661 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4662 0 : PyObject *py_dwRecursionRetry;
4663 1 : py_dwRecursionRetry = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRecursionRetry));
4664 1 : return py_dwRecursionRetry;
4665 : }
4666 :
4667 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwRecursionRetry(PyObject *py_obj, PyObject *value, void *closure)
4668 : {
4669 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4670 0 : if (value == NULL) {
4671 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRecursionRetry");
4672 0 : return -1;
4673 : }
4674 : {
4675 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRecursionRetry));
4676 0 : if (PyLong_Check(value)) {
4677 0 : unsigned long long test_var;
4678 0 : test_var = PyLong_AsUnsignedLongLong(value);
4679 0 : if (PyErr_Occurred() != NULL) {
4680 0 : return -1;
4681 : }
4682 0 : if (test_var > uint_max) {
4683 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4684 : PyLong_Type.tp_name, uint_max, test_var);
4685 0 : return -1;
4686 : }
4687 0 : object->dwRecursionRetry = test_var;
4688 : } else {
4689 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4690 : PyLong_Type.tp_name);
4691 0 : return -1;
4692 : }
4693 : }
4694 0 : return 0;
4695 : }
4696 :
4697 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwRecursionTimeout(PyObject *obj, void *closure)
4698 : {
4699 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4700 0 : PyObject *py_dwRecursionTimeout;
4701 1 : py_dwRecursionTimeout = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRecursionTimeout));
4702 1 : return py_dwRecursionTimeout;
4703 : }
4704 :
4705 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwRecursionTimeout(PyObject *py_obj, PyObject *value, void *closure)
4706 : {
4707 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4708 0 : if (value == NULL) {
4709 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRecursionTimeout");
4710 0 : return -1;
4711 : }
4712 : {
4713 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRecursionTimeout));
4714 0 : if (PyLong_Check(value)) {
4715 0 : unsigned long long test_var;
4716 0 : test_var = PyLong_AsUnsignedLongLong(value);
4717 0 : if (PyErr_Occurred() != NULL) {
4718 0 : return -1;
4719 : }
4720 0 : if (test_var > uint_max) {
4721 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4722 : PyLong_Type.tp_name, uint_max, test_var);
4723 0 : return -1;
4724 : }
4725 0 : object->dwRecursionTimeout = test_var;
4726 : } else {
4727 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4728 : PyLong_Type.tp_name);
4729 0 : return -1;
4730 : }
4731 : }
4732 0 : return 0;
4733 : }
4734 :
4735 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwMaxCacheTtl(PyObject *obj, void *closure)
4736 : {
4737 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4738 0 : PyObject *py_dwMaxCacheTtl;
4739 1 : py_dwMaxCacheTtl = PyLong_FromUnsignedLongLong((uint32_t)(object->dwMaxCacheTtl));
4740 1 : return py_dwMaxCacheTtl;
4741 : }
4742 :
4743 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwMaxCacheTtl(PyObject *py_obj, PyObject *value, void *closure)
4744 : {
4745 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4746 0 : if (value == NULL) {
4747 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwMaxCacheTtl");
4748 0 : return -1;
4749 : }
4750 : {
4751 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwMaxCacheTtl));
4752 0 : if (PyLong_Check(value)) {
4753 0 : unsigned long long test_var;
4754 0 : test_var = PyLong_AsUnsignedLongLong(value);
4755 0 : if (PyErr_Occurred() != NULL) {
4756 0 : return -1;
4757 : }
4758 0 : if (test_var > uint_max) {
4759 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4760 : PyLong_Type.tp_name, uint_max, test_var);
4761 0 : return -1;
4762 : }
4763 0 : object->dwMaxCacheTtl = test_var;
4764 : } else {
4765 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4766 : PyLong_Type.tp_name);
4767 0 : return -1;
4768 : }
4769 : }
4770 0 : return 0;
4771 : }
4772 :
4773 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwDsPollingInterval(PyObject *obj, void *closure)
4774 : {
4775 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4776 0 : PyObject *py_dwDsPollingInterval;
4777 1 : py_dwDsPollingInterval = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDsPollingInterval));
4778 1 : return py_dwDsPollingInterval;
4779 : }
4780 :
4781 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwDsPollingInterval(PyObject *py_obj, PyObject *value, void *closure)
4782 : {
4783 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4784 0 : if (value == NULL) {
4785 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDsPollingInterval");
4786 0 : return -1;
4787 : }
4788 : {
4789 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDsPollingInterval));
4790 0 : if (PyLong_Check(value)) {
4791 0 : unsigned long long test_var;
4792 0 : test_var = PyLong_AsUnsignedLongLong(value);
4793 0 : if (PyErr_Occurred() != NULL) {
4794 0 : return -1;
4795 : }
4796 0 : if (test_var > uint_max) {
4797 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4798 : PyLong_Type.tp_name, uint_max, test_var);
4799 0 : return -1;
4800 : }
4801 0 : object->dwDsPollingInterval = test_var;
4802 : } else {
4803 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4804 : PyLong_Type.tp_name);
4805 0 : return -1;
4806 : }
4807 : }
4808 0 : return 0;
4809 : }
4810 :
4811 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwScavengingInterval(PyObject *obj, void *closure)
4812 : {
4813 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4814 0 : PyObject *py_dwScavengingInterval;
4815 1 : py_dwScavengingInterval = PyLong_FromUnsignedLongLong((uint32_t)(object->dwScavengingInterval));
4816 1 : return py_dwScavengingInterval;
4817 : }
4818 :
4819 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwScavengingInterval(PyObject *py_obj, PyObject *value, void *closure)
4820 : {
4821 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4822 0 : if (value == NULL) {
4823 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwScavengingInterval");
4824 0 : return -1;
4825 : }
4826 : {
4827 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwScavengingInterval));
4828 0 : if (PyLong_Check(value)) {
4829 0 : unsigned long long test_var;
4830 0 : test_var = PyLong_AsUnsignedLongLong(value);
4831 0 : if (PyErr_Occurred() != NULL) {
4832 0 : return -1;
4833 : }
4834 0 : if (test_var > uint_max) {
4835 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4836 : PyLong_Type.tp_name, uint_max, test_var);
4837 0 : return -1;
4838 : }
4839 0 : object->dwScavengingInterval = test_var;
4840 : } else {
4841 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4842 : PyLong_Type.tp_name);
4843 0 : return -1;
4844 : }
4845 : }
4846 0 : return 0;
4847 : }
4848 :
4849 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwDefaultRefreshInterval(PyObject *obj, void *closure)
4850 : {
4851 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4852 0 : PyObject *py_dwDefaultRefreshInterval;
4853 1 : py_dwDefaultRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDefaultRefreshInterval));
4854 1 : return py_dwDefaultRefreshInterval;
4855 : }
4856 :
4857 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwDefaultRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
4858 : {
4859 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4860 0 : if (value == NULL) {
4861 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDefaultRefreshInterval");
4862 0 : return -1;
4863 : }
4864 : {
4865 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDefaultRefreshInterval));
4866 0 : if (PyLong_Check(value)) {
4867 0 : unsigned long long test_var;
4868 0 : test_var = PyLong_AsUnsignedLongLong(value);
4869 0 : if (PyErr_Occurred() != NULL) {
4870 0 : return -1;
4871 : }
4872 0 : if (test_var > uint_max) {
4873 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4874 : PyLong_Type.tp_name, uint_max, test_var);
4875 0 : return -1;
4876 : }
4877 0 : object->dwDefaultRefreshInterval = test_var;
4878 : } else {
4879 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4880 : PyLong_Type.tp_name);
4881 0 : return -1;
4882 : }
4883 : }
4884 0 : return 0;
4885 : }
4886 :
4887 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwDefaultNoRefreshInterval(PyObject *obj, void *closure)
4888 : {
4889 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4890 0 : PyObject *py_dwDefaultNoRefreshInterval;
4891 1 : py_dwDefaultNoRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDefaultNoRefreshInterval));
4892 1 : return py_dwDefaultNoRefreshInterval;
4893 : }
4894 :
4895 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwDefaultNoRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
4896 : {
4897 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4898 0 : if (value == NULL) {
4899 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDefaultNoRefreshInterval");
4900 0 : return -1;
4901 : }
4902 : {
4903 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDefaultNoRefreshInterval));
4904 0 : if (PyLong_Check(value)) {
4905 0 : unsigned long long test_var;
4906 0 : test_var = PyLong_AsUnsignedLongLong(value);
4907 0 : if (PyErr_Occurred() != NULL) {
4908 0 : return -1;
4909 : }
4910 0 : if (test_var > uint_max) {
4911 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4912 : PyLong_Type.tp_name, uint_max, test_var);
4913 0 : return -1;
4914 : }
4915 0 : object->dwDefaultNoRefreshInterval = test_var;
4916 : } else {
4917 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4918 : PyLong_Type.tp_name);
4919 0 : return -1;
4920 : }
4921 : }
4922 0 : return 0;
4923 : }
4924 :
4925 0 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwReserveArray(PyObject *obj, void *closure)
4926 : {
4927 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4928 0 : PyObject *py_dwReserveArray;
4929 0 : py_dwReserveArray = PyList_New(10);
4930 0 : if (py_dwReserveArray == NULL) {
4931 0 : return NULL;
4932 : }
4933 : {
4934 : int dwReserveArray_cntr_0;
4935 0 : for (dwReserveArray_cntr_0 = 0; dwReserveArray_cntr_0 < (10); dwReserveArray_cntr_0++) {
4936 0 : PyObject *py_dwReserveArray_0;
4937 0 : py_dwReserveArray_0 = PyLong_FromUnsignedLongLong((uint32_t)((object->dwReserveArray)[dwReserveArray_cntr_0]));
4938 0 : PyList_SetItem(py_dwReserveArray, dwReserveArray_cntr_0, py_dwReserveArray_0);
4939 : }
4940 : }
4941 0 : return py_dwReserveArray;
4942 : }
4943 :
4944 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwReserveArray(PyObject *py_obj, PyObject *value, void *closure)
4945 : {
4946 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4947 0 : if (value == NULL) {
4948 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserveArray");
4949 0 : return -1;
4950 : }
4951 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
4952 : {
4953 0 : int dwReserveArray_cntr_0;
4954 0 : if (ARRAY_SIZE(object->dwReserveArray) != PyList_GET_SIZE(value)) {
4955 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));
4956 0 : return -1;
4957 : }
4958 0 : for (dwReserveArray_cntr_0 = 0; dwReserveArray_cntr_0 < PyList_GET_SIZE(value); dwReserveArray_cntr_0++) {
4959 0 : if (PyList_GET_ITEM(value, dwReserveArray_cntr_0) == NULL) {
4960 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->dwReserveArray)[dwReserveArray_cntr_0]");
4961 0 : return -1;
4962 : }
4963 : {
4964 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->dwReserveArray)[dwReserveArray_cntr_0]));
4965 0 : if (PyLong_Check(PyList_GET_ITEM(value, dwReserveArray_cntr_0))) {
4966 0 : unsigned long long test_var;
4967 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, dwReserveArray_cntr_0));
4968 0 : if (PyErr_Occurred() != NULL) {
4969 0 : return -1;
4970 : }
4971 0 : if (test_var > uint_max) {
4972 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4973 : PyLong_Type.tp_name, uint_max, test_var);
4974 0 : return -1;
4975 : }
4976 0 : (object->dwReserveArray)[dwReserveArray_cntr_0] = test_var;
4977 : } else {
4978 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4979 : PyLong_Type.tp_name);
4980 0 : return -1;
4981 : }
4982 : }
4983 : }
4984 : }
4985 0 : return 0;
4986 : }
4987 :
4988 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fAutoReverseZones(PyObject *obj, void *closure)
4989 : {
4990 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
4991 0 : PyObject *py_fAutoReverseZones;
4992 1 : py_fAutoReverseZones = PyLong_FromLong((uint16_t)(object->fAutoReverseZones));
4993 1 : return py_fAutoReverseZones;
4994 : }
4995 :
4996 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fAutoReverseZones(PyObject *py_obj, PyObject *value, void *closure)
4997 : {
4998 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
4999 0 : if (value == NULL) {
5000 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAutoReverseZones");
5001 0 : return -1;
5002 : }
5003 : {
5004 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAutoReverseZones));
5005 0 : if (PyLong_Check(value)) {
5006 0 : unsigned long long test_var;
5007 0 : test_var = PyLong_AsUnsignedLongLong(value);
5008 0 : if (PyErr_Occurred() != NULL) {
5009 0 : return -1;
5010 : }
5011 0 : if (test_var > uint_max) {
5012 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5013 : PyLong_Type.tp_name, uint_max, test_var);
5014 0 : return -1;
5015 : }
5016 0 : object->fAutoReverseZones = test_var;
5017 : } else {
5018 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5019 : PyLong_Type.tp_name);
5020 0 : return -1;
5021 : }
5022 : }
5023 0 : return 0;
5024 : }
5025 :
5026 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fAutoCacheUpdate(PyObject *obj, void *closure)
5027 : {
5028 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
5029 0 : PyObject *py_fAutoCacheUpdate;
5030 1 : py_fAutoCacheUpdate = PyLong_FromLong((uint16_t)(object->fAutoCacheUpdate));
5031 1 : return py_fAutoCacheUpdate;
5032 : }
5033 :
5034 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fAutoCacheUpdate(PyObject *py_obj, PyObject *value, void *closure)
5035 : {
5036 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
5037 0 : if (value == NULL) {
5038 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAutoCacheUpdate");
5039 0 : return -1;
5040 : }
5041 : {
5042 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAutoCacheUpdate));
5043 0 : if (PyLong_Check(value)) {
5044 0 : unsigned long long test_var;
5045 0 : test_var = PyLong_AsUnsignedLongLong(value);
5046 0 : if (PyErr_Occurred() != NULL) {
5047 0 : return -1;
5048 : }
5049 0 : if (test_var > uint_max) {
5050 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5051 : PyLong_Type.tp_name, uint_max, test_var);
5052 0 : return -1;
5053 : }
5054 0 : object->fAutoCacheUpdate = test_var;
5055 : } else {
5056 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5057 : PyLong_Type.tp_name);
5058 0 : return -1;
5059 : }
5060 : }
5061 0 : return 0;
5062 : }
5063 :
5064 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
5065 : {
5066 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
5067 0 : PyObject *py_fRecurseAfterForwarding;
5068 1 : py_fRecurseAfterForwarding = PyLong_FromLong((uint16_t)(object->fRecurseAfterForwarding));
5069 1 : return py_fRecurseAfterForwarding;
5070 : }
5071 :
5072 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
5073 : {
5074 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
5075 0 : if (value == NULL) {
5076 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fRecurseAfterForwarding");
5077 0 : return -1;
5078 : }
5079 : {
5080 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRecurseAfterForwarding));
5081 0 : if (PyLong_Check(value)) {
5082 0 : unsigned long long test_var;
5083 0 : test_var = PyLong_AsUnsignedLongLong(value);
5084 0 : if (PyErr_Occurred() != NULL) {
5085 0 : return -1;
5086 : }
5087 0 : if (test_var > uint_max) {
5088 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5089 : PyLong_Type.tp_name, uint_max, test_var);
5090 0 : return -1;
5091 : }
5092 0 : object->fRecurseAfterForwarding = test_var;
5093 : } else {
5094 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5095 : PyLong_Type.tp_name);
5096 0 : return -1;
5097 : }
5098 : }
5099 0 : return 0;
5100 : }
5101 :
5102 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fForwardDelegations(PyObject *obj, void *closure)
5103 : {
5104 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
5105 0 : PyObject *py_fForwardDelegations;
5106 1 : py_fForwardDelegations = PyLong_FromLong((uint16_t)(object->fForwardDelegations));
5107 1 : return py_fForwardDelegations;
5108 : }
5109 :
5110 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fForwardDelegations(PyObject *py_obj, PyObject *value, void *closure)
5111 : {
5112 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
5113 0 : if (value == NULL) {
5114 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fForwardDelegations");
5115 0 : return -1;
5116 : }
5117 : {
5118 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fForwardDelegations));
5119 0 : if (PyLong_Check(value)) {
5120 0 : unsigned long long test_var;
5121 0 : test_var = PyLong_AsUnsignedLongLong(value);
5122 0 : if (PyErr_Occurred() != NULL) {
5123 0 : return -1;
5124 : }
5125 0 : if (test_var > uint_max) {
5126 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5127 : PyLong_Type.tp_name, uint_max, test_var);
5128 0 : return -1;
5129 : }
5130 0 : object->fForwardDelegations = test_var;
5131 : } else {
5132 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5133 : PyLong_Type.tp_name);
5134 0 : return -1;
5135 : }
5136 : }
5137 0 : return 0;
5138 : }
5139 :
5140 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fNoRecursion(PyObject *obj, void *closure)
5141 : {
5142 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
5143 0 : PyObject *py_fNoRecursion;
5144 1 : py_fNoRecursion = PyLong_FromLong((uint16_t)(object->fNoRecursion));
5145 1 : return py_fNoRecursion;
5146 : }
5147 :
5148 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fNoRecursion(PyObject *py_obj, PyObject *value, void *closure)
5149 : {
5150 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
5151 0 : if (value == NULL) {
5152 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fNoRecursion");
5153 0 : return -1;
5154 : }
5155 : {
5156 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNoRecursion));
5157 0 : if (PyLong_Check(value)) {
5158 0 : unsigned long long test_var;
5159 0 : test_var = PyLong_AsUnsignedLongLong(value);
5160 0 : if (PyErr_Occurred() != NULL) {
5161 0 : return -1;
5162 : }
5163 0 : if (test_var > uint_max) {
5164 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5165 : PyLong_Type.tp_name, uint_max, test_var);
5166 0 : return -1;
5167 : }
5168 0 : object->fNoRecursion = test_var;
5169 : } else {
5170 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5171 : PyLong_Type.tp_name);
5172 0 : return -1;
5173 : }
5174 : }
5175 0 : return 0;
5176 : }
5177 :
5178 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fSecureResponses(PyObject *obj, void *closure)
5179 : {
5180 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
5181 0 : PyObject *py_fSecureResponses;
5182 1 : py_fSecureResponses = PyLong_FromLong((uint16_t)(object->fSecureResponses));
5183 1 : return py_fSecureResponses;
5184 : }
5185 :
5186 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fSecureResponses(PyObject *py_obj, PyObject *value, void *closure)
5187 : {
5188 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
5189 0 : if (value == NULL) {
5190 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fSecureResponses");
5191 0 : return -1;
5192 : }
5193 : {
5194 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureResponses));
5195 0 : if (PyLong_Check(value)) {
5196 0 : unsigned long long test_var;
5197 0 : test_var = PyLong_AsUnsignedLongLong(value);
5198 0 : if (PyErr_Occurred() != NULL) {
5199 0 : return -1;
5200 : }
5201 0 : if (test_var > uint_max) {
5202 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5203 : PyLong_Type.tp_name, uint_max, test_var);
5204 0 : return -1;
5205 : }
5206 0 : object->fSecureResponses = test_var;
5207 : } else {
5208 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5209 : PyLong_Type.tp_name);
5210 0 : return -1;
5211 : }
5212 : }
5213 0 : return 0;
5214 : }
5215 :
5216 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fRoundRobin(PyObject *obj, void *closure)
5217 : {
5218 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
5219 0 : PyObject *py_fRoundRobin;
5220 1 : py_fRoundRobin = PyLong_FromLong((uint16_t)(object->fRoundRobin));
5221 1 : return py_fRoundRobin;
5222 : }
5223 :
5224 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fRoundRobin(PyObject *py_obj, PyObject *value, void *closure)
5225 : {
5226 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
5227 0 : if (value == NULL) {
5228 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fRoundRobin");
5229 0 : return -1;
5230 : }
5231 : {
5232 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRoundRobin));
5233 0 : if (PyLong_Check(value)) {
5234 0 : unsigned long long test_var;
5235 0 : test_var = PyLong_AsUnsignedLongLong(value);
5236 0 : if (PyErr_Occurred() != NULL) {
5237 0 : return -1;
5238 : }
5239 0 : if (test_var > uint_max) {
5240 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5241 : PyLong_Type.tp_name, uint_max, test_var);
5242 0 : return -1;
5243 : }
5244 0 : object->fRoundRobin = test_var;
5245 : } else {
5246 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5247 : PyLong_Type.tp_name);
5248 0 : return -1;
5249 : }
5250 : }
5251 0 : return 0;
5252 : }
5253 :
5254 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fLocalNetPriority(PyObject *obj, void *closure)
5255 : {
5256 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
5257 0 : PyObject *py_fLocalNetPriority;
5258 1 : py_fLocalNetPriority = PyLong_FromLong((uint16_t)(object->fLocalNetPriority));
5259 1 : return py_fLocalNetPriority;
5260 : }
5261 :
5262 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fLocalNetPriority(PyObject *py_obj, PyObject *value, void *closure)
5263 : {
5264 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
5265 0 : if (value == NULL) {
5266 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fLocalNetPriority");
5267 0 : return -1;
5268 : }
5269 : {
5270 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fLocalNetPriority));
5271 0 : if (PyLong_Check(value)) {
5272 0 : unsigned long long test_var;
5273 0 : test_var = PyLong_AsUnsignedLongLong(value);
5274 0 : if (PyErr_Occurred() != NULL) {
5275 0 : return -1;
5276 : }
5277 0 : if (test_var > uint_max) {
5278 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5279 : PyLong_Type.tp_name, uint_max, test_var);
5280 0 : return -1;
5281 : }
5282 0 : object->fLocalNetPriority = test_var;
5283 : } else {
5284 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5285 : PyLong_Type.tp_name);
5286 0 : return -1;
5287 : }
5288 : }
5289 0 : return 0;
5290 : }
5291 :
5292 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fBindSecondaries(PyObject *obj, void *closure)
5293 : {
5294 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
5295 0 : PyObject *py_fBindSecondaries;
5296 1 : py_fBindSecondaries = PyLong_FromLong((uint16_t)(object->fBindSecondaries));
5297 1 : return py_fBindSecondaries;
5298 : }
5299 :
5300 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fBindSecondaries(PyObject *py_obj, PyObject *value, void *closure)
5301 : {
5302 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
5303 0 : if (value == NULL) {
5304 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fBindSecondaries");
5305 0 : return -1;
5306 : }
5307 : {
5308 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fBindSecondaries));
5309 0 : if (PyLong_Check(value)) {
5310 0 : unsigned long long test_var;
5311 0 : test_var = PyLong_AsUnsignedLongLong(value);
5312 0 : if (PyErr_Occurred() != NULL) {
5313 0 : return -1;
5314 : }
5315 0 : if (test_var > uint_max) {
5316 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5317 : PyLong_Type.tp_name, uint_max, test_var);
5318 0 : return -1;
5319 : }
5320 0 : object->fBindSecondaries = test_var;
5321 : } else {
5322 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5323 : PyLong_Type.tp_name);
5324 0 : return -1;
5325 : }
5326 : }
5327 0 : return 0;
5328 : }
5329 :
5330 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fWriteAuthorityNs(PyObject *obj, void *closure)
5331 : {
5332 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
5333 0 : PyObject *py_fWriteAuthorityNs;
5334 1 : py_fWriteAuthorityNs = PyLong_FromLong((uint16_t)(object->fWriteAuthorityNs));
5335 1 : return py_fWriteAuthorityNs;
5336 : }
5337 :
5338 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fWriteAuthorityNs(PyObject *py_obj, PyObject *value, void *closure)
5339 : {
5340 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
5341 0 : if (value == NULL) {
5342 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fWriteAuthorityNs");
5343 0 : return -1;
5344 : }
5345 : {
5346 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fWriteAuthorityNs));
5347 0 : if (PyLong_Check(value)) {
5348 0 : unsigned long long test_var;
5349 0 : test_var = PyLong_AsUnsignedLongLong(value);
5350 0 : if (PyErr_Occurred() != NULL) {
5351 0 : return -1;
5352 : }
5353 0 : if (test_var > uint_max) {
5354 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5355 : PyLong_Type.tp_name, uint_max, test_var);
5356 0 : return -1;
5357 : }
5358 0 : object->fWriteAuthorityNs = test_var;
5359 : } else {
5360 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5361 : PyLong_Type.tp_name);
5362 0 : return -1;
5363 : }
5364 : }
5365 0 : return 0;
5366 : }
5367 :
5368 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fStrictFileParsing(PyObject *obj, void *closure)
5369 : {
5370 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
5371 0 : PyObject *py_fStrictFileParsing;
5372 1 : py_fStrictFileParsing = PyLong_FromLong((uint16_t)(object->fStrictFileParsing));
5373 1 : return py_fStrictFileParsing;
5374 : }
5375 :
5376 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fStrictFileParsing(PyObject *py_obj, PyObject *value, void *closure)
5377 : {
5378 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
5379 0 : if (value == NULL) {
5380 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fStrictFileParsing");
5381 0 : return -1;
5382 : }
5383 : {
5384 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fStrictFileParsing));
5385 0 : if (PyLong_Check(value)) {
5386 0 : unsigned long long test_var;
5387 0 : test_var = PyLong_AsUnsignedLongLong(value);
5388 0 : if (PyErr_Occurred() != NULL) {
5389 0 : return -1;
5390 : }
5391 0 : if (test_var > uint_max) {
5392 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5393 : PyLong_Type.tp_name, uint_max, test_var);
5394 0 : return -1;
5395 : }
5396 0 : object->fStrictFileParsing = test_var;
5397 : } else {
5398 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5399 : PyLong_Type.tp_name);
5400 0 : return -1;
5401 : }
5402 : }
5403 0 : return 0;
5404 : }
5405 :
5406 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fLooseWildcarding(PyObject *obj, void *closure)
5407 : {
5408 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
5409 0 : PyObject *py_fLooseWildcarding;
5410 1 : py_fLooseWildcarding = PyLong_FromLong((uint16_t)(object->fLooseWildcarding));
5411 1 : return py_fLooseWildcarding;
5412 : }
5413 :
5414 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fLooseWildcarding(PyObject *py_obj, PyObject *value, void *closure)
5415 : {
5416 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
5417 0 : if (value == NULL) {
5418 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fLooseWildcarding");
5419 0 : return -1;
5420 : }
5421 : {
5422 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fLooseWildcarding));
5423 0 : if (PyLong_Check(value)) {
5424 0 : unsigned long long test_var;
5425 0 : test_var = PyLong_AsUnsignedLongLong(value);
5426 0 : if (PyErr_Occurred() != NULL) {
5427 0 : return -1;
5428 : }
5429 0 : if (test_var > uint_max) {
5430 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5431 : PyLong_Type.tp_name, uint_max, test_var);
5432 0 : return -1;
5433 : }
5434 0 : object->fLooseWildcarding = test_var;
5435 : } else {
5436 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5437 : PyLong_Type.tp_name);
5438 0 : return -1;
5439 : }
5440 : }
5441 0 : return 0;
5442 : }
5443 :
5444 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fDefaultAgingState(PyObject *obj, void *closure)
5445 : {
5446 1 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
5447 0 : PyObject *py_fDefaultAgingState;
5448 1 : py_fDefaultAgingState = PyLong_FromLong((uint16_t)(object->fDefaultAgingState));
5449 1 : return py_fDefaultAgingState;
5450 : }
5451 :
5452 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fDefaultAgingState(PyObject *py_obj, PyObject *value, void *closure)
5453 : {
5454 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
5455 0 : if (value == NULL) {
5456 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fDefaultAgingState");
5457 0 : return -1;
5458 : }
5459 : {
5460 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDefaultAgingState));
5461 0 : if (PyLong_Check(value)) {
5462 0 : unsigned long long test_var;
5463 0 : test_var = PyLong_AsUnsignedLongLong(value);
5464 0 : if (PyErr_Occurred() != NULL) {
5465 0 : return -1;
5466 : }
5467 0 : if (test_var > uint_max) {
5468 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5469 : PyLong_Type.tp_name, uint_max, test_var);
5470 0 : return -1;
5471 : }
5472 0 : object->fDefaultAgingState = test_var;
5473 : } else {
5474 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5475 : PyLong_Type.tp_name);
5476 0 : return -1;
5477 : }
5478 : }
5479 0 : return 0;
5480 : }
5481 :
5482 0 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fReserveArray(PyObject *obj, void *closure)
5483 : {
5484 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(obj);
5485 0 : PyObject *py_fReserveArray;
5486 0 : py_fReserveArray = PyList_New(15);
5487 0 : if (py_fReserveArray == NULL) {
5488 0 : return NULL;
5489 : }
5490 : {
5491 : int fReserveArray_cntr_0;
5492 0 : for (fReserveArray_cntr_0 = 0; fReserveArray_cntr_0 < (15); fReserveArray_cntr_0++) {
5493 0 : PyObject *py_fReserveArray_0;
5494 0 : py_fReserveArray_0 = PyLong_FromLong((uint16_t)((object->fReserveArray)[fReserveArray_cntr_0]));
5495 0 : PyList_SetItem(py_fReserveArray, fReserveArray_cntr_0, py_fReserveArray_0);
5496 : }
5497 : }
5498 0 : return py_fReserveArray;
5499 : }
5500 :
5501 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fReserveArray(PyObject *py_obj, PyObject *value, void *closure)
5502 : {
5503 0 : struct DNS_RPC_SERVER_INFO_W2K *object = pytalloc_get_ptr(py_obj);
5504 0 : if (value == NULL) {
5505 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fReserveArray");
5506 0 : return -1;
5507 : }
5508 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
5509 : {
5510 0 : int fReserveArray_cntr_0;
5511 0 : if (ARRAY_SIZE(object->fReserveArray) != PyList_GET_SIZE(value)) {
5512 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));
5513 0 : return -1;
5514 : }
5515 0 : for (fReserveArray_cntr_0 = 0; fReserveArray_cntr_0 < PyList_GET_SIZE(value); fReserveArray_cntr_0++) {
5516 0 : if (PyList_GET_ITEM(value, fReserveArray_cntr_0) == NULL) {
5517 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->fReserveArray)[fReserveArray_cntr_0]");
5518 0 : return -1;
5519 : }
5520 : {
5521 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->fReserveArray)[fReserveArray_cntr_0]));
5522 0 : if (PyLong_Check(PyList_GET_ITEM(value, fReserveArray_cntr_0))) {
5523 0 : unsigned long long test_var;
5524 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, fReserveArray_cntr_0));
5525 0 : if (PyErr_Occurred() != NULL) {
5526 0 : return -1;
5527 : }
5528 0 : if (test_var > uint_max) {
5529 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5530 : PyLong_Type.tp_name, uint_max, test_var);
5531 0 : return -1;
5532 : }
5533 0 : (object->fReserveArray)[fReserveArray_cntr_0] = test_var;
5534 : } else {
5535 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5536 : PyLong_Type.tp_name);
5537 0 : return -1;
5538 : }
5539 : }
5540 : }
5541 : }
5542 0 : return 0;
5543 : }
5544 :
5545 : static PyGetSetDef py_DNS_RPC_SERVER_INFO_W2K_getsetters[] = {
5546 : {
5547 : .name = discard_const_p(char, "dwVersion"),
5548 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwVersion,
5549 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwVersion,
5550 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5551 : },
5552 : {
5553 : .name = discard_const_p(char, "fBootMethod"),
5554 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fBootMethod,
5555 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fBootMethod,
5556 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_BOOT_METHOD")
5557 : },
5558 : {
5559 : .name = discard_const_p(char, "fAdminConfigured"),
5560 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fAdminConfigured,
5561 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fAdminConfigured,
5562 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5563 : },
5564 : {
5565 : .name = discard_const_p(char, "fAllowUpdate"),
5566 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fAllowUpdate,
5567 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fAllowUpdate,
5568 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5569 : },
5570 : {
5571 : .name = discard_const_p(char, "fDsAvailable"),
5572 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fDsAvailable,
5573 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fDsAvailable,
5574 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5575 : },
5576 : {
5577 : .name = discard_const_p(char, "pszServerName"),
5578 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_pszServerName,
5579 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_pszServerName,
5580 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5581 : },
5582 : {
5583 : .name = discard_const_p(char, "pszDsContainer"),
5584 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_pszDsContainer,
5585 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_pszDsContainer,
5586 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
5587 : },
5588 : {
5589 : .name = discard_const_p(char, "aipServerAddrs"),
5590 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_aipServerAddrs,
5591 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_aipServerAddrs,
5592 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
5593 : },
5594 : {
5595 : .name = discard_const_p(char, "aipListenAddrs"),
5596 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_aipListenAddrs,
5597 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_aipListenAddrs,
5598 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
5599 : },
5600 : {
5601 : .name = discard_const_p(char, "aipForwarders"),
5602 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_aipForwarders,
5603 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_aipForwarders,
5604 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
5605 : },
5606 : {
5607 : .name = discard_const_p(char, "pExtension1"),
5608 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_pExtension1,
5609 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_pExtension1,
5610 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5611 : },
5612 : {
5613 : .name = discard_const_p(char, "pExtension2"),
5614 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_pExtension2,
5615 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_pExtension2,
5616 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5617 : },
5618 : {
5619 : .name = discard_const_p(char, "pExtension3"),
5620 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_pExtension3,
5621 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_pExtension3,
5622 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5623 : },
5624 : {
5625 : .name = discard_const_p(char, "pExtension4"),
5626 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_pExtension4,
5627 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_pExtension4,
5628 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5629 : },
5630 : {
5631 : .name = discard_const_p(char, "pExtension5"),
5632 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_pExtension5,
5633 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_pExtension5,
5634 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5635 : },
5636 : {
5637 : .name = discard_const_p(char, "dwLogLevel"),
5638 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwLogLevel,
5639 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwLogLevel,
5640 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5641 : },
5642 : {
5643 : .name = discard_const_p(char, "dwDebugLevel"),
5644 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwDebugLevel,
5645 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwDebugLevel,
5646 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5647 : },
5648 : {
5649 : .name = discard_const_p(char, "dwForwardTimeout"),
5650 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwForwardTimeout,
5651 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwForwardTimeout,
5652 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5653 : },
5654 : {
5655 : .name = discard_const_p(char, "dwRpcProtocol"),
5656 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwRpcProtocol,
5657 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwRpcProtocol,
5658 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5659 : },
5660 : {
5661 : .name = discard_const_p(char, "dwNameCheckFlag"),
5662 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwNameCheckFlag,
5663 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwNameCheckFlag,
5664 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_NAME_CHECK_FLAG")
5665 : },
5666 : {
5667 : .name = discard_const_p(char, "cAddressAnswerLimit"),
5668 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_cAddressAnswerLimit,
5669 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_cAddressAnswerLimit,
5670 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5671 : },
5672 : {
5673 : .name = discard_const_p(char, "dwRecursionRetry"),
5674 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwRecursionRetry,
5675 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwRecursionRetry,
5676 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5677 : },
5678 : {
5679 : .name = discard_const_p(char, "dwRecursionTimeout"),
5680 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwRecursionTimeout,
5681 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwRecursionTimeout,
5682 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5683 : },
5684 : {
5685 : .name = discard_const_p(char, "dwMaxCacheTtl"),
5686 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwMaxCacheTtl,
5687 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwMaxCacheTtl,
5688 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5689 : },
5690 : {
5691 : .name = discard_const_p(char, "dwDsPollingInterval"),
5692 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwDsPollingInterval,
5693 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwDsPollingInterval,
5694 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5695 : },
5696 : {
5697 : .name = discard_const_p(char, "dwScavengingInterval"),
5698 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwScavengingInterval,
5699 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwScavengingInterval,
5700 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5701 : },
5702 : {
5703 : .name = discard_const_p(char, "dwDefaultRefreshInterval"),
5704 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwDefaultRefreshInterval,
5705 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwDefaultRefreshInterval,
5706 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5707 : },
5708 : {
5709 : .name = discard_const_p(char, "dwDefaultNoRefreshInterval"),
5710 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwDefaultNoRefreshInterval,
5711 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwDefaultNoRefreshInterval,
5712 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5713 : },
5714 : {
5715 : .name = discard_const_p(char, "dwReserveArray"),
5716 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwReserveArray,
5717 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwReserveArray,
5718 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5719 : },
5720 : {
5721 : .name = discard_const_p(char, "fAutoReverseZones"),
5722 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fAutoReverseZones,
5723 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fAutoReverseZones,
5724 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5725 : },
5726 : {
5727 : .name = discard_const_p(char, "fAutoCacheUpdate"),
5728 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fAutoCacheUpdate,
5729 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fAutoCacheUpdate,
5730 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5731 : },
5732 : {
5733 : .name = discard_const_p(char, "fRecurseAfterForwarding"),
5734 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fRecurseAfterForwarding,
5735 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fRecurseAfterForwarding,
5736 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5737 : },
5738 : {
5739 : .name = discard_const_p(char, "fForwardDelegations"),
5740 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fForwardDelegations,
5741 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fForwardDelegations,
5742 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5743 : },
5744 : {
5745 : .name = discard_const_p(char, "fNoRecursion"),
5746 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fNoRecursion,
5747 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fNoRecursion,
5748 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5749 : },
5750 : {
5751 : .name = discard_const_p(char, "fSecureResponses"),
5752 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fSecureResponses,
5753 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fSecureResponses,
5754 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5755 : },
5756 : {
5757 : .name = discard_const_p(char, "fRoundRobin"),
5758 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fRoundRobin,
5759 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fRoundRobin,
5760 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5761 : },
5762 : {
5763 : .name = discard_const_p(char, "fLocalNetPriority"),
5764 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fLocalNetPriority,
5765 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fLocalNetPriority,
5766 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5767 : },
5768 : {
5769 : .name = discard_const_p(char, "fBindSecondaries"),
5770 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fBindSecondaries,
5771 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fBindSecondaries,
5772 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5773 : },
5774 : {
5775 : .name = discard_const_p(char, "fWriteAuthorityNs"),
5776 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fWriteAuthorityNs,
5777 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fWriteAuthorityNs,
5778 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5779 : },
5780 : {
5781 : .name = discard_const_p(char, "fStrictFileParsing"),
5782 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fStrictFileParsing,
5783 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fStrictFileParsing,
5784 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5785 : },
5786 : {
5787 : .name = discard_const_p(char, "fLooseWildcarding"),
5788 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fLooseWildcarding,
5789 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fLooseWildcarding,
5790 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5791 : },
5792 : {
5793 : .name = discard_const_p(char, "fDefaultAgingState"),
5794 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fDefaultAgingState,
5795 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fDefaultAgingState,
5796 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5797 : },
5798 : {
5799 : .name = discard_const_p(char, "fReserveArray"),
5800 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fReserveArray,
5801 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fReserveArray,
5802 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5803 : },
5804 : { .name = NULL }
5805 : };
5806 :
5807 0 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
5808 : {
5809 0 : return pytalloc_new(struct DNS_RPC_SERVER_INFO_W2K, type);
5810 : }
5811 :
5812 :
5813 : static PyTypeObject DNS_RPC_SERVER_INFO_W2K_Type = {
5814 : PyVarObject_HEAD_INIT(NULL, 0)
5815 : .tp_name = "dnsserver.DNS_RPC_SERVER_INFO_W2K",
5816 : .tp_getset = py_DNS_RPC_SERVER_INFO_W2K_getsetters,
5817 : .tp_methods = NULL,
5818 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
5819 : .tp_new = py_DNS_RPC_SERVER_INFO_W2K_new,
5820 : };
5821 :
5822 :
5823 0 : static PyObject *py_DNS_EXTENSION_get_extension(PyObject *obj, void *closure)
5824 : {
5825 0 : struct DNS_EXTENSION *object = pytalloc_get_ptr(obj);
5826 0 : PyObject *py_extension;
5827 0 : if (object->extension == NULL) {
5828 0 : Py_RETURN_NONE;
5829 : }
5830 0 : if (object->extension == NULL) {
5831 0 : py_extension = Py_None;
5832 0 : Py_INCREF(py_extension);
5833 : } else {
5834 0 : if (object->extension == NULL) {
5835 0 : py_extension = Py_None;
5836 0 : Py_INCREF(py_extension);
5837 : } else {
5838 0 : py_extension = PyUnicode_Decode(object->extension, strlen(object->extension), "utf-8", "ignore");
5839 : }
5840 : }
5841 0 : return py_extension;
5842 : }
5843 :
5844 0 : static int py_DNS_EXTENSION_set_extension(PyObject *py_obj, PyObject *value, void *closure)
5845 : {
5846 0 : struct DNS_EXTENSION *object = pytalloc_get_ptr(py_obj);
5847 0 : if (value == NULL) {
5848 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->extension");
5849 0 : return -1;
5850 : }
5851 0 : if (value == Py_None) {
5852 0 : object->extension = NULL;
5853 : } else {
5854 0 : object->extension = NULL;
5855 : {
5856 0 : const char *test_str;
5857 0 : const char *talloc_str;
5858 0 : PyObject *unicode = NULL;
5859 0 : if (PyUnicode_Check(value)) {
5860 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
5861 0 : if (unicode == NULL) {
5862 0 : return -1;
5863 : }
5864 0 : test_str = PyBytes_AS_STRING(unicode);
5865 0 : } else if (PyBytes_Check(value)) {
5866 0 : test_str = PyBytes_AS_STRING(value);
5867 : } else {
5868 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
5869 0 : return -1;
5870 : }
5871 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
5872 0 : if (unicode != NULL) {
5873 0 : Py_DECREF(unicode);
5874 : }
5875 0 : if (talloc_str == NULL) {
5876 0 : PyErr_NoMemory();
5877 0 : return -1;
5878 : }
5879 0 : object->extension = talloc_str;
5880 : }
5881 : }
5882 0 : return 0;
5883 : }
5884 :
5885 : static PyGetSetDef py_DNS_EXTENSION_getsetters[] = {
5886 : {
5887 : .name = discard_const_p(char, "extension"),
5888 : .get = py_DNS_EXTENSION_get_extension,
5889 : .set = py_DNS_EXTENSION_set_extension,
5890 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5891 : },
5892 : { .name = NULL }
5893 : };
5894 :
5895 0 : static PyObject *py_DNS_EXTENSION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
5896 : {
5897 0 : return pytalloc_new(struct DNS_EXTENSION, type);
5898 : }
5899 :
5900 :
5901 : static PyTypeObject DNS_EXTENSION_Type = {
5902 : PyVarObject_HEAD_INIT(NULL, 0)
5903 : .tp_name = "dnsserver.DNS_EXTENSION",
5904 : .tp_getset = py_DNS_EXTENSION_getsetters,
5905 : .tp_methods = NULL,
5906 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
5907 : .tp_new = py_DNS_EXTENSION_new,
5908 : };
5909 :
5910 :
5911 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
5912 : {
5913 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
5914 0 : PyObject *py_dwRpcStructureVersion;
5915 1 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
5916 1 : return py_dwRpcStructureVersion;
5917 : }
5918 :
5919 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
5920 : {
5921 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
5922 0 : if (value == NULL) {
5923 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
5924 0 : return -1;
5925 : }
5926 : {
5927 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
5928 0 : if (PyLong_Check(value)) {
5929 0 : unsigned long long test_var;
5930 0 : test_var = PyLong_AsUnsignedLongLong(value);
5931 0 : if (PyErr_Occurred() != NULL) {
5932 0 : return -1;
5933 : }
5934 0 : if (test_var > uint_max) {
5935 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5936 : PyLong_Type.tp_name, uint_max, test_var);
5937 0 : return -1;
5938 : }
5939 0 : object->dwRpcStructureVersion = test_var;
5940 : } else {
5941 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5942 : PyLong_Type.tp_name);
5943 0 : return -1;
5944 : }
5945 : }
5946 0 : return 0;
5947 : }
5948 :
5949 0 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
5950 : {
5951 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
5952 0 : PyObject *py_dwReserved0;
5953 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
5954 0 : return py_dwReserved0;
5955 : }
5956 :
5957 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
5958 : {
5959 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
5960 0 : if (value == NULL) {
5961 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
5962 0 : return -1;
5963 : }
5964 : {
5965 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
5966 0 : if (PyLong_Check(value)) {
5967 0 : unsigned long long test_var;
5968 0 : test_var = PyLong_AsUnsignedLongLong(value);
5969 0 : if (PyErr_Occurred() != NULL) {
5970 0 : return -1;
5971 : }
5972 0 : if (test_var > uint_max) {
5973 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5974 : PyLong_Type.tp_name, uint_max, test_var);
5975 0 : return -1;
5976 : }
5977 0 : object->dwReserved0 = test_var;
5978 : } else {
5979 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5980 : PyLong_Type.tp_name);
5981 0 : return -1;
5982 : }
5983 : }
5984 0 : return 0;
5985 : }
5986 :
5987 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwVersion(PyObject *obj, void *closure)
5988 : {
5989 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
5990 0 : PyObject *py_dwVersion;
5991 1 : py_dwVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwVersion));
5992 1 : return py_dwVersion;
5993 : }
5994 :
5995 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwVersion(PyObject *py_obj, PyObject *value, void *closure)
5996 : {
5997 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
5998 0 : if (value == NULL) {
5999 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwVersion");
6000 0 : return -1;
6001 : }
6002 : {
6003 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwVersion));
6004 0 : if (PyLong_Check(value)) {
6005 0 : unsigned long long test_var;
6006 0 : test_var = PyLong_AsUnsignedLongLong(value);
6007 0 : if (PyErr_Occurred() != NULL) {
6008 0 : return -1;
6009 : }
6010 0 : if (test_var > uint_max) {
6011 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6012 : PyLong_Type.tp_name, uint_max, test_var);
6013 0 : return -1;
6014 : }
6015 0 : object->dwVersion = test_var;
6016 : } else {
6017 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6018 : PyLong_Type.tp_name);
6019 0 : return -1;
6020 : }
6021 : }
6022 0 : return 0;
6023 : }
6024 :
6025 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fBootMethod(PyObject *obj, void *closure)
6026 : {
6027 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
6028 0 : PyObject *py_fBootMethod;
6029 1 : py_fBootMethod = PyLong_FromLong((uint16_t)(object->fBootMethod));
6030 1 : return py_fBootMethod;
6031 : }
6032 :
6033 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fBootMethod(PyObject *py_obj, PyObject *value, void *closure)
6034 : {
6035 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
6036 0 : if (value == NULL) {
6037 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fBootMethod");
6038 0 : return -1;
6039 : }
6040 : {
6041 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fBootMethod));
6042 0 : if (PyLong_Check(value)) {
6043 0 : unsigned long long test_var;
6044 0 : test_var = PyLong_AsUnsignedLongLong(value);
6045 0 : if (PyErr_Occurred() != NULL) {
6046 0 : return -1;
6047 : }
6048 0 : if (test_var > uint_max) {
6049 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6050 : PyLong_Type.tp_name, uint_max, test_var);
6051 0 : return -1;
6052 : }
6053 0 : object->fBootMethod = test_var;
6054 : } else {
6055 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6056 : PyLong_Type.tp_name);
6057 0 : return -1;
6058 : }
6059 : }
6060 0 : return 0;
6061 : }
6062 :
6063 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fAdminConfigured(PyObject *obj, void *closure)
6064 : {
6065 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
6066 0 : PyObject *py_fAdminConfigured;
6067 1 : py_fAdminConfigured = PyLong_FromLong((uint16_t)(object->fAdminConfigured));
6068 1 : return py_fAdminConfigured;
6069 : }
6070 :
6071 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fAdminConfigured(PyObject *py_obj, PyObject *value, void *closure)
6072 : {
6073 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
6074 0 : if (value == NULL) {
6075 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAdminConfigured");
6076 0 : return -1;
6077 : }
6078 : {
6079 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAdminConfigured));
6080 0 : if (PyLong_Check(value)) {
6081 0 : unsigned long long test_var;
6082 0 : test_var = PyLong_AsUnsignedLongLong(value);
6083 0 : if (PyErr_Occurred() != NULL) {
6084 0 : return -1;
6085 : }
6086 0 : if (test_var > uint_max) {
6087 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6088 : PyLong_Type.tp_name, uint_max, test_var);
6089 0 : return -1;
6090 : }
6091 0 : object->fAdminConfigured = test_var;
6092 : } else {
6093 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6094 : PyLong_Type.tp_name);
6095 0 : return -1;
6096 : }
6097 : }
6098 0 : return 0;
6099 : }
6100 :
6101 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fAllowUpdate(PyObject *obj, void *closure)
6102 : {
6103 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
6104 0 : PyObject *py_fAllowUpdate;
6105 1 : py_fAllowUpdate = PyLong_FromLong((uint16_t)(object->fAllowUpdate));
6106 1 : return py_fAllowUpdate;
6107 : }
6108 :
6109 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
6110 : {
6111 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
6112 0 : if (value == NULL) {
6113 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAllowUpdate");
6114 0 : return -1;
6115 : }
6116 : {
6117 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAllowUpdate));
6118 0 : if (PyLong_Check(value)) {
6119 0 : unsigned long long test_var;
6120 0 : test_var = PyLong_AsUnsignedLongLong(value);
6121 0 : if (PyErr_Occurred() != NULL) {
6122 0 : return -1;
6123 : }
6124 0 : if (test_var > uint_max) {
6125 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6126 : PyLong_Type.tp_name, uint_max, test_var);
6127 0 : return -1;
6128 : }
6129 0 : object->fAllowUpdate = test_var;
6130 : } else {
6131 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6132 : PyLong_Type.tp_name);
6133 0 : return -1;
6134 : }
6135 : }
6136 0 : return 0;
6137 : }
6138 :
6139 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fDsAvailable(PyObject *obj, void *closure)
6140 : {
6141 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
6142 0 : PyObject *py_fDsAvailable;
6143 1 : py_fDsAvailable = PyLong_FromLong((uint16_t)(object->fDsAvailable));
6144 1 : return py_fDsAvailable;
6145 : }
6146 :
6147 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fDsAvailable(PyObject *py_obj, PyObject *value, void *closure)
6148 : {
6149 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
6150 0 : if (value == NULL) {
6151 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fDsAvailable");
6152 0 : return -1;
6153 : }
6154 : {
6155 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDsAvailable));
6156 0 : if (PyLong_Check(value)) {
6157 0 : unsigned long long test_var;
6158 0 : test_var = PyLong_AsUnsignedLongLong(value);
6159 0 : if (PyErr_Occurred() != NULL) {
6160 0 : return -1;
6161 : }
6162 0 : if (test_var > uint_max) {
6163 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6164 : PyLong_Type.tp_name, uint_max, test_var);
6165 0 : return -1;
6166 : }
6167 0 : object->fDsAvailable = test_var;
6168 : } else {
6169 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6170 : PyLong_Type.tp_name);
6171 0 : return -1;
6172 : }
6173 : }
6174 0 : return 0;
6175 : }
6176 :
6177 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pszServerName(PyObject *obj, void *closure)
6178 : {
6179 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
6180 0 : PyObject *py_pszServerName;
6181 1 : if (object->pszServerName == NULL) {
6182 0 : Py_RETURN_NONE;
6183 : }
6184 1 : if (object->pszServerName == NULL) {
6185 0 : py_pszServerName = Py_None;
6186 0 : Py_INCREF(py_pszServerName);
6187 : } else {
6188 1 : if (object->pszServerName == NULL) {
6189 0 : py_pszServerName = Py_None;
6190 0 : Py_INCREF(py_pszServerName);
6191 : } else {
6192 1 : py_pszServerName = PyUnicode_Decode(object->pszServerName, strlen(object->pszServerName), "utf-8", "ignore");
6193 : }
6194 : }
6195 1 : return py_pszServerName;
6196 : }
6197 :
6198 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pszServerName(PyObject *py_obj, PyObject *value, void *closure)
6199 : {
6200 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
6201 0 : if (value == NULL) {
6202 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszServerName");
6203 0 : return -1;
6204 : }
6205 0 : if (value == Py_None) {
6206 0 : object->pszServerName = NULL;
6207 : } else {
6208 0 : object->pszServerName = NULL;
6209 : {
6210 0 : const char *test_str;
6211 0 : const char *talloc_str;
6212 0 : PyObject *unicode = NULL;
6213 0 : if (PyUnicode_Check(value)) {
6214 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
6215 0 : if (unicode == NULL) {
6216 0 : return -1;
6217 : }
6218 0 : test_str = PyBytes_AS_STRING(unicode);
6219 0 : } else if (PyBytes_Check(value)) {
6220 0 : test_str = PyBytes_AS_STRING(value);
6221 : } else {
6222 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6223 0 : return -1;
6224 : }
6225 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
6226 0 : if (unicode != NULL) {
6227 0 : Py_DECREF(unicode);
6228 : }
6229 0 : if (talloc_str == NULL) {
6230 0 : PyErr_NoMemory();
6231 0 : return -1;
6232 : }
6233 0 : object->pszServerName = talloc_str;
6234 : }
6235 : }
6236 0 : return 0;
6237 : }
6238 :
6239 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pszDsContainer(PyObject *obj, void *closure)
6240 : {
6241 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
6242 0 : PyObject *py_pszDsContainer;
6243 1 : if (object->pszDsContainer == NULL) {
6244 0 : Py_RETURN_NONE;
6245 : }
6246 1 : if (object->pszDsContainer == NULL) {
6247 0 : py_pszDsContainer = Py_None;
6248 0 : Py_INCREF(py_pszDsContainer);
6249 : } else {
6250 1 : if (object->pszDsContainer == NULL) {
6251 0 : py_pszDsContainer = Py_None;
6252 0 : Py_INCREF(py_pszDsContainer);
6253 : } else {
6254 1 : py_pszDsContainer = PyUnicode_Decode(object->pszDsContainer, strlen(object->pszDsContainer), "utf-8", "ignore");
6255 : }
6256 : }
6257 1 : return py_pszDsContainer;
6258 : }
6259 :
6260 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pszDsContainer(PyObject *py_obj, PyObject *value, void *closure)
6261 : {
6262 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
6263 0 : if (value == NULL) {
6264 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDsContainer");
6265 0 : return -1;
6266 : }
6267 0 : if (value == Py_None) {
6268 0 : object->pszDsContainer = NULL;
6269 : } else {
6270 0 : object->pszDsContainer = NULL;
6271 : {
6272 0 : const char *test_str;
6273 0 : const char *talloc_str;
6274 0 : PyObject *unicode = NULL;
6275 0 : if (PyUnicode_Check(value)) {
6276 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
6277 0 : if (unicode == NULL) {
6278 0 : return -1;
6279 : }
6280 0 : test_str = PyBytes_AS_STRING(unicode);
6281 0 : } else if (PyBytes_Check(value)) {
6282 0 : test_str = PyBytes_AS_STRING(value);
6283 : } else {
6284 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6285 0 : return -1;
6286 : }
6287 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
6288 0 : if (unicode != NULL) {
6289 0 : Py_DECREF(unicode);
6290 : }
6291 0 : if (talloc_str == NULL) {
6292 0 : PyErr_NoMemory();
6293 0 : return -1;
6294 : }
6295 0 : object->pszDsContainer = talloc_str;
6296 : }
6297 : }
6298 0 : return 0;
6299 : }
6300 :
6301 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_aipServerAddrs(PyObject *obj, void *closure)
6302 : {
6303 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
6304 0 : PyObject *py_aipServerAddrs;
6305 1 : if (object->aipServerAddrs == NULL) {
6306 0 : Py_RETURN_NONE;
6307 : }
6308 1 : if (object->aipServerAddrs == NULL) {
6309 0 : py_aipServerAddrs = Py_None;
6310 0 : Py_INCREF(py_aipServerAddrs);
6311 : } else {
6312 1 : py_aipServerAddrs = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipServerAddrs, object->aipServerAddrs);
6313 : }
6314 1 : return py_aipServerAddrs;
6315 : }
6316 :
6317 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_aipServerAddrs(PyObject *py_obj, PyObject *value, void *closure)
6318 : {
6319 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
6320 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipServerAddrs));
6321 0 : if (value == NULL) {
6322 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipServerAddrs");
6323 0 : return -1;
6324 : }
6325 0 : if (value == Py_None) {
6326 0 : object->aipServerAddrs = NULL;
6327 : } else {
6328 0 : object->aipServerAddrs = NULL;
6329 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
6330 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
6331 0 : PyErr_NoMemory();
6332 0 : return -1;
6333 : }
6334 0 : object->aipServerAddrs = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
6335 : }
6336 0 : return 0;
6337 : }
6338 :
6339 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_aipListenAddrs(PyObject *obj, void *closure)
6340 : {
6341 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
6342 0 : PyObject *py_aipListenAddrs;
6343 1 : if (object->aipListenAddrs == NULL) {
6344 0 : Py_RETURN_NONE;
6345 : }
6346 1 : if (object->aipListenAddrs == NULL) {
6347 0 : py_aipListenAddrs = Py_None;
6348 0 : Py_INCREF(py_aipListenAddrs);
6349 : } else {
6350 1 : py_aipListenAddrs = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipListenAddrs, object->aipListenAddrs);
6351 : }
6352 1 : return py_aipListenAddrs;
6353 : }
6354 :
6355 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_aipListenAddrs(PyObject *py_obj, PyObject *value, void *closure)
6356 : {
6357 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
6358 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipListenAddrs));
6359 0 : if (value == NULL) {
6360 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipListenAddrs");
6361 0 : return -1;
6362 : }
6363 0 : if (value == Py_None) {
6364 0 : object->aipListenAddrs = NULL;
6365 : } else {
6366 0 : object->aipListenAddrs = NULL;
6367 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
6368 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
6369 0 : PyErr_NoMemory();
6370 0 : return -1;
6371 : }
6372 0 : object->aipListenAddrs = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
6373 : }
6374 0 : return 0;
6375 : }
6376 :
6377 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_aipForwarders(PyObject *obj, void *closure)
6378 : {
6379 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
6380 0 : PyObject *py_aipForwarders;
6381 1 : if (object->aipForwarders == NULL) {
6382 1 : Py_RETURN_NONE;
6383 : }
6384 0 : if (object->aipForwarders == NULL) {
6385 0 : py_aipForwarders = Py_None;
6386 0 : Py_INCREF(py_aipForwarders);
6387 : } else {
6388 0 : py_aipForwarders = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipForwarders, object->aipForwarders);
6389 : }
6390 0 : return py_aipForwarders;
6391 : }
6392 :
6393 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_aipForwarders(PyObject *py_obj, PyObject *value, void *closure)
6394 : {
6395 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
6396 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipForwarders));
6397 0 : if (value == NULL) {
6398 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipForwarders");
6399 0 : return -1;
6400 : }
6401 0 : if (value == Py_None) {
6402 0 : object->aipForwarders = NULL;
6403 : } else {
6404 0 : object->aipForwarders = NULL;
6405 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
6406 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
6407 0 : PyErr_NoMemory();
6408 0 : return -1;
6409 : }
6410 0 : object->aipForwarders = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
6411 : }
6412 0 : return 0;
6413 : }
6414 :
6415 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_aipLogFilter(PyObject *obj, void *closure)
6416 : {
6417 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
6418 0 : PyObject *py_aipLogFilter;
6419 1 : if (object->aipLogFilter == NULL) {
6420 1 : Py_RETURN_NONE;
6421 : }
6422 0 : if (object->aipLogFilter == NULL) {
6423 0 : py_aipLogFilter = Py_None;
6424 0 : Py_INCREF(py_aipLogFilter);
6425 : } else {
6426 0 : py_aipLogFilter = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipLogFilter, object->aipLogFilter);
6427 : }
6428 0 : return py_aipLogFilter;
6429 : }
6430 :
6431 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_aipLogFilter(PyObject *py_obj, PyObject *value, void *closure)
6432 : {
6433 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
6434 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipLogFilter));
6435 0 : if (value == NULL) {
6436 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipLogFilter");
6437 0 : return -1;
6438 : }
6439 0 : if (value == Py_None) {
6440 0 : object->aipLogFilter = NULL;
6441 : } else {
6442 0 : object->aipLogFilter = NULL;
6443 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
6444 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
6445 0 : PyErr_NoMemory();
6446 0 : return -1;
6447 : }
6448 0 : object->aipLogFilter = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
6449 : }
6450 0 : return 0;
6451 : }
6452 :
6453 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pwszLogFilePath(PyObject *obj, void *closure)
6454 : {
6455 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
6456 0 : PyObject *py_pwszLogFilePath;
6457 1 : if (object->pwszLogFilePath == NULL) {
6458 1 : Py_RETURN_NONE;
6459 : }
6460 0 : if (object->pwszLogFilePath == NULL) {
6461 0 : py_pwszLogFilePath = Py_None;
6462 0 : Py_INCREF(py_pwszLogFilePath);
6463 : } else {
6464 0 : if (object->pwszLogFilePath == NULL) {
6465 0 : py_pwszLogFilePath = Py_None;
6466 0 : Py_INCREF(py_pwszLogFilePath);
6467 : } else {
6468 0 : py_pwszLogFilePath = PyUnicode_Decode(object->pwszLogFilePath, strlen(object->pwszLogFilePath), "utf-8", "ignore");
6469 : }
6470 : }
6471 0 : return py_pwszLogFilePath;
6472 : }
6473 :
6474 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pwszLogFilePath(PyObject *py_obj, PyObject *value, void *closure)
6475 : {
6476 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
6477 0 : if (value == NULL) {
6478 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pwszLogFilePath");
6479 0 : return -1;
6480 : }
6481 0 : if (value == Py_None) {
6482 0 : object->pwszLogFilePath = NULL;
6483 : } else {
6484 0 : object->pwszLogFilePath = NULL;
6485 : {
6486 0 : const char *test_str;
6487 0 : const char *talloc_str;
6488 0 : PyObject *unicode = NULL;
6489 0 : if (PyUnicode_Check(value)) {
6490 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
6491 0 : if (unicode == NULL) {
6492 0 : return -1;
6493 : }
6494 0 : test_str = PyBytes_AS_STRING(unicode);
6495 0 : } else if (PyBytes_Check(value)) {
6496 0 : test_str = PyBytes_AS_STRING(value);
6497 : } else {
6498 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6499 0 : return -1;
6500 : }
6501 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
6502 0 : if (unicode != NULL) {
6503 0 : Py_DECREF(unicode);
6504 : }
6505 0 : if (talloc_str == NULL) {
6506 0 : PyErr_NoMemory();
6507 0 : return -1;
6508 : }
6509 0 : object->pwszLogFilePath = talloc_str;
6510 : }
6511 : }
6512 0 : return 0;
6513 : }
6514 :
6515 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pszDomainName(PyObject *obj, void *closure)
6516 : {
6517 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
6518 0 : PyObject *py_pszDomainName;
6519 1 : if (object->pszDomainName == NULL) {
6520 0 : Py_RETURN_NONE;
6521 : }
6522 1 : if (object->pszDomainName == NULL) {
6523 0 : py_pszDomainName = Py_None;
6524 0 : Py_INCREF(py_pszDomainName);
6525 : } else {
6526 1 : if (object->pszDomainName == NULL) {
6527 0 : py_pszDomainName = Py_None;
6528 0 : Py_INCREF(py_pszDomainName);
6529 : } else {
6530 1 : py_pszDomainName = PyUnicode_Decode(object->pszDomainName, strlen(object->pszDomainName), "utf-8", "ignore");
6531 : }
6532 : }
6533 1 : return py_pszDomainName;
6534 : }
6535 :
6536 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pszDomainName(PyObject *py_obj, PyObject *value, void *closure)
6537 : {
6538 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
6539 0 : if (value == NULL) {
6540 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDomainName");
6541 0 : return -1;
6542 : }
6543 0 : if (value == Py_None) {
6544 0 : object->pszDomainName = NULL;
6545 : } else {
6546 0 : object->pszDomainName = NULL;
6547 : {
6548 0 : const char *test_str;
6549 0 : const char *talloc_str;
6550 0 : PyObject *unicode = NULL;
6551 0 : if (PyUnicode_Check(value)) {
6552 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
6553 0 : if (unicode == NULL) {
6554 0 : return -1;
6555 : }
6556 0 : test_str = PyBytes_AS_STRING(unicode);
6557 0 : } else if (PyBytes_Check(value)) {
6558 0 : test_str = PyBytes_AS_STRING(value);
6559 : } else {
6560 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6561 0 : return -1;
6562 : }
6563 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
6564 0 : if (unicode != NULL) {
6565 0 : Py_DECREF(unicode);
6566 : }
6567 0 : if (talloc_str == NULL) {
6568 0 : PyErr_NoMemory();
6569 0 : return -1;
6570 : }
6571 0 : object->pszDomainName = talloc_str;
6572 : }
6573 : }
6574 0 : return 0;
6575 : }
6576 :
6577 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pszForestName(PyObject *obj, void *closure)
6578 : {
6579 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
6580 0 : PyObject *py_pszForestName;
6581 1 : if (object->pszForestName == NULL) {
6582 0 : Py_RETURN_NONE;
6583 : }
6584 1 : if (object->pszForestName == NULL) {
6585 0 : py_pszForestName = Py_None;
6586 0 : Py_INCREF(py_pszForestName);
6587 : } else {
6588 1 : if (object->pszForestName == NULL) {
6589 0 : py_pszForestName = Py_None;
6590 0 : Py_INCREF(py_pszForestName);
6591 : } else {
6592 1 : py_pszForestName = PyUnicode_Decode(object->pszForestName, strlen(object->pszForestName), "utf-8", "ignore");
6593 : }
6594 : }
6595 1 : return py_pszForestName;
6596 : }
6597 :
6598 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pszForestName(PyObject *py_obj, PyObject *value, void *closure)
6599 : {
6600 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
6601 0 : if (value == NULL) {
6602 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszForestName");
6603 0 : return -1;
6604 : }
6605 0 : if (value == Py_None) {
6606 0 : object->pszForestName = NULL;
6607 : } else {
6608 0 : object->pszForestName = NULL;
6609 : {
6610 0 : const char *test_str;
6611 0 : const char *talloc_str;
6612 0 : PyObject *unicode = NULL;
6613 0 : if (PyUnicode_Check(value)) {
6614 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
6615 0 : if (unicode == NULL) {
6616 0 : return -1;
6617 : }
6618 0 : test_str = PyBytes_AS_STRING(unicode);
6619 0 : } else if (PyBytes_Check(value)) {
6620 0 : test_str = PyBytes_AS_STRING(value);
6621 : } else {
6622 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6623 0 : return -1;
6624 : }
6625 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
6626 0 : if (unicode != NULL) {
6627 0 : Py_DECREF(unicode);
6628 : }
6629 0 : if (talloc_str == NULL) {
6630 0 : PyErr_NoMemory();
6631 0 : return -1;
6632 : }
6633 0 : object->pszForestName = talloc_str;
6634 : }
6635 : }
6636 0 : return 0;
6637 : }
6638 :
6639 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pszDomainDirectoryPartition(PyObject *obj, void *closure)
6640 : {
6641 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
6642 0 : PyObject *py_pszDomainDirectoryPartition;
6643 1 : if (object->pszDomainDirectoryPartition == NULL) {
6644 0 : Py_RETURN_NONE;
6645 : }
6646 1 : if (object->pszDomainDirectoryPartition == NULL) {
6647 0 : py_pszDomainDirectoryPartition = Py_None;
6648 0 : Py_INCREF(py_pszDomainDirectoryPartition);
6649 : } else {
6650 1 : if (object->pszDomainDirectoryPartition == NULL) {
6651 0 : py_pszDomainDirectoryPartition = Py_None;
6652 0 : Py_INCREF(py_pszDomainDirectoryPartition);
6653 : } else {
6654 1 : py_pszDomainDirectoryPartition = PyUnicode_Decode(object->pszDomainDirectoryPartition, strlen(object->pszDomainDirectoryPartition), "utf-8", "ignore");
6655 : }
6656 : }
6657 1 : return py_pszDomainDirectoryPartition;
6658 : }
6659 :
6660 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pszDomainDirectoryPartition(PyObject *py_obj, PyObject *value, void *closure)
6661 : {
6662 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
6663 0 : if (value == NULL) {
6664 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDomainDirectoryPartition");
6665 0 : return -1;
6666 : }
6667 0 : if (value == Py_None) {
6668 0 : object->pszDomainDirectoryPartition = NULL;
6669 : } else {
6670 0 : object->pszDomainDirectoryPartition = NULL;
6671 : {
6672 0 : const char *test_str;
6673 0 : const char *talloc_str;
6674 0 : PyObject *unicode = NULL;
6675 0 : if (PyUnicode_Check(value)) {
6676 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
6677 0 : if (unicode == NULL) {
6678 0 : return -1;
6679 : }
6680 0 : test_str = PyBytes_AS_STRING(unicode);
6681 0 : } else if (PyBytes_Check(value)) {
6682 0 : test_str = PyBytes_AS_STRING(value);
6683 : } else {
6684 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6685 0 : return -1;
6686 : }
6687 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
6688 0 : if (unicode != NULL) {
6689 0 : Py_DECREF(unicode);
6690 : }
6691 0 : if (talloc_str == NULL) {
6692 0 : PyErr_NoMemory();
6693 0 : return -1;
6694 : }
6695 0 : object->pszDomainDirectoryPartition = talloc_str;
6696 : }
6697 : }
6698 0 : return 0;
6699 : }
6700 :
6701 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pszForestDirectoryPartition(PyObject *obj, void *closure)
6702 : {
6703 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
6704 0 : PyObject *py_pszForestDirectoryPartition;
6705 1 : if (object->pszForestDirectoryPartition == NULL) {
6706 0 : Py_RETURN_NONE;
6707 : }
6708 1 : if (object->pszForestDirectoryPartition == NULL) {
6709 0 : py_pszForestDirectoryPartition = Py_None;
6710 0 : Py_INCREF(py_pszForestDirectoryPartition);
6711 : } else {
6712 1 : if (object->pszForestDirectoryPartition == NULL) {
6713 0 : py_pszForestDirectoryPartition = Py_None;
6714 0 : Py_INCREF(py_pszForestDirectoryPartition);
6715 : } else {
6716 1 : py_pszForestDirectoryPartition = PyUnicode_Decode(object->pszForestDirectoryPartition, strlen(object->pszForestDirectoryPartition), "utf-8", "ignore");
6717 : }
6718 : }
6719 1 : return py_pszForestDirectoryPartition;
6720 : }
6721 :
6722 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pszForestDirectoryPartition(PyObject *py_obj, PyObject *value, void *closure)
6723 : {
6724 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
6725 0 : if (value == NULL) {
6726 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszForestDirectoryPartition");
6727 0 : return -1;
6728 : }
6729 0 : if (value == Py_None) {
6730 0 : object->pszForestDirectoryPartition = NULL;
6731 : } else {
6732 0 : object->pszForestDirectoryPartition = NULL;
6733 : {
6734 0 : const char *test_str;
6735 0 : const char *talloc_str;
6736 0 : PyObject *unicode = NULL;
6737 0 : if (PyUnicode_Check(value)) {
6738 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
6739 0 : if (unicode == NULL) {
6740 0 : return -1;
6741 : }
6742 0 : test_str = PyBytes_AS_STRING(unicode);
6743 0 : } else if (PyBytes_Check(value)) {
6744 0 : test_str = PyBytes_AS_STRING(value);
6745 : } else {
6746 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6747 0 : return -1;
6748 : }
6749 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
6750 0 : if (unicode != NULL) {
6751 0 : Py_DECREF(unicode);
6752 : }
6753 0 : if (talloc_str == NULL) {
6754 0 : PyErr_NoMemory();
6755 0 : return -1;
6756 : }
6757 0 : object->pszForestDirectoryPartition = talloc_str;
6758 : }
6759 : }
6760 0 : return 0;
6761 : }
6762 :
6763 0 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pExtensions(PyObject *obj, void *closure)
6764 : {
6765 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
6766 0 : PyObject *py_pExtensions;
6767 0 : py_pExtensions = PyList_New(6);
6768 0 : if (py_pExtensions == NULL) {
6769 0 : return NULL;
6770 : }
6771 : {
6772 : int pExtensions_cntr_0;
6773 0 : for (pExtensions_cntr_0 = 0; pExtensions_cntr_0 < (6); pExtensions_cntr_0++) {
6774 0 : PyObject *py_pExtensions_0;
6775 0 : py_pExtensions_0 = pytalloc_reference_ex(&DNS_EXTENSION_Type, pytalloc_get_mem_ctx(obj), &(object->pExtensions)[pExtensions_cntr_0]);
6776 0 : PyList_SetItem(py_pExtensions, pExtensions_cntr_0, py_pExtensions_0);
6777 : }
6778 : }
6779 0 : return py_pExtensions;
6780 : }
6781 :
6782 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pExtensions(PyObject *py_obj, PyObject *value, void *closure)
6783 : {
6784 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
6785 0 : if (value == NULL) {
6786 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pExtensions");
6787 0 : return -1;
6788 : }
6789 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
6790 : {
6791 0 : int pExtensions_cntr_0;
6792 0 : if (ARRAY_SIZE(object->pExtensions) != PyList_GET_SIZE(value)) {
6793 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));
6794 0 : return -1;
6795 : }
6796 0 : for (pExtensions_cntr_0 = 0; pExtensions_cntr_0 < PyList_GET_SIZE(value); pExtensions_cntr_0++) {
6797 0 : if (PyList_GET_ITEM(value, pExtensions_cntr_0) == NULL) {
6798 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->pExtensions)[pExtensions_cntr_0]");
6799 0 : return -1;
6800 : }
6801 0 : PY_CHECK_TYPE(&DNS_EXTENSION_Type, PyList_GET_ITEM(value, pExtensions_cntr_0), return -1;);
6802 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(PyList_GET_ITEM(value, pExtensions_cntr_0))) == NULL) {
6803 0 : PyErr_NoMemory();
6804 0 : return -1;
6805 : }
6806 0 : (object->pExtensions)[pExtensions_cntr_0] = *(struct DNS_EXTENSION *)pytalloc_get_ptr(PyList_GET_ITEM(value, pExtensions_cntr_0));
6807 : }
6808 : }
6809 0 : return 0;
6810 : }
6811 :
6812 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLogLevel(PyObject *obj, void *closure)
6813 : {
6814 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
6815 0 : PyObject *py_dwLogLevel;
6816 1 : py_dwLogLevel = PyLong_FromUnsignedLongLong((uint32_t)(object->dwLogLevel));
6817 1 : return py_dwLogLevel;
6818 : }
6819 :
6820 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLogLevel(PyObject *py_obj, PyObject *value, void *closure)
6821 : {
6822 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
6823 0 : if (value == NULL) {
6824 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwLogLevel");
6825 0 : return -1;
6826 : }
6827 : {
6828 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLogLevel));
6829 0 : if (PyLong_Check(value)) {
6830 0 : unsigned long long test_var;
6831 0 : test_var = PyLong_AsUnsignedLongLong(value);
6832 0 : if (PyErr_Occurred() != NULL) {
6833 0 : return -1;
6834 : }
6835 0 : if (test_var > uint_max) {
6836 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6837 : PyLong_Type.tp_name, uint_max, test_var);
6838 0 : return -1;
6839 : }
6840 0 : object->dwLogLevel = test_var;
6841 : } else {
6842 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6843 : PyLong_Type.tp_name);
6844 0 : return -1;
6845 : }
6846 : }
6847 0 : return 0;
6848 : }
6849 :
6850 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDebugLevel(PyObject *obj, void *closure)
6851 : {
6852 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
6853 0 : PyObject *py_dwDebugLevel;
6854 1 : py_dwDebugLevel = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDebugLevel));
6855 1 : return py_dwDebugLevel;
6856 : }
6857 :
6858 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDebugLevel(PyObject *py_obj, PyObject *value, void *closure)
6859 : {
6860 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
6861 0 : if (value == NULL) {
6862 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDebugLevel");
6863 0 : return -1;
6864 : }
6865 : {
6866 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDebugLevel));
6867 0 : if (PyLong_Check(value)) {
6868 0 : unsigned long long test_var;
6869 0 : test_var = PyLong_AsUnsignedLongLong(value);
6870 0 : if (PyErr_Occurred() != NULL) {
6871 0 : return -1;
6872 : }
6873 0 : if (test_var > uint_max) {
6874 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6875 : PyLong_Type.tp_name, uint_max, test_var);
6876 0 : return -1;
6877 : }
6878 0 : object->dwDebugLevel = test_var;
6879 : } else {
6880 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6881 : PyLong_Type.tp_name);
6882 0 : return -1;
6883 : }
6884 : }
6885 0 : return 0;
6886 : }
6887 :
6888 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwForwardTimeout(PyObject *obj, void *closure)
6889 : {
6890 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
6891 0 : PyObject *py_dwForwardTimeout;
6892 1 : py_dwForwardTimeout = PyLong_FromUnsignedLongLong((uint32_t)(object->dwForwardTimeout));
6893 1 : return py_dwForwardTimeout;
6894 : }
6895 :
6896 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwForwardTimeout(PyObject *py_obj, PyObject *value, void *closure)
6897 : {
6898 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
6899 0 : if (value == NULL) {
6900 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwForwardTimeout");
6901 0 : return -1;
6902 : }
6903 : {
6904 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwForwardTimeout));
6905 0 : if (PyLong_Check(value)) {
6906 0 : unsigned long long test_var;
6907 0 : test_var = PyLong_AsUnsignedLongLong(value);
6908 0 : if (PyErr_Occurred() != NULL) {
6909 0 : return -1;
6910 : }
6911 0 : if (test_var > uint_max) {
6912 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6913 : PyLong_Type.tp_name, uint_max, test_var);
6914 0 : return -1;
6915 : }
6916 0 : object->dwForwardTimeout = test_var;
6917 : } else {
6918 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6919 : PyLong_Type.tp_name);
6920 0 : return -1;
6921 : }
6922 : }
6923 0 : return 0;
6924 : }
6925 :
6926 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRpcProtocol(PyObject *obj, void *closure)
6927 : {
6928 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
6929 0 : PyObject *py_dwRpcProtocol;
6930 1 : py_dwRpcProtocol = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcProtocol));
6931 1 : return py_dwRpcProtocol;
6932 : }
6933 :
6934 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRpcProtocol(PyObject *py_obj, PyObject *value, void *closure)
6935 : {
6936 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
6937 0 : if (value == NULL) {
6938 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcProtocol");
6939 0 : return -1;
6940 : }
6941 : {
6942 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcProtocol));
6943 0 : if (PyLong_Check(value)) {
6944 0 : unsigned long long test_var;
6945 0 : test_var = PyLong_AsUnsignedLongLong(value);
6946 0 : if (PyErr_Occurred() != NULL) {
6947 0 : return -1;
6948 : }
6949 0 : if (test_var > uint_max) {
6950 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6951 : PyLong_Type.tp_name, uint_max, test_var);
6952 0 : return -1;
6953 : }
6954 0 : object->dwRpcProtocol = test_var;
6955 : } else {
6956 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6957 : PyLong_Type.tp_name);
6958 0 : return -1;
6959 : }
6960 : }
6961 0 : return 0;
6962 : }
6963 :
6964 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwNameCheckFlag(PyObject *obj, void *closure)
6965 : {
6966 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
6967 0 : PyObject *py_dwNameCheckFlag;
6968 1 : py_dwNameCheckFlag = PyLong_FromUnsignedLongLong((uint32_t)(object->dwNameCheckFlag));
6969 1 : return py_dwNameCheckFlag;
6970 : }
6971 :
6972 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwNameCheckFlag(PyObject *py_obj, PyObject *value, void *closure)
6973 : {
6974 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
6975 0 : if (value == NULL) {
6976 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwNameCheckFlag");
6977 0 : return -1;
6978 : }
6979 : {
6980 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwNameCheckFlag));
6981 0 : if (PyLong_Check(value)) {
6982 0 : unsigned long long test_var;
6983 0 : test_var = PyLong_AsUnsignedLongLong(value);
6984 0 : if (PyErr_Occurred() != NULL) {
6985 0 : return -1;
6986 : }
6987 0 : if (test_var > uint_max) {
6988 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6989 : PyLong_Type.tp_name, uint_max, test_var);
6990 0 : return -1;
6991 : }
6992 0 : object->dwNameCheckFlag = test_var;
6993 : } else {
6994 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6995 : PyLong_Type.tp_name);
6996 0 : return -1;
6997 : }
6998 : }
6999 0 : return 0;
7000 : }
7001 :
7002 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_cAddressAnswerLimit(PyObject *obj, void *closure)
7003 : {
7004 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7005 0 : PyObject *py_cAddressAnswerLimit;
7006 1 : py_cAddressAnswerLimit = PyLong_FromUnsignedLongLong((uint32_t)(object->cAddressAnswerLimit));
7007 1 : return py_cAddressAnswerLimit;
7008 : }
7009 :
7010 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_cAddressAnswerLimit(PyObject *py_obj, PyObject *value, void *closure)
7011 : {
7012 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7013 0 : if (value == NULL) {
7014 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->cAddressAnswerLimit");
7015 0 : return -1;
7016 : }
7017 : {
7018 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->cAddressAnswerLimit));
7019 0 : if (PyLong_Check(value)) {
7020 0 : unsigned long long test_var;
7021 0 : test_var = PyLong_AsUnsignedLongLong(value);
7022 0 : if (PyErr_Occurred() != NULL) {
7023 0 : return -1;
7024 : }
7025 0 : if (test_var > uint_max) {
7026 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7027 : PyLong_Type.tp_name, uint_max, test_var);
7028 0 : return -1;
7029 : }
7030 0 : object->cAddressAnswerLimit = test_var;
7031 : } else {
7032 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7033 : PyLong_Type.tp_name);
7034 0 : return -1;
7035 : }
7036 : }
7037 0 : return 0;
7038 : }
7039 :
7040 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRecursionRetry(PyObject *obj, void *closure)
7041 : {
7042 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7043 0 : PyObject *py_dwRecursionRetry;
7044 1 : py_dwRecursionRetry = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRecursionRetry));
7045 1 : return py_dwRecursionRetry;
7046 : }
7047 :
7048 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRecursionRetry(PyObject *py_obj, PyObject *value, void *closure)
7049 : {
7050 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7051 0 : if (value == NULL) {
7052 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRecursionRetry");
7053 0 : return -1;
7054 : }
7055 : {
7056 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRecursionRetry));
7057 0 : if (PyLong_Check(value)) {
7058 0 : unsigned long long test_var;
7059 0 : test_var = PyLong_AsUnsignedLongLong(value);
7060 0 : if (PyErr_Occurred() != NULL) {
7061 0 : return -1;
7062 : }
7063 0 : if (test_var > uint_max) {
7064 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7065 : PyLong_Type.tp_name, uint_max, test_var);
7066 0 : return -1;
7067 : }
7068 0 : object->dwRecursionRetry = test_var;
7069 : } else {
7070 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7071 : PyLong_Type.tp_name);
7072 0 : return -1;
7073 : }
7074 : }
7075 0 : return 0;
7076 : }
7077 :
7078 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRecursionTimeout(PyObject *obj, void *closure)
7079 : {
7080 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7081 0 : PyObject *py_dwRecursionTimeout;
7082 1 : py_dwRecursionTimeout = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRecursionTimeout));
7083 1 : return py_dwRecursionTimeout;
7084 : }
7085 :
7086 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRecursionTimeout(PyObject *py_obj, PyObject *value, void *closure)
7087 : {
7088 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7089 0 : if (value == NULL) {
7090 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRecursionTimeout");
7091 0 : return -1;
7092 : }
7093 : {
7094 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRecursionTimeout));
7095 0 : if (PyLong_Check(value)) {
7096 0 : unsigned long long test_var;
7097 0 : test_var = PyLong_AsUnsignedLongLong(value);
7098 0 : if (PyErr_Occurred() != NULL) {
7099 0 : return -1;
7100 : }
7101 0 : if (test_var > uint_max) {
7102 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7103 : PyLong_Type.tp_name, uint_max, test_var);
7104 0 : return -1;
7105 : }
7106 0 : object->dwRecursionTimeout = test_var;
7107 : } else {
7108 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7109 : PyLong_Type.tp_name);
7110 0 : return -1;
7111 : }
7112 : }
7113 0 : return 0;
7114 : }
7115 :
7116 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwMaxCacheTtl(PyObject *obj, void *closure)
7117 : {
7118 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7119 0 : PyObject *py_dwMaxCacheTtl;
7120 1 : py_dwMaxCacheTtl = PyLong_FromUnsignedLongLong((uint32_t)(object->dwMaxCacheTtl));
7121 1 : return py_dwMaxCacheTtl;
7122 : }
7123 :
7124 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwMaxCacheTtl(PyObject *py_obj, PyObject *value, void *closure)
7125 : {
7126 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7127 0 : if (value == NULL) {
7128 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwMaxCacheTtl");
7129 0 : return -1;
7130 : }
7131 : {
7132 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwMaxCacheTtl));
7133 0 : if (PyLong_Check(value)) {
7134 0 : unsigned long long test_var;
7135 0 : test_var = PyLong_AsUnsignedLongLong(value);
7136 0 : if (PyErr_Occurred() != NULL) {
7137 0 : return -1;
7138 : }
7139 0 : if (test_var > uint_max) {
7140 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7141 : PyLong_Type.tp_name, uint_max, test_var);
7142 0 : return -1;
7143 : }
7144 0 : object->dwMaxCacheTtl = test_var;
7145 : } else {
7146 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7147 : PyLong_Type.tp_name);
7148 0 : return -1;
7149 : }
7150 : }
7151 0 : return 0;
7152 : }
7153 :
7154 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsPollingInterval(PyObject *obj, void *closure)
7155 : {
7156 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7157 0 : PyObject *py_dwDsPollingInterval;
7158 1 : py_dwDsPollingInterval = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDsPollingInterval));
7159 1 : return py_dwDsPollingInterval;
7160 : }
7161 :
7162 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsPollingInterval(PyObject *py_obj, PyObject *value, void *closure)
7163 : {
7164 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7165 0 : if (value == NULL) {
7166 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDsPollingInterval");
7167 0 : return -1;
7168 : }
7169 : {
7170 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDsPollingInterval));
7171 0 : if (PyLong_Check(value)) {
7172 0 : unsigned long long test_var;
7173 0 : test_var = PyLong_AsUnsignedLongLong(value);
7174 0 : if (PyErr_Occurred() != NULL) {
7175 0 : return -1;
7176 : }
7177 0 : if (test_var > uint_max) {
7178 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7179 : PyLong_Type.tp_name, uint_max, test_var);
7180 0 : return -1;
7181 : }
7182 0 : object->dwDsPollingInterval = test_var;
7183 : } else {
7184 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7185 : PyLong_Type.tp_name);
7186 0 : return -1;
7187 : }
7188 : }
7189 0 : return 0;
7190 : }
7191 :
7192 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLocalNetPriorityNetMask(PyObject *obj, void *closure)
7193 : {
7194 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7195 0 : PyObject *py_dwLocalNetPriorityNetMask;
7196 1 : py_dwLocalNetPriorityNetMask = PyLong_FromUnsignedLongLong((uint32_t)(object->dwLocalNetPriorityNetMask));
7197 1 : return py_dwLocalNetPriorityNetMask;
7198 : }
7199 :
7200 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLocalNetPriorityNetMask(PyObject *py_obj, PyObject *value, void *closure)
7201 : {
7202 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7203 0 : if (value == NULL) {
7204 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwLocalNetPriorityNetMask");
7205 0 : return -1;
7206 : }
7207 : {
7208 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLocalNetPriorityNetMask));
7209 0 : if (PyLong_Check(value)) {
7210 0 : unsigned long long test_var;
7211 0 : test_var = PyLong_AsUnsignedLongLong(value);
7212 0 : if (PyErr_Occurred() != NULL) {
7213 0 : return -1;
7214 : }
7215 0 : if (test_var > uint_max) {
7216 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7217 : PyLong_Type.tp_name, uint_max, test_var);
7218 0 : return -1;
7219 : }
7220 0 : object->dwLocalNetPriorityNetMask = test_var;
7221 : } else {
7222 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7223 : PyLong_Type.tp_name);
7224 0 : return -1;
7225 : }
7226 : }
7227 0 : return 0;
7228 : }
7229 :
7230 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwScavengingInterval(PyObject *obj, void *closure)
7231 : {
7232 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7233 0 : PyObject *py_dwScavengingInterval;
7234 1 : py_dwScavengingInterval = PyLong_FromUnsignedLongLong((uint32_t)(object->dwScavengingInterval));
7235 1 : return py_dwScavengingInterval;
7236 : }
7237 :
7238 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwScavengingInterval(PyObject *py_obj, PyObject *value, void *closure)
7239 : {
7240 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7241 0 : if (value == NULL) {
7242 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwScavengingInterval");
7243 0 : return -1;
7244 : }
7245 : {
7246 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwScavengingInterval));
7247 0 : if (PyLong_Check(value)) {
7248 0 : unsigned long long test_var;
7249 0 : test_var = PyLong_AsUnsignedLongLong(value);
7250 0 : if (PyErr_Occurred() != NULL) {
7251 0 : return -1;
7252 : }
7253 0 : if (test_var > uint_max) {
7254 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7255 : PyLong_Type.tp_name, uint_max, test_var);
7256 0 : return -1;
7257 : }
7258 0 : object->dwScavengingInterval = test_var;
7259 : } else {
7260 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7261 : PyLong_Type.tp_name);
7262 0 : return -1;
7263 : }
7264 : }
7265 0 : return 0;
7266 : }
7267 :
7268 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDefaultRefreshInterval(PyObject *obj, void *closure)
7269 : {
7270 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7271 0 : PyObject *py_dwDefaultRefreshInterval;
7272 1 : py_dwDefaultRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDefaultRefreshInterval));
7273 1 : return py_dwDefaultRefreshInterval;
7274 : }
7275 :
7276 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDefaultRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
7277 : {
7278 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7279 0 : if (value == NULL) {
7280 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDefaultRefreshInterval");
7281 0 : return -1;
7282 : }
7283 : {
7284 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDefaultRefreshInterval));
7285 0 : if (PyLong_Check(value)) {
7286 0 : unsigned long long test_var;
7287 0 : test_var = PyLong_AsUnsignedLongLong(value);
7288 0 : if (PyErr_Occurred() != NULL) {
7289 0 : return -1;
7290 : }
7291 0 : if (test_var > uint_max) {
7292 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7293 : PyLong_Type.tp_name, uint_max, test_var);
7294 0 : return -1;
7295 : }
7296 0 : object->dwDefaultRefreshInterval = test_var;
7297 : } else {
7298 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7299 : PyLong_Type.tp_name);
7300 0 : return -1;
7301 : }
7302 : }
7303 0 : return 0;
7304 : }
7305 :
7306 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDefaultNoRefreshInterval(PyObject *obj, void *closure)
7307 : {
7308 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7309 0 : PyObject *py_dwDefaultNoRefreshInterval;
7310 1 : py_dwDefaultNoRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDefaultNoRefreshInterval));
7311 1 : return py_dwDefaultNoRefreshInterval;
7312 : }
7313 :
7314 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDefaultNoRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
7315 : {
7316 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7317 0 : if (value == NULL) {
7318 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDefaultNoRefreshInterval");
7319 0 : return -1;
7320 : }
7321 : {
7322 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDefaultNoRefreshInterval));
7323 0 : if (PyLong_Check(value)) {
7324 0 : unsigned long long test_var;
7325 0 : test_var = PyLong_AsUnsignedLongLong(value);
7326 0 : if (PyErr_Occurred() != NULL) {
7327 0 : return -1;
7328 : }
7329 0 : if (test_var > uint_max) {
7330 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7331 : PyLong_Type.tp_name, uint_max, test_var);
7332 0 : return -1;
7333 : }
7334 0 : object->dwDefaultNoRefreshInterval = test_var;
7335 : } else {
7336 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7337 : PyLong_Type.tp_name);
7338 0 : return -1;
7339 : }
7340 : }
7341 0 : return 0;
7342 : }
7343 :
7344 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLastScavengeTime(PyObject *obj, void *closure)
7345 : {
7346 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7347 0 : PyObject *py_dwLastScavengeTime;
7348 1 : py_dwLastScavengeTime = PyLong_FromUnsignedLongLong((uint32_t)(object->dwLastScavengeTime));
7349 1 : return py_dwLastScavengeTime;
7350 : }
7351 :
7352 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLastScavengeTime(PyObject *py_obj, PyObject *value, void *closure)
7353 : {
7354 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7355 0 : if (value == NULL) {
7356 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwLastScavengeTime");
7357 0 : return -1;
7358 : }
7359 : {
7360 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLastScavengeTime));
7361 0 : if (PyLong_Check(value)) {
7362 0 : unsigned long long test_var;
7363 0 : test_var = PyLong_AsUnsignedLongLong(value);
7364 0 : if (PyErr_Occurred() != NULL) {
7365 0 : return -1;
7366 : }
7367 0 : if (test_var > uint_max) {
7368 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7369 : PyLong_Type.tp_name, uint_max, test_var);
7370 0 : return -1;
7371 : }
7372 0 : object->dwLastScavengeTime = test_var;
7373 : } else {
7374 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7375 : PyLong_Type.tp_name);
7376 0 : return -1;
7377 : }
7378 : }
7379 0 : return 0;
7380 : }
7381 :
7382 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwEventLogLevel(PyObject *obj, void *closure)
7383 : {
7384 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7385 0 : PyObject *py_dwEventLogLevel;
7386 1 : py_dwEventLogLevel = PyLong_FromUnsignedLongLong((uint32_t)(object->dwEventLogLevel));
7387 1 : return py_dwEventLogLevel;
7388 : }
7389 :
7390 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwEventLogLevel(PyObject *py_obj, PyObject *value, void *closure)
7391 : {
7392 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7393 0 : if (value == NULL) {
7394 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwEventLogLevel");
7395 0 : return -1;
7396 : }
7397 : {
7398 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwEventLogLevel));
7399 0 : if (PyLong_Check(value)) {
7400 0 : unsigned long long test_var;
7401 0 : test_var = PyLong_AsUnsignedLongLong(value);
7402 0 : if (PyErr_Occurred() != NULL) {
7403 0 : return -1;
7404 : }
7405 0 : if (test_var > uint_max) {
7406 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7407 : PyLong_Type.tp_name, uint_max, test_var);
7408 0 : return -1;
7409 : }
7410 0 : object->dwEventLogLevel = test_var;
7411 : } else {
7412 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7413 : PyLong_Type.tp_name);
7414 0 : return -1;
7415 : }
7416 : }
7417 0 : return 0;
7418 : }
7419 :
7420 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLogFileMaxSize(PyObject *obj, void *closure)
7421 : {
7422 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7423 0 : PyObject *py_dwLogFileMaxSize;
7424 1 : py_dwLogFileMaxSize = PyLong_FromUnsignedLongLong((uint32_t)(object->dwLogFileMaxSize));
7425 1 : return py_dwLogFileMaxSize;
7426 : }
7427 :
7428 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLogFileMaxSize(PyObject *py_obj, PyObject *value, void *closure)
7429 : {
7430 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7431 0 : if (value == NULL) {
7432 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwLogFileMaxSize");
7433 0 : return -1;
7434 : }
7435 : {
7436 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLogFileMaxSize));
7437 0 : if (PyLong_Check(value)) {
7438 0 : unsigned long long test_var;
7439 0 : test_var = PyLong_AsUnsignedLongLong(value);
7440 0 : if (PyErr_Occurred() != NULL) {
7441 0 : return -1;
7442 : }
7443 0 : if (test_var > uint_max) {
7444 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7445 : PyLong_Type.tp_name, uint_max, test_var);
7446 0 : return -1;
7447 : }
7448 0 : object->dwLogFileMaxSize = test_var;
7449 : } else {
7450 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7451 : PyLong_Type.tp_name);
7452 0 : return -1;
7453 : }
7454 : }
7455 0 : return 0;
7456 : }
7457 :
7458 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsForestVersion(PyObject *obj, void *closure)
7459 : {
7460 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7461 0 : PyObject *py_dwDsForestVersion;
7462 1 : py_dwDsForestVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDsForestVersion));
7463 1 : return py_dwDsForestVersion;
7464 : }
7465 :
7466 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsForestVersion(PyObject *py_obj, PyObject *value, void *closure)
7467 : {
7468 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7469 0 : if (value == NULL) {
7470 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDsForestVersion");
7471 0 : return -1;
7472 : }
7473 : {
7474 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDsForestVersion));
7475 0 : if (PyLong_Check(value)) {
7476 0 : unsigned long long test_var;
7477 0 : test_var = PyLong_AsUnsignedLongLong(value);
7478 0 : if (PyErr_Occurred() != NULL) {
7479 0 : return -1;
7480 : }
7481 0 : if (test_var > uint_max) {
7482 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7483 : PyLong_Type.tp_name, uint_max, test_var);
7484 0 : return -1;
7485 : }
7486 0 : object->dwDsForestVersion = test_var;
7487 : } else {
7488 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7489 : PyLong_Type.tp_name);
7490 0 : return -1;
7491 : }
7492 : }
7493 0 : return 0;
7494 : }
7495 :
7496 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsDomainVersion(PyObject *obj, void *closure)
7497 : {
7498 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7499 0 : PyObject *py_dwDsDomainVersion;
7500 1 : py_dwDsDomainVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDsDomainVersion));
7501 1 : return py_dwDsDomainVersion;
7502 : }
7503 :
7504 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsDomainVersion(PyObject *py_obj, PyObject *value, void *closure)
7505 : {
7506 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7507 0 : if (value == NULL) {
7508 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDsDomainVersion");
7509 0 : return -1;
7510 : }
7511 : {
7512 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDsDomainVersion));
7513 0 : if (PyLong_Check(value)) {
7514 0 : unsigned long long test_var;
7515 0 : test_var = PyLong_AsUnsignedLongLong(value);
7516 0 : if (PyErr_Occurred() != NULL) {
7517 0 : return -1;
7518 : }
7519 0 : if (test_var > uint_max) {
7520 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7521 : PyLong_Type.tp_name, uint_max, test_var);
7522 0 : return -1;
7523 : }
7524 0 : object->dwDsDomainVersion = test_var;
7525 : } else {
7526 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7527 : PyLong_Type.tp_name);
7528 0 : return -1;
7529 : }
7530 : }
7531 0 : return 0;
7532 : }
7533 :
7534 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsDsaVersion(PyObject *obj, void *closure)
7535 : {
7536 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7537 0 : PyObject *py_dwDsDsaVersion;
7538 1 : py_dwDsDsaVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDsDsaVersion));
7539 1 : return py_dwDsDsaVersion;
7540 : }
7541 :
7542 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsDsaVersion(PyObject *py_obj, PyObject *value, void *closure)
7543 : {
7544 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7545 0 : if (value == NULL) {
7546 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDsDsaVersion");
7547 0 : return -1;
7548 : }
7549 : {
7550 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDsDsaVersion));
7551 0 : if (PyLong_Check(value)) {
7552 0 : unsigned long long test_var;
7553 0 : test_var = PyLong_AsUnsignedLongLong(value);
7554 0 : if (PyErr_Occurred() != NULL) {
7555 0 : return -1;
7556 : }
7557 0 : if (test_var > uint_max) {
7558 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7559 : PyLong_Type.tp_name, uint_max, test_var);
7560 0 : return -1;
7561 : }
7562 0 : object->dwDsDsaVersion = test_var;
7563 : } else {
7564 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7565 : PyLong_Type.tp_name);
7566 0 : return -1;
7567 : }
7568 : }
7569 0 : return 0;
7570 : }
7571 :
7572 0 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwReserveArray(PyObject *obj, void *closure)
7573 : {
7574 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7575 0 : PyObject *py_dwReserveArray;
7576 0 : py_dwReserveArray = PyList_New(4);
7577 0 : if (py_dwReserveArray == NULL) {
7578 0 : return NULL;
7579 : }
7580 : {
7581 : int dwReserveArray_cntr_0;
7582 0 : for (dwReserveArray_cntr_0 = 0; dwReserveArray_cntr_0 < (4); dwReserveArray_cntr_0++) {
7583 0 : PyObject *py_dwReserveArray_0;
7584 0 : py_dwReserveArray_0 = PyLong_FromUnsignedLongLong((uint32_t)((object->dwReserveArray)[dwReserveArray_cntr_0]));
7585 0 : PyList_SetItem(py_dwReserveArray, dwReserveArray_cntr_0, py_dwReserveArray_0);
7586 : }
7587 : }
7588 0 : return py_dwReserveArray;
7589 : }
7590 :
7591 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwReserveArray(PyObject *py_obj, PyObject *value, void *closure)
7592 : {
7593 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7594 0 : if (value == NULL) {
7595 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserveArray");
7596 0 : return -1;
7597 : }
7598 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
7599 : {
7600 0 : int dwReserveArray_cntr_0;
7601 0 : if (ARRAY_SIZE(object->dwReserveArray) != PyList_GET_SIZE(value)) {
7602 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));
7603 0 : return -1;
7604 : }
7605 0 : for (dwReserveArray_cntr_0 = 0; dwReserveArray_cntr_0 < PyList_GET_SIZE(value); dwReserveArray_cntr_0++) {
7606 0 : if (PyList_GET_ITEM(value, dwReserveArray_cntr_0) == NULL) {
7607 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->dwReserveArray)[dwReserveArray_cntr_0]");
7608 0 : return -1;
7609 : }
7610 : {
7611 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->dwReserveArray)[dwReserveArray_cntr_0]));
7612 0 : if (PyLong_Check(PyList_GET_ITEM(value, dwReserveArray_cntr_0))) {
7613 0 : unsigned long long test_var;
7614 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, dwReserveArray_cntr_0));
7615 0 : if (PyErr_Occurred() != NULL) {
7616 0 : return -1;
7617 : }
7618 0 : if (test_var > uint_max) {
7619 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7620 : PyLong_Type.tp_name, uint_max, test_var);
7621 0 : return -1;
7622 : }
7623 0 : (object->dwReserveArray)[dwReserveArray_cntr_0] = test_var;
7624 : } else {
7625 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7626 : PyLong_Type.tp_name);
7627 0 : return -1;
7628 : }
7629 : }
7630 : }
7631 : }
7632 0 : return 0;
7633 : }
7634 :
7635 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fAutoReverseZones(PyObject *obj, void *closure)
7636 : {
7637 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7638 0 : PyObject *py_fAutoReverseZones;
7639 1 : py_fAutoReverseZones = PyLong_FromLong((uint16_t)(object->fAutoReverseZones));
7640 1 : return py_fAutoReverseZones;
7641 : }
7642 :
7643 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fAutoReverseZones(PyObject *py_obj, PyObject *value, void *closure)
7644 : {
7645 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7646 0 : if (value == NULL) {
7647 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAutoReverseZones");
7648 0 : return -1;
7649 : }
7650 : {
7651 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAutoReverseZones));
7652 0 : if (PyLong_Check(value)) {
7653 0 : unsigned long long test_var;
7654 0 : test_var = PyLong_AsUnsignedLongLong(value);
7655 0 : if (PyErr_Occurred() != NULL) {
7656 0 : return -1;
7657 : }
7658 0 : if (test_var > uint_max) {
7659 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7660 : PyLong_Type.tp_name, uint_max, test_var);
7661 0 : return -1;
7662 : }
7663 0 : object->fAutoReverseZones = test_var;
7664 : } else {
7665 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7666 : PyLong_Type.tp_name);
7667 0 : return -1;
7668 : }
7669 : }
7670 0 : return 0;
7671 : }
7672 :
7673 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fAutoCacheUpdate(PyObject *obj, void *closure)
7674 : {
7675 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7676 0 : PyObject *py_fAutoCacheUpdate;
7677 1 : py_fAutoCacheUpdate = PyLong_FromLong((uint16_t)(object->fAutoCacheUpdate));
7678 1 : return py_fAutoCacheUpdate;
7679 : }
7680 :
7681 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fAutoCacheUpdate(PyObject *py_obj, PyObject *value, void *closure)
7682 : {
7683 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7684 0 : if (value == NULL) {
7685 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAutoCacheUpdate");
7686 0 : return -1;
7687 : }
7688 : {
7689 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAutoCacheUpdate));
7690 0 : if (PyLong_Check(value)) {
7691 0 : unsigned long long test_var;
7692 0 : test_var = PyLong_AsUnsignedLongLong(value);
7693 0 : if (PyErr_Occurred() != NULL) {
7694 0 : return -1;
7695 : }
7696 0 : if (test_var > uint_max) {
7697 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7698 : PyLong_Type.tp_name, uint_max, test_var);
7699 0 : return -1;
7700 : }
7701 0 : object->fAutoCacheUpdate = test_var;
7702 : } else {
7703 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7704 : PyLong_Type.tp_name);
7705 0 : return -1;
7706 : }
7707 : }
7708 0 : return 0;
7709 : }
7710 :
7711 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
7712 : {
7713 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7714 0 : PyObject *py_fRecurseAfterForwarding;
7715 1 : py_fRecurseAfterForwarding = PyLong_FromLong((uint16_t)(object->fRecurseAfterForwarding));
7716 1 : return py_fRecurseAfterForwarding;
7717 : }
7718 :
7719 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
7720 : {
7721 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7722 0 : if (value == NULL) {
7723 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fRecurseAfterForwarding");
7724 0 : return -1;
7725 : }
7726 : {
7727 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRecurseAfterForwarding));
7728 0 : if (PyLong_Check(value)) {
7729 0 : unsigned long long test_var;
7730 0 : test_var = PyLong_AsUnsignedLongLong(value);
7731 0 : if (PyErr_Occurred() != NULL) {
7732 0 : return -1;
7733 : }
7734 0 : if (test_var > uint_max) {
7735 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7736 : PyLong_Type.tp_name, uint_max, test_var);
7737 0 : return -1;
7738 : }
7739 0 : object->fRecurseAfterForwarding = test_var;
7740 : } else {
7741 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7742 : PyLong_Type.tp_name);
7743 0 : return -1;
7744 : }
7745 : }
7746 0 : return 0;
7747 : }
7748 :
7749 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fForwardDelegations(PyObject *obj, void *closure)
7750 : {
7751 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7752 0 : PyObject *py_fForwardDelegations;
7753 1 : py_fForwardDelegations = PyLong_FromLong((uint16_t)(object->fForwardDelegations));
7754 1 : return py_fForwardDelegations;
7755 : }
7756 :
7757 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fForwardDelegations(PyObject *py_obj, PyObject *value, void *closure)
7758 : {
7759 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7760 0 : if (value == NULL) {
7761 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fForwardDelegations");
7762 0 : return -1;
7763 : }
7764 : {
7765 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fForwardDelegations));
7766 0 : if (PyLong_Check(value)) {
7767 0 : unsigned long long test_var;
7768 0 : test_var = PyLong_AsUnsignedLongLong(value);
7769 0 : if (PyErr_Occurred() != NULL) {
7770 0 : return -1;
7771 : }
7772 0 : if (test_var > uint_max) {
7773 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7774 : PyLong_Type.tp_name, uint_max, test_var);
7775 0 : return -1;
7776 : }
7777 0 : object->fForwardDelegations = test_var;
7778 : } else {
7779 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7780 : PyLong_Type.tp_name);
7781 0 : return -1;
7782 : }
7783 : }
7784 0 : return 0;
7785 : }
7786 :
7787 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fNoRecursion(PyObject *obj, void *closure)
7788 : {
7789 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7790 0 : PyObject *py_fNoRecursion;
7791 1 : py_fNoRecursion = PyLong_FromLong((uint16_t)(object->fNoRecursion));
7792 1 : return py_fNoRecursion;
7793 : }
7794 :
7795 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fNoRecursion(PyObject *py_obj, PyObject *value, void *closure)
7796 : {
7797 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7798 0 : if (value == NULL) {
7799 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fNoRecursion");
7800 0 : return -1;
7801 : }
7802 : {
7803 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNoRecursion));
7804 0 : if (PyLong_Check(value)) {
7805 0 : unsigned long long test_var;
7806 0 : test_var = PyLong_AsUnsignedLongLong(value);
7807 0 : if (PyErr_Occurred() != NULL) {
7808 0 : return -1;
7809 : }
7810 0 : if (test_var > uint_max) {
7811 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7812 : PyLong_Type.tp_name, uint_max, test_var);
7813 0 : return -1;
7814 : }
7815 0 : object->fNoRecursion = test_var;
7816 : } else {
7817 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7818 : PyLong_Type.tp_name);
7819 0 : return -1;
7820 : }
7821 : }
7822 0 : return 0;
7823 : }
7824 :
7825 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fSecureResponses(PyObject *obj, void *closure)
7826 : {
7827 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7828 0 : PyObject *py_fSecureResponses;
7829 1 : py_fSecureResponses = PyLong_FromLong((uint16_t)(object->fSecureResponses));
7830 1 : return py_fSecureResponses;
7831 : }
7832 :
7833 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fSecureResponses(PyObject *py_obj, PyObject *value, void *closure)
7834 : {
7835 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7836 0 : if (value == NULL) {
7837 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fSecureResponses");
7838 0 : return -1;
7839 : }
7840 : {
7841 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureResponses));
7842 0 : if (PyLong_Check(value)) {
7843 0 : unsigned long long test_var;
7844 0 : test_var = PyLong_AsUnsignedLongLong(value);
7845 0 : if (PyErr_Occurred() != NULL) {
7846 0 : return -1;
7847 : }
7848 0 : if (test_var > uint_max) {
7849 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7850 : PyLong_Type.tp_name, uint_max, test_var);
7851 0 : return -1;
7852 : }
7853 0 : object->fSecureResponses = test_var;
7854 : } else {
7855 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7856 : PyLong_Type.tp_name);
7857 0 : return -1;
7858 : }
7859 : }
7860 0 : return 0;
7861 : }
7862 :
7863 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fRoundRobin(PyObject *obj, void *closure)
7864 : {
7865 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7866 0 : PyObject *py_fRoundRobin;
7867 1 : py_fRoundRobin = PyLong_FromLong((uint16_t)(object->fRoundRobin));
7868 1 : return py_fRoundRobin;
7869 : }
7870 :
7871 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fRoundRobin(PyObject *py_obj, PyObject *value, void *closure)
7872 : {
7873 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7874 0 : if (value == NULL) {
7875 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fRoundRobin");
7876 0 : return -1;
7877 : }
7878 : {
7879 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRoundRobin));
7880 0 : if (PyLong_Check(value)) {
7881 0 : unsigned long long test_var;
7882 0 : test_var = PyLong_AsUnsignedLongLong(value);
7883 0 : if (PyErr_Occurred() != NULL) {
7884 0 : return -1;
7885 : }
7886 0 : if (test_var > uint_max) {
7887 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7888 : PyLong_Type.tp_name, uint_max, test_var);
7889 0 : return -1;
7890 : }
7891 0 : object->fRoundRobin = test_var;
7892 : } else {
7893 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7894 : PyLong_Type.tp_name);
7895 0 : return -1;
7896 : }
7897 : }
7898 0 : return 0;
7899 : }
7900 :
7901 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fLocalNetPriority(PyObject *obj, void *closure)
7902 : {
7903 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7904 0 : PyObject *py_fLocalNetPriority;
7905 1 : py_fLocalNetPriority = PyLong_FromLong((uint16_t)(object->fLocalNetPriority));
7906 1 : return py_fLocalNetPriority;
7907 : }
7908 :
7909 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fLocalNetPriority(PyObject *py_obj, PyObject *value, void *closure)
7910 : {
7911 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7912 0 : if (value == NULL) {
7913 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fLocalNetPriority");
7914 0 : return -1;
7915 : }
7916 : {
7917 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fLocalNetPriority));
7918 0 : if (PyLong_Check(value)) {
7919 0 : unsigned long long test_var;
7920 0 : test_var = PyLong_AsUnsignedLongLong(value);
7921 0 : if (PyErr_Occurred() != NULL) {
7922 0 : return -1;
7923 : }
7924 0 : if (test_var > uint_max) {
7925 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7926 : PyLong_Type.tp_name, uint_max, test_var);
7927 0 : return -1;
7928 : }
7929 0 : object->fLocalNetPriority = test_var;
7930 : } else {
7931 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7932 : PyLong_Type.tp_name);
7933 0 : return -1;
7934 : }
7935 : }
7936 0 : return 0;
7937 : }
7938 :
7939 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fBindSecondaries(PyObject *obj, void *closure)
7940 : {
7941 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7942 0 : PyObject *py_fBindSecondaries;
7943 1 : py_fBindSecondaries = PyLong_FromLong((uint16_t)(object->fBindSecondaries));
7944 1 : return py_fBindSecondaries;
7945 : }
7946 :
7947 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fBindSecondaries(PyObject *py_obj, PyObject *value, void *closure)
7948 : {
7949 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7950 0 : if (value == NULL) {
7951 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fBindSecondaries");
7952 0 : return -1;
7953 : }
7954 : {
7955 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fBindSecondaries));
7956 0 : if (PyLong_Check(value)) {
7957 0 : unsigned long long test_var;
7958 0 : test_var = PyLong_AsUnsignedLongLong(value);
7959 0 : if (PyErr_Occurred() != NULL) {
7960 0 : return -1;
7961 : }
7962 0 : if (test_var > uint_max) {
7963 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7964 : PyLong_Type.tp_name, uint_max, test_var);
7965 0 : return -1;
7966 : }
7967 0 : object->fBindSecondaries = test_var;
7968 : } else {
7969 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7970 : PyLong_Type.tp_name);
7971 0 : return -1;
7972 : }
7973 : }
7974 0 : return 0;
7975 : }
7976 :
7977 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fWriteAuthorityNs(PyObject *obj, void *closure)
7978 : {
7979 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
7980 0 : PyObject *py_fWriteAuthorityNs;
7981 1 : py_fWriteAuthorityNs = PyLong_FromLong((uint16_t)(object->fWriteAuthorityNs));
7982 1 : return py_fWriteAuthorityNs;
7983 : }
7984 :
7985 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fWriteAuthorityNs(PyObject *py_obj, PyObject *value, void *closure)
7986 : {
7987 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
7988 0 : if (value == NULL) {
7989 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fWriteAuthorityNs");
7990 0 : return -1;
7991 : }
7992 : {
7993 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fWriteAuthorityNs));
7994 0 : if (PyLong_Check(value)) {
7995 0 : unsigned long long test_var;
7996 0 : test_var = PyLong_AsUnsignedLongLong(value);
7997 0 : if (PyErr_Occurred() != NULL) {
7998 0 : return -1;
7999 : }
8000 0 : if (test_var > uint_max) {
8001 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8002 : PyLong_Type.tp_name, uint_max, test_var);
8003 0 : return -1;
8004 : }
8005 0 : object->fWriteAuthorityNs = test_var;
8006 : } else {
8007 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8008 : PyLong_Type.tp_name);
8009 0 : return -1;
8010 : }
8011 : }
8012 0 : return 0;
8013 : }
8014 :
8015 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fStrictFileParsing(PyObject *obj, void *closure)
8016 : {
8017 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
8018 0 : PyObject *py_fStrictFileParsing;
8019 1 : py_fStrictFileParsing = PyLong_FromLong((uint16_t)(object->fStrictFileParsing));
8020 1 : return py_fStrictFileParsing;
8021 : }
8022 :
8023 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fStrictFileParsing(PyObject *py_obj, PyObject *value, void *closure)
8024 : {
8025 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
8026 0 : if (value == NULL) {
8027 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fStrictFileParsing");
8028 0 : return -1;
8029 : }
8030 : {
8031 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fStrictFileParsing));
8032 0 : if (PyLong_Check(value)) {
8033 0 : unsigned long long test_var;
8034 0 : test_var = PyLong_AsUnsignedLongLong(value);
8035 0 : if (PyErr_Occurred() != NULL) {
8036 0 : return -1;
8037 : }
8038 0 : if (test_var > uint_max) {
8039 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8040 : PyLong_Type.tp_name, uint_max, test_var);
8041 0 : return -1;
8042 : }
8043 0 : object->fStrictFileParsing = test_var;
8044 : } else {
8045 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8046 : PyLong_Type.tp_name);
8047 0 : return -1;
8048 : }
8049 : }
8050 0 : return 0;
8051 : }
8052 :
8053 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fLooseWildcarding(PyObject *obj, void *closure)
8054 : {
8055 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
8056 0 : PyObject *py_fLooseWildcarding;
8057 1 : py_fLooseWildcarding = PyLong_FromLong((uint16_t)(object->fLooseWildcarding));
8058 1 : return py_fLooseWildcarding;
8059 : }
8060 :
8061 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fLooseWildcarding(PyObject *py_obj, PyObject *value, void *closure)
8062 : {
8063 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
8064 0 : if (value == NULL) {
8065 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fLooseWildcarding");
8066 0 : return -1;
8067 : }
8068 : {
8069 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fLooseWildcarding));
8070 0 : if (PyLong_Check(value)) {
8071 0 : unsigned long long test_var;
8072 0 : test_var = PyLong_AsUnsignedLongLong(value);
8073 0 : if (PyErr_Occurred() != NULL) {
8074 0 : return -1;
8075 : }
8076 0 : if (test_var > uint_max) {
8077 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8078 : PyLong_Type.tp_name, uint_max, test_var);
8079 0 : return -1;
8080 : }
8081 0 : object->fLooseWildcarding = test_var;
8082 : } else {
8083 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8084 : PyLong_Type.tp_name);
8085 0 : return -1;
8086 : }
8087 : }
8088 0 : return 0;
8089 : }
8090 :
8091 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fDefaultAgingState(PyObject *obj, void *closure)
8092 : {
8093 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
8094 0 : PyObject *py_fDefaultAgingState;
8095 1 : py_fDefaultAgingState = PyLong_FromLong((uint16_t)(object->fDefaultAgingState));
8096 1 : return py_fDefaultAgingState;
8097 : }
8098 :
8099 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fDefaultAgingState(PyObject *py_obj, PyObject *value, void *closure)
8100 : {
8101 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
8102 0 : if (value == NULL) {
8103 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fDefaultAgingState");
8104 0 : return -1;
8105 : }
8106 : {
8107 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDefaultAgingState));
8108 0 : if (PyLong_Check(value)) {
8109 0 : unsigned long long test_var;
8110 0 : test_var = PyLong_AsUnsignedLongLong(value);
8111 0 : if (PyErr_Occurred() != NULL) {
8112 0 : return -1;
8113 : }
8114 0 : if (test_var > uint_max) {
8115 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8116 : PyLong_Type.tp_name, uint_max, test_var);
8117 0 : return -1;
8118 : }
8119 0 : object->fDefaultAgingState = test_var;
8120 : } else {
8121 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8122 : PyLong_Type.tp_name);
8123 0 : return -1;
8124 : }
8125 : }
8126 0 : return 0;
8127 : }
8128 :
8129 0 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fReserveArray(PyObject *obj, void *closure)
8130 : {
8131 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(obj);
8132 0 : PyObject *py_fReserveArray;
8133 0 : py_fReserveArray = PyList_New(15);
8134 0 : if (py_fReserveArray == NULL) {
8135 0 : return NULL;
8136 : }
8137 : {
8138 : int fReserveArray_cntr_0;
8139 0 : for (fReserveArray_cntr_0 = 0; fReserveArray_cntr_0 < (15); fReserveArray_cntr_0++) {
8140 0 : PyObject *py_fReserveArray_0;
8141 0 : py_fReserveArray_0 = PyLong_FromLong((uint16_t)((object->fReserveArray)[fReserveArray_cntr_0]));
8142 0 : PyList_SetItem(py_fReserveArray, fReserveArray_cntr_0, py_fReserveArray_0);
8143 : }
8144 : }
8145 0 : return py_fReserveArray;
8146 : }
8147 :
8148 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fReserveArray(PyObject *py_obj, PyObject *value, void *closure)
8149 : {
8150 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
8151 0 : if (value == NULL) {
8152 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fReserveArray");
8153 0 : return -1;
8154 : }
8155 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
8156 : {
8157 0 : int fReserveArray_cntr_0;
8158 0 : if (ARRAY_SIZE(object->fReserveArray) != PyList_GET_SIZE(value)) {
8159 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));
8160 0 : return -1;
8161 : }
8162 0 : for (fReserveArray_cntr_0 = 0; fReserveArray_cntr_0 < PyList_GET_SIZE(value); fReserveArray_cntr_0++) {
8163 0 : if (PyList_GET_ITEM(value, fReserveArray_cntr_0) == NULL) {
8164 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->fReserveArray)[fReserveArray_cntr_0]");
8165 0 : return -1;
8166 : }
8167 : {
8168 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->fReserveArray)[fReserveArray_cntr_0]));
8169 0 : if (PyLong_Check(PyList_GET_ITEM(value, fReserveArray_cntr_0))) {
8170 0 : unsigned long long test_var;
8171 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, fReserveArray_cntr_0));
8172 0 : if (PyErr_Occurred() != NULL) {
8173 0 : return -1;
8174 : }
8175 0 : if (test_var > uint_max) {
8176 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8177 : PyLong_Type.tp_name, uint_max, test_var);
8178 0 : return -1;
8179 : }
8180 0 : (object->fReserveArray)[fReserveArray_cntr_0] = test_var;
8181 : } else {
8182 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8183 : PyLong_Type.tp_name);
8184 0 : return -1;
8185 : }
8186 : }
8187 : }
8188 : }
8189 0 : return 0;
8190 : }
8191 :
8192 : static PyGetSetDef py_DNS_RPC_SERVER_INFO_DOTNET_getsetters[] = {
8193 : {
8194 : .name = discard_const_p(char, "dwRpcStructureVersion"),
8195 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRpcStructureVersion,
8196 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRpcStructureVersion,
8197 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8198 : },
8199 : {
8200 : .name = discard_const_p(char, "dwReserved0"),
8201 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwReserved0,
8202 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwReserved0,
8203 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8204 : },
8205 : {
8206 : .name = discard_const_p(char, "dwVersion"),
8207 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwVersion,
8208 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwVersion,
8209 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8210 : },
8211 : {
8212 : .name = discard_const_p(char, "fBootMethod"),
8213 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fBootMethod,
8214 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fBootMethod,
8215 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_BOOT_METHOD")
8216 : },
8217 : {
8218 : .name = discard_const_p(char, "fAdminConfigured"),
8219 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fAdminConfigured,
8220 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fAdminConfigured,
8221 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8222 : },
8223 : {
8224 : .name = discard_const_p(char, "fAllowUpdate"),
8225 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fAllowUpdate,
8226 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fAllowUpdate,
8227 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8228 : },
8229 : {
8230 : .name = discard_const_p(char, "fDsAvailable"),
8231 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fDsAvailable,
8232 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fDsAvailable,
8233 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8234 : },
8235 : {
8236 : .name = discard_const_p(char, "pszServerName"),
8237 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_pszServerName,
8238 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_pszServerName,
8239 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8240 : },
8241 : {
8242 : .name = discard_const_p(char, "pszDsContainer"),
8243 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_pszDsContainer,
8244 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_pszDsContainer,
8245 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
8246 : },
8247 : {
8248 : .name = discard_const_p(char, "aipServerAddrs"),
8249 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_aipServerAddrs,
8250 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_aipServerAddrs,
8251 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
8252 : },
8253 : {
8254 : .name = discard_const_p(char, "aipListenAddrs"),
8255 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_aipListenAddrs,
8256 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_aipListenAddrs,
8257 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
8258 : },
8259 : {
8260 : .name = discard_const_p(char, "aipForwarders"),
8261 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_aipForwarders,
8262 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_aipForwarders,
8263 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
8264 : },
8265 : {
8266 : .name = discard_const_p(char, "aipLogFilter"),
8267 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_aipLogFilter,
8268 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_aipLogFilter,
8269 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
8270 : },
8271 : {
8272 : .name = discard_const_p(char, "pwszLogFilePath"),
8273 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_pwszLogFilePath,
8274 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_pwszLogFilePath,
8275 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
8276 : },
8277 : {
8278 : .name = discard_const_p(char, "pszDomainName"),
8279 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_pszDomainName,
8280 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_pszDomainName,
8281 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8282 : },
8283 : {
8284 : .name = discard_const_p(char, "pszForestName"),
8285 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_pszForestName,
8286 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_pszForestName,
8287 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8288 : },
8289 : {
8290 : .name = discard_const_p(char, "pszDomainDirectoryPartition"),
8291 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_pszDomainDirectoryPartition,
8292 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_pszDomainDirectoryPartition,
8293 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8294 : },
8295 : {
8296 : .name = discard_const_p(char, "pszForestDirectoryPartition"),
8297 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_pszForestDirectoryPartition,
8298 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_pszForestDirectoryPartition,
8299 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8300 : },
8301 : {
8302 : .name = discard_const_p(char, "pExtensions"),
8303 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_pExtensions,
8304 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_pExtensions,
8305 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_EXTENSION")
8306 : },
8307 : {
8308 : .name = discard_const_p(char, "dwLogLevel"),
8309 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLogLevel,
8310 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLogLevel,
8311 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8312 : },
8313 : {
8314 : .name = discard_const_p(char, "dwDebugLevel"),
8315 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDebugLevel,
8316 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDebugLevel,
8317 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8318 : },
8319 : {
8320 : .name = discard_const_p(char, "dwForwardTimeout"),
8321 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwForwardTimeout,
8322 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwForwardTimeout,
8323 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8324 : },
8325 : {
8326 : .name = discard_const_p(char, "dwRpcProtocol"),
8327 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRpcProtocol,
8328 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRpcProtocol,
8329 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8330 : },
8331 : {
8332 : .name = discard_const_p(char, "dwNameCheckFlag"),
8333 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwNameCheckFlag,
8334 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwNameCheckFlag,
8335 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_NAME_CHECK_FLAG")
8336 : },
8337 : {
8338 : .name = discard_const_p(char, "cAddressAnswerLimit"),
8339 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_cAddressAnswerLimit,
8340 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_cAddressAnswerLimit,
8341 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8342 : },
8343 : {
8344 : .name = discard_const_p(char, "dwRecursionRetry"),
8345 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRecursionRetry,
8346 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRecursionRetry,
8347 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8348 : },
8349 : {
8350 : .name = discard_const_p(char, "dwRecursionTimeout"),
8351 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRecursionTimeout,
8352 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRecursionTimeout,
8353 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8354 : },
8355 : {
8356 : .name = discard_const_p(char, "dwMaxCacheTtl"),
8357 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwMaxCacheTtl,
8358 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwMaxCacheTtl,
8359 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8360 : },
8361 : {
8362 : .name = discard_const_p(char, "dwDsPollingInterval"),
8363 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsPollingInterval,
8364 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsPollingInterval,
8365 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8366 : },
8367 : {
8368 : .name = discard_const_p(char, "dwLocalNetPriorityNetMask"),
8369 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLocalNetPriorityNetMask,
8370 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLocalNetPriorityNetMask,
8371 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8372 : },
8373 : {
8374 : .name = discard_const_p(char, "dwScavengingInterval"),
8375 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwScavengingInterval,
8376 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwScavengingInterval,
8377 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8378 : },
8379 : {
8380 : .name = discard_const_p(char, "dwDefaultRefreshInterval"),
8381 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDefaultRefreshInterval,
8382 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDefaultRefreshInterval,
8383 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8384 : },
8385 : {
8386 : .name = discard_const_p(char, "dwDefaultNoRefreshInterval"),
8387 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDefaultNoRefreshInterval,
8388 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDefaultNoRefreshInterval,
8389 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8390 : },
8391 : {
8392 : .name = discard_const_p(char, "dwLastScavengeTime"),
8393 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLastScavengeTime,
8394 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLastScavengeTime,
8395 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8396 : },
8397 : {
8398 : .name = discard_const_p(char, "dwEventLogLevel"),
8399 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwEventLogLevel,
8400 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwEventLogLevel,
8401 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8402 : },
8403 : {
8404 : .name = discard_const_p(char, "dwLogFileMaxSize"),
8405 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLogFileMaxSize,
8406 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLogFileMaxSize,
8407 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8408 : },
8409 : {
8410 : .name = discard_const_p(char, "dwDsForestVersion"),
8411 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsForestVersion,
8412 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsForestVersion,
8413 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8414 : },
8415 : {
8416 : .name = discard_const_p(char, "dwDsDomainVersion"),
8417 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsDomainVersion,
8418 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsDomainVersion,
8419 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8420 : },
8421 : {
8422 : .name = discard_const_p(char, "dwDsDsaVersion"),
8423 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsDsaVersion,
8424 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsDsaVersion,
8425 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8426 : },
8427 : {
8428 : .name = discard_const_p(char, "dwReserveArray"),
8429 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwReserveArray,
8430 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwReserveArray,
8431 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8432 : },
8433 : {
8434 : .name = discard_const_p(char, "fAutoReverseZones"),
8435 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fAutoReverseZones,
8436 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fAutoReverseZones,
8437 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8438 : },
8439 : {
8440 : .name = discard_const_p(char, "fAutoCacheUpdate"),
8441 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fAutoCacheUpdate,
8442 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fAutoCacheUpdate,
8443 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8444 : },
8445 : {
8446 : .name = discard_const_p(char, "fRecurseAfterForwarding"),
8447 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fRecurseAfterForwarding,
8448 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fRecurseAfterForwarding,
8449 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8450 : },
8451 : {
8452 : .name = discard_const_p(char, "fForwardDelegations"),
8453 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fForwardDelegations,
8454 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fForwardDelegations,
8455 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8456 : },
8457 : {
8458 : .name = discard_const_p(char, "fNoRecursion"),
8459 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fNoRecursion,
8460 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fNoRecursion,
8461 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8462 : },
8463 : {
8464 : .name = discard_const_p(char, "fSecureResponses"),
8465 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fSecureResponses,
8466 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fSecureResponses,
8467 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8468 : },
8469 : {
8470 : .name = discard_const_p(char, "fRoundRobin"),
8471 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fRoundRobin,
8472 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fRoundRobin,
8473 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8474 : },
8475 : {
8476 : .name = discard_const_p(char, "fLocalNetPriority"),
8477 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fLocalNetPriority,
8478 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fLocalNetPriority,
8479 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8480 : },
8481 : {
8482 : .name = discard_const_p(char, "fBindSecondaries"),
8483 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fBindSecondaries,
8484 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fBindSecondaries,
8485 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8486 : },
8487 : {
8488 : .name = discard_const_p(char, "fWriteAuthorityNs"),
8489 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fWriteAuthorityNs,
8490 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fWriteAuthorityNs,
8491 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8492 : },
8493 : {
8494 : .name = discard_const_p(char, "fStrictFileParsing"),
8495 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fStrictFileParsing,
8496 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fStrictFileParsing,
8497 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8498 : },
8499 : {
8500 : .name = discard_const_p(char, "fLooseWildcarding"),
8501 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fLooseWildcarding,
8502 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fLooseWildcarding,
8503 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8504 : },
8505 : {
8506 : .name = discard_const_p(char, "fDefaultAgingState"),
8507 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fDefaultAgingState,
8508 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fDefaultAgingState,
8509 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8510 : },
8511 : {
8512 : .name = discard_const_p(char, "fReserveArray"),
8513 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fReserveArray,
8514 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fReserveArray,
8515 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8516 : },
8517 : { .name = NULL }
8518 : };
8519 :
8520 0 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
8521 : {
8522 0 : return pytalloc_new(struct DNS_RPC_SERVER_INFO_DOTNET, type);
8523 : }
8524 :
8525 0 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
8526 : {
8527 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
8528 0 : PyObject *ret = NULL;
8529 0 : DATA_BLOB blob;
8530 0 : enum ndr_err_code err;
8531 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
8532 0 : if (tmp_ctx == NULL) {
8533 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
8534 0 : return NULL;
8535 : }
8536 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_SERVER_INFO_DOTNET);
8537 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
8538 0 : TALLOC_FREE(tmp_ctx);
8539 0 : PyErr_SetNdrError(err);
8540 0 : return NULL;
8541 : }
8542 :
8543 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
8544 0 : TALLOC_FREE(tmp_ctx);
8545 0 : return ret;
8546 : }
8547 :
8548 0 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
8549 : {
8550 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
8551 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
8552 0 : Py_ssize_t blob_length = 0;
8553 0 : enum ndr_err_code err;
8554 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
8555 0 : PyObject *allow_remaining_obj = NULL;
8556 0 : bool allow_remaining = false;
8557 :
8558 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
8559 : discard_const_p(char *, kwnames),
8560 : &blob.data, &blob_length,
8561 : &allow_remaining_obj)) {
8562 0 : return NULL;
8563 : }
8564 0 : blob.length = blob_length;
8565 :
8566 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
8567 0 : allow_remaining = true;
8568 : }
8569 :
8570 0 : if (allow_remaining) {
8571 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);
8572 : } else {
8573 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);
8574 : }
8575 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
8576 0 : PyErr_SetNdrError(err);
8577 0 : return NULL;
8578 : }
8579 :
8580 0 : Py_RETURN_NONE;
8581 : }
8582 :
8583 0 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
8584 : {
8585 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
8586 0 : PyObject *ret;
8587 0 : char *retstr;
8588 :
8589 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);
8590 0 : ret = PyUnicode_FromString(retstr);
8591 0 : talloc_free(retstr);
8592 :
8593 0 : return ret;
8594 : }
8595 :
8596 : static PyMethodDef py_DNS_RPC_SERVER_INFO_DOTNET_methods[] = {
8597 : { "__ndr_pack__", (PyCFunction)py_DNS_RPC_SERVER_INFO_DOTNET_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
8598 : { "__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" },
8599 : { "__ndr_print__", (PyCFunction)py_DNS_RPC_SERVER_INFO_DOTNET_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
8600 : { NULL, NULL, 0, NULL }
8601 : };
8602 :
8603 :
8604 : static PyTypeObject DNS_RPC_SERVER_INFO_DOTNET_Type = {
8605 : PyVarObject_HEAD_INIT(NULL, 0)
8606 : .tp_name = "dnsserver.DNS_RPC_SERVER_INFO_DOTNET",
8607 : .tp_getset = py_DNS_RPC_SERVER_INFO_DOTNET_getsetters,
8608 : .tp_methods = py_DNS_RPC_SERVER_INFO_DOTNET_methods,
8609 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
8610 : .tp_new = py_DNS_RPC_SERVER_INFO_DOTNET_new,
8611 : };
8612 :
8613 :
8614 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRpcStructureVersion(PyObject *obj, void *closure)
8615 : {
8616 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
8617 0 : PyObject *py_dwRpcStructureVersion;
8618 1 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
8619 1 : return py_dwRpcStructureVersion;
8620 : }
8621 :
8622 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
8623 : {
8624 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
8625 0 : if (value == NULL) {
8626 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
8627 0 : return -1;
8628 : }
8629 : {
8630 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
8631 0 : if (PyLong_Check(value)) {
8632 0 : unsigned long long test_var;
8633 0 : test_var = PyLong_AsUnsignedLongLong(value);
8634 0 : if (PyErr_Occurred() != NULL) {
8635 0 : return -1;
8636 : }
8637 0 : if (test_var > uint_max) {
8638 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8639 : PyLong_Type.tp_name, uint_max, test_var);
8640 0 : return -1;
8641 : }
8642 0 : object->dwRpcStructureVersion = test_var;
8643 : } else {
8644 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8645 : PyLong_Type.tp_name);
8646 0 : return -1;
8647 : }
8648 : }
8649 0 : return 0;
8650 : }
8651 :
8652 0 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwReserved0(PyObject *obj, void *closure)
8653 : {
8654 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
8655 0 : PyObject *py_dwReserved0;
8656 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
8657 0 : return py_dwReserved0;
8658 : }
8659 :
8660 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
8661 : {
8662 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
8663 0 : if (value == NULL) {
8664 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
8665 0 : return -1;
8666 : }
8667 : {
8668 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
8669 0 : if (PyLong_Check(value)) {
8670 0 : unsigned long long test_var;
8671 0 : test_var = PyLong_AsUnsignedLongLong(value);
8672 0 : if (PyErr_Occurred() != NULL) {
8673 0 : return -1;
8674 : }
8675 0 : if (test_var > uint_max) {
8676 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8677 : PyLong_Type.tp_name, uint_max, test_var);
8678 0 : return -1;
8679 : }
8680 0 : object->dwReserved0 = test_var;
8681 : } else {
8682 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8683 : PyLong_Type.tp_name);
8684 0 : return -1;
8685 : }
8686 : }
8687 0 : return 0;
8688 : }
8689 :
8690 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwVersion(PyObject *obj, void *closure)
8691 : {
8692 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
8693 0 : PyObject *py_dwVersion;
8694 1 : py_dwVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwVersion));
8695 1 : return py_dwVersion;
8696 : }
8697 :
8698 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwVersion(PyObject *py_obj, PyObject *value, void *closure)
8699 : {
8700 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
8701 0 : if (value == NULL) {
8702 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwVersion");
8703 0 : return -1;
8704 : }
8705 : {
8706 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwVersion));
8707 0 : if (PyLong_Check(value)) {
8708 0 : unsigned long long test_var;
8709 0 : test_var = PyLong_AsUnsignedLongLong(value);
8710 0 : if (PyErr_Occurred() != NULL) {
8711 0 : return -1;
8712 : }
8713 0 : if (test_var > uint_max) {
8714 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8715 : PyLong_Type.tp_name, uint_max, test_var);
8716 0 : return -1;
8717 : }
8718 0 : object->dwVersion = test_var;
8719 : } else {
8720 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8721 : PyLong_Type.tp_name);
8722 0 : return -1;
8723 : }
8724 : }
8725 0 : return 0;
8726 : }
8727 :
8728 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fBootMethod(PyObject *obj, void *closure)
8729 : {
8730 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
8731 0 : PyObject *py_fBootMethod;
8732 1 : py_fBootMethod = PyLong_FromLong((uint16_t)(object->fBootMethod));
8733 1 : return py_fBootMethod;
8734 : }
8735 :
8736 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fBootMethod(PyObject *py_obj, PyObject *value, void *closure)
8737 : {
8738 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
8739 0 : if (value == NULL) {
8740 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fBootMethod");
8741 0 : return -1;
8742 : }
8743 : {
8744 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fBootMethod));
8745 0 : if (PyLong_Check(value)) {
8746 0 : unsigned long long test_var;
8747 0 : test_var = PyLong_AsUnsignedLongLong(value);
8748 0 : if (PyErr_Occurred() != NULL) {
8749 0 : return -1;
8750 : }
8751 0 : if (test_var > uint_max) {
8752 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8753 : PyLong_Type.tp_name, uint_max, test_var);
8754 0 : return -1;
8755 : }
8756 0 : object->fBootMethod = test_var;
8757 : } else {
8758 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8759 : PyLong_Type.tp_name);
8760 0 : return -1;
8761 : }
8762 : }
8763 0 : return 0;
8764 : }
8765 :
8766 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAdminConfigured(PyObject *obj, void *closure)
8767 : {
8768 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
8769 0 : PyObject *py_fAdminConfigured;
8770 1 : py_fAdminConfigured = PyLong_FromLong((uint16_t)(object->fAdminConfigured));
8771 1 : return py_fAdminConfigured;
8772 : }
8773 :
8774 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAdminConfigured(PyObject *py_obj, PyObject *value, void *closure)
8775 : {
8776 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
8777 0 : if (value == NULL) {
8778 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAdminConfigured");
8779 0 : return -1;
8780 : }
8781 : {
8782 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAdminConfigured));
8783 0 : if (PyLong_Check(value)) {
8784 0 : unsigned long long test_var;
8785 0 : test_var = PyLong_AsUnsignedLongLong(value);
8786 0 : if (PyErr_Occurred() != NULL) {
8787 0 : return -1;
8788 : }
8789 0 : if (test_var > uint_max) {
8790 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8791 : PyLong_Type.tp_name, uint_max, test_var);
8792 0 : return -1;
8793 : }
8794 0 : object->fAdminConfigured = test_var;
8795 : } else {
8796 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8797 : PyLong_Type.tp_name);
8798 0 : return -1;
8799 : }
8800 : }
8801 0 : return 0;
8802 : }
8803 :
8804 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAllowUpdate(PyObject *obj, void *closure)
8805 : {
8806 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
8807 0 : PyObject *py_fAllowUpdate;
8808 1 : py_fAllowUpdate = PyLong_FromLong((uint16_t)(object->fAllowUpdate));
8809 1 : return py_fAllowUpdate;
8810 : }
8811 :
8812 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
8813 : {
8814 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
8815 0 : if (value == NULL) {
8816 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAllowUpdate");
8817 0 : return -1;
8818 : }
8819 : {
8820 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAllowUpdate));
8821 0 : if (PyLong_Check(value)) {
8822 0 : unsigned long long test_var;
8823 0 : test_var = PyLong_AsUnsignedLongLong(value);
8824 0 : if (PyErr_Occurred() != NULL) {
8825 0 : return -1;
8826 : }
8827 0 : if (test_var > uint_max) {
8828 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8829 : PyLong_Type.tp_name, uint_max, test_var);
8830 0 : return -1;
8831 : }
8832 0 : object->fAllowUpdate = test_var;
8833 : } else {
8834 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8835 : PyLong_Type.tp_name);
8836 0 : return -1;
8837 : }
8838 : }
8839 0 : return 0;
8840 : }
8841 :
8842 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fDsAvailable(PyObject *obj, void *closure)
8843 : {
8844 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
8845 0 : PyObject *py_fDsAvailable;
8846 1 : py_fDsAvailable = PyLong_FromLong((uint16_t)(object->fDsAvailable));
8847 1 : return py_fDsAvailable;
8848 : }
8849 :
8850 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fDsAvailable(PyObject *py_obj, PyObject *value, void *closure)
8851 : {
8852 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
8853 0 : if (value == NULL) {
8854 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fDsAvailable");
8855 0 : return -1;
8856 : }
8857 : {
8858 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDsAvailable));
8859 0 : if (PyLong_Check(value)) {
8860 0 : unsigned long long test_var;
8861 0 : test_var = PyLong_AsUnsignedLongLong(value);
8862 0 : if (PyErr_Occurred() != NULL) {
8863 0 : return -1;
8864 : }
8865 0 : if (test_var > uint_max) {
8866 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8867 : PyLong_Type.tp_name, uint_max, test_var);
8868 0 : return -1;
8869 : }
8870 0 : object->fDsAvailable = test_var;
8871 : } else {
8872 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8873 : PyLong_Type.tp_name);
8874 0 : return -1;
8875 : }
8876 : }
8877 0 : return 0;
8878 : }
8879 :
8880 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszServerName(PyObject *obj, void *closure)
8881 : {
8882 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
8883 0 : PyObject *py_pszServerName;
8884 1 : if (object->pszServerName == NULL) {
8885 0 : Py_RETURN_NONE;
8886 : }
8887 1 : if (object->pszServerName == NULL) {
8888 0 : py_pszServerName = Py_None;
8889 0 : Py_INCREF(py_pszServerName);
8890 : } else {
8891 1 : if (object->pszServerName == NULL) {
8892 0 : py_pszServerName = Py_None;
8893 0 : Py_INCREF(py_pszServerName);
8894 : } else {
8895 1 : py_pszServerName = PyUnicode_Decode(object->pszServerName, strlen(object->pszServerName), "utf-8", "ignore");
8896 : }
8897 : }
8898 1 : return py_pszServerName;
8899 : }
8900 :
8901 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszServerName(PyObject *py_obj, PyObject *value, void *closure)
8902 : {
8903 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
8904 0 : if (value == NULL) {
8905 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszServerName");
8906 0 : return -1;
8907 : }
8908 0 : if (value == Py_None) {
8909 0 : object->pszServerName = NULL;
8910 : } else {
8911 0 : object->pszServerName = NULL;
8912 : {
8913 0 : const char *test_str;
8914 0 : const char *talloc_str;
8915 0 : PyObject *unicode = NULL;
8916 0 : if (PyUnicode_Check(value)) {
8917 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
8918 0 : if (unicode == NULL) {
8919 0 : return -1;
8920 : }
8921 0 : test_str = PyBytes_AS_STRING(unicode);
8922 0 : } else if (PyBytes_Check(value)) {
8923 0 : test_str = PyBytes_AS_STRING(value);
8924 : } else {
8925 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
8926 0 : return -1;
8927 : }
8928 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
8929 0 : if (unicode != NULL) {
8930 0 : Py_DECREF(unicode);
8931 : }
8932 0 : if (talloc_str == NULL) {
8933 0 : PyErr_NoMemory();
8934 0 : return -1;
8935 : }
8936 0 : object->pszServerName = talloc_str;
8937 : }
8938 : }
8939 0 : return 0;
8940 : }
8941 :
8942 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszDsContainer(PyObject *obj, void *closure)
8943 : {
8944 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
8945 0 : PyObject *py_pszDsContainer;
8946 1 : if (object->pszDsContainer == NULL) {
8947 0 : Py_RETURN_NONE;
8948 : }
8949 1 : if (object->pszDsContainer == NULL) {
8950 0 : py_pszDsContainer = Py_None;
8951 0 : Py_INCREF(py_pszDsContainer);
8952 : } else {
8953 1 : if (object->pszDsContainer == NULL) {
8954 0 : py_pszDsContainer = Py_None;
8955 0 : Py_INCREF(py_pszDsContainer);
8956 : } else {
8957 1 : py_pszDsContainer = PyUnicode_Decode(object->pszDsContainer, strlen(object->pszDsContainer), "utf-8", "ignore");
8958 : }
8959 : }
8960 1 : return py_pszDsContainer;
8961 : }
8962 :
8963 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszDsContainer(PyObject *py_obj, PyObject *value, void *closure)
8964 : {
8965 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
8966 0 : if (value == NULL) {
8967 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDsContainer");
8968 0 : return -1;
8969 : }
8970 0 : if (value == Py_None) {
8971 0 : object->pszDsContainer = NULL;
8972 : } else {
8973 0 : object->pszDsContainer = NULL;
8974 : {
8975 0 : const char *test_str;
8976 0 : const char *talloc_str;
8977 0 : PyObject *unicode = NULL;
8978 0 : if (PyUnicode_Check(value)) {
8979 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
8980 0 : if (unicode == NULL) {
8981 0 : return -1;
8982 : }
8983 0 : test_str = PyBytes_AS_STRING(unicode);
8984 0 : } else if (PyBytes_Check(value)) {
8985 0 : test_str = PyBytes_AS_STRING(value);
8986 : } else {
8987 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
8988 0 : return -1;
8989 : }
8990 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
8991 0 : if (unicode != NULL) {
8992 0 : Py_DECREF(unicode);
8993 : }
8994 0 : if (talloc_str == NULL) {
8995 0 : PyErr_NoMemory();
8996 0 : return -1;
8997 : }
8998 0 : object->pszDsContainer = talloc_str;
8999 : }
9000 : }
9001 0 : return 0;
9002 : }
9003 :
9004 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipServerAddrs(PyObject *obj, void *closure)
9005 : {
9006 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9007 0 : PyObject *py_aipServerAddrs;
9008 1 : if (object->aipServerAddrs == NULL) {
9009 0 : Py_RETURN_NONE;
9010 : }
9011 1 : if (object->aipServerAddrs == NULL) {
9012 0 : py_aipServerAddrs = Py_None;
9013 0 : Py_INCREF(py_aipServerAddrs);
9014 : } else {
9015 1 : py_aipServerAddrs = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipServerAddrs, object->aipServerAddrs);
9016 : }
9017 1 : return py_aipServerAddrs;
9018 : }
9019 :
9020 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipServerAddrs(PyObject *py_obj, PyObject *value, void *closure)
9021 : {
9022 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9023 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipServerAddrs));
9024 0 : if (value == NULL) {
9025 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipServerAddrs");
9026 0 : return -1;
9027 : }
9028 0 : if (value == Py_None) {
9029 0 : object->aipServerAddrs = NULL;
9030 : } else {
9031 0 : object->aipServerAddrs = NULL;
9032 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
9033 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9034 0 : PyErr_NoMemory();
9035 0 : return -1;
9036 : }
9037 0 : object->aipServerAddrs = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
9038 : }
9039 0 : return 0;
9040 : }
9041 :
9042 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipListenAddrs(PyObject *obj, void *closure)
9043 : {
9044 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9045 0 : PyObject *py_aipListenAddrs;
9046 1 : if (object->aipListenAddrs == NULL) {
9047 0 : Py_RETURN_NONE;
9048 : }
9049 1 : if (object->aipListenAddrs == NULL) {
9050 0 : py_aipListenAddrs = Py_None;
9051 0 : Py_INCREF(py_aipListenAddrs);
9052 : } else {
9053 1 : py_aipListenAddrs = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipListenAddrs, object->aipListenAddrs);
9054 : }
9055 1 : return py_aipListenAddrs;
9056 : }
9057 :
9058 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipListenAddrs(PyObject *py_obj, PyObject *value, void *closure)
9059 : {
9060 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9061 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipListenAddrs));
9062 0 : if (value == NULL) {
9063 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipListenAddrs");
9064 0 : return -1;
9065 : }
9066 0 : if (value == Py_None) {
9067 0 : object->aipListenAddrs = NULL;
9068 : } else {
9069 0 : object->aipListenAddrs = NULL;
9070 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
9071 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9072 0 : PyErr_NoMemory();
9073 0 : return -1;
9074 : }
9075 0 : object->aipListenAddrs = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
9076 : }
9077 0 : return 0;
9078 : }
9079 :
9080 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipForwarders(PyObject *obj, void *closure)
9081 : {
9082 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9083 0 : PyObject *py_aipForwarders;
9084 1 : if (object->aipForwarders == NULL) {
9085 1 : Py_RETURN_NONE;
9086 : }
9087 0 : if (object->aipForwarders == NULL) {
9088 0 : py_aipForwarders = Py_None;
9089 0 : Py_INCREF(py_aipForwarders);
9090 : } else {
9091 0 : py_aipForwarders = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipForwarders, object->aipForwarders);
9092 : }
9093 0 : return py_aipForwarders;
9094 : }
9095 :
9096 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipForwarders(PyObject *py_obj, PyObject *value, void *closure)
9097 : {
9098 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9099 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipForwarders));
9100 0 : if (value == NULL) {
9101 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipForwarders");
9102 0 : return -1;
9103 : }
9104 0 : if (value == Py_None) {
9105 0 : object->aipForwarders = NULL;
9106 : } else {
9107 0 : object->aipForwarders = NULL;
9108 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
9109 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9110 0 : PyErr_NoMemory();
9111 0 : return -1;
9112 : }
9113 0 : object->aipForwarders = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
9114 : }
9115 0 : return 0;
9116 : }
9117 :
9118 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipLogFilter(PyObject *obj, void *closure)
9119 : {
9120 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9121 0 : PyObject *py_aipLogFilter;
9122 1 : if (object->aipLogFilter == NULL) {
9123 1 : Py_RETURN_NONE;
9124 : }
9125 0 : if (object->aipLogFilter == NULL) {
9126 0 : py_aipLogFilter = Py_None;
9127 0 : Py_INCREF(py_aipLogFilter);
9128 : } else {
9129 0 : py_aipLogFilter = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipLogFilter, object->aipLogFilter);
9130 : }
9131 0 : return py_aipLogFilter;
9132 : }
9133 :
9134 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipLogFilter(PyObject *py_obj, PyObject *value, void *closure)
9135 : {
9136 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9137 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipLogFilter));
9138 0 : if (value == NULL) {
9139 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipLogFilter");
9140 0 : return -1;
9141 : }
9142 0 : if (value == Py_None) {
9143 0 : object->aipLogFilter = NULL;
9144 : } else {
9145 0 : object->aipLogFilter = NULL;
9146 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
9147 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9148 0 : PyErr_NoMemory();
9149 0 : return -1;
9150 : }
9151 0 : object->aipLogFilter = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
9152 : }
9153 0 : return 0;
9154 : }
9155 :
9156 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pwszLogFilePath(PyObject *obj, void *closure)
9157 : {
9158 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9159 0 : PyObject *py_pwszLogFilePath;
9160 1 : if (object->pwszLogFilePath == NULL) {
9161 1 : Py_RETURN_NONE;
9162 : }
9163 0 : if (object->pwszLogFilePath == NULL) {
9164 0 : py_pwszLogFilePath = Py_None;
9165 0 : Py_INCREF(py_pwszLogFilePath);
9166 : } else {
9167 0 : if (object->pwszLogFilePath == NULL) {
9168 0 : py_pwszLogFilePath = Py_None;
9169 0 : Py_INCREF(py_pwszLogFilePath);
9170 : } else {
9171 0 : py_pwszLogFilePath = PyUnicode_Decode(object->pwszLogFilePath, strlen(object->pwszLogFilePath), "utf-8", "ignore");
9172 : }
9173 : }
9174 0 : return py_pwszLogFilePath;
9175 : }
9176 :
9177 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pwszLogFilePath(PyObject *py_obj, PyObject *value, void *closure)
9178 : {
9179 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9180 0 : if (value == NULL) {
9181 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pwszLogFilePath");
9182 0 : return -1;
9183 : }
9184 0 : if (value == Py_None) {
9185 0 : object->pwszLogFilePath = NULL;
9186 : } else {
9187 0 : object->pwszLogFilePath = NULL;
9188 : {
9189 0 : const char *test_str;
9190 0 : const char *talloc_str;
9191 0 : PyObject *unicode = NULL;
9192 0 : if (PyUnicode_Check(value)) {
9193 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
9194 0 : if (unicode == NULL) {
9195 0 : return -1;
9196 : }
9197 0 : test_str = PyBytes_AS_STRING(unicode);
9198 0 : } else if (PyBytes_Check(value)) {
9199 0 : test_str = PyBytes_AS_STRING(value);
9200 : } else {
9201 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
9202 0 : return -1;
9203 : }
9204 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
9205 0 : if (unicode != NULL) {
9206 0 : Py_DECREF(unicode);
9207 : }
9208 0 : if (talloc_str == NULL) {
9209 0 : PyErr_NoMemory();
9210 0 : return -1;
9211 : }
9212 0 : object->pwszLogFilePath = talloc_str;
9213 : }
9214 : }
9215 0 : return 0;
9216 : }
9217 :
9218 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszDomainName(PyObject *obj, void *closure)
9219 : {
9220 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9221 0 : PyObject *py_pszDomainName;
9222 1 : if (object->pszDomainName == NULL) {
9223 0 : Py_RETURN_NONE;
9224 : }
9225 1 : if (object->pszDomainName == NULL) {
9226 0 : py_pszDomainName = Py_None;
9227 0 : Py_INCREF(py_pszDomainName);
9228 : } else {
9229 1 : if (object->pszDomainName == NULL) {
9230 0 : py_pszDomainName = Py_None;
9231 0 : Py_INCREF(py_pszDomainName);
9232 : } else {
9233 1 : py_pszDomainName = PyUnicode_Decode(object->pszDomainName, strlen(object->pszDomainName), "utf-8", "ignore");
9234 : }
9235 : }
9236 1 : return py_pszDomainName;
9237 : }
9238 :
9239 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszDomainName(PyObject *py_obj, PyObject *value, void *closure)
9240 : {
9241 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9242 0 : if (value == NULL) {
9243 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDomainName");
9244 0 : return -1;
9245 : }
9246 0 : if (value == Py_None) {
9247 0 : object->pszDomainName = NULL;
9248 : } else {
9249 0 : object->pszDomainName = NULL;
9250 : {
9251 0 : const char *test_str;
9252 0 : const char *talloc_str;
9253 0 : PyObject *unicode = NULL;
9254 0 : if (PyUnicode_Check(value)) {
9255 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
9256 0 : if (unicode == NULL) {
9257 0 : return -1;
9258 : }
9259 0 : test_str = PyBytes_AS_STRING(unicode);
9260 0 : } else if (PyBytes_Check(value)) {
9261 0 : test_str = PyBytes_AS_STRING(value);
9262 : } else {
9263 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
9264 0 : return -1;
9265 : }
9266 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
9267 0 : if (unicode != NULL) {
9268 0 : Py_DECREF(unicode);
9269 : }
9270 0 : if (talloc_str == NULL) {
9271 0 : PyErr_NoMemory();
9272 0 : return -1;
9273 : }
9274 0 : object->pszDomainName = talloc_str;
9275 : }
9276 : }
9277 0 : return 0;
9278 : }
9279 :
9280 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszForestName(PyObject *obj, void *closure)
9281 : {
9282 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9283 0 : PyObject *py_pszForestName;
9284 1 : if (object->pszForestName == NULL) {
9285 0 : Py_RETURN_NONE;
9286 : }
9287 1 : if (object->pszForestName == NULL) {
9288 0 : py_pszForestName = Py_None;
9289 0 : Py_INCREF(py_pszForestName);
9290 : } else {
9291 1 : if (object->pszForestName == NULL) {
9292 0 : py_pszForestName = Py_None;
9293 0 : Py_INCREF(py_pszForestName);
9294 : } else {
9295 1 : py_pszForestName = PyUnicode_Decode(object->pszForestName, strlen(object->pszForestName), "utf-8", "ignore");
9296 : }
9297 : }
9298 1 : return py_pszForestName;
9299 : }
9300 :
9301 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszForestName(PyObject *py_obj, PyObject *value, void *closure)
9302 : {
9303 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9304 0 : if (value == NULL) {
9305 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszForestName");
9306 0 : return -1;
9307 : }
9308 0 : if (value == Py_None) {
9309 0 : object->pszForestName = NULL;
9310 : } else {
9311 0 : object->pszForestName = NULL;
9312 : {
9313 0 : const char *test_str;
9314 0 : const char *talloc_str;
9315 0 : PyObject *unicode = NULL;
9316 0 : if (PyUnicode_Check(value)) {
9317 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
9318 0 : if (unicode == NULL) {
9319 0 : return -1;
9320 : }
9321 0 : test_str = PyBytes_AS_STRING(unicode);
9322 0 : } else if (PyBytes_Check(value)) {
9323 0 : test_str = PyBytes_AS_STRING(value);
9324 : } else {
9325 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
9326 0 : return -1;
9327 : }
9328 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
9329 0 : if (unicode != NULL) {
9330 0 : Py_DECREF(unicode);
9331 : }
9332 0 : if (talloc_str == NULL) {
9333 0 : PyErr_NoMemory();
9334 0 : return -1;
9335 : }
9336 0 : object->pszForestName = talloc_str;
9337 : }
9338 : }
9339 0 : return 0;
9340 : }
9341 :
9342 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszDomainDirectoryPartition(PyObject *obj, void *closure)
9343 : {
9344 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9345 0 : PyObject *py_pszDomainDirectoryPartition;
9346 1 : if (object->pszDomainDirectoryPartition == NULL) {
9347 0 : Py_RETURN_NONE;
9348 : }
9349 1 : if (object->pszDomainDirectoryPartition == NULL) {
9350 0 : py_pszDomainDirectoryPartition = Py_None;
9351 0 : Py_INCREF(py_pszDomainDirectoryPartition);
9352 : } else {
9353 1 : if (object->pszDomainDirectoryPartition == NULL) {
9354 0 : py_pszDomainDirectoryPartition = Py_None;
9355 0 : Py_INCREF(py_pszDomainDirectoryPartition);
9356 : } else {
9357 1 : py_pszDomainDirectoryPartition = PyUnicode_Decode(object->pszDomainDirectoryPartition, strlen(object->pszDomainDirectoryPartition), "utf-8", "ignore");
9358 : }
9359 : }
9360 1 : return py_pszDomainDirectoryPartition;
9361 : }
9362 :
9363 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszDomainDirectoryPartition(PyObject *py_obj, PyObject *value, void *closure)
9364 : {
9365 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9366 0 : if (value == NULL) {
9367 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDomainDirectoryPartition");
9368 0 : return -1;
9369 : }
9370 0 : if (value == Py_None) {
9371 0 : object->pszDomainDirectoryPartition = NULL;
9372 : } else {
9373 0 : object->pszDomainDirectoryPartition = NULL;
9374 : {
9375 0 : const char *test_str;
9376 0 : const char *talloc_str;
9377 0 : PyObject *unicode = NULL;
9378 0 : if (PyUnicode_Check(value)) {
9379 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
9380 0 : if (unicode == NULL) {
9381 0 : return -1;
9382 : }
9383 0 : test_str = PyBytes_AS_STRING(unicode);
9384 0 : } else if (PyBytes_Check(value)) {
9385 0 : test_str = PyBytes_AS_STRING(value);
9386 : } else {
9387 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
9388 0 : return -1;
9389 : }
9390 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
9391 0 : if (unicode != NULL) {
9392 0 : Py_DECREF(unicode);
9393 : }
9394 0 : if (talloc_str == NULL) {
9395 0 : PyErr_NoMemory();
9396 0 : return -1;
9397 : }
9398 0 : object->pszDomainDirectoryPartition = talloc_str;
9399 : }
9400 : }
9401 0 : return 0;
9402 : }
9403 :
9404 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszForestDirectoryPartition(PyObject *obj, void *closure)
9405 : {
9406 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9407 0 : PyObject *py_pszForestDirectoryPartition;
9408 1 : if (object->pszForestDirectoryPartition == NULL) {
9409 0 : Py_RETURN_NONE;
9410 : }
9411 1 : if (object->pszForestDirectoryPartition == NULL) {
9412 0 : py_pszForestDirectoryPartition = Py_None;
9413 0 : Py_INCREF(py_pszForestDirectoryPartition);
9414 : } else {
9415 1 : if (object->pszForestDirectoryPartition == NULL) {
9416 0 : py_pszForestDirectoryPartition = Py_None;
9417 0 : Py_INCREF(py_pszForestDirectoryPartition);
9418 : } else {
9419 1 : py_pszForestDirectoryPartition = PyUnicode_Decode(object->pszForestDirectoryPartition, strlen(object->pszForestDirectoryPartition), "utf-8", "ignore");
9420 : }
9421 : }
9422 1 : return py_pszForestDirectoryPartition;
9423 : }
9424 :
9425 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszForestDirectoryPartition(PyObject *py_obj, PyObject *value, void *closure)
9426 : {
9427 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9428 0 : if (value == NULL) {
9429 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszForestDirectoryPartition");
9430 0 : return -1;
9431 : }
9432 0 : if (value == Py_None) {
9433 0 : object->pszForestDirectoryPartition = NULL;
9434 : } else {
9435 0 : object->pszForestDirectoryPartition = NULL;
9436 : {
9437 0 : const char *test_str;
9438 0 : const char *talloc_str;
9439 0 : PyObject *unicode = NULL;
9440 0 : if (PyUnicode_Check(value)) {
9441 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
9442 0 : if (unicode == NULL) {
9443 0 : return -1;
9444 : }
9445 0 : test_str = PyBytes_AS_STRING(unicode);
9446 0 : } else if (PyBytes_Check(value)) {
9447 0 : test_str = PyBytes_AS_STRING(value);
9448 : } else {
9449 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
9450 0 : return -1;
9451 : }
9452 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
9453 0 : if (unicode != NULL) {
9454 0 : Py_DECREF(unicode);
9455 : }
9456 0 : if (talloc_str == NULL) {
9457 0 : PyErr_NoMemory();
9458 0 : return -1;
9459 : }
9460 0 : object->pszForestDirectoryPartition = talloc_str;
9461 : }
9462 : }
9463 0 : return 0;
9464 : }
9465 :
9466 0 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pExtensions(PyObject *obj, void *closure)
9467 : {
9468 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9469 0 : PyObject *py_pExtensions;
9470 0 : py_pExtensions = PyList_New(6);
9471 0 : if (py_pExtensions == NULL) {
9472 0 : return NULL;
9473 : }
9474 : {
9475 : int pExtensions_cntr_0;
9476 0 : for (pExtensions_cntr_0 = 0; pExtensions_cntr_0 < (6); pExtensions_cntr_0++) {
9477 0 : PyObject *py_pExtensions_0;
9478 0 : py_pExtensions_0 = pytalloc_reference_ex(&DNS_EXTENSION_Type, pytalloc_get_mem_ctx(obj), &(object->pExtensions)[pExtensions_cntr_0]);
9479 0 : PyList_SetItem(py_pExtensions, pExtensions_cntr_0, py_pExtensions_0);
9480 : }
9481 : }
9482 0 : return py_pExtensions;
9483 : }
9484 :
9485 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pExtensions(PyObject *py_obj, PyObject *value, void *closure)
9486 : {
9487 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9488 0 : if (value == NULL) {
9489 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pExtensions");
9490 0 : return -1;
9491 : }
9492 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
9493 : {
9494 0 : int pExtensions_cntr_0;
9495 0 : if (ARRAY_SIZE(object->pExtensions) != PyList_GET_SIZE(value)) {
9496 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));
9497 0 : return -1;
9498 : }
9499 0 : for (pExtensions_cntr_0 = 0; pExtensions_cntr_0 < PyList_GET_SIZE(value); pExtensions_cntr_0++) {
9500 0 : if (PyList_GET_ITEM(value, pExtensions_cntr_0) == NULL) {
9501 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->pExtensions)[pExtensions_cntr_0]");
9502 0 : return -1;
9503 : }
9504 0 : PY_CHECK_TYPE(&DNS_EXTENSION_Type, PyList_GET_ITEM(value, pExtensions_cntr_0), return -1;);
9505 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(PyList_GET_ITEM(value, pExtensions_cntr_0))) == NULL) {
9506 0 : PyErr_NoMemory();
9507 0 : return -1;
9508 : }
9509 0 : (object->pExtensions)[pExtensions_cntr_0] = *(struct DNS_EXTENSION *)pytalloc_get_ptr(PyList_GET_ITEM(value, pExtensions_cntr_0));
9510 : }
9511 : }
9512 0 : return 0;
9513 : }
9514 :
9515 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLogLevel(PyObject *obj, void *closure)
9516 : {
9517 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9518 0 : PyObject *py_dwLogLevel;
9519 1 : py_dwLogLevel = PyLong_FromUnsignedLongLong((uint32_t)(object->dwLogLevel));
9520 1 : return py_dwLogLevel;
9521 : }
9522 :
9523 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLogLevel(PyObject *py_obj, PyObject *value, void *closure)
9524 : {
9525 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9526 0 : if (value == NULL) {
9527 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwLogLevel");
9528 0 : return -1;
9529 : }
9530 : {
9531 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLogLevel));
9532 0 : if (PyLong_Check(value)) {
9533 0 : unsigned long long test_var;
9534 0 : test_var = PyLong_AsUnsignedLongLong(value);
9535 0 : if (PyErr_Occurred() != NULL) {
9536 0 : return -1;
9537 : }
9538 0 : if (test_var > uint_max) {
9539 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9540 : PyLong_Type.tp_name, uint_max, test_var);
9541 0 : return -1;
9542 : }
9543 0 : object->dwLogLevel = test_var;
9544 : } else {
9545 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9546 : PyLong_Type.tp_name);
9547 0 : return -1;
9548 : }
9549 : }
9550 0 : return 0;
9551 : }
9552 :
9553 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDebugLevel(PyObject *obj, void *closure)
9554 : {
9555 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9556 0 : PyObject *py_dwDebugLevel;
9557 1 : py_dwDebugLevel = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDebugLevel));
9558 1 : return py_dwDebugLevel;
9559 : }
9560 :
9561 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDebugLevel(PyObject *py_obj, PyObject *value, void *closure)
9562 : {
9563 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9564 0 : if (value == NULL) {
9565 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDebugLevel");
9566 0 : return -1;
9567 : }
9568 : {
9569 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDebugLevel));
9570 0 : if (PyLong_Check(value)) {
9571 0 : unsigned long long test_var;
9572 0 : test_var = PyLong_AsUnsignedLongLong(value);
9573 0 : if (PyErr_Occurred() != NULL) {
9574 0 : return -1;
9575 : }
9576 0 : if (test_var > uint_max) {
9577 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9578 : PyLong_Type.tp_name, uint_max, test_var);
9579 0 : return -1;
9580 : }
9581 0 : object->dwDebugLevel = test_var;
9582 : } else {
9583 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9584 : PyLong_Type.tp_name);
9585 0 : return -1;
9586 : }
9587 : }
9588 0 : return 0;
9589 : }
9590 :
9591 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwForwardTimeout(PyObject *obj, void *closure)
9592 : {
9593 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9594 0 : PyObject *py_dwForwardTimeout;
9595 1 : py_dwForwardTimeout = PyLong_FromUnsignedLongLong((uint32_t)(object->dwForwardTimeout));
9596 1 : return py_dwForwardTimeout;
9597 : }
9598 :
9599 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwForwardTimeout(PyObject *py_obj, PyObject *value, void *closure)
9600 : {
9601 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9602 0 : if (value == NULL) {
9603 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwForwardTimeout");
9604 0 : return -1;
9605 : }
9606 : {
9607 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwForwardTimeout));
9608 0 : if (PyLong_Check(value)) {
9609 0 : unsigned long long test_var;
9610 0 : test_var = PyLong_AsUnsignedLongLong(value);
9611 0 : if (PyErr_Occurred() != NULL) {
9612 0 : return -1;
9613 : }
9614 0 : if (test_var > uint_max) {
9615 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9616 : PyLong_Type.tp_name, uint_max, test_var);
9617 0 : return -1;
9618 : }
9619 0 : object->dwForwardTimeout = test_var;
9620 : } else {
9621 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9622 : PyLong_Type.tp_name);
9623 0 : return -1;
9624 : }
9625 : }
9626 0 : return 0;
9627 : }
9628 :
9629 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRpcProtocol(PyObject *obj, void *closure)
9630 : {
9631 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9632 0 : PyObject *py_dwRpcProtocol;
9633 1 : py_dwRpcProtocol = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcProtocol));
9634 1 : return py_dwRpcProtocol;
9635 : }
9636 :
9637 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRpcProtocol(PyObject *py_obj, PyObject *value, void *closure)
9638 : {
9639 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9640 0 : if (value == NULL) {
9641 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcProtocol");
9642 0 : return -1;
9643 : }
9644 : {
9645 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcProtocol));
9646 0 : if (PyLong_Check(value)) {
9647 0 : unsigned long long test_var;
9648 0 : test_var = PyLong_AsUnsignedLongLong(value);
9649 0 : if (PyErr_Occurred() != NULL) {
9650 0 : return -1;
9651 : }
9652 0 : if (test_var > uint_max) {
9653 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9654 : PyLong_Type.tp_name, uint_max, test_var);
9655 0 : return -1;
9656 : }
9657 0 : object->dwRpcProtocol = test_var;
9658 : } else {
9659 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9660 : PyLong_Type.tp_name);
9661 0 : return -1;
9662 : }
9663 : }
9664 0 : return 0;
9665 : }
9666 :
9667 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwNameCheckFlag(PyObject *obj, void *closure)
9668 : {
9669 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9670 0 : PyObject *py_dwNameCheckFlag;
9671 1 : py_dwNameCheckFlag = PyLong_FromUnsignedLongLong((uint32_t)(object->dwNameCheckFlag));
9672 1 : return py_dwNameCheckFlag;
9673 : }
9674 :
9675 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwNameCheckFlag(PyObject *py_obj, PyObject *value, void *closure)
9676 : {
9677 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9678 0 : if (value == NULL) {
9679 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwNameCheckFlag");
9680 0 : return -1;
9681 : }
9682 : {
9683 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwNameCheckFlag));
9684 0 : if (PyLong_Check(value)) {
9685 0 : unsigned long long test_var;
9686 0 : test_var = PyLong_AsUnsignedLongLong(value);
9687 0 : if (PyErr_Occurred() != NULL) {
9688 0 : return -1;
9689 : }
9690 0 : if (test_var > uint_max) {
9691 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9692 : PyLong_Type.tp_name, uint_max, test_var);
9693 0 : return -1;
9694 : }
9695 0 : object->dwNameCheckFlag = test_var;
9696 : } else {
9697 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9698 : PyLong_Type.tp_name);
9699 0 : return -1;
9700 : }
9701 : }
9702 0 : return 0;
9703 : }
9704 :
9705 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_cAddressAnswerLimit(PyObject *obj, void *closure)
9706 : {
9707 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9708 0 : PyObject *py_cAddressAnswerLimit;
9709 1 : py_cAddressAnswerLimit = PyLong_FromUnsignedLongLong((uint32_t)(object->cAddressAnswerLimit));
9710 1 : return py_cAddressAnswerLimit;
9711 : }
9712 :
9713 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_cAddressAnswerLimit(PyObject *py_obj, PyObject *value, void *closure)
9714 : {
9715 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9716 0 : if (value == NULL) {
9717 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->cAddressAnswerLimit");
9718 0 : return -1;
9719 : }
9720 : {
9721 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->cAddressAnswerLimit));
9722 0 : if (PyLong_Check(value)) {
9723 0 : unsigned long long test_var;
9724 0 : test_var = PyLong_AsUnsignedLongLong(value);
9725 0 : if (PyErr_Occurred() != NULL) {
9726 0 : return -1;
9727 : }
9728 0 : if (test_var > uint_max) {
9729 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9730 : PyLong_Type.tp_name, uint_max, test_var);
9731 0 : return -1;
9732 : }
9733 0 : object->cAddressAnswerLimit = test_var;
9734 : } else {
9735 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9736 : PyLong_Type.tp_name);
9737 0 : return -1;
9738 : }
9739 : }
9740 0 : return 0;
9741 : }
9742 :
9743 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRecursionRetry(PyObject *obj, void *closure)
9744 : {
9745 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9746 0 : PyObject *py_dwRecursionRetry;
9747 1 : py_dwRecursionRetry = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRecursionRetry));
9748 1 : return py_dwRecursionRetry;
9749 : }
9750 :
9751 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRecursionRetry(PyObject *py_obj, PyObject *value, void *closure)
9752 : {
9753 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9754 0 : if (value == NULL) {
9755 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRecursionRetry");
9756 0 : return -1;
9757 : }
9758 : {
9759 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRecursionRetry));
9760 0 : if (PyLong_Check(value)) {
9761 0 : unsigned long long test_var;
9762 0 : test_var = PyLong_AsUnsignedLongLong(value);
9763 0 : if (PyErr_Occurred() != NULL) {
9764 0 : return -1;
9765 : }
9766 0 : if (test_var > uint_max) {
9767 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9768 : PyLong_Type.tp_name, uint_max, test_var);
9769 0 : return -1;
9770 : }
9771 0 : object->dwRecursionRetry = test_var;
9772 : } else {
9773 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9774 : PyLong_Type.tp_name);
9775 0 : return -1;
9776 : }
9777 : }
9778 0 : return 0;
9779 : }
9780 :
9781 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRecursionTimeout(PyObject *obj, void *closure)
9782 : {
9783 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9784 0 : PyObject *py_dwRecursionTimeout;
9785 1 : py_dwRecursionTimeout = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRecursionTimeout));
9786 1 : return py_dwRecursionTimeout;
9787 : }
9788 :
9789 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRecursionTimeout(PyObject *py_obj, PyObject *value, void *closure)
9790 : {
9791 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9792 0 : if (value == NULL) {
9793 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRecursionTimeout");
9794 0 : return -1;
9795 : }
9796 : {
9797 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRecursionTimeout));
9798 0 : if (PyLong_Check(value)) {
9799 0 : unsigned long long test_var;
9800 0 : test_var = PyLong_AsUnsignedLongLong(value);
9801 0 : if (PyErr_Occurred() != NULL) {
9802 0 : return -1;
9803 : }
9804 0 : if (test_var > uint_max) {
9805 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9806 : PyLong_Type.tp_name, uint_max, test_var);
9807 0 : return -1;
9808 : }
9809 0 : object->dwRecursionTimeout = test_var;
9810 : } else {
9811 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9812 : PyLong_Type.tp_name);
9813 0 : return -1;
9814 : }
9815 : }
9816 0 : return 0;
9817 : }
9818 :
9819 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwMaxCacheTtl(PyObject *obj, void *closure)
9820 : {
9821 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9822 0 : PyObject *py_dwMaxCacheTtl;
9823 1 : py_dwMaxCacheTtl = PyLong_FromUnsignedLongLong((uint32_t)(object->dwMaxCacheTtl));
9824 1 : return py_dwMaxCacheTtl;
9825 : }
9826 :
9827 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwMaxCacheTtl(PyObject *py_obj, PyObject *value, void *closure)
9828 : {
9829 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9830 0 : if (value == NULL) {
9831 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwMaxCacheTtl");
9832 0 : return -1;
9833 : }
9834 : {
9835 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwMaxCacheTtl));
9836 0 : if (PyLong_Check(value)) {
9837 0 : unsigned long long test_var;
9838 0 : test_var = PyLong_AsUnsignedLongLong(value);
9839 0 : if (PyErr_Occurred() != NULL) {
9840 0 : return -1;
9841 : }
9842 0 : if (test_var > uint_max) {
9843 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9844 : PyLong_Type.tp_name, uint_max, test_var);
9845 0 : return -1;
9846 : }
9847 0 : object->dwMaxCacheTtl = test_var;
9848 : } else {
9849 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9850 : PyLong_Type.tp_name);
9851 0 : return -1;
9852 : }
9853 : }
9854 0 : return 0;
9855 : }
9856 :
9857 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsPollingInterval(PyObject *obj, void *closure)
9858 : {
9859 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9860 0 : PyObject *py_dwDsPollingInterval;
9861 1 : py_dwDsPollingInterval = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDsPollingInterval));
9862 1 : return py_dwDsPollingInterval;
9863 : }
9864 :
9865 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsPollingInterval(PyObject *py_obj, PyObject *value, void *closure)
9866 : {
9867 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9868 0 : if (value == NULL) {
9869 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDsPollingInterval");
9870 0 : return -1;
9871 : }
9872 : {
9873 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDsPollingInterval));
9874 0 : if (PyLong_Check(value)) {
9875 0 : unsigned long long test_var;
9876 0 : test_var = PyLong_AsUnsignedLongLong(value);
9877 0 : if (PyErr_Occurred() != NULL) {
9878 0 : return -1;
9879 : }
9880 0 : if (test_var > uint_max) {
9881 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9882 : PyLong_Type.tp_name, uint_max, test_var);
9883 0 : return -1;
9884 : }
9885 0 : object->dwDsPollingInterval = test_var;
9886 : } else {
9887 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9888 : PyLong_Type.tp_name);
9889 0 : return -1;
9890 : }
9891 : }
9892 0 : return 0;
9893 : }
9894 :
9895 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLocalNetPriorityNetMask(PyObject *obj, void *closure)
9896 : {
9897 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9898 0 : PyObject *py_dwLocalNetPriorityNetMask;
9899 1 : py_dwLocalNetPriorityNetMask = PyLong_FromUnsignedLongLong((uint32_t)(object->dwLocalNetPriorityNetMask));
9900 1 : return py_dwLocalNetPriorityNetMask;
9901 : }
9902 :
9903 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLocalNetPriorityNetMask(PyObject *py_obj, PyObject *value, void *closure)
9904 : {
9905 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9906 0 : if (value == NULL) {
9907 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwLocalNetPriorityNetMask");
9908 0 : return -1;
9909 : }
9910 : {
9911 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLocalNetPriorityNetMask));
9912 0 : if (PyLong_Check(value)) {
9913 0 : unsigned long long test_var;
9914 0 : test_var = PyLong_AsUnsignedLongLong(value);
9915 0 : if (PyErr_Occurred() != NULL) {
9916 0 : return -1;
9917 : }
9918 0 : if (test_var > uint_max) {
9919 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9920 : PyLong_Type.tp_name, uint_max, test_var);
9921 0 : return -1;
9922 : }
9923 0 : object->dwLocalNetPriorityNetMask = test_var;
9924 : } else {
9925 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9926 : PyLong_Type.tp_name);
9927 0 : return -1;
9928 : }
9929 : }
9930 0 : return 0;
9931 : }
9932 :
9933 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwScavengingInterval(PyObject *obj, void *closure)
9934 : {
9935 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9936 0 : PyObject *py_dwScavengingInterval;
9937 1 : py_dwScavengingInterval = PyLong_FromUnsignedLongLong((uint32_t)(object->dwScavengingInterval));
9938 1 : return py_dwScavengingInterval;
9939 : }
9940 :
9941 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwScavengingInterval(PyObject *py_obj, PyObject *value, void *closure)
9942 : {
9943 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9944 0 : if (value == NULL) {
9945 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwScavengingInterval");
9946 0 : return -1;
9947 : }
9948 : {
9949 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwScavengingInterval));
9950 0 : if (PyLong_Check(value)) {
9951 0 : unsigned long long test_var;
9952 0 : test_var = PyLong_AsUnsignedLongLong(value);
9953 0 : if (PyErr_Occurred() != NULL) {
9954 0 : return -1;
9955 : }
9956 0 : if (test_var > uint_max) {
9957 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9958 : PyLong_Type.tp_name, uint_max, test_var);
9959 0 : return -1;
9960 : }
9961 0 : object->dwScavengingInterval = test_var;
9962 : } else {
9963 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9964 : PyLong_Type.tp_name);
9965 0 : return -1;
9966 : }
9967 : }
9968 0 : return 0;
9969 : }
9970 :
9971 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDefaultRefreshInterval(PyObject *obj, void *closure)
9972 : {
9973 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
9974 0 : PyObject *py_dwDefaultRefreshInterval;
9975 1 : py_dwDefaultRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDefaultRefreshInterval));
9976 1 : return py_dwDefaultRefreshInterval;
9977 : }
9978 :
9979 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDefaultRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
9980 : {
9981 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
9982 0 : if (value == NULL) {
9983 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDefaultRefreshInterval");
9984 0 : return -1;
9985 : }
9986 : {
9987 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDefaultRefreshInterval));
9988 0 : if (PyLong_Check(value)) {
9989 0 : unsigned long long test_var;
9990 0 : test_var = PyLong_AsUnsignedLongLong(value);
9991 0 : if (PyErr_Occurred() != NULL) {
9992 0 : return -1;
9993 : }
9994 0 : if (test_var > uint_max) {
9995 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9996 : PyLong_Type.tp_name, uint_max, test_var);
9997 0 : return -1;
9998 : }
9999 0 : object->dwDefaultRefreshInterval = test_var;
10000 : } else {
10001 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10002 : PyLong_Type.tp_name);
10003 0 : return -1;
10004 : }
10005 : }
10006 0 : return 0;
10007 : }
10008 :
10009 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDefaultNoRefreshInterval(PyObject *obj, void *closure)
10010 : {
10011 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10012 0 : PyObject *py_dwDefaultNoRefreshInterval;
10013 1 : py_dwDefaultNoRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDefaultNoRefreshInterval));
10014 1 : return py_dwDefaultNoRefreshInterval;
10015 : }
10016 :
10017 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDefaultNoRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
10018 : {
10019 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10020 0 : if (value == NULL) {
10021 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDefaultNoRefreshInterval");
10022 0 : return -1;
10023 : }
10024 : {
10025 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDefaultNoRefreshInterval));
10026 0 : if (PyLong_Check(value)) {
10027 0 : unsigned long long test_var;
10028 0 : test_var = PyLong_AsUnsignedLongLong(value);
10029 0 : if (PyErr_Occurred() != NULL) {
10030 0 : return -1;
10031 : }
10032 0 : if (test_var > uint_max) {
10033 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10034 : PyLong_Type.tp_name, uint_max, test_var);
10035 0 : return -1;
10036 : }
10037 0 : object->dwDefaultNoRefreshInterval = test_var;
10038 : } else {
10039 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10040 : PyLong_Type.tp_name);
10041 0 : return -1;
10042 : }
10043 : }
10044 0 : return 0;
10045 : }
10046 :
10047 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLastScavengeTime(PyObject *obj, void *closure)
10048 : {
10049 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10050 0 : PyObject *py_dwLastScavengeTime;
10051 1 : py_dwLastScavengeTime = PyLong_FromUnsignedLongLong((uint32_t)(object->dwLastScavengeTime));
10052 1 : return py_dwLastScavengeTime;
10053 : }
10054 :
10055 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLastScavengeTime(PyObject *py_obj, PyObject *value, void *closure)
10056 : {
10057 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10058 0 : if (value == NULL) {
10059 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwLastScavengeTime");
10060 0 : return -1;
10061 : }
10062 : {
10063 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLastScavengeTime));
10064 0 : if (PyLong_Check(value)) {
10065 0 : unsigned long long test_var;
10066 0 : test_var = PyLong_AsUnsignedLongLong(value);
10067 0 : if (PyErr_Occurred() != NULL) {
10068 0 : return -1;
10069 : }
10070 0 : if (test_var > uint_max) {
10071 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10072 : PyLong_Type.tp_name, uint_max, test_var);
10073 0 : return -1;
10074 : }
10075 0 : object->dwLastScavengeTime = test_var;
10076 : } else {
10077 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10078 : PyLong_Type.tp_name);
10079 0 : return -1;
10080 : }
10081 : }
10082 0 : return 0;
10083 : }
10084 :
10085 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwEventLogLevel(PyObject *obj, void *closure)
10086 : {
10087 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10088 0 : PyObject *py_dwEventLogLevel;
10089 1 : py_dwEventLogLevel = PyLong_FromUnsignedLongLong((uint32_t)(object->dwEventLogLevel));
10090 1 : return py_dwEventLogLevel;
10091 : }
10092 :
10093 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwEventLogLevel(PyObject *py_obj, PyObject *value, void *closure)
10094 : {
10095 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10096 0 : if (value == NULL) {
10097 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwEventLogLevel");
10098 0 : return -1;
10099 : }
10100 : {
10101 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwEventLogLevel));
10102 0 : if (PyLong_Check(value)) {
10103 0 : unsigned long long test_var;
10104 0 : test_var = PyLong_AsUnsignedLongLong(value);
10105 0 : if (PyErr_Occurred() != NULL) {
10106 0 : return -1;
10107 : }
10108 0 : if (test_var > uint_max) {
10109 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10110 : PyLong_Type.tp_name, uint_max, test_var);
10111 0 : return -1;
10112 : }
10113 0 : object->dwEventLogLevel = test_var;
10114 : } else {
10115 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10116 : PyLong_Type.tp_name);
10117 0 : return -1;
10118 : }
10119 : }
10120 0 : return 0;
10121 : }
10122 :
10123 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLogFileMaxSize(PyObject *obj, void *closure)
10124 : {
10125 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10126 0 : PyObject *py_dwLogFileMaxSize;
10127 1 : py_dwLogFileMaxSize = PyLong_FromUnsignedLongLong((uint32_t)(object->dwLogFileMaxSize));
10128 1 : return py_dwLogFileMaxSize;
10129 : }
10130 :
10131 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLogFileMaxSize(PyObject *py_obj, PyObject *value, void *closure)
10132 : {
10133 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10134 0 : if (value == NULL) {
10135 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwLogFileMaxSize");
10136 0 : return -1;
10137 : }
10138 : {
10139 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLogFileMaxSize));
10140 0 : if (PyLong_Check(value)) {
10141 0 : unsigned long long test_var;
10142 0 : test_var = PyLong_AsUnsignedLongLong(value);
10143 0 : if (PyErr_Occurred() != NULL) {
10144 0 : return -1;
10145 : }
10146 0 : if (test_var > uint_max) {
10147 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10148 : PyLong_Type.tp_name, uint_max, test_var);
10149 0 : return -1;
10150 : }
10151 0 : object->dwLogFileMaxSize = test_var;
10152 : } else {
10153 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10154 : PyLong_Type.tp_name);
10155 0 : return -1;
10156 : }
10157 : }
10158 0 : return 0;
10159 : }
10160 :
10161 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsForestVersion(PyObject *obj, void *closure)
10162 : {
10163 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10164 0 : PyObject *py_dwDsForestVersion;
10165 1 : py_dwDsForestVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDsForestVersion));
10166 1 : return py_dwDsForestVersion;
10167 : }
10168 :
10169 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsForestVersion(PyObject *py_obj, PyObject *value, void *closure)
10170 : {
10171 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10172 0 : if (value == NULL) {
10173 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDsForestVersion");
10174 0 : return -1;
10175 : }
10176 : {
10177 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDsForestVersion));
10178 0 : if (PyLong_Check(value)) {
10179 0 : unsigned long long test_var;
10180 0 : test_var = PyLong_AsUnsignedLongLong(value);
10181 0 : if (PyErr_Occurred() != NULL) {
10182 0 : return -1;
10183 : }
10184 0 : if (test_var > uint_max) {
10185 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10186 : PyLong_Type.tp_name, uint_max, test_var);
10187 0 : return -1;
10188 : }
10189 0 : object->dwDsForestVersion = test_var;
10190 : } else {
10191 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10192 : PyLong_Type.tp_name);
10193 0 : return -1;
10194 : }
10195 : }
10196 0 : return 0;
10197 : }
10198 :
10199 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsDomainVersion(PyObject *obj, void *closure)
10200 : {
10201 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10202 0 : PyObject *py_dwDsDomainVersion;
10203 1 : py_dwDsDomainVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDsDomainVersion));
10204 1 : return py_dwDsDomainVersion;
10205 : }
10206 :
10207 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsDomainVersion(PyObject *py_obj, PyObject *value, void *closure)
10208 : {
10209 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10210 0 : if (value == NULL) {
10211 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDsDomainVersion");
10212 0 : return -1;
10213 : }
10214 : {
10215 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDsDomainVersion));
10216 0 : if (PyLong_Check(value)) {
10217 0 : unsigned long long test_var;
10218 0 : test_var = PyLong_AsUnsignedLongLong(value);
10219 0 : if (PyErr_Occurred() != NULL) {
10220 0 : return -1;
10221 : }
10222 0 : if (test_var > uint_max) {
10223 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10224 : PyLong_Type.tp_name, uint_max, test_var);
10225 0 : return -1;
10226 : }
10227 0 : object->dwDsDomainVersion = test_var;
10228 : } else {
10229 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10230 : PyLong_Type.tp_name);
10231 0 : return -1;
10232 : }
10233 : }
10234 0 : return 0;
10235 : }
10236 :
10237 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsDsaVersion(PyObject *obj, void *closure)
10238 : {
10239 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10240 0 : PyObject *py_dwDsDsaVersion;
10241 1 : py_dwDsDsaVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDsDsaVersion));
10242 1 : return py_dwDsDsaVersion;
10243 : }
10244 :
10245 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsDsaVersion(PyObject *py_obj, PyObject *value, void *closure)
10246 : {
10247 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10248 0 : if (value == NULL) {
10249 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDsDsaVersion");
10250 0 : return -1;
10251 : }
10252 : {
10253 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDsDsaVersion));
10254 0 : if (PyLong_Check(value)) {
10255 0 : unsigned long long test_var;
10256 0 : test_var = PyLong_AsUnsignedLongLong(value);
10257 0 : if (PyErr_Occurred() != NULL) {
10258 0 : return -1;
10259 : }
10260 0 : if (test_var > uint_max) {
10261 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10262 : PyLong_Type.tp_name, uint_max, test_var);
10263 0 : return -1;
10264 : }
10265 0 : object->dwDsDsaVersion = test_var;
10266 : } else {
10267 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10268 : PyLong_Type.tp_name);
10269 0 : return -1;
10270 : }
10271 : }
10272 0 : return 0;
10273 : }
10274 :
10275 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fReadOnlyDC(PyObject *obj, void *closure)
10276 : {
10277 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10278 0 : PyObject *py_fReadOnlyDC;
10279 1 : py_fReadOnlyDC = PyLong_FromLong((uint16_t)(object->fReadOnlyDC));
10280 1 : return py_fReadOnlyDC;
10281 : }
10282 :
10283 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fReadOnlyDC(PyObject *py_obj, PyObject *value, void *closure)
10284 : {
10285 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10286 0 : if (value == NULL) {
10287 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fReadOnlyDC");
10288 0 : return -1;
10289 : }
10290 : {
10291 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fReadOnlyDC));
10292 0 : if (PyLong_Check(value)) {
10293 0 : unsigned long long test_var;
10294 0 : test_var = PyLong_AsUnsignedLongLong(value);
10295 0 : if (PyErr_Occurred() != NULL) {
10296 0 : return -1;
10297 : }
10298 0 : if (test_var > uint_max) {
10299 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10300 : PyLong_Type.tp_name, uint_max, test_var);
10301 0 : return -1;
10302 : }
10303 0 : object->fReadOnlyDC = test_var;
10304 : } else {
10305 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10306 : PyLong_Type.tp_name);
10307 0 : return -1;
10308 : }
10309 : }
10310 0 : return 0;
10311 : }
10312 :
10313 0 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwReserveArray(PyObject *obj, void *closure)
10314 : {
10315 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10316 0 : PyObject *py_dwReserveArray;
10317 0 : py_dwReserveArray = PyList_New(3);
10318 0 : if (py_dwReserveArray == NULL) {
10319 0 : return NULL;
10320 : }
10321 : {
10322 : int dwReserveArray_cntr_0;
10323 0 : for (dwReserveArray_cntr_0 = 0; dwReserveArray_cntr_0 < (3); dwReserveArray_cntr_0++) {
10324 0 : PyObject *py_dwReserveArray_0;
10325 0 : py_dwReserveArray_0 = PyLong_FromUnsignedLongLong((uint32_t)((object->dwReserveArray)[dwReserveArray_cntr_0]));
10326 0 : PyList_SetItem(py_dwReserveArray, dwReserveArray_cntr_0, py_dwReserveArray_0);
10327 : }
10328 : }
10329 0 : return py_dwReserveArray;
10330 : }
10331 :
10332 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwReserveArray(PyObject *py_obj, PyObject *value, void *closure)
10333 : {
10334 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10335 0 : if (value == NULL) {
10336 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserveArray");
10337 0 : return -1;
10338 : }
10339 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
10340 : {
10341 0 : int dwReserveArray_cntr_0;
10342 0 : if (ARRAY_SIZE(object->dwReserveArray) != PyList_GET_SIZE(value)) {
10343 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));
10344 0 : return -1;
10345 : }
10346 0 : for (dwReserveArray_cntr_0 = 0; dwReserveArray_cntr_0 < PyList_GET_SIZE(value); dwReserveArray_cntr_0++) {
10347 0 : if (PyList_GET_ITEM(value, dwReserveArray_cntr_0) == NULL) {
10348 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->dwReserveArray)[dwReserveArray_cntr_0]");
10349 0 : return -1;
10350 : }
10351 : {
10352 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->dwReserveArray)[dwReserveArray_cntr_0]));
10353 0 : if (PyLong_Check(PyList_GET_ITEM(value, dwReserveArray_cntr_0))) {
10354 0 : unsigned long long test_var;
10355 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, dwReserveArray_cntr_0));
10356 0 : if (PyErr_Occurred() != NULL) {
10357 0 : return -1;
10358 : }
10359 0 : if (test_var > uint_max) {
10360 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10361 : PyLong_Type.tp_name, uint_max, test_var);
10362 0 : return -1;
10363 : }
10364 0 : (object->dwReserveArray)[dwReserveArray_cntr_0] = test_var;
10365 : } else {
10366 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10367 : PyLong_Type.tp_name);
10368 0 : return -1;
10369 : }
10370 : }
10371 : }
10372 : }
10373 0 : return 0;
10374 : }
10375 :
10376 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAutoReverseZones(PyObject *obj, void *closure)
10377 : {
10378 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10379 0 : PyObject *py_fAutoReverseZones;
10380 1 : py_fAutoReverseZones = PyLong_FromLong((uint16_t)(object->fAutoReverseZones));
10381 1 : return py_fAutoReverseZones;
10382 : }
10383 :
10384 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAutoReverseZones(PyObject *py_obj, PyObject *value, void *closure)
10385 : {
10386 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10387 0 : if (value == NULL) {
10388 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAutoReverseZones");
10389 0 : return -1;
10390 : }
10391 : {
10392 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAutoReverseZones));
10393 0 : if (PyLong_Check(value)) {
10394 0 : unsigned long long test_var;
10395 0 : test_var = PyLong_AsUnsignedLongLong(value);
10396 0 : if (PyErr_Occurred() != NULL) {
10397 0 : return -1;
10398 : }
10399 0 : if (test_var > uint_max) {
10400 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10401 : PyLong_Type.tp_name, uint_max, test_var);
10402 0 : return -1;
10403 : }
10404 0 : object->fAutoReverseZones = test_var;
10405 : } else {
10406 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10407 : PyLong_Type.tp_name);
10408 0 : return -1;
10409 : }
10410 : }
10411 0 : return 0;
10412 : }
10413 :
10414 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAutoCacheUpdate(PyObject *obj, void *closure)
10415 : {
10416 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10417 0 : PyObject *py_fAutoCacheUpdate;
10418 1 : py_fAutoCacheUpdate = PyLong_FromLong((uint16_t)(object->fAutoCacheUpdate));
10419 1 : return py_fAutoCacheUpdate;
10420 : }
10421 :
10422 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAutoCacheUpdate(PyObject *py_obj, PyObject *value, void *closure)
10423 : {
10424 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10425 0 : if (value == NULL) {
10426 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAutoCacheUpdate");
10427 0 : return -1;
10428 : }
10429 : {
10430 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAutoCacheUpdate));
10431 0 : if (PyLong_Check(value)) {
10432 0 : unsigned long long test_var;
10433 0 : test_var = PyLong_AsUnsignedLongLong(value);
10434 0 : if (PyErr_Occurred() != NULL) {
10435 0 : return -1;
10436 : }
10437 0 : if (test_var > uint_max) {
10438 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10439 : PyLong_Type.tp_name, uint_max, test_var);
10440 0 : return -1;
10441 : }
10442 0 : object->fAutoCacheUpdate = test_var;
10443 : } else {
10444 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10445 : PyLong_Type.tp_name);
10446 0 : return -1;
10447 : }
10448 : }
10449 0 : return 0;
10450 : }
10451 :
10452 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
10453 : {
10454 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10455 0 : PyObject *py_fRecurseAfterForwarding;
10456 1 : py_fRecurseAfterForwarding = PyLong_FromLong((uint16_t)(object->fRecurseAfterForwarding));
10457 1 : return py_fRecurseAfterForwarding;
10458 : }
10459 :
10460 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
10461 : {
10462 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10463 0 : if (value == NULL) {
10464 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fRecurseAfterForwarding");
10465 0 : return -1;
10466 : }
10467 : {
10468 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRecurseAfterForwarding));
10469 0 : if (PyLong_Check(value)) {
10470 0 : unsigned long long test_var;
10471 0 : test_var = PyLong_AsUnsignedLongLong(value);
10472 0 : if (PyErr_Occurred() != NULL) {
10473 0 : return -1;
10474 : }
10475 0 : if (test_var > uint_max) {
10476 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10477 : PyLong_Type.tp_name, uint_max, test_var);
10478 0 : return -1;
10479 : }
10480 0 : object->fRecurseAfterForwarding = test_var;
10481 : } else {
10482 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10483 : PyLong_Type.tp_name);
10484 0 : return -1;
10485 : }
10486 : }
10487 0 : return 0;
10488 : }
10489 :
10490 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fForwardDelegations(PyObject *obj, void *closure)
10491 : {
10492 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10493 0 : PyObject *py_fForwardDelegations;
10494 1 : py_fForwardDelegations = PyLong_FromLong((uint16_t)(object->fForwardDelegations));
10495 1 : return py_fForwardDelegations;
10496 : }
10497 :
10498 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fForwardDelegations(PyObject *py_obj, PyObject *value, void *closure)
10499 : {
10500 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10501 0 : if (value == NULL) {
10502 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fForwardDelegations");
10503 0 : return -1;
10504 : }
10505 : {
10506 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fForwardDelegations));
10507 0 : if (PyLong_Check(value)) {
10508 0 : unsigned long long test_var;
10509 0 : test_var = PyLong_AsUnsignedLongLong(value);
10510 0 : if (PyErr_Occurred() != NULL) {
10511 0 : return -1;
10512 : }
10513 0 : if (test_var > uint_max) {
10514 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10515 : PyLong_Type.tp_name, uint_max, test_var);
10516 0 : return -1;
10517 : }
10518 0 : object->fForwardDelegations = test_var;
10519 : } else {
10520 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10521 : PyLong_Type.tp_name);
10522 0 : return -1;
10523 : }
10524 : }
10525 0 : return 0;
10526 : }
10527 :
10528 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fNoRecursion(PyObject *obj, void *closure)
10529 : {
10530 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10531 0 : PyObject *py_fNoRecursion;
10532 1 : py_fNoRecursion = PyLong_FromLong((uint16_t)(object->fNoRecursion));
10533 1 : return py_fNoRecursion;
10534 : }
10535 :
10536 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fNoRecursion(PyObject *py_obj, PyObject *value, void *closure)
10537 : {
10538 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10539 0 : if (value == NULL) {
10540 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fNoRecursion");
10541 0 : return -1;
10542 : }
10543 : {
10544 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNoRecursion));
10545 0 : if (PyLong_Check(value)) {
10546 0 : unsigned long long test_var;
10547 0 : test_var = PyLong_AsUnsignedLongLong(value);
10548 0 : if (PyErr_Occurred() != NULL) {
10549 0 : return -1;
10550 : }
10551 0 : if (test_var > uint_max) {
10552 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10553 : PyLong_Type.tp_name, uint_max, test_var);
10554 0 : return -1;
10555 : }
10556 0 : object->fNoRecursion = test_var;
10557 : } else {
10558 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10559 : PyLong_Type.tp_name);
10560 0 : return -1;
10561 : }
10562 : }
10563 0 : return 0;
10564 : }
10565 :
10566 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fSecureResponses(PyObject *obj, void *closure)
10567 : {
10568 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10569 0 : PyObject *py_fSecureResponses;
10570 1 : py_fSecureResponses = PyLong_FromLong((uint16_t)(object->fSecureResponses));
10571 1 : return py_fSecureResponses;
10572 : }
10573 :
10574 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fSecureResponses(PyObject *py_obj, PyObject *value, void *closure)
10575 : {
10576 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10577 0 : if (value == NULL) {
10578 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fSecureResponses");
10579 0 : return -1;
10580 : }
10581 : {
10582 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureResponses));
10583 0 : if (PyLong_Check(value)) {
10584 0 : unsigned long long test_var;
10585 0 : test_var = PyLong_AsUnsignedLongLong(value);
10586 0 : if (PyErr_Occurred() != NULL) {
10587 0 : return -1;
10588 : }
10589 0 : if (test_var > uint_max) {
10590 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10591 : PyLong_Type.tp_name, uint_max, test_var);
10592 0 : return -1;
10593 : }
10594 0 : object->fSecureResponses = test_var;
10595 : } else {
10596 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10597 : PyLong_Type.tp_name);
10598 0 : return -1;
10599 : }
10600 : }
10601 0 : return 0;
10602 : }
10603 :
10604 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fRoundRobin(PyObject *obj, void *closure)
10605 : {
10606 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10607 0 : PyObject *py_fRoundRobin;
10608 1 : py_fRoundRobin = PyLong_FromLong((uint16_t)(object->fRoundRobin));
10609 1 : return py_fRoundRobin;
10610 : }
10611 :
10612 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fRoundRobin(PyObject *py_obj, PyObject *value, void *closure)
10613 : {
10614 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10615 0 : if (value == NULL) {
10616 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fRoundRobin");
10617 0 : return -1;
10618 : }
10619 : {
10620 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRoundRobin));
10621 0 : if (PyLong_Check(value)) {
10622 0 : unsigned long long test_var;
10623 0 : test_var = PyLong_AsUnsignedLongLong(value);
10624 0 : if (PyErr_Occurred() != NULL) {
10625 0 : return -1;
10626 : }
10627 0 : if (test_var > uint_max) {
10628 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10629 : PyLong_Type.tp_name, uint_max, test_var);
10630 0 : return -1;
10631 : }
10632 0 : object->fRoundRobin = test_var;
10633 : } else {
10634 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10635 : PyLong_Type.tp_name);
10636 0 : return -1;
10637 : }
10638 : }
10639 0 : return 0;
10640 : }
10641 :
10642 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fLocalNetPriority(PyObject *obj, void *closure)
10643 : {
10644 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10645 0 : PyObject *py_fLocalNetPriority;
10646 1 : py_fLocalNetPriority = PyLong_FromLong((uint16_t)(object->fLocalNetPriority));
10647 1 : return py_fLocalNetPriority;
10648 : }
10649 :
10650 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fLocalNetPriority(PyObject *py_obj, PyObject *value, void *closure)
10651 : {
10652 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10653 0 : if (value == NULL) {
10654 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fLocalNetPriority");
10655 0 : return -1;
10656 : }
10657 : {
10658 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fLocalNetPriority));
10659 0 : if (PyLong_Check(value)) {
10660 0 : unsigned long long test_var;
10661 0 : test_var = PyLong_AsUnsignedLongLong(value);
10662 0 : if (PyErr_Occurred() != NULL) {
10663 0 : return -1;
10664 : }
10665 0 : if (test_var > uint_max) {
10666 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10667 : PyLong_Type.tp_name, uint_max, test_var);
10668 0 : return -1;
10669 : }
10670 0 : object->fLocalNetPriority = test_var;
10671 : } else {
10672 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10673 : PyLong_Type.tp_name);
10674 0 : return -1;
10675 : }
10676 : }
10677 0 : return 0;
10678 : }
10679 :
10680 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fBindSecondaries(PyObject *obj, void *closure)
10681 : {
10682 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10683 0 : PyObject *py_fBindSecondaries;
10684 1 : py_fBindSecondaries = PyLong_FromLong((uint16_t)(object->fBindSecondaries));
10685 1 : return py_fBindSecondaries;
10686 : }
10687 :
10688 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fBindSecondaries(PyObject *py_obj, PyObject *value, void *closure)
10689 : {
10690 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10691 0 : if (value == NULL) {
10692 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fBindSecondaries");
10693 0 : return -1;
10694 : }
10695 : {
10696 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fBindSecondaries));
10697 0 : if (PyLong_Check(value)) {
10698 0 : unsigned long long test_var;
10699 0 : test_var = PyLong_AsUnsignedLongLong(value);
10700 0 : if (PyErr_Occurred() != NULL) {
10701 0 : return -1;
10702 : }
10703 0 : if (test_var > uint_max) {
10704 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10705 : PyLong_Type.tp_name, uint_max, test_var);
10706 0 : return -1;
10707 : }
10708 0 : object->fBindSecondaries = test_var;
10709 : } else {
10710 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10711 : PyLong_Type.tp_name);
10712 0 : return -1;
10713 : }
10714 : }
10715 0 : return 0;
10716 : }
10717 :
10718 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fWriteAuthorityNs(PyObject *obj, void *closure)
10719 : {
10720 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10721 0 : PyObject *py_fWriteAuthorityNs;
10722 1 : py_fWriteAuthorityNs = PyLong_FromLong((uint16_t)(object->fWriteAuthorityNs));
10723 1 : return py_fWriteAuthorityNs;
10724 : }
10725 :
10726 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fWriteAuthorityNs(PyObject *py_obj, PyObject *value, void *closure)
10727 : {
10728 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10729 0 : if (value == NULL) {
10730 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fWriteAuthorityNs");
10731 0 : return -1;
10732 : }
10733 : {
10734 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fWriteAuthorityNs));
10735 0 : if (PyLong_Check(value)) {
10736 0 : unsigned long long test_var;
10737 0 : test_var = PyLong_AsUnsignedLongLong(value);
10738 0 : if (PyErr_Occurred() != NULL) {
10739 0 : return -1;
10740 : }
10741 0 : if (test_var > uint_max) {
10742 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10743 : PyLong_Type.tp_name, uint_max, test_var);
10744 0 : return -1;
10745 : }
10746 0 : object->fWriteAuthorityNs = test_var;
10747 : } else {
10748 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10749 : PyLong_Type.tp_name);
10750 0 : return -1;
10751 : }
10752 : }
10753 0 : return 0;
10754 : }
10755 :
10756 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fStrictFileParsing(PyObject *obj, void *closure)
10757 : {
10758 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10759 0 : PyObject *py_fStrictFileParsing;
10760 1 : py_fStrictFileParsing = PyLong_FromLong((uint16_t)(object->fStrictFileParsing));
10761 1 : return py_fStrictFileParsing;
10762 : }
10763 :
10764 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fStrictFileParsing(PyObject *py_obj, PyObject *value, void *closure)
10765 : {
10766 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10767 0 : if (value == NULL) {
10768 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fStrictFileParsing");
10769 0 : return -1;
10770 : }
10771 : {
10772 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fStrictFileParsing));
10773 0 : if (PyLong_Check(value)) {
10774 0 : unsigned long long test_var;
10775 0 : test_var = PyLong_AsUnsignedLongLong(value);
10776 0 : if (PyErr_Occurred() != NULL) {
10777 0 : return -1;
10778 : }
10779 0 : if (test_var > uint_max) {
10780 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10781 : PyLong_Type.tp_name, uint_max, test_var);
10782 0 : return -1;
10783 : }
10784 0 : object->fStrictFileParsing = test_var;
10785 : } else {
10786 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10787 : PyLong_Type.tp_name);
10788 0 : return -1;
10789 : }
10790 : }
10791 0 : return 0;
10792 : }
10793 :
10794 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fLooseWildcarding(PyObject *obj, void *closure)
10795 : {
10796 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10797 0 : PyObject *py_fLooseWildcarding;
10798 1 : py_fLooseWildcarding = PyLong_FromLong((uint16_t)(object->fLooseWildcarding));
10799 1 : return py_fLooseWildcarding;
10800 : }
10801 :
10802 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fLooseWildcarding(PyObject *py_obj, PyObject *value, void *closure)
10803 : {
10804 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10805 0 : if (value == NULL) {
10806 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fLooseWildcarding");
10807 0 : return -1;
10808 : }
10809 : {
10810 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fLooseWildcarding));
10811 0 : if (PyLong_Check(value)) {
10812 0 : unsigned long long test_var;
10813 0 : test_var = PyLong_AsUnsignedLongLong(value);
10814 0 : if (PyErr_Occurred() != NULL) {
10815 0 : return -1;
10816 : }
10817 0 : if (test_var > uint_max) {
10818 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10819 : PyLong_Type.tp_name, uint_max, test_var);
10820 0 : return -1;
10821 : }
10822 0 : object->fLooseWildcarding = test_var;
10823 : } else {
10824 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10825 : PyLong_Type.tp_name);
10826 0 : return -1;
10827 : }
10828 : }
10829 0 : return 0;
10830 : }
10831 :
10832 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fDefaultAgingState(PyObject *obj, void *closure)
10833 : {
10834 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10835 0 : PyObject *py_fDefaultAgingState;
10836 1 : py_fDefaultAgingState = PyLong_FromLong((uint16_t)(object->fDefaultAgingState));
10837 1 : return py_fDefaultAgingState;
10838 : }
10839 :
10840 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fDefaultAgingState(PyObject *py_obj, PyObject *value, void *closure)
10841 : {
10842 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10843 0 : if (value == NULL) {
10844 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fDefaultAgingState");
10845 0 : return -1;
10846 : }
10847 : {
10848 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDefaultAgingState));
10849 0 : if (PyLong_Check(value)) {
10850 0 : unsigned long long test_var;
10851 0 : test_var = PyLong_AsUnsignedLongLong(value);
10852 0 : if (PyErr_Occurred() != NULL) {
10853 0 : return -1;
10854 : }
10855 0 : if (test_var > uint_max) {
10856 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10857 : PyLong_Type.tp_name, uint_max, test_var);
10858 0 : return -1;
10859 : }
10860 0 : object->fDefaultAgingState = test_var;
10861 : } else {
10862 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10863 : PyLong_Type.tp_name);
10864 0 : return -1;
10865 : }
10866 : }
10867 0 : return 0;
10868 : }
10869 :
10870 0 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fReserveArray(PyObject *obj, void *closure)
10871 : {
10872 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
10873 0 : PyObject *py_fReserveArray;
10874 0 : py_fReserveArray = PyList_New(15);
10875 0 : if (py_fReserveArray == NULL) {
10876 0 : return NULL;
10877 : }
10878 : {
10879 : int fReserveArray_cntr_0;
10880 0 : for (fReserveArray_cntr_0 = 0; fReserveArray_cntr_0 < (15); fReserveArray_cntr_0++) {
10881 0 : PyObject *py_fReserveArray_0;
10882 0 : py_fReserveArray_0 = PyLong_FromLong((uint16_t)((object->fReserveArray)[fReserveArray_cntr_0]));
10883 0 : PyList_SetItem(py_fReserveArray, fReserveArray_cntr_0, py_fReserveArray_0);
10884 : }
10885 : }
10886 0 : return py_fReserveArray;
10887 : }
10888 :
10889 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fReserveArray(PyObject *py_obj, PyObject *value, void *closure)
10890 : {
10891 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
10892 0 : if (value == NULL) {
10893 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fReserveArray");
10894 0 : return -1;
10895 : }
10896 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
10897 : {
10898 0 : int fReserveArray_cntr_0;
10899 0 : if (ARRAY_SIZE(object->fReserveArray) != PyList_GET_SIZE(value)) {
10900 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));
10901 0 : return -1;
10902 : }
10903 0 : for (fReserveArray_cntr_0 = 0; fReserveArray_cntr_0 < PyList_GET_SIZE(value); fReserveArray_cntr_0++) {
10904 0 : if (PyList_GET_ITEM(value, fReserveArray_cntr_0) == NULL) {
10905 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->fReserveArray)[fReserveArray_cntr_0]");
10906 0 : return -1;
10907 : }
10908 : {
10909 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->fReserveArray)[fReserveArray_cntr_0]));
10910 0 : if (PyLong_Check(PyList_GET_ITEM(value, fReserveArray_cntr_0))) {
10911 0 : unsigned long long test_var;
10912 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, fReserveArray_cntr_0));
10913 0 : if (PyErr_Occurred() != NULL) {
10914 0 : return -1;
10915 : }
10916 0 : if (test_var > uint_max) {
10917 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10918 : PyLong_Type.tp_name, uint_max, test_var);
10919 0 : return -1;
10920 : }
10921 0 : (object->fReserveArray)[fReserveArray_cntr_0] = test_var;
10922 : } else {
10923 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10924 : PyLong_Type.tp_name);
10925 0 : return -1;
10926 : }
10927 : }
10928 : }
10929 : }
10930 0 : return 0;
10931 : }
10932 :
10933 : static PyGetSetDef py_DNS_RPC_SERVER_INFO_LONGHORN_getsetters[] = {
10934 : {
10935 : .name = discard_const_p(char, "dwRpcStructureVersion"),
10936 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRpcStructureVersion,
10937 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRpcStructureVersion,
10938 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
10939 : },
10940 : {
10941 : .name = discard_const_p(char, "dwReserved0"),
10942 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwReserved0,
10943 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwReserved0,
10944 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
10945 : },
10946 : {
10947 : .name = discard_const_p(char, "dwVersion"),
10948 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwVersion,
10949 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwVersion,
10950 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
10951 : },
10952 : {
10953 : .name = discard_const_p(char, "fBootMethod"),
10954 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fBootMethod,
10955 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fBootMethod,
10956 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_BOOT_METHOD")
10957 : },
10958 : {
10959 : .name = discard_const_p(char, "fAdminConfigured"),
10960 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAdminConfigured,
10961 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAdminConfigured,
10962 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
10963 : },
10964 : {
10965 : .name = discard_const_p(char, "fAllowUpdate"),
10966 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAllowUpdate,
10967 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAllowUpdate,
10968 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
10969 : },
10970 : {
10971 : .name = discard_const_p(char, "fDsAvailable"),
10972 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fDsAvailable,
10973 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fDsAvailable,
10974 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
10975 : },
10976 : {
10977 : .name = discard_const_p(char, "pszServerName"),
10978 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszServerName,
10979 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszServerName,
10980 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
10981 : },
10982 : {
10983 : .name = discard_const_p(char, "pszDsContainer"),
10984 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszDsContainer,
10985 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszDsContainer,
10986 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
10987 : },
10988 : {
10989 : .name = discard_const_p(char, "aipServerAddrs"),
10990 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipServerAddrs,
10991 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipServerAddrs,
10992 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
10993 : },
10994 : {
10995 : .name = discard_const_p(char, "aipListenAddrs"),
10996 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipListenAddrs,
10997 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipListenAddrs,
10998 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
10999 : },
11000 : {
11001 : .name = discard_const_p(char, "aipForwarders"),
11002 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipForwarders,
11003 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipForwarders,
11004 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
11005 : },
11006 : {
11007 : .name = discard_const_p(char, "aipLogFilter"),
11008 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipLogFilter,
11009 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipLogFilter,
11010 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
11011 : },
11012 : {
11013 : .name = discard_const_p(char, "pwszLogFilePath"),
11014 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_pwszLogFilePath,
11015 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_pwszLogFilePath,
11016 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
11017 : },
11018 : {
11019 : .name = discard_const_p(char, "pszDomainName"),
11020 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszDomainName,
11021 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszDomainName,
11022 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11023 : },
11024 : {
11025 : .name = discard_const_p(char, "pszForestName"),
11026 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszForestName,
11027 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszForestName,
11028 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11029 : },
11030 : {
11031 : .name = discard_const_p(char, "pszDomainDirectoryPartition"),
11032 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszDomainDirectoryPartition,
11033 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszDomainDirectoryPartition,
11034 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11035 : },
11036 : {
11037 : .name = discard_const_p(char, "pszForestDirectoryPartition"),
11038 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszForestDirectoryPartition,
11039 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszForestDirectoryPartition,
11040 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11041 : },
11042 : {
11043 : .name = discard_const_p(char, "pExtensions"),
11044 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_pExtensions,
11045 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_pExtensions,
11046 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_EXTENSION")
11047 : },
11048 : {
11049 : .name = discard_const_p(char, "dwLogLevel"),
11050 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLogLevel,
11051 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLogLevel,
11052 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11053 : },
11054 : {
11055 : .name = discard_const_p(char, "dwDebugLevel"),
11056 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDebugLevel,
11057 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDebugLevel,
11058 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11059 : },
11060 : {
11061 : .name = discard_const_p(char, "dwForwardTimeout"),
11062 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwForwardTimeout,
11063 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwForwardTimeout,
11064 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11065 : },
11066 : {
11067 : .name = discard_const_p(char, "dwRpcProtocol"),
11068 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRpcProtocol,
11069 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRpcProtocol,
11070 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11071 : },
11072 : {
11073 : .name = discard_const_p(char, "dwNameCheckFlag"),
11074 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwNameCheckFlag,
11075 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwNameCheckFlag,
11076 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_NAME_CHECK_FLAG")
11077 : },
11078 : {
11079 : .name = discard_const_p(char, "cAddressAnswerLimit"),
11080 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_cAddressAnswerLimit,
11081 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_cAddressAnswerLimit,
11082 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11083 : },
11084 : {
11085 : .name = discard_const_p(char, "dwRecursionRetry"),
11086 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRecursionRetry,
11087 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRecursionRetry,
11088 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11089 : },
11090 : {
11091 : .name = discard_const_p(char, "dwRecursionTimeout"),
11092 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRecursionTimeout,
11093 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRecursionTimeout,
11094 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11095 : },
11096 : {
11097 : .name = discard_const_p(char, "dwMaxCacheTtl"),
11098 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwMaxCacheTtl,
11099 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwMaxCacheTtl,
11100 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11101 : },
11102 : {
11103 : .name = discard_const_p(char, "dwDsPollingInterval"),
11104 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsPollingInterval,
11105 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsPollingInterval,
11106 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11107 : },
11108 : {
11109 : .name = discard_const_p(char, "dwLocalNetPriorityNetMask"),
11110 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLocalNetPriorityNetMask,
11111 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLocalNetPriorityNetMask,
11112 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11113 : },
11114 : {
11115 : .name = discard_const_p(char, "dwScavengingInterval"),
11116 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwScavengingInterval,
11117 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwScavengingInterval,
11118 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11119 : },
11120 : {
11121 : .name = discard_const_p(char, "dwDefaultRefreshInterval"),
11122 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDefaultRefreshInterval,
11123 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDefaultRefreshInterval,
11124 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11125 : },
11126 : {
11127 : .name = discard_const_p(char, "dwDefaultNoRefreshInterval"),
11128 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDefaultNoRefreshInterval,
11129 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDefaultNoRefreshInterval,
11130 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11131 : },
11132 : {
11133 : .name = discard_const_p(char, "dwLastScavengeTime"),
11134 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLastScavengeTime,
11135 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLastScavengeTime,
11136 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11137 : },
11138 : {
11139 : .name = discard_const_p(char, "dwEventLogLevel"),
11140 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwEventLogLevel,
11141 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwEventLogLevel,
11142 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11143 : },
11144 : {
11145 : .name = discard_const_p(char, "dwLogFileMaxSize"),
11146 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLogFileMaxSize,
11147 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLogFileMaxSize,
11148 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11149 : },
11150 : {
11151 : .name = discard_const_p(char, "dwDsForestVersion"),
11152 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsForestVersion,
11153 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsForestVersion,
11154 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11155 : },
11156 : {
11157 : .name = discard_const_p(char, "dwDsDomainVersion"),
11158 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsDomainVersion,
11159 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsDomainVersion,
11160 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11161 : },
11162 : {
11163 : .name = discard_const_p(char, "dwDsDsaVersion"),
11164 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsDsaVersion,
11165 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsDsaVersion,
11166 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11167 : },
11168 : {
11169 : .name = discard_const_p(char, "fReadOnlyDC"),
11170 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fReadOnlyDC,
11171 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fReadOnlyDC,
11172 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11173 : },
11174 : {
11175 : .name = discard_const_p(char, "dwReserveArray"),
11176 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwReserveArray,
11177 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwReserveArray,
11178 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11179 : },
11180 : {
11181 : .name = discard_const_p(char, "fAutoReverseZones"),
11182 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAutoReverseZones,
11183 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAutoReverseZones,
11184 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11185 : },
11186 : {
11187 : .name = discard_const_p(char, "fAutoCacheUpdate"),
11188 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAutoCacheUpdate,
11189 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAutoCacheUpdate,
11190 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11191 : },
11192 : {
11193 : .name = discard_const_p(char, "fRecurseAfterForwarding"),
11194 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fRecurseAfterForwarding,
11195 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fRecurseAfterForwarding,
11196 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11197 : },
11198 : {
11199 : .name = discard_const_p(char, "fForwardDelegations"),
11200 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fForwardDelegations,
11201 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fForwardDelegations,
11202 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11203 : },
11204 : {
11205 : .name = discard_const_p(char, "fNoRecursion"),
11206 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fNoRecursion,
11207 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fNoRecursion,
11208 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11209 : },
11210 : {
11211 : .name = discard_const_p(char, "fSecureResponses"),
11212 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fSecureResponses,
11213 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fSecureResponses,
11214 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11215 : },
11216 : {
11217 : .name = discard_const_p(char, "fRoundRobin"),
11218 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fRoundRobin,
11219 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fRoundRobin,
11220 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11221 : },
11222 : {
11223 : .name = discard_const_p(char, "fLocalNetPriority"),
11224 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fLocalNetPriority,
11225 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fLocalNetPriority,
11226 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11227 : },
11228 : {
11229 : .name = discard_const_p(char, "fBindSecondaries"),
11230 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fBindSecondaries,
11231 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fBindSecondaries,
11232 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11233 : },
11234 : {
11235 : .name = discard_const_p(char, "fWriteAuthorityNs"),
11236 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fWriteAuthorityNs,
11237 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fWriteAuthorityNs,
11238 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11239 : },
11240 : {
11241 : .name = discard_const_p(char, "fStrictFileParsing"),
11242 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fStrictFileParsing,
11243 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fStrictFileParsing,
11244 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11245 : },
11246 : {
11247 : .name = discard_const_p(char, "fLooseWildcarding"),
11248 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fLooseWildcarding,
11249 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fLooseWildcarding,
11250 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11251 : },
11252 : {
11253 : .name = discard_const_p(char, "fDefaultAgingState"),
11254 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fDefaultAgingState,
11255 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fDefaultAgingState,
11256 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11257 : },
11258 : {
11259 : .name = discard_const_p(char, "fReserveArray"),
11260 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fReserveArray,
11261 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fReserveArray,
11262 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11263 : },
11264 : { .name = NULL }
11265 : };
11266 :
11267 0 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
11268 : {
11269 0 : return pytalloc_new(struct DNS_RPC_SERVER_INFO_LONGHORN, type);
11270 : }
11271 :
11272 0 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
11273 : {
11274 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
11275 0 : PyObject *ret = NULL;
11276 0 : DATA_BLOB blob;
11277 0 : enum ndr_err_code err;
11278 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
11279 0 : if (tmp_ctx == NULL) {
11280 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
11281 0 : return NULL;
11282 : }
11283 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_SERVER_INFO_LONGHORN);
11284 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
11285 0 : TALLOC_FREE(tmp_ctx);
11286 0 : PyErr_SetNdrError(err);
11287 0 : return NULL;
11288 : }
11289 :
11290 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
11291 0 : TALLOC_FREE(tmp_ctx);
11292 0 : return ret;
11293 : }
11294 :
11295 0 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
11296 : {
11297 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
11298 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
11299 0 : Py_ssize_t blob_length = 0;
11300 0 : enum ndr_err_code err;
11301 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
11302 0 : PyObject *allow_remaining_obj = NULL;
11303 0 : bool allow_remaining = false;
11304 :
11305 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
11306 : discard_const_p(char *, kwnames),
11307 : &blob.data, &blob_length,
11308 : &allow_remaining_obj)) {
11309 0 : return NULL;
11310 : }
11311 0 : blob.length = blob_length;
11312 :
11313 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
11314 0 : allow_remaining = true;
11315 : }
11316 :
11317 0 : if (allow_remaining) {
11318 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);
11319 : } else {
11320 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);
11321 : }
11322 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
11323 0 : PyErr_SetNdrError(err);
11324 0 : return NULL;
11325 : }
11326 :
11327 0 : Py_RETURN_NONE;
11328 : }
11329 :
11330 0 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
11331 : {
11332 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
11333 0 : PyObject *ret;
11334 0 : char *retstr;
11335 :
11336 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);
11337 0 : ret = PyUnicode_FromString(retstr);
11338 0 : talloc_free(retstr);
11339 :
11340 0 : return ret;
11341 : }
11342 :
11343 : static PyMethodDef py_DNS_RPC_SERVER_INFO_LONGHORN_methods[] = {
11344 : { "__ndr_pack__", (PyCFunction)py_DNS_RPC_SERVER_INFO_LONGHORN_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
11345 : { "__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" },
11346 : { "__ndr_print__", (PyCFunction)py_DNS_RPC_SERVER_INFO_LONGHORN_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
11347 : { NULL, NULL, 0, NULL }
11348 : };
11349 :
11350 :
11351 : static PyTypeObject DNS_RPC_SERVER_INFO_LONGHORN_Type = {
11352 : PyVarObject_HEAD_INIT(NULL, 0)
11353 : .tp_name = "dnsserver.DNS_RPC_SERVER_INFO_LONGHORN",
11354 : .tp_getset = py_DNS_RPC_SERVER_INFO_LONGHORN_getsetters,
11355 : .tp_methods = py_DNS_RPC_SERVER_INFO_LONGHORN_methods,
11356 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
11357 : .tp_new = py_DNS_RPC_SERVER_INFO_LONGHORN_new,
11358 : };
11359 :
11360 :
11361 0 : static PyObject *py_DNS_RPC_DP_REPLICA_get_pszReplicaDn(PyObject *obj, void *closure)
11362 : {
11363 0 : struct DNS_RPC_DP_REPLICA *object = pytalloc_get_ptr(obj);
11364 0 : PyObject *py_pszReplicaDn;
11365 0 : if (object->pszReplicaDn == NULL) {
11366 0 : Py_RETURN_NONE;
11367 : }
11368 0 : if (object->pszReplicaDn == NULL) {
11369 0 : py_pszReplicaDn = Py_None;
11370 0 : Py_INCREF(py_pszReplicaDn);
11371 : } else {
11372 0 : if (object->pszReplicaDn == NULL) {
11373 0 : py_pszReplicaDn = Py_None;
11374 0 : Py_INCREF(py_pszReplicaDn);
11375 : } else {
11376 0 : py_pszReplicaDn = PyUnicode_Decode(object->pszReplicaDn, strlen(object->pszReplicaDn), "utf-8", "ignore");
11377 : }
11378 : }
11379 0 : return py_pszReplicaDn;
11380 : }
11381 :
11382 0 : static int py_DNS_RPC_DP_REPLICA_set_pszReplicaDn(PyObject *py_obj, PyObject *value, void *closure)
11383 : {
11384 0 : struct DNS_RPC_DP_REPLICA *object = pytalloc_get_ptr(py_obj);
11385 0 : if (value == NULL) {
11386 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszReplicaDn");
11387 0 : return -1;
11388 : }
11389 0 : if (value == Py_None) {
11390 0 : object->pszReplicaDn = NULL;
11391 : } else {
11392 0 : object->pszReplicaDn = NULL;
11393 : {
11394 0 : const char *test_str;
11395 0 : const char *talloc_str;
11396 0 : PyObject *unicode = NULL;
11397 0 : if (PyUnicode_Check(value)) {
11398 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
11399 0 : if (unicode == NULL) {
11400 0 : return -1;
11401 : }
11402 0 : test_str = PyBytes_AS_STRING(unicode);
11403 0 : } else if (PyBytes_Check(value)) {
11404 0 : test_str = PyBytes_AS_STRING(value);
11405 : } else {
11406 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
11407 0 : return -1;
11408 : }
11409 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
11410 0 : if (unicode != NULL) {
11411 0 : Py_DECREF(unicode);
11412 : }
11413 0 : if (talloc_str == NULL) {
11414 0 : PyErr_NoMemory();
11415 0 : return -1;
11416 : }
11417 0 : object->pszReplicaDn = talloc_str;
11418 : }
11419 : }
11420 0 : return 0;
11421 : }
11422 :
11423 : static PyGetSetDef py_DNS_RPC_DP_REPLICA_getsetters[] = {
11424 : {
11425 : .name = discard_const_p(char, "pszReplicaDn"),
11426 : .get = py_DNS_RPC_DP_REPLICA_get_pszReplicaDn,
11427 : .set = py_DNS_RPC_DP_REPLICA_set_pszReplicaDn,
11428 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
11429 : },
11430 : { .name = NULL }
11431 : };
11432 :
11433 0 : static PyObject *py_DNS_RPC_DP_REPLICA_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
11434 : {
11435 0 : return pytalloc_new(struct DNS_RPC_DP_REPLICA, type);
11436 : }
11437 :
11438 :
11439 : static PyTypeObject DNS_RPC_DP_REPLICA_Type = {
11440 : PyVarObject_HEAD_INIT(NULL, 0)
11441 : .tp_name = "dnsserver.DNS_RPC_DP_REPLICA",
11442 : .tp_getset = py_DNS_RPC_DP_REPLICA_getsetters,
11443 : .tp_methods = NULL,
11444 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
11445 : .tp_new = py_DNS_RPC_DP_REPLICA_new,
11446 : };
11447 :
11448 :
11449 0 : static PyObject *py_DNS_RPC_DP_INFO_get_dwRpcStructureVersion(PyObject *obj, void *closure)
11450 : {
11451 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(obj);
11452 0 : PyObject *py_dwRpcStructureVersion;
11453 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
11454 0 : return py_dwRpcStructureVersion;
11455 : }
11456 :
11457 0 : static int py_DNS_RPC_DP_INFO_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
11458 : {
11459 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(py_obj);
11460 0 : if (value == NULL) {
11461 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
11462 0 : return -1;
11463 : }
11464 : {
11465 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
11466 0 : if (PyLong_Check(value)) {
11467 0 : unsigned long long test_var;
11468 0 : test_var = PyLong_AsUnsignedLongLong(value);
11469 0 : if (PyErr_Occurred() != NULL) {
11470 0 : return -1;
11471 : }
11472 0 : if (test_var > uint_max) {
11473 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
11474 : PyLong_Type.tp_name, uint_max, test_var);
11475 0 : return -1;
11476 : }
11477 0 : object->dwRpcStructureVersion = test_var;
11478 : } else {
11479 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
11480 : PyLong_Type.tp_name);
11481 0 : return -1;
11482 : }
11483 : }
11484 0 : return 0;
11485 : }
11486 :
11487 0 : static PyObject *py_DNS_RPC_DP_INFO_get_dwReserved0(PyObject *obj, void *closure)
11488 : {
11489 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(obj);
11490 0 : PyObject *py_dwReserved0;
11491 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
11492 0 : return py_dwReserved0;
11493 : }
11494 :
11495 0 : static int py_DNS_RPC_DP_INFO_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
11496 : {
11497 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(py_obj);
11498 0 : if (value == NULL) {
11499 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
11500 0 : return -1;
11501 : }
11502 : {
11503 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
11504 0 : if (PyLong_Check(value)) {
11505 0 : unsigned long long test_var;
11506 0 : test_var = PyLong_AsUnsignedLongLong(value);
11507 0 : if (PyErr_Occurred() != NULL) {
11508 0 : return -1;
11509 : }
11510 0 : if (test_var > uint_max) {
11511 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
11512 : PyLong_Type.tp_name, uint_max, test_var);
11513 0 : return -1;
11514 : }
11515 0 : object->dwReserved0 = test_var;
11516 : } else {
11517 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
11518 : PyLong_Type.tp_name);
11519 0 : return -1;
11520 : }
11521 : }
11522 0 : return 0;
11523 : }
11524 :
11525 0 : static PyObject *py_DNS_RPC_DP_INFO_get_pszDpFqdn(PyObject *obj, void *closure)
11526 : {
11527 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(obj);
11528 0 : PyObject *py_pszDpFqdn;
11529 0 : if (object->pszDpFqdn == NULL) {
11530 0 : Py_RETURN_NONE;
11531 : }
11532 0 : if (object->pszDpFqdn == NULL) {
11533 0 : py_pszDpFqdn = Py_None;
11534 0 : Py_INCREF(py_pszDpFqdn);
11535 : } else {
11536 0 : if (object->pszDpFqdn == NULL) {
11537 0 : py_pszDpFqdn = Py_None;
11538 0 : Py_INCREF(py_pszDpFqdn);
11539 : } else {
11540 0 : py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
11541 : }
11542 : }
11543 0 : return py_pszDpFqdn;
11544 : }
11545 :
11546 0 : static int py_DNS_RPC_DP_INFO_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
11547 : {
11548 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(py_obj);
11549 0 : if (value == NULL) {
11550 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDpFqdn");
11551 0 : return -1;
11552 : }
11553 0 : if (value == Py_None) {
11554 0 : object->pszDpFqdn = NULL;
11555 : } else {
11556 0 : object->pszDpFqdn = NULL;
11557 : {
11558 0 : const char *test_str;
11559 0 : const char *talloc_str;
11560 0 : PyObject *unicode = NULL;
11561 0 : if (PyUnicode_Check(value)) {
11562 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
11563 0 : if (unicode == NULL) {
11564 0 : return -1;
11565 : }
11566 0 : test_str = PyBytes_AS_STRING(unicode);
11567 0 : } else if (PyBytes_Check(value)) {
11568 0 : test_str = PyBytes_AS_STRING(value);
11569 : } else {
11570 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
11571 0 : return -1;
11572 : }
11573 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
11574 0 : if (unicode != NULL) {
11575 0 : Py_DECREF(unicode);
11576 : }
11577 0 : if (talloc_str == NULL) {
11578 0 : PyErr_NoMemory();
11579 0 : return -1;
11580 : }
11581 0 : object->pszDpFqdn = talloc_str;
11582 : }
11583 : }
11584 0 : return 0;
11585 : }
11586 :
11587 0 : static PyObject *py_DNS_RPC_DP_INFO_get_pszDpDn(PyObject *obj, void *closure)
11588 : {
11589 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(obj);
11590 0 : PyObject *py_pszDpDn;
11591 0 : if (object->pszDpDn == NULL) {
11592 0 : Py_RETURN_NONE;
11593 : }
11594 0 : if (object->pszDpDn == NULL) {
11595 0 : py_pszDpDn = Py_None;
11596 0 : Py_INCREF(py_pszDpDn);
11597 : } else {
11598 0 : if (object->pszDpDn == NULL) {
11599 0 : py_pszDpDn = Py_None;
11600 0 : Py_INCREF(py_pszDpDn);
11601 : } else {
11602 0 : py_pszDpDn = PyUnicode_Decode(object->pszDpDn, strlen(object->pszDpDn), "utf-8", "ignore");
11603 : }
11604 : }
11605 0 : return py_pszDpDn;
11606 : }
11607 :
11608 0 : static int py_DNS_RPC_DP_INFO_set_pszDpDn(PyObject *py_obj, PyObject *value, void *closure)
11609 : {
11610 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(py_obj);
11611 0 : if (value == NULL) {
11612 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDpDn");
11613 0 : return -1;
11614 : }
11615 0 : if (value == Py_None) {
11616 0 : object->pszDpDn = NULL;
11617 : } else {
11618 0 : object->pszDpDn = NULL;
11619 : {
11620 0 : const char *test_str;
11621 0 : const char *talloc_str;
11622 0 : PyObject *unicode = NULL;
11623 0 : if (PyUnicode_Check(value)) {
11624 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
11625 0 : if (unicode == NULL) {
11626 0 : return -1;
11627 : }
11628 0 : test_str = PyBytes_AS_STRING(unicode);
11629 0 : } else if (PyBytes_Check(value)) {
11630 0 : test_str = PyBytes_AS_STRING(value);
11631 : } else {
11632 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
11633 0 : return -1;
11634 : }
11635 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
11636 0 : if (unicode != NULL) {
11637 0 : Py_DECREF(unicode);
11638 : }
11639 0 : if (talloc_str == NULL) {
11640 0 : PyErr_NoMemory();
11641 0 : return -1;
11642 : }
11643 0 : object->pszDpDn = talloc_str;
11644 : }
11645 : }
11646 0 : return 0;
11647 : }
11648 :
11649 0 : static PyObject *py_DNS_RPC_DP_INFO_get_pszCrDn(PyObject *obj, void *closure)
11650 : {
11651 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(obj);
11652 0 : PyObject *py_pszCrDn;
11653 0 : if (object->pszCrDn == NULL) {
11654 0 : Py_RETURN_NONE;
11655 : }
11656 0 : if (object->pszCrDn == NULL) {
11657 0 : py_pszCrDn = Py_None;
11658 0 : Py_INCREF(py_pszCrDn);
11659 : } else {
11660 0 : if (object->pszCrDn == NULL) {
11661 0 : py_pszCrDn = Py_None;
11662 0 : Py_INCREF(py_pszCrDn);
11663 : } else {
11664 0 : py_pszCrDn = PyUnicode_Decode(object->pszCrDn, strlen(object->pszCrDn), "utf-8", "ignore");
11665 : }
11666 : }
11667 0 : return py_pszCrDn;
11668 : }
11669 :
11670 0 : static int py_DNS_RPC_DP_INFO_set_pszCrDn(PyObject *py_obj, PyObject *value, void *closure)
11671 : {
11672 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(py_obj);
11673 0 : if (value == NULL) {
11674 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszCrDn");
11675 0 : return -1;
11676 : }
11677 0 : if (value == Py_None) {
11678 0 : object->pszCrDn = NULL;
11679 : } else {
11680 0 : object->pszCrDn = NULL;
11681 : {
11682 0 : const char *test_str;
11683 0 : const char *talloc_str;
11684 0 : PyObject *unicode = NULL;
11685 0 : if (PyUnicode_Check(value)) {
11686 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
11687 0 : if (unicode == NULL) {
11688 0 : return -1;
11689 : }
11690 0 : test_str = PyBytes_AS_STRING(unicode);
11691 0 : } else if (PyBytes_Check(value)) {
11692 0 : test_str = PyBytes_AS_STRING(value);
11693 : } else {
11694 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
11695 0 : return -1;
11696 : }
11697 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
11698 0 : if (unicode != NULL) {
11699 0 : Py_DECREF(unicode);
11700 : }
11701 0 : if (talloc_str == NULL) {
11702 0 : PyErr_NoMemory();
11703 0 : return -1;
11704 : }
11705 0 : object->pszCrDn = talloc_str;
11706 : }
11707 : }
11708 0 : return 0;
11709 : }
11710 :
11711 0 : static PyObject *py_DNS_RPC_DP_INFO_get_dwFlags(PyObject *obj, void *closure)
11712 : {
11713 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(obj);
11714 0 : PyObject *py_dwFlags;
11715 0 : py_dwFlags = PyLong_FromUnsignedLongLong((uint32_t)(object->dwFlags));
11716 0 : return py_dwFlags;
11717 : }
11718 :
11719 0 : static int py_DNS_RPC_DP_INFO_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
11720 : {
11721 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(py_obj);
11722 0 : if (value == NULL) {
11723 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwFlags");
11724 0 : return -1;
11725 : }
11726 : {
11727 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwFlags));
11728 0 : if (PyLong_Check(value)) {
11729 0 : unsigned long long test_var;
11730 0 : test_var = PyLong_AsUnsignedLongLong(value);
11731 0 : if (PyErr_Occurred() != NULL) {
11732 0 : return -1;
11733 : }
11734 0 : if (test_var > uint_max) {
11735 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
11736 : PyLong_Type.tp_name, uint_max, test_var);
11737 0 : return -1;
11738 : }
11739 0 : object->dwFlags = test_var;
11740 : } else {
11741 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
11742 : PyLong_Type.tp_name);
11743 0 : return -1;
11744 : }
11745 : }
11746 0 : return 0;
11747 : }
11748 :
11749 0 : static PyObject *py_DNS_RPC_DP_INFO_get_dwZoneCount(PyObject *obj, void *closure)
11750 : {
11751 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(obj);
11752 0 : PyObject *py_dwZoneCount;
11753 0 : py_dwZoneCount = PyLong_FromUnsignedLongLong((uint32_t)(object->dwZoneCount));
11754 0 : return py_dwZoneCount;
11755 : }
11756 :
11757 0 : static int py_DNS_RPC_DP_INFO_set_dwZoneCount(PyObject *py_obj, PyObject *value, void *closure)
11758 : {
11759 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(py_obj);
11760 0 : if (value == NULL) {
11761 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwZoneCount");
11762 0 : return -1;
11763 : }
11764 : {
11765 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwZoneCount));
11766 0 : if (PyLong_Check(value)) {
11767 0 : unsigned long long test_var;
11768 0 : test_var = PyLong_AsUnsignedLongLong(value);
11769 0 : if (PyErr_Occurred() != NULL) {
11770 0 : return -1;
11771 : }
11772 0 : if (test_var > uint_max) {
11773 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
11774 : PyLong_Type.tp_name, uint_max, test_var);
11775 0 : return -1;
11776 : }
11777 0 : object->dwZoneCount = test_var;
11778 : } else {
11779 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
11780 : PyLong_Type.tp_name);
11781 0 : return -1;
11782 : }
11783 : }
11784 0 : return 0;
11785 : }
11786 :
11787 0 : static PyObject *py_DNS_RPC_DP_INFO_get_dwState(PyObject *obj, void *closure)
11788 : {
11789 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(obj);
11790 0 : PyObject *py_dwState;
11791 0 : py_dwState = PyLong_FromUnsignedLongLong((uint32_t)(object->dwState));
11792 0 : return py_dwState;
11793 : }
11794 :
11795 0 : static int py_DNS_RPC_DP_INFO_set_dwState(PyObject *py_obj, PyObject *value, void *closure)
11796 : {
11797 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(py_obj);
11798 0 : if (value == NULL) {
11799 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwState");
11800 0 : return -1;
11801 : }
11802 : {
11803 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwState));
11804 0 : if (PyLong_Check(value)) {
11805 0 : unsigned long long test_var;
11806 0 : test_var = PyLong_AsUnsignedLongLong(value);
11807 0 : if (PyErr_Occurred() != NULL) {
11808 0 : return -1;
11809 : }
11810 0 : if (test_var > uint_max) {
11811 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
11812 : PyLong_Type.tp_name, uint_max, test_var);
11813 0 : return -1;
11814 : }
11815 0 : object->dwState = test_var;
11816 : } else {
11817 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
11818 : PyLong_Type.tp_name);
11819 0 : return -1;
11820 : }
11821 : }
11822 0 : return 0;
11823 : }
11824 :
11825 0 : static PyObject *py_DNS_RPC_DP_INFO_get_dwReserved(PyObject *obj, void *closure)
11826 : {
11827 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(obj);
11828 0 : PyObject *py_dwReserved;
11829 0 : py_dwReserved = PyList_New(3);
11830 0 : if (py_dwReserved == NULL) {
11831 0 : return NULL;
11832 : }
11833 : {
11834 : int dwReserved_cntr_0;
11835 0 : for (dwReserved_cntr_0 = 0; dwReserved_cntr_0 < (3); dwReserved_cntr_0++) {
11836 0 : PyObject *py_dwReserved_0;
11837 0 : py_dwReserved_0 = PyLong_FromUnsignedLongLong((uint32_t)((object->dwReserved)[dwReserved_cntr_0]));
11838 0 : PyList_SetItem(py_dwReserved, dwReserved_cntr_0, py_dwReserved_0);
11839 : }
11840 : }
11841 0 : return py_dwReserved;
11842 : }
11843 :
11844 0 : static int py_DNS_RPC_DP_INFO_set_dwReserved(PyObject *py_obj, PyObject *value, void *closure)
11845 : {
11846 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(py_obj);
11847 0 : if (value == NULL) {
11848 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved");
11849 0 : return -1;
11850 : }
11851 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
11852 : {
11853 0 : int dwReserved_cntr_0;
11854 0 : if (ARRAY_SIZE(object->dwReserved) != PyList_GET_SIZE(value)) {
11855 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));
11856 0 : return -1;
11857 : }
11858 0 : for (dwReserved_cntr_0 = 0; dwReserved_cntr_0 < PyList_GET_SIZE(value); dwReserved_cntr_0++) {
11859 0 : if (PyList_GET_ITEM(value, dwReserved_cntr_0) == NULL) {
11860 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->dwReserved)[dwReserved_cntr_0]");
11861 0 : return -1;
11862 : }
11863 : {
11864 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->dwReserved)[dwReserved_cntr_0]));
11865 0 : if (PyLong_Check(PyList_GET_ITEM(value, dwReserved_cntr_0))) {
11866 0 : unsigned long long test_var;
11867 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, dwReserved_cntr_0));
11868 0 : if (PyErr_Occurred() != NULL) {
11869 0 : return -1;
11870 : }
11871 0 : if (test_var > uint_max) {
11872 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
11873 : PyLong_Type.tp_name, uint_max, test_var);
11874 0 : return -1;
11875 : }
11876 0 : (object->dwReserved)[dwReserved_cntr_0] = test_var;
11877 : } else {
11878 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
11879 : PyLong_Type.tp_name);
11880 0 : return -1;
11881 : }
11882 : }
11883 : }
11884 : }
11885 0 : return 0;
11886 : }
11887 :
11888 0 : static PyObject *py_DNS_RPC_DP_INFO_get_pwszReserved(PyObject *obj, void *closure)
11889 : {
11890 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(obj);
11891 0 : PyObject *py_pwszReserved;
11892 0 : py_pwszReserved = PyList_New(3);
11893 0 : if (py_pwszReserved == NULL) {
11894 0 : return NULL;
11895 : }
11896 : {
11897 : int pwszReserved_cntr_0;
11898 0 : for (pwszReserved_cntr_0 = 0; pwszReserved_cntr_0 < (3); pwszReserved_cntr_0++) {
11899 0 : PyObject *py_pwszReserved_0;
11900 0 : py_pwszReserved_0 = pytalloc_reference_ex(&DNS_EXTENSION_Type, pytalloc_get_mem_ctx(obj), &(object->pwszReserved)[pwszReserved_cntr_0]);
11901 0 : PyList_SetItem(py_pwszReserved, pwszReserved_cntr_0, py_pwszReserved_0);
11902 : }
11903 : }
11904 0 : return py_pwszReserved;
11905 : }
11906 :
11907 0 : static int py_DNS_RPC_DP_INFO_set_pwszReserved(PyObject *py_obj, PyObject *value, void *closure)
11908 : {
11909 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(py_obj);
11910 0 : if (value == NULL) {
11911 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pwszReserved");
11912 0 : return -1;
11913 : }
11914 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
11915 : {
11916 0 : int pwszReserved_cntr_0;
11917 0 : if (ARRAY_SIZE(object->pwszReserved) != PyList_GET_SIZE(value)) {
11918 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));
11919 0 : return -1;
11920 : }
11921 0 : for (pwszReserved_cntr_0 = 0; pwszReserved_cntr_0 < PyList_GET_SIZE(value); pwszReserved_cntr_0++) {
11922 0 : if (PyList_GET_ITEM(value, pwszReserved_cntr_0) == NULL) {
11923 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->pwszReserved)[pwszReserved_cntr_0]");
11924 0 : return -1;
11925 : }
11926 0 : PY_CHECK_TYPE(&DNS_EXTENSION_Type, PyList_GET_ITEM(value, pwszReserved_cntr_0), return -1;);
11927 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(PyList_GET_ITEM(value, pwszReserved_cntr_0))) == NULL) {
11928 0 : PyErr_NoMemory();
11929 0 : return -1;
11930 : }
11931 0 : (object->pwszReserved)[pwszReserved_cntr_0] = *(struct DNS_EXTENSION *)pytalloc_get_ptr(PyList_GET_ITEM(value, pwszReserved_cntr_0));
11932 : }
11933 : }
11934 0 : return 0;
11935 : }
11936 :
11937 0 : static PyObject *py_DNS_RPC_DP_INFO_get_dwReplicaCount(PyObject *obj, void *closure)
11938 : {
11939 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(obj);
11940 0 : PyObject *py_dwReplicaCount;
11941 0 : py_dwReplicaCount = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReplicaCount));
11942 0 : return py_dwReplicaCount;
11943 : }
11944 :
11945 0 : static int py_DNS_RPC_DP_INFO_set_dwReplicaCount(PyObject *py_obj, PyObject *value, void *closure)
11946 : {
11947 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(py_obj);
11948 0 : if (value == NULL) {
11949 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReplicaCount");
11950 0 : return -1;
11951 : }
11952 : {
11953 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReplicaCount));
11954 0 : if (PyLong_Check(value)) {
11955 0 : unsigned long long test_var;
11956 0 : test_var = PyLong_AsUnsignedLongLong(value);
11957 0 : if (PyErr_Occurred() != NULL) {
11958 0 : return -1;
11959 : }
11960 0 : if (test_var > uint_max) {
11961 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
11962 : PyLong_Type.tp_name, uint_max, test_var);
11963 0 : return -1;
11964 : }
11965 0 : object->dwReplicaCount = test_var;
11966 : } else {
11967 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
11968 : PyLong_Type.tp_name);
11969 0 : return -1;
11970 : }
11971 : }
11972 0 : return 0;
11973 : }
11974 :
11975 0 : static PyObject *py_DNS_RPC_DP_INFO_get_ReplicaArray(PyObject *obj, void *closure)
11976 : {
11977 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(obj);
11978 0 : PyObject *py_ReplicaArray;
11979 0 : py_ReplicaArray = PyList_New(object->dwReplicaCount);
11980 0 : if (py_ReplicaArray == NULL) {
11981 0 : return NULL;
11982 : }
11983 : {
11984 : int ReplicaArray_cntr_0;
11985 0 : for (ReplicaArray_cntr_0 = 0; ReplicaArray_cntr_0 < (object->dwReplicaCount); ReplicaArray_cntr_0++) {
11986 0 : PyObject *py_ReplicaArray_0;
11987 0 : if ((object->ReplicaArray)[ReplicaArray_cntr_0] == NULL) {
11988 0 : py_ReplicaArray_0 = Py_None;
11989 0 : Py_INCREF(py_ReplicaArray_0);
11990 : } else {
11991 0 : py_ReplicaArray_0 = pytalloc_reference_ex(&DNS_RPC_DP_REPLICA_Type, (object->ReplicaArray)[ReplicaArray_cntr_0], (object->ReplicaArray)[ReplicaArray_cntr_0]);
11992 : }
11993 0 : PyList_SetItem(py_ReplicaArray, ReplicaArray_cntr_0, py_ReplicaArray_0);
11994 : }
11995 : }
11996 0 : return py_ReplicaArray;
11997 : }
11998 :
11999 0 : static int py_DNS_RPC_DP_INFO_set_ReplicaArray(PyObject *py_obj, PyObject *value, void *closure)
12000 : {
12001 0 : struct DNS_RPC_DP_INFO *object = pytalloc_get_ptr(py_obj);
12002 0 : if (value == NULL) {
12003 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ReplicaArray");
12004 0 : return -1;
12005 : }
12006 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
12007 : {
12008 0 : int ReplicaArray_cntr_0;
12009 0 : object->ReplicaArray = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->ReplicaArray, PyList_GET_SIZE(value));
12010 0 : if (!object->ReplicaArray) { return -1; }
12011 0 : talloc_set_name_const(object->ReplicaArray, "ARRAY: object->ReplicaArray");
12012 0 : for (ReplicaArray_cntr_0 = 0; ReplicaArray_cntr_0 < PyList_GET_SIZE(value); ReplicaArray_cntr_0++) {
12013 0 : if (PyList_GET_ITEM(value, ReplicaArray_cntr_0) == NULL) {
12014 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->ReplicaArray)[ReplicaArray_cntr_0]");
12015 0 : return -1;
12016 : }
12017 0 : if (PyList_GET_ITEM(value, ReplicaArray_cntr_0) == Py_None) {
12018 0 : (object->ReplicaArray)[ReplicaArray_cntr_0] = NULL;
12019 : } else {
12020 0 : (object->ReplicaArray)[ReplicaArray_cntr_0] = NULL;
12021 0 : PY_CHECK_TYPE(&DNS_RPC_DP_REPLICA_Type, PyList_GET_ITEM(value, ReplicaArray_cntr_0), return -1;);
12022 0 : if (talloc_reference(object->ReplicaArray, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, ReplicaArray_cntr_0))) == NULL) {
12023 0 : PyErr_NoMemory();
12024 0 : return -1;
12025 : }
12026 0 : (object->ReplicaArray)[ReplicaArray_cntr_0] = (struct DNS_RPC_DP_REPLICA *)pytalloc_get_ptr(PyList_GET_ITEM(value, ReplicaArray_cntr_0));
12027 : }
12028 : }
12029 : }
12030 0 : return 0;
12031 : }
12032 :
12033 : static PyGetSetDef py_DNS_RPC_DP_INFO_getsetters[] = {
12034 : {
12035 : .name = discard_const_p(char, "dwRpcStructureVersion"),
12036 : .get = py_DNS_RPC_DP_INFO_get_dwRpcStructureVersion,
12037 : .set = py_DNS_RPC_DP_INFO_set_dwRpcStructureVersion,
12038 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12039 : },
12040 : {
12041 : .name = discard_const_p(char, "dwReserved0"),
12042 : .get = py_DNS_RPC_DP_INFO_get_dwReserved0,
12043 : .set = py_DNS_RPC_DP_INFO_set_dwReserved0,
12044 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12045 : },
12046 : {
12047 : .name = discard_const_p(char, "pszDpFqdn"),
12048 : .get = py_DNS_RPC_DP_INFO_get_pszDpFqdn,
12049 : .set = py_DNS_RPC_DP_INFO_set_pszDpFqdn,
12050 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
12051 : },
12052 : {
12053 : .name = discard_const_p(char, "pszDpDn"),
12054 : .get = py_DNS_RPC_DP_INFO_get_pszDpDn,
12055 : .set = py_DNS_RPC_DP_INFO_set_pszDpDn,
12056 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
12057 : },
12058 : {
12059 : .name = discard_const_p(char, "pszCrDn"),
12060 : .get = py_DNS_RPC_DP_INFO_get_pszCrDn,
12061 : .set = py_DNS_RPC_DP_INFO_set_pszCrDn,
12062 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
12063 : },
12064 : {
12065 : .name = discard_const_p(char, "dwFlags"),
12066 : .get = py_DNS_RPC_DP_INFO_get_dwFlags,
12067 : .set = py_DNS_RPC_DP_INFO_set_dwFlags,
12068 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12069 : },
12070 : {
12071 : .name = discard_const_p(char, "dwZoneCount"),
12072 : .get = py_DNS_RPC_DP_INFO_get_dwZoneCount,
12073 : .set = py_DNS_RPC_DP_INFO_set_dwZoneCount,
12074 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12075 : },
12076 : {
12077 : .name = discard_const_p(char, "dwState"),
12078 : .get = py_DNS_RPC_DP_INFO_get_dwState,
12079 : .set = py_DNS_RPC_DP_INFO_set_dwState,
12080 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_DP_STATE")
12081 : },
12082 : {
12083 : .name = discard_const_p(char, "dwReserved"),
12084 : .get = py_DNS_RPC_DP_INFO_get_dwReserved,
12085 : .set = py_DNS_RPC_DP_INFO_set_dwReserved,
12086 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12087 : },
12088 : {
12089 : .name = discard_const_p(char, "pwszReserved"),
12090 : .get = py_DNS_RPC_DP_INFO_get_pwszReserved,
12091 : .set = py_DNS_RPC_DP_INFO_set_pwszReserved,
12092 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_EXTENSION")
12093 : },
12094 : {
12095 : .name = discard_const_p(char, "dwReplicaCount"),
12096 : .get = py_DNS_RPC_DP_INFO_get_dwReplicaCount,
12097 : .set = py_DNS_RPC_DP_INFO_set_dwReplicaCount,
12098 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12099 : },
12100 : {
12101 : .name = discard_const_p(char, "ReplicaArray"),
12102 : .get = py_DNS_RPC_DP_INFO_get_ReplicaArray,
12103 : .set = py_DNS_RPC_DP_INFO_set_ReplicaArray,
12104 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_DP_REPLICA")
12105 : },
12106 : { .name = NULL }
12107 : };
12108 :
12109 0 : static PyObject *py_DNS_RPC_DP_INFO_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12110 : {
12111 0 : return pytalloc_new(struct DNS_RPC_DP_INFO, type);
12112 : }
12113 :
12114 :
12115 : static PyTypeObject DNS_RPC_DP_INFO_Type = {
12116 : PyVarObject_HEAD_INIT(NULL, 0)
12117 : .tp_name = "dnsserver.DNS_RPC_DP_INFO",
12118 : .tp_getset = py_DNS_RPC_DP_INFO_getsetters,
12119 : .tp_methods = NULL,
12120 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12121 : .tp_new = py_DNS_RPC_DP_INFO_new,
12122 : };
12123 :
12124 :
12125 0 : static PyObject *py_DNS_RPC_DP_ENUM_get_dwRpcStructureVersion(PyObject *obj, void *closure)
12126 : {
12127 0 : struct DNS_RPC_DP_ENUM *object = pytalloc_get_ptr(obj);
12128 0 : PyObject *py_dwRpcStructureVersion;
12129 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
12130 0 : return py_dwRpcStructureVersion;
12131 : }
12132 :
12133 0 : static int py_DNS_RPC_DP_ENUM_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
12134 : {
12135 0 : struct DNS_RPC_DP_ENUM *object = pytalloc_get_ptr(py_obj);
12136 0 : if (value == NULL) {
12137 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
12138 0 : return -1;
12139 : }
12140 : {
12141 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
12142 0 : if (PyLong_Check(value)) {
12143 0 : unsigned long long test_var;
12144 0 : test_var = PyLong_AsUnsignedLongLong(value);
12145 0 : if (PyErr_Occurred() != NULL) {
12146 0 : return -1;
12147 : }
12148 0 : if (test_var > uint_max) {
12149 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12150 : PyLong_Type.tp_name, uint_max, test_var);
12151 0 : return -1;
12152 : }
12153 0 : object->dwRpcStructureVersion = test_var;
12154 : } else {
12155 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12156 : PyLong_Type.tp_name);
12157 0 : return -1;
12158 : }
12159 : }
12160 0 : return 0;
12161 : }
12162 :
12163 0 : static PyObject *py_DNS_RPC_DP_ENUM_get_dwReserved0(PyObject *obj, void *closure)
12164 : {
12165 0 : struct DNS_RPC_DP_ENUM *object = pytalloc_get_ptr(obj);
12166 0 : PyObject *py_dwReserved0;
12167 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
12168 0 : return py_dwReserved0;
12169 : }
12170 :
12171 0 : static int py_DNS_RPC_DP_ENUM_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
12172 : {
12173 0 : struct DNS_RPC_DP_ENUM *object = pytalloc_get_ptr(py_obj);
12174 0 : if (value == NULL) {
12175 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
12176 0 : return -1;
12177 : }
12178 : {
12179 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
12180 0 : if (PyLong_Check(value)) {
12181 0 : unsigned long long test_var;
12182 0 : test_var = PyLong_AsUnsignedLongLong(value);
12183 0 : if (PyErr_Occurred() != NULL) {
12184 0 : return -1;
12185 : }
12186 0 : if (test_var > uint_max) {
12187 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12188 : PyLong_Type.tp_name, uint_max, test_var);
12189 0 : return -1;
12190 : }
12191 0 : object->dwReserved0 = test_var;
12192 : } else {
12193 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12194 : PyLong_Type.tp_name);
12195 0 : return -1;
12196 : }
12197 : }
12198 0 : return 0;
12199 : }
12200 :
12201 0 : static PyObject *py_DNS_RPC_DP_ENUM_get_pszDpFqdn(PyObject *obj, void *closure)
12202 : {
12203 0 : struct DNS_RPC_DP_ENUM *object = pytalloc_get_ptr(obj);
12204 0 : PyObject *py_pszDpFqdn;
12205 0 : if (object->pszDpFqdn == NULL) {
12206 0 : Py_RETURN_NONE;
12207 : }
12208 0 : if (object->pszDpFqdn == NULL) {
12209 0 : py_pszDpFqdn = Py_None;
12210 0 : Py_INCREF(py_pszDpFqdn);
12211 : } else {
12212 0 : if (object->pszDpFqdn == NULL) {
12213 0 : py_pszDpFqdn = Py_None;
12214 0 : Py_INCREF(py_pszDpFqdn);
12215 : } else {
12216 0 : py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
12217 : }
12218 : }
12219 0 : return py_pszDpFqdn;
12220 : }
12221 :
12222 0 : static int py_DNS_RPC_DP_ENUM_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
12223 : {
12224 0 : struct DNS_RPC_DP_ENUM *object = pytalloc_get_ptr(py_obj);
12225 0 : if (value == NULL) {
12226 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDpFqdn");
12227 0 : return -1;
12228 : }
12229 0 : if (value == Py_None) {
12230 0 : object->pszDpFqdn = NULL;
12231 : } else {
12232 0 : object->pszDpFqdn = NULL;
12233 : {
12234 0 : const char *test_str;
12235 0 : const char *talloc_str;
12236 0 : PyObject *unicode = NULL;
12237 0 : if (PyUnicode_Check(value)) {
12238 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
12239 0 : if (unicode == NULL) {
12240 0 : return -1;
12241 : }
12242 0 : test_str = PyBytes_AS_STRING(unicode);
12243 0 : } else if (PyBytes_Check(value)) {
12244 0 : test_str = PyBytes_AS_STRING(value);
12245 : } else {
12246 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
12247 0 : return -1;
12248 : }
12249 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
12250 0 : if (unicode != NULL) {
12251 0 : Py_DECREF(unicode);
12252 : }
12253 0 : if (talloc_str == NULL) {
12254 0 : PyErr_NoMemory();
12255 0 : return -1;
12256 : }
12257 0 : object->pszDpFqdn = talloc_str;
12258 : }
12259 : }
12260 0 : return 0;
12261 : }
12262 :
12263 0 : static PyObject *py_DNS_RPC_DP_ENUM_get_dwFlags(PyObject *obj, void *closure)
12264 : {
12265 0 : struct DNS_RPC_DP_ENUM *object = pytalloc_get_ptr(obj);
12266 0 : PyObject *py_dwFlags;
12267 0 : py_dwFlags = PyLong_FromUnsignedLongLong((uint32_t)(object->dwFlags));
12268 0 : return py_dwFlags;
12269 : }
12270 :
12271 0 : static int py_DNS_RPC_DP_ENUM_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
12272 : {
12273 0 : struct DNS_RPC_DP_ENUM *object = pytalloc_get_ptr(py_obj);
12274 0 : if (value == NULL) {
12275 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwFlags");
12276 0 : return -1;
12277 : }
12278 : {
12279 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwFlags));
12280 0 : if (PyLong_Check(value)) {
12281 0 : unsigned long long test_var;
12282 0 : test_var = PyLong_AsUnsignedLongLong(value);
12283 0 : if (PyErr_Occurred() != NULL) {
12284 0 : return -1;
12285 : }
12286 0 : if (test_var > uint_max) {
12287 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12288 : PyLong_Type.tp_name, uint_max, test_var);
12289 0 : return -1;
12290 : }
12291 0 : object->dwFlags = test_var;
12292 : } else {
12293 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12294 : PyLong_Type.tp_name);
12295 0 : return -1;
12296 : }
12297 : }
12298 0 : return 0;
12299 : }
12300 :
12301 0 : static PyObject *py_DNS_RPC_DP_ENUM_get_dwZoneCount(PyObject *obj, void *closure)
12302 : {
12303 0 : struct DNS_RPC_DP_ENUM *object = pytalloc_get_ptr(obj);
12304 0 : PyObject *py_dwZoneCount;
12305 0 : py_dwZoneCount = PyLong_FromUnsignedLongLong((uint32_t)(object->dwZoneCount));
12306 0 : return py_dwZoneCount;
12307 : }
12308 :
12309 0 : static int py_DNS_RPC_DP_ENUM_set_dwZoneCount(PyObject *py_obj, PyObject *value, void *closure)
12310 : {
12311 0 : struct DNS_RPC_DP_ENUM *object = pytalloc_get_ptr(py_obj);
12312 0 : if (value == NULL) {
12313 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwZoneCount");
12314 0 : return -1;
12315 : }
12316 : {
12317 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwZoneCount));
12318 0 : if (PyLong_Check(value)) {
12319 0 : unsigned long long test_var;
12320 0 : test_var = PyLong_AsUnsignedLongLong(value);
12321 0 : if (PyErr_Occurred() != NULL) {
12322 0 : return -1;
12323 : }
12324 0 : if (test_var > uint_max) {
12325 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12326 : PyLong_Type.tp_name, uint_max, test_var);
12327 0 : return -1;
12328 : }
12329 0 : object->dwZoneCount = test_var;
12330 : } else {
12331 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12332 : PyLong_Type.tp_name);
12333 0 : return -1;
12334 : }
12335 : }
12336 0 : return 0;
12337 : }
12338 :
12339 : static PyGetSetDef py_DNS_RPC_DP_ENUM_getsetters[] = {
12340 : {
12341 : .name = discard_const_p(char, "dwRpcStructureVersion"),
12342 : .get = py_DNS_RPC_DP_ENUM_get_dwRpcStructureVersion,
12343 : .set = py_DNS_RPC_DP_ENUM_set_dwRpcStructureVersion,
12344 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12345 : },
12346 : {
12347 : .name = discard_const_p(char, "dwReserved0"),
12348 : .get = py_DNS_RPC_DP_ENUM_get_dwReserved0,
12349 : .set = py_DNS_RPC_DP_ENUM_set_dwReserved0,
12350 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12351 : },
12352 : {
12353 : .name = discard_const_p(char, "pszDpFqdn"),
12354 : .get = py_DNS_RPC_DP_ENUM_get_pszDpFqdn,
12355 : .set = py_DNS_RPC_DP_ENUM_set_pszDpFqdn,
12356 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
12357 : },
12358 : {
12359 : .name = discard_const_p(char, "dwFlags"),
12360 : .get = py_DNS_RPC_DP_ENUM_get_dwFlags,
12361 : .set = py_DNS_RPC_DP_ENUM_set_dwFlags,
12362 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12363 : },
12364 : {
12365 : .name = discard_const_p(char, "dwZoneCount"),
12366 : .get = py_DNS_RPC_DP_ENUM_get_dwZoneCount,
12367 : .set = py_DNS_RPC_DP_ENUM_set_dwZoneCount,
12368 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12369 : },
12370 : { .name = NULL }
12371 : };
12372 :
12373 0 : static PyObject *py_DNS_RPC_DP_ENUM_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12374 : {
12375 0 : return pytalloc_new(struct DNS_RPC_DP_ENUM, type);
12376 : }
12377 :
12378 :
12379 : static PyTypeObject DNS_RPC_DP_ENUM_Type = {
12380 : PyVarObject_HEAD_INIT(NULL, 0)
12381 : .tp_name = "dnsserver.DNS_RPC_DP_ENUM",
12382 : .tp_getset = py_DNS_RPC_DP_ENUM_getsetters,
12383 : .tp_methods = NULL,
12384 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12385 : .tp_new = py_DNS_RPC_DP_ENUM_new,
12386 : };
12387 :
12388 :
12389 0 : static PyObject *py_DNS_RPC_DP_LIST_get_dwRpcStructureVersion(PyObject *obj, void *closure)
12390 : {
12391 0 : struct DNS_RPC_DP_LIST *object = pytalloc_get_ptr(obj);
12392 0 : PyObject *py_dwRpcStructureVersion;
12393 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
12394 0 : return py_dwRpcStructureVersion;
12395 : }
12396 :
12397 0 : static int py_DNS_RPC_DP_LIST_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
12398 : {
12399 0 : struct DNS_RPC_DP_LIST *object = pytalloc_get_ptr(py_obj);
12400 0 : if (value == NULL) {
12401 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
12402 0 : return -1;
12403 : }
12404 : {
12405 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
12406 0 : if (PyLong_Check(value)) {
12407 0 : unsigned long long test_var;
12408 0 : test_var = PyLong_AsUnsignedLongLong(value);
12409 0 : if (PyErr_Occurred() != NULL) {
12410 0 : return -1;
12411 : }
12412 0 : if (test_var > uint_max) {
12413 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12414 : PyLong_Type.tp_name, uint_max, test_var);
12415 0 : return -1;
12416 : }
12417 0 : object->dwRpcStructureVersion = test_var;
12418 : } else {
12419 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12420 : PyLong_Type.tp_name);
12421 0 : return -1;
12422 : }
12423 : }
12424 0 : return 0;
12425 : }
12426 :
12427 0 : static PyObject *py_DNS_RPC_DP_LIST_get_dwReserved0(PyObject *obj, void *closure)
12428 : {
12429 0 : struct DNS_RPC_DP_LIST *object = pytalloc_get_ptr(obj);
12430 0 : PyObject *py_dwReserved0;
12431 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
12432 0 : return py_dwReserved0;
12433 : }
12434 :
12435 0 : static int py_DNS_RPC_DP_LIST_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
12436 : {
12437 0 : struct DNS_RPC_DP_LIST *object = pytalloc_get_ptr(py_obj);
12438 0 : if (value == NULL) {
12439 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
12440 0 : return -1;
12441 : }
12442 : {
12443 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
12444 0 : if (PyLong_Check(value)) {
12445 0 : unsigned long long test_var;
12446 0 : test_var = PyLong_AsUnsignedLongLong(value);
12447 0 : if (PyErr_Occurred() != NULL) {
12448 0 : return -1;
12449 : }
12450 0 : if (test_var > uint_max) {
12451 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12452 : PyLong_Type.tp_name, uint_max, test_var);
12453 0 : return -1;
12454 : }
12455 0 : object->dwReserved0 = test_var;
12456 : } else {
12457 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12458 : PyLong_Type.tp_name);
12459 0 : return -1;
12460 : }
12461 : }
12462 0 : return 0;
12463 : }
12464 :
12465 0 : static PyObject *py_DNS_RPC_DP_LIST_get_dwDpCount(PyObject *obj, void *closure)
12466 : {
12467 0 : struct DNS_RPC_DP_LIST *object = pytalloc_get_ptr(obj);
12468 0 : PyObject *py_dwDpCount;
12469 0 : py_dwDpCount = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDpCount));
12470 0 : return py_dwDpCount;
12471 : }
12472 :
12473 0 : static int py_DNS_RPC_DP_LIST_set_dwDpCount(PyObject *py_obj, PyObject *value, void *closure)
12474 : {
12475 0 : struct DNS_RPC_DP_LIST *object = pytalloc_get_ptr(py_obj);
12476 0 : if (value == NULL) {
12477 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDpCount");
12478 0 : return -1;
12479 : }
12480 : {
12481 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDpCount));
12482 0 : if (PyLong_Check(value)) {
12483 0 : unsigned long long test_var;
12484 0 : test_var = PyLong_AsUnsignedLongLong(value);
12485 0 : if (PyErr_Occurred() != NULL) {
12486 0 : return -1;
12487 : }
12488 0 : if (test_var > uint_max) {
12489 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12490 : PyLong_Type.tp_name, uint_max, test_var);
12491 0 : return -1;
12492 : }
12493 0 : object->dwDpCount = test_var;
12494 : } else {
12495 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12496 : PyLong_Type.tp_name);
12497 0 : return -1;
12498 : }
12499 : }
12500 0 : return 0;
12501 : }
12502 :
12503 0 : static PyObject *py_DNS_RPC_DP_LIST_get_DpArray(PyObject *obj, void *closure)
12504 : {
12505 0 : struct DNS_RPC_DP_LIST *object = pytalloc_get_ptr(obj);
12506 0 : PyObject *py_DpArray;
12507 0 : py_DpArray = PyList_New(object->dwDpCount);
12508 0 : if (py_DpArray == NULL) {
12509 0 : return NULL;
12510 : }
12511 : {
12512 : int DpArray_cntr_0;
12513 0 : for (DpArray_cntr_0 = 0; DpArray_cntr_0 < (object->dwDpCount); DpArray_cntr_0++) {
12514 0 : PyObject *py_DpArray_0;
12515 0 : if ((object->DpArray)[DpArray_cntr_0] == NULL) {
12516 0 : py_DpArray_0 = Py_None;
12517 0 : Py_INCREF(py_DpArray_0);
12518 : } else {
12519 0 : py_DpArray_0 = pytalloc_reference_ex(&DNS_RPC_DP_ENUM_Type, (object->DpArray)[DpArray_cntr_0], (object->DpArray)[DpArray_cntr_0]);
12520 : }
12521 0 : PyList_SetItem(py_DpArray, DpArray_cntr_0, py_DpArray_0);
12522 : }
12523 : }
12524 0 : return py_DpArray;
12525 : }
12526 :
12527 0 : static int py_DNS_RPC_DP_LIST_set_DpArray(PyObject *py_obj, PyObject *value, void *closure)
12528 : {
12529 0 : struct DNS_RPC_DP_LIST *object = pytalloc_get_ptr(py_obj);
12530 0 : if (value == NULL) {
12531 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->DpArray");
12532 0 : return -1;
12533 : }
12534 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
12535 : {
12536 0 : int DpArray_cntr_0;
12537 0 : object->DpArray = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->DpArray, PyList_GET_SIZE(value));
12538 0 : if (!object->DpArray) { return -1; }
12539 0 : talloc_set_name_const(object->DpArray, "ARRAY: object->DpArray");
12540 0 : for (DpArray_cntr_0 = 0; DpArray_cntr_0 < PyList_GET_SIZE(value); DpArray_cntr_0++) {
12541 0 : if (PyList_GET_ITEM(value, DpArray_cntr_0) == NULL) {
12542 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->DpArray)[DpArray_cntr_0]");
12543 0 : return -1;
12544 : }
12545 0 : if (PyList_GET_ITEM(value, DpArray_cntr_0) == Py_None) {
12546 0 : (object->DpArray)[DpArray_cntr_0] = NULL;
12547 : } else {
12548 0 : (object->DpArray)[DpArray_cntr_0] = NULL;
12549 0 : PY_CHECK_TYPE(&DNS_RPC_DP_ENUM_Type, PyList_GET_ITEM(value, DpArray_cntr_0), return -1;);
12550 0 : if (talloc_reference(object->DpArray, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, DpArray_cntr_0))) == NULL) {
12551 0 : PyErr_NoMemory();
12552 0 : return -1;
12553 : }
12554 0 : (object->DpArray)[DpArray_cntr_0] = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(PyList_GET_ITEM(value, DpArray_cntr_0));
12555 : }
12556 : }
12557 : }
12558 0 : return 0;
12559 : }
12560 :
12561 : static PyGetSetDef py_DNS_RPC_DP_LIST_getsetters[] = {
12562 : {
12563 : .name = discard_const_p(char, "dwRpcStructureVersion"),
12564 : .get = py_DNS_RPC_DP_LIST_get_dwRpcStructureVersion,
12565 : .set = py_DNS_RPC_DP_LIST_set_dwRpcStructureVersion,
12566 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12567 : },
12568 : {
12569 : .name = discard_const_p(char, "dwReserved0"),
12570 : .get = py_DNS_RPC_DP_LIST_get_dwReserved0,
12571 : .set = py_DNS_RPC_DP_LIST_set_dwReserved0,
12572 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12573 : },
12574 : {
12575 : .name = discard_const_p(char, "dwDpCount"),
12576 : .get = py_DNS_RPC_DP_LIST_get_dwDpCount,
12577 : .set = py_DNS_RPC_DP_LIST_set_dwDpCount,
12578 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12579 : },
12580 : {
12581 : .name = discard_const_p(char, "DpArray"),
12582 : .get = py_DNS_RPC_DP_LIST_get_DpArray,
12583 : .set = py_DNS_RPC_DP_LIST_set_DpArray,
12584 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_DP_ENUM")
12585 : },
12586 : { .name = NULL }
12587 : };
12588 :
12589 0 : static PyObject *py_DNS_RPC_DP_LIST_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12590 : {
12591 0 : return pytalloc_new(struct DNS_RPC_DP_LIST, type);
12592 : }
12593 :
12594 :
12595 : static PyTypeObject DNS_RPC_DP_LIST_Type = {
12596 : PyVarObject_HEAD_INIT(NULL, 0)
12597 : .tp_name = "dnsserver.DNS_RPC_DP_LIST",
12598 : .tp_getset = py_DNS_RPC_DP_LIST_getsetters,
12599 : .tp_methods = NULL,
12600 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12601 : .tp_new = py_DNS_RPC_DP_LIST_new,
12602 : };
12603 :
12604 :
12605 0 : static PyObject *py_DNS_RPC_ENLIST_DP_get_dwRpcStructureVersion(PyObject *obj, void *closure)
12606 : {
12607 0 : struct DNS_RPC_ENLIST_DP *object = pytalloc_get_ptr(obj);
12608 0 : PyObject *py_dwRpcStructureVersion;
12609 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
12610 0 : return py_dwRpcStructureVersion;
12611 : }
12612 :
12613 0 : static int py_DNS_RPC_ENLIST_DP_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
12614 : {
12615 0 : struct DNS_RPC_ENLIST_DP *object = pytalloc_get_ptr(py_obj);
12616 0 : if (value == NULL) {
12617 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
12618 0 : return -1;
12619 : }
12620 : {
12621 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
12622 0 : if (PyLong_Check(value)) {
12623 0 : unsigned long long test_var;
12624 0 : test_var = PyLong_AsUnsignedLongLong(value);
12625 0 : if (PyErr_Occurred() != NULL) {
12626 0 : return -1;
12627 : }
12628 0 : if (test_var > uint_max) {
12629 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12630 : PyLong_Type.tp_name, uint_max, test_var);
12631 0 : return -1;
12632 : }
12633 0 : object->dwRpcStructureVersion = test_var;
12634 : } else {
12635 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12636 : PyLong_Type.tp_name);
12637 0 : return -1;
12638 : }
12639 : }
12640 0 : return 0;
12641 : }
12642 :
12643 0 : static PyObject *py_DNS_RPC_ENLIST_DP_get_dwReserved0(PyObject *obj, void *closure)
12644 : {
12645 0 : struct DNS_RPC_ENLIST_DP *object = pytalloc_get_ptr(obj);
12646 0 : PyObject *py_dwReserved0;
12647 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
12648 0 : return py_dwReserved0;
12649 : }
12650 :
12651 0 : static int py_DNS_RPC_ENLIST_DP_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
12652 : {
12653 0 : struct DNS_RPC_ENLIST_DP *object = pytalloc_get_ptr(py_obj);
12654 0 : if (value == NULL) {
12655 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
12656 0 : return -1;
12657 : }
12658 : {
12659 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
12660 0 : if (PyLong_Check(value)) {
12661 0 : unsigned long long test_var;
12662 0 : test_var = PyLong_AsUnsignedLongLong(value);
12663 0 : if (PyErr_Occurred() != NULL) {
12664 0 : return -1;
12665 : }
12666 0 : if (test_var > uint_max) {
12667 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12668 : PyLong_Type.tp_name, uint_max, test_var);
12669 0 : return -1;
12670 : }
12671 0 : object->dwReserved0 = test_var;
12672 : } else {
12673 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12674 : PyLong_Type.tp_name);
12675 0 : return -1;
12676 : }
12677 : }
12678 0 : return 0;
12679 : }
12680 :
12681 0 : static PyObject *py_DNS_RPC_ENLIST_DP_get_pszDpFqdn(PyObject *obj, void *closure)
12682 : {
12683 0 : struct DNS_RPC_ENLIST_DP *object = pytalloc_get_ptr(obj);
12684 0 : PyObject *py_pszDpFqdn;
12685 0 : if (object->pszDpFqdn == NULL) {
12686 0 : Py_RETURN_NONE;
12687 : }
12688 0 : if (object->pszDpFqdn == NULL) {
12689 0 : py_pszDpFqdn = Py_None;
12690 0 : Py_INCREF(py_pszDpFqdn);
12691 : } else {
12692 0 : if (object->pszDpFqdn == NULL) {
12693 0 : py_pszDpFqdn = Py_None;
12694 0 : Py_INCREF(py_pszDpFqdn);
12695 : } else {
12696 0 : py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
12697 : }
12698 : }
12699 0 : return py_pszDpFqdn;
12700 : }
12701 :
12702 0 : static int py_DNS_RPC_ENLIST_DP_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
12703 : {
12704 0 : struct DNS_RPC_ENLIST_DP *object = pytalloc_get_ptr(py_obj);
12705 0 : if (value == NULL) {
12706 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDpFqdn");
12707 0 : return -1;
12708 : }
12709 0 : if (value == Py_None) {
12710 0 : object->pszDpFqdn = NULL;
12711 : } else {
12712 0 : object->pszDpFqdn = NULL;
12713 : {
12714 0 : const char *test_str;
12715 0 : const char *talloc_str;
12716 0 : PyObject *unicode = NULL;
12717 0 : if (PyUnicode_Check(value)) {
12718 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
12719 0 : if (unicode == NULL) {
12720 0 : return -1;
12721 : }
12722 0 : test_str = PyBytes_AS_STRING(unicode);
12723 0 : } else if (PyBytes_Check(value)) {
12724 0 : test_str = PyBytes_AS_STRING(value);
12725 : } else {
12726 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
12727 0 : return -1;
12728 : }
12729 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
12730 0 : if (unicode != NULL) {
12731 0 : Py_DECREF(unicode);
12732 : }
12733 0 : if (talloc_str == NULL) {
12734 0 : PyErr_NoMemory();
12735 0 : return -1;
12736 : }
12737 0 : object->pszDpFqdn = talloc_str;
12738 : }
12739 : }
12740 0 : return 0;
12741 : }
12742 :
12743 0 : static PyObject *py_DNS_RPC_ENLIST_DP_get_dwOperation(PyObject *obj, void *closure)
12744 : {
12745 0 : struct DNS_RPC_ENLIST_DP *object = pytalloc_get_ptr(obj);
12746 0 : PyObject *py_dwOperation;
12747 0 : py_dwOperation = PyLong_FromUnsignedLongLong((uint32_t)(object->dwOperation));
12748 0 : return py_dwOperation;
12749 : }
12750 :
12751 0 : static int py_DNS_RPC_ENLIST_DP_set_dwOperation(PyObject *py_obj, PyObject *value, void *closure)
12752 : {
12753 0 : struct DNS_RPC_ENLIST_DP *object = pytalloc_get_ptr(py_obj);
12754 0 : if (value == NULL) {
12755 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwOperation");
12756 0 : return -1;
12757 : }
12758 : {
12759 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwOperation));
12760 0 : if (PyLong_Check(value)) {
12761 0 : unsigned long long test_var;
12762 0 : test_var = PyLong_AsUnsignedLongLong(value);
12763 0 : if (PyErr_Occurred() != NULL) {
12764 0 : return -1;
12765 : }
12766 0 : if (test_var > uint_max) {
12767 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12768 : PyLong_Type.tp_name, uint_max, test_var);
12769 0 : return -1;
12770 : }
12771 0 : object->dwOperation = test_var;
12772 : } else {
12773 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12774 : PyLong_Type.tp_name);
12775 0 : return -1;
12776 : }
12777 : }
12778 0 : return 0;
12779 : }
12780 :
12781 : static PyGetSetDef py_DNS_RPC_ENLIST_DP_getsetters[] = {
12782 : {
12783 : .name = discard_const_p(char, "dwRpcStructureVersion"),
12784 : .get = py_DNS_RPC_ENLIST_DP_get_dwRpcStructureVersion,
12785 : .set = py_DNS_RPC_ENLIST_DP_set_dwRpcStructureVersion,
12786 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12787 : },
12788 : {
12789 : .name = discard_const_p(char, "dwReserved0"),
12790 : .get = py_DNS_RPC_ENLIST_DP_get_dwReserved0,
12791 : .set = py_DNS_RPC_ENLIST_DP_set_dwReserved0,
12792 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12793 : },
12794 : {
12795 : .name = discard_const_p(char, "pszDpFqdn"),
12796 : .get = py_DNS_RPC_ENLIST_DP_get_pszDpFqdn,
12797 : .set = py_DNS_RPC_ENLIST_DP_set_pszDpFqdn,
12798 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
12799 : },
12800 : {
12801 : .name = discard_const_p(char, "dwOperation"),
12802 : .get = py_DNS_RPC_ENLIST_DP_get_dwOperation,
12803 : .set = py_DNS_RPC_ENLIST_DP_set_dwOperation,
12804 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12805 : },
12806 : { .name = NULL }
12807 : };
12808 :
12809 0 : static PyObject *py_DNS_RPC_ENLIST_DP_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12810 : {
12811 0 : return pytalloc_new(struct DNS_RPC_ENLIST_DP, type);
12812 : }
12813 :
12814 :
12815 : static PyTypeObject DNS_RPC_ENLIST_DP_Type = {
12816 : PyVarObject_HEAD_INIT(NULL, 0)
12817 : .tp_name = "dnsserver.DNS_RPC_ENLIST_DP",
12818 : .tp_getset = py_DNS_RPC_ENLIST_DP_getsetters,
12819 : .tp_methods = NULL,
12820 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12821 : .tp_new = py_DNS_RPC_ENLIST_DP_new,
12822 : };
12823 :
12824 :
12825 0 : static PyObject *py_DNS_RPC_ZONE_CHANGE_DP_get_dwRpcStructureVersion(PyObject *obj, void *closure)
12826 : {
12827 0 : struct DNS_RPC_ZONE_CHANGE_DP *object = pytalloc_get_ptr(obj);
12828 0 : PyObject *py_dwRpcStructureVersion;
12829 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
12830 0 : return py_dwRpcStructureVersion;
12831 : }
12832 :
12833 0 : static int py_DNS_RPC_ZONE_CHANGE_DP_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
12834 : {
12835 0 : struct DNS_RPC_ZONE_CHANGE_DP *object = pytalloc_get_ptr(py_obj);
12836 0 : if (value == NULL) {
12837 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
12838 0 : return -1;
12839 : }
12840 : {
12841 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
12842 0 : if (PyLong_Check(value)) {
12843 0 : unsigned long long test_var;
12844 0 : test_var = PyLong_AsUnsignedLongLong(value);
12845 0 : if (PyErr_Occurred() != NULL) {
12846 0 : return -1;
12847 : }
12848 0 : if (test_var > uint_max) {
12849 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12850 : PyLong_Type.tp_name, uint_max, test_var);
12851 0 : return -1;
12852 : }
12853 0 : object->dwRpcStructureVersion = test_var;
12854 : } else {
12855 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12856 : PyLong_Type.tp_name);
12857 0 : return -1;
12858 : }
12859 : }
12860 0 : return 0;
12861 : }
12862 :
12863 0 : static PyObject *py_DNS_RPC_ZONE_CHANGE_DP_get_dwReserved0(PyObject *obj, void *closure)
12864 : {
12865 0 : struct DNS_RPC_ZONE_CHANGE_DP *object = pytalloc_get_ptr(obj);
12866 0 : PyObject *py_dwReserved0;
12867 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
12868 0 : return py_dwReserved0;
12869 : }
12870 :
12871 0 : static int py_DNS_RPC_ZONE_CHANGE_DP_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
12872 : {
12873 0 : struct DNS_RPC_ZONE_CHANGE_DP *object = pytalloc_get_ptr(py_obj);
12874 0 : if (value == NULL) {
12875 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
12876 0 : return -1;
12877 : }
12878 : {
12879 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
12880 0 : if (PyLong_Check(value)) {
12881 0 : unsigned long long test_var;
12882 0 : test_var = PyLong_AsUnsignedLongLong(value);
12883 0 : if (PyErr_Occurred() != NULL) {
12884 0 : return -1;
12885 : }
12886 0 : if (test_var > uint_max) {
12887 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12888 : PyLong_Type.tp_name, uint_max, test_var);
12889 0 : return -1;
12890 : }
12891 0 : object->dwReserved0 = test_var;
12892 : } else {
12893 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12894 : PyLong_Type.tp_name);
12895 0 : return -1;
12896 : }
12897 : }
12898 0 : return 0;
12899 : }
12900 :
12901 0 : static PyObject *py_DNS_RPC_ZONE_CHANGE_DP_get_pszDestPartition(PyObject *obj, void *closure)
12902 : {
12903 0 : struct DNS_RPC_ZONE_CHANGE_DP *object = pytalloc_get_ptr(obj);
12904 0 : PyObject *py_pszDestPartition;
12905 0 : if (object->pszDestPartition == NULL) {
12906 0 : Py_RETURN_NONE;
12907 : }
12908 0 : if (object->pszDestPartition == NULL) {
12909 0 : py_pszDestPartition = Py_None;
12910 0 : Py_INCREF(py_pszDestPartition);
12911 : } else {
12912 0 : if (object->pszDestPartition == NULL) {
12913 0 : py_pszDestPartition = Py_None;
12914 0 : Py_INCREF(py_pszDestPartition);
12915 : } else {
12916 0 : py_pszDestPartition = PyUnicode_Decode(object->pszDestPartition, strlen(object->pszDestPartition), "utf-8", "ignore");
12917 : }
12918 : }
12919 0 : return py_pszDestPartition;
12920 : }
12921 :
12922 0 : static int py_DNS_RPC_ZONE_CHANGE_DP_set_pszDestPartition(PyObject *py_obj, PyObject *value, void *closure)
12923 : {
12924 0 : struct DNS_RPC_ZONE_CHANGE_DP *object = pytalloc_get_ptr(py_obj);
12925 0 : if (value == NULL) {
12926 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDestPartition");
12927 0 : return -1;
12928 : }
12929 0 : if (value == Py_None) {
12930 0 : object->pszDestPartition = NULL;
12931 : } else {
12932 0 : object->pszDestPartition = NULL;
12933 : {
12934 0 : const char *test_str;
12935 0 : const char *talloc_str;
12936 0 : PyObject *unicode = NULL;
12937 0 : if (PyUnicode_Check(value)) {
12938 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
12939 0 : if (unicode == NULL) {
12940 0 : return -1;
12941 : }
12942 0 : test_str = PyBytes_AS_STRING(unicode);
12943 0 : } else if (PyBytes_Check(value)) {
12944 0 : test_str = PyBytes_AS_STRING(value);
12945 : } else {
12946 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
12947 0 : return -1;
12948 : }
12949 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
12950 0 : if (unicode != NULL) {
12951 0 : Py_DECREF(unicode);
12952 : }
12953 0 : if (talloc_str == NULL) {
12954 0 : PyErr_NoMemory();
12955 0 : return -1;
12956 : }
12957 0 : object->pszDestPartition = talloc_str;
12958 : }
12959 : }
12960 0 : return 0;
12961 : }
12962 :
12963 : static PyGetSetDef py_DNS_RPC_ZONE_CHANGE_DP_getsetters[] = {
12964 : {
12965 : .name = discard_const_p(char, "dwRpcStructureVersion"),
12966 : .get = py_DNS_RPC_ZONE_CHANGE_DP_get_dwRpcStructureVersion,
12967 : .set = py_DNS_RPC_ZONE_CHANGE_DP_set_dwRpcStructureVersion,
12968 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12969 : },
12970 : {
12971 : .name = discard_const_p(char, "dwReserved0"),
12972 : .get = py_DNS_RPC_ZONE_CHANGE_DP_get_dwReserved0,
12973 : .set = py_DNS_RPC_ZONE_CHANGE_DP_set_dwReserved0,
12974 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12975 : },
12976 : {
12977 : .name = discard_const_p(char, "pszDestPartition"),
12978 : .get = py_DNS_RPC_ZONE_CHANGE_DP_get_pszDestPartition,
12979 : .set = py_DNS_RPC_ZONE_CHANGE_DP_set_pszDestPartition,
12980 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
12981 : },
12982 : { .name = NULL }
12983 : };
12984 :
12985 0 : static PyObject *py_DNS_RPC_ZONE_CHANGE_DP_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12986 : {
12987 0 : return pytalloc_new(struct DNS_RPC_ZONE_CHANGE_DP, type);
12988 : }
12989 :
12990 :
12991 : static PyTypeObject DNS_RPC_ZONE_CHANGE_DP_Type = {
12992 : PyVarObject_HEAD_INIT(NULL, 0)
12993 : .tp_name = "dnsserver.DNS_RPC_ZONE_CHANGE_DP",
12994 : .tp_getset = py_DNS_RPC_ZONE_CHANGE_DP_getsetters,
12995 : .tp_methods = NULL,
12996 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12997 : .tp_new = py_DNS_RPC_ZONE_CHANGE_DP_new,
12998 : };
12999 :
13000 :
13001 0 : static PyObject *py_DNS_RPC_ZONE_W2K_get_pszZoneName(PyObject *obj, void *closure)
13002 : {
13003 0 : struct DNS_RPC_ZONE_W2K *object = pytalloc_get_ptr(obj);
13004 0 : PyObject *py_pszZoneName;
13005 0 : if (object->pszZoneName == NULL) {
13006 0 : Py_RETURN_NONE;
13007 : }
13008 0 : if (object->pszZoneName == NULL) {
13009 0 : py_pszZoneName = Py_None;
13010 0 : Py_INCREF(py_pszZoneName);
13011 : } else {
13012 0 : if (object->pszZoneName == NULL) {
13013 0 : py_pszZoneName = Py_None;
13014 0 : Py_INCREF(py_pszZoneName);
13015 : } else {
13016 0 : py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
13017 : }
13018 : }
13019 0 : return py_pszZoneName;
13020 : }
13021 :
13022 0 : static int py_DNS_RPC_ZONE_W2K_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
13023 : {
13024 0 : struct DNS_RPC_ZONE_W2K *object = pytalloc_get_ptr(py_obj);
13025 0 : if (value == NULL) {
13026 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszZoneName");
13027 0 : return -1;
13028 : }
13029 0 : if (value == Py_None) {
13030 0 : object->pszZoneName = NULL;
13031 : } else {
13032 0 : object->pszZoneName = NULL;
13033 : {
13034 0 : const char *test_str;
13035 0 : const char *talloc_str;
13036 0 : PyObject *unicode = NULL;
13037 0 : if (PyUnicode_Check(value)) {
13038 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
13039 0 : if (unicode == NULL) {
13040 0 : return -1;
13041 : }
13042 0 : test_str = PyBytes_AS_STRING(unicode);
13043 0 : } else if (PyBytes_Check(value)) {
13044 0 : test_str = PyBytes_AS_STRING(value);
13045 : } else {
13046 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
13047 0 : return -1;
13048 : }
13049 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
13050 0 : if (unicode != NULL) {
13051 0 : Py_DECREF(unicode);
13052 : }
13053 0 : if (talloc_str == NULL) {
13054 0 : PyErr_NoMemory();
13055 0 : return -1;
13056 : }
13057 0 : object->pszZoneName = talloc_str;
13058 : }
13059 : }
13060 0 : return 0;
13061 : }
13062 :
13063 0 : static PyObject *py_DNS_RPC_ZONE_W2K_get_Flags(PyObject *obj, void *closure)
13064 : {
13065 0 : struct DNS_RPC_ZONE_W2K *object = pytalloc_get_ptr(obj);
13066 0 : PyObject *py_Flags;
13067 0 : py_Flags = PyLong_FromUnsignedLongLong((uint32_t)(object->Flags));
13068 0 : return py_Flags;
13069 : }
13070 :
13071 0 : static int py_DNS_RPC_ZONE_W2K_set_Flags(PyObject *py_obj, PyObject *value, void *closure)
13072 : {
13073 0 : struct DNS_RPC_ZONE_W2K *object = pytalloc_get_ptr(py_obj);
13074 0 : if (value == NULL) {
13075 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->Flags");
13076 0 : return -1;
13077 : }
13078 : {
13079 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Flags));
13080 0 : if (PyLong_Check(value)) {
13081 0 : unsigned long long test_var;
13082 0 : test_var = PyLong_AsUnsignedLongLong(value);
13083 0 : if (PyErr_Occurred() != NULL) {
13084 0 : return -1;
13085 : }
13086 0 : if (test_var > uint_max) {
13087 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13088 : PyLong_Type.tp_name, uint_max, test_var);
13089 0 : return -1;
13090 : }
13091 0 : object->Flags = test_var;
13092 : } else {
13093 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13094 : PyLong_Type.tp_name);
13095 0 : return -1;
13096 : }
13097 : }
13098 0 : return 0;
13099 : }
13100 :
13101 0 : static PyObject *py_DNS_RPC_ZONE_W2K_get_ZoneType(PyObject *obj, void *closure)
13102 : {
13103 0 : struct DNS_RPC_ZONE_W2K *object = pytalloc_get_ptr(obj);
13104 0 : PyObject *py_ZoneType;
13105 0 : py_ZoneType = PyLong_FromLong((uint16_t)(object->ZoneType));
13106 0 : return py_ZoneType;
13107 : }
13108 :
13109 0 : static int py_DNS_RPC_ZONE_W2K_set_ZoneType(PyObject *py_obj, PyObject *value, void *closure)
13110 : {
13111 0 : struct DNS_RPC_ZONE_W2K *object = pytalloc_get_ptr(py_obj);
13112 0 : if (value == NULL) {
13113 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ZoneType");
13114 0 : return -1;
13115 : }
13116 : {
13117 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ZoneType));
13118 0 : if (PyLong_Check(value)) {
13119 0 : unsigned long long test_var;
13120 0 : test_var = PyLong_AsUnsignedLongLong(value);
13121 0 : if (PyErr_Occurred() != NULL) {
13122 0 : return -1;
13123 : }
13124 0 : if (test_var > uint_max) {
13125 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13126 : PyLong_Type.tp_name, uint_max, test_var);
13127 0 : return -1;
13128 : }
13129 0 : object->ZoneType = test_var;
13130 : } else {
13131 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13132 : PyLong_Type.tp_name);
13133 0 : return -1;
13134 : }
13135 : }
13136 0 : return 0;
13137 : }
13138 :
13139 0 : static PyObject *py_DNS_RPC_ZONE_W2K_get_Version(PyObject *obj, void *closure)
13140 : {
13141 0 : struct DNS_RPC_ZONE_W2K *object = pytalloc_get_ptr(obj);
13142 0 : PyObject *py_Version;
13143 0 : py_Version = PyLong_FromLong((uint16_t)(object->Version));
13144 0 : return py_Version;
13145 : }
13146 :
13147 0 : static int py_DNS_RPC_ZONE_W2K_set_Version(PyObject *py_obj, PyObject *value, void *closure)
13148 : {
13149 0 : struct DNS_RPC_ZONE_W2K *object = pytalloc_get_ptr(py_obj);
13150 0 : if (value == NULL) {
13151 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->Version");
13152 0 : return -1;
13153 : }
13154 : {
13155 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Version));
13156 0 : if (PyLong_Check(value)) {
13157 0 : unsigned long long test_var;
13158 0 : test_var = PyLong_AsUnsignedLongLong(value);
13159 0 : if (PyErr_Occurred() != NULL) {
13160 0 : return -1;
13161 : }
13162 0 : if (test_var > uint_max) {
13163 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13164 : PyLong_Type.tp_name, uint_max, test_var);
13165 0 : return -1;
13166 : }
13167 0 : object->Version = test_var;
13168 : } else {
13169 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13170 : PyLong_Type.tp_name);
13171 0 : return -1;
13172 : }
13173 : }
13174 0 : return 0;
13175 : }
13176 :
13177 : static PyGetSetDef py_DNS_RPC_ZONE_W2K_getsetters[] = {
13178 : {
13179 : .name = discard_const_p(char, "pszZoneName"),
13180 : .get = py_DNS_RPC_ZONE_W2K_get_pszZoneName,
13181 : .set = py_DNS_RPC_ZONE_W2K_set_pszZoneName,
13182 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
13183 : },
13184 : {
13185 : .name = discard_const_p(char, "Flags"),
13186 : .get = py_DNS_RPC_ZONE_W2K_get_Flags,
13187 : .set = py_DNS_RPC_ZONE_W2K_set_Flags,
13188 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_ZONE_FLAGS")
13189 : },
13190 : {
13191 : .name = discard_const_p(char, "ZoneType"),
13192 : .get = py_DNS_RPC_ZONE_W2K_get_ZoneType,
13193 : .set = py_DNS_RPC_ZONE_W2K_set_ZoneType,
13194 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
13195 : },
13196 : {
13197 : .name = discard_const_p(char, "Version"),
13198 : .get = py_DNS_RPC_ZONE_W2K_get_Version,
13199 : .set = py_DNS_RPC_ZONE_W2K_set_Version,
13200 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
13201 : },
13202 : { .name = NULL }
13203 : };
13204 :
13205 0 : static PyObject *py_DNS_RPC_ZONE_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
13206 : {
13207 0 : return pytalloc_new(struct DNS_RPC_ZONE_W2K, type);
13208 : }
13209 :
13210 :
13211 : static PyTypeObject DNS_RPC_ZONE_W2K_Type = {
13212 : PyVarObject_HEAD_INIT(NULL, 0)
13213 : .tp_name = "dnsserver.DNS_RPC_ZONE_W2K",
13214 : .tp_getset = py_DNS_RPC_ZONE_W2K_getsetters,
13215 : .tp_methods = NULL,
13216 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
13217 : .tp_new = py_DNS_RPC_ZONE_W2K_new,
13218 : };
13219 :
13220 :
13221 0 : static PyObject *py_DNS_RPC_ZONE_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
13222 : {
13223 0 : struct DNS_RPC_ZONE_DOTNET *object = pytalloc_get_ptr(obj);
13224 0 : PyObject *py_dwRpcStructureVersion;
13225 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
13226 0 : return py_dwRpcStructureVersion;
13227 : }
13228 :
13229 0 : static int py_DNS_RPC_ZONE_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
13230 : {
13231 0 : struct DNS_RPC_ZONE_DOTNET *object = pytalloc_get_ptr(py_obj);
13232 0 : if (value == NULL) {
13233 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
13234 0 : return -1;
13235 : }
13236 : {
13237 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
13238 0 : if (PyLong_Check(value)) {
13239 0 : unsigned long long test_var;
13240 0 : test_var = PyLong_AsUnsignedLongLong(value);
13241 0 : if (PyErr_Occurred() != NULL) {
13242 0 : return -1;
13243 : }
13244 0 : if (test_var > uint_max) {
13245 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13246 : PyLong_Type.tp_name, uint_max, test_var);
13247 0 : return -1;
13248 : }
13249 0 : object->dwRpcStructureVersion = test_var;
13250 : } else {
13251 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13252 : PyLong_Type.tp_name);
13253 0 : return -1;
13254 : }
13255 : }
13256 0 : return 0;
13257 : }
13258 :
13259 0 : static PyObject *py_DNS_RPC_ZONE_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
13260 : {
13261 0 : struct DNS_RPC_ZONE_DOTNET *object = pytalloc_get_ptr(obj);
13262 0 : PyObject *py_dwReserved0;
13263 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
13264 0 : return py_dwReserved0;
13265 : }
13266 :
13267 0 : static int py_DNS_RPC_ZONE_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
13268 : {
13269 0 : struct DNS_RPC_ZONE_DOTNET *object = pytalloc_get_ptr(py_obj);
13270 0 : if (value == NULL) {
13271 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
13272 0 : return -1;
13273 : }
13274 : {
13275 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
13276 0 : if (PyLong_Check(value)) {
13277 0 : unsigned long long test_var;
13278 0 : test_var = PyLong_AsUnsignedLongLong(value);
13279 0 : if (PyErr_Occurred() != NULL) {
13280 0 : return -1;
13281 : }
13282 0 : if (test_var > uint_max) {
13283 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13284 : PyLong_Type.tp_name, uint_max, test_var);
13285 0 : return -1;
13286 : }
13287 0 : object->dwReserved0 = test_var;
13288 : } else {
13289 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13290 : PyLong_Type.tp_name);
13291 0 : return -1;
13292 : }
13293 : }
13294 0 : return 0;
13295 : }
13296 :
13297 18 : static PyObject *py_DNS_RPC_ZONE_DOTNET_get_pszZoneName(PyObject *obj, void *closure)
13298 : {
13299 18 : struct DNS_RPC_ZONE_DOTNET *object = pytalloc_get_ptr(obj);
13300 0 : PyObject *py_pszZoneName;
13301 18 : if (object->pszZoneName == NULL) {
13302 0 : Py_RETURN_NONE;
13303 : }
13304 18 : if (object->pszZoneName == NULL) {
13305 0 : py_pszZoneName = Py_None;
13306 0 : Py_INCREF(py_pszZoneName);
13307 : } else {
13308 18 : if (object->pszZoneName == NULL) {
13309 0 : py_pszZoneName = Py_None;
13310 0 : Py_INCREF(py_pszZoneName);
13311 : } else {
13312 18 : py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
13313 : }
13314 : }
13315 18 : return py_pszZoneName;
13316 : }
13317 :
13318 0 : static int py_DNS_RPC_ZONE_DOTNET_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
13319 : {
13320 0 : struct DNS_RPC_ZONE_DOTNET *object = pytalloc_get_ptr(py_obj);
13321 0 : if (value == NULL) {
13322 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszZoneName");
13323 0 : return -1;
13324 : }
13325 0 : if (value == Py_None) {
13326 0 : object->pszZoneName = NULL;
13327 : } else {
13328 0 : object->pszZoneName = NULL;
13329 : {
13330 0 : const char *test_str;
13331 0 : const char *talloc_str;
13332 0 : PyObject *unicode = NULL;
13333 0 : if (PyUnicode_Check(value)) {
13334 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
13335 0 : if (unicode == NULL) {
13336 0 : return -1;
13337 : }
13338 0 : test_str = PyBytes_AS_STRING(unicode);
13339 0 : } else if (PyBytes_Check(value)) {
13340 0 : test_str = PyBytes_AS_STRING(value);
13341 : } else {
13342 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
13343 0 : return -1;
13344 : }
13345 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
13346 0 : if (unicode != NULL) {
13347 0 : Py_DECREF(unicode);
13348 : }
13349 0 : if (talloc_str == NULL) {
13350 0 : PyErr_NoMemory();
13351 0 : return -1;
13352 : }
13353 0 : object->pszZoneName = talloc_str;
13354 : }
13355 : }
13356 0 : return 0;
13357 : }
13358 :
13359 6 : static PyObject *py_DNS_RPC_ZONE_DOTNET_get_Flags(PyObject *obj, void *closure)
13360 : {
13361 6 : struct DNS_RPC_ZONE_DOTNET *object = pytalloc_get_ptr(obj);
13362 0 : PyObject *py_Flags;
13363 6 : py_Flags = PyLong_FromUnsignedLongLong((uint32_t)(object->Flags));
13364 6 : return py_Flags;
13365 : }
13366 :
13367 0 : static int py_DNS_RPC_ZONE_DOTNET_set_Flags(PyObject *py_obj, PyObject *value, void *closure)
13368 : {
13369 0 : struct DNS_RPC_ZONE_DOTNET *object = pytalloc_get_ptr(py_obj);
13370 0 : if (value == NULL) {
13371 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->Flags");
13372 0 : return -1;
13373 : }
13374 : {
13375 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Flags));
13376 0 : if (PyLong_Check(value)) {
13377 0 : unsigned long long test_var;
13378 0 : test_var = PyLong_AsUnsignedLongLong(value);
13379 0 : if (PyErr_Occurred() != NULL) {
13380 0 : return -1;
13381 : }
13382 0 : if (test_var > uint_max) {
13383 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13384 : PyLong_Type.tp_name, uint_max, test_var);
13385 0 : return -1;
13386 : }
13387 0 : object->Flags = test_var;
13388 : } else {
13389 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13390 : PyLong_Type.tp_name);
13391 0 : return -1;
13392 : }
13393 : }
13394 0 : return 0;
13395 : }
13396 :
13397 6 : static PyObject *py_DNS_RPC_ZONE_DOTNET_get_ZoneType(PyObject *obj, void *closure)
13398 : {
13399 6 : struct DNS_RPC_ZONE_DOTNET *object = pytalloc_get_ptr(obj);
13400 0 : PyObject *py_ZoneType;
13401 6 : py_ZoneType = PyLong_FromLong((uint16_t)(object->ZoneType));
13402 6 : return py_ZoneType;
13403 : }
13404 :
13405 0 : static int py_DNS_RPC_ZONE_DOTNET_set_ZoneType(PyObject *py_obj, PyObject *value, void *closure)
13406 : {
13407 0 : struct DNS_RPC_ZONE_DOTNET *object = pytalloc_get_ptr(py_obj);
13408 0 : if (value == NULL) {
13409 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ZoneType");
13410 0 : return -1;
13411 : }
13412 : {
13413 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ZoneType));
13414 0 : if (PyLong_Check(value)) {
13415 0 : unsigned long long test_var;
13416 0 : test_var = PyLong_AsUnsignedLongLong(value);
13417 0 : if (PyErr_Occurred() != NULL) {
13418 0 : return -1;
13419 : }
13420 0 : if (test_var > uint_max) {
13421 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13422 : PyLong_Type.tp_name, uint_max, test_var);
13423 0 : return -1;
13424 : }
13425 0 : object->ZoneType = test_var;
13426 : } else {
13427 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13428 : PyLong_Type.tp_name);
13429 0 : return -1;
13430 : }
13431 : }
13432 0 : return 0;
13433 : }
13434 :
13435 6 : static PyObject *py_DNS_RPC_ZONE_DOTNET_get_Version(PyObject *obj, void *closure)
13436 : {
13437 6 : struct DNS_RPC_ZONE_DOTNET *object = pytalloc_get_ptr(obj);
13438 0 : PyObject *py_Version;
13439 6 : py_Version = PyLong_FromLong((uint16_t)(object->Version));
13440 6 : return py_Version;
13441 : }
13442 :
13443 0 : static int py_DNS_RPC_ZONE_DOTNET_set_Version(PyObject *py_obj, PyObject *value, void *closure)
13444 : {
13445 0 : struct DNS_RPC_ZONE_DOTNET *object = pytalloc_get_ptr(py_obj);
13446 0 : if (value == NULL) {
13447 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->Version");
13448 0 : return -1;
13449 : }
13450 : {
13451 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Version));
13452 0 : if (PyLong_Check(value)) {
13453 0 : unsigned long long test_var;
13454 0 : test_var = PyLong_AsUnsignedLongLong(value);
13455 0 : if (PyErr_Occurred() != NULL) {
13456 0 : return -1;
13457 : }
13458 0 : if (test_var > uint_max) {
13459 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13460 : PyLong_Type.tp_name, uint_max, test_var);
13461 0 : return -1;
13462 : }
13463 0 : object->Version = test_var;
13464 : } else {
13465 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13466 : PyLong_Type.tp_name);
13467 0 : return -1;
13468 : }
13469 : }
13470 0 : return 0;
13471 : }
13472 :
13473 6 : static PyObject *py_DNS_RPC_ZONE_DOTNET_get_dwDpFlags(PyObject *obj, void *closure)
13474 : {
13475 6 : struct DNS_RPC_ZONE_DOTNET *object = pytalloc_get_ptr(obj);
13476 0 : PyObject *py_dwDpFlags;
13477 6 : py_dwDpFlags = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDpFlags));
13478 6 : return py_dwDpFlags;
13479 : }
13480 :
13481 0 : static int py_DNS_RPC_ZONE_DOTNET_set_dwDpFlags(PyObject *py_obj, PyObject *value, void *closure)
13482 : {
13483 0 : struct DNS_RPC_ZONE_DOTNET *object = pytalloc_get_ptr(py_obj);
13484 0 : if (value == NULL) {
13485 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDpFlags");
13486 0 : return -1;
13487 : }
13488 : {
13489 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDpFlags));
13490 0 : if (PyLong_Check(value)) {
13491 0 : unsigned long long test_var;
13492 0 : test_var = PyLong_AsUnsignedLongLong(value);
13493 0 : if (PyErr_Occurred() != NULL) {
13494 0 : return -1;
13495 : }
13496 0 : if (test_var > uint_max) {
13497 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13498 : PyLong_Type.tp_name, uint_max, test_var);
13499 0 : return -1;
13500 : }
13501 0 : object->dwDpFlags = test_var;
13502 : } else {
13503 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13504 : PyLong_Type.tp_name);
13505 0 : return -1;
13506 : }
13507 : }
13508 0 : return 0;
13509 : }
13510 :
13511 6 : static PyObject *py_DNS_RPC_ZONE_DOTNET_get_pszDpFqdn(PyObject *obj, void *closure)
13512 : {
13513 6 : struct DNS_RPC_ZONE_DOTNET *object = pytalloc_get_ptr(obj);
13514 0 : PyObject *py_pszDpFqdn;
13515 6 : if (object->pszDpFqdn == NULL) {
13516 0 : Py_RETURN_NONE;
13517 : }
13518 6 : if (object->pszDpFqdn == NULL) {
13519 0 : py_pszDpFqdn = Py_None;
13520 0 : Py_INCREF(py_pszDpFqdn);
13521 : } else {
13522 6 : if (object->pszDpFqdn == NULL) {
13523 0 : py_pszDpFqdn = Py_None;
13524 0 : Py_INCREF(py_pszDpFqdn);
13525 : } else {
13526 6 : py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
13527 : }
13528 : }
13529 6 : return py_pszDpFqdn;
13530 : }
13531 :
13532 0 : static int py_DNS_RPC_ZONE_DOTNET_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
13533 : {
13534 0 : struct DNS_RPC_ZONE_DOTNET *object = pytalloc_get_ptr(py_obj);
13535 0 : if (value == NULL) {
13536 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDpFqdn");
13537 0 : return -1;
13538 : }
13539 0 : if (value == Py_None) {
13540 0 : object->pszDpFqdn = NULL;
13541 : } else {
13542 0 : object->pszDpFqdn = NULL;
13543 : {
13544 0 : const char *test_str;
13545 0 : const char *talloc_str;
13546 0 : PyObject *unicode = NULL;
13547 0 : if (PyUnicode_Check(value)) {
13548 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
13549 0 : if (unicode == NULL) {
13550 0 : return -1;
13551 : }
13552 0 : test_str = PyBytes_AS_STRING(unicode);
13553 0 : } else if (PyBytes_Check(value)) {
13554 0 : test_str = PyBytes_AS_STRING(value);
13555 : } else {
13556 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
13557 0 : return -1;
13558 : }
13559 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
13560 0 : if (unicode != NULL) {
13561 0 : Py_DECREF(unicode);
13562 : }
13563 0 : if (talloc_str == NULL) {
13564 0 : PyErr_NoMemory();
13565 0 : return -1;
13566 : }
13567 0 : object->pszDpFqdn = talloc_str;
13568 : }
13569 : }
13570 0 : return 0;
13571 : }
13572 :
13573 : static PyGetSetDef py_DNS_RPC_ZONE_DOTNET_getsetters[] = {
13574 : {
13575 : .name = discard_const_p(char, "dwRpcStructureVersion"),
13576 : .get = py_DNS_RPC_ZONE_DOTNET_get_dwRpcStructureVersion,
13577 : .set = py_DNS_RPC_ZONE_DOTNET_set_dwRpcStructureVersion,
13578 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
13579 : },
13580 : {
13581 : .name = discard_const_p(char, "dwReserved0"),
13582 : .get = py_DNS_RPC_ZONE_DOTNET_get_dwReserved0,
13583 : .set = py_DNS_RPC_ZONE_DOTNET_set_dwReserved0,
13584 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
13585 : },
13586 : {
13587 : .name = discard_const_p(char, "pszZoneName"),
13588 : .get = py_DNS_RPC_ZONE_DOTNET_get_pszZoneName,
13589 : .set = py_DNS_RPC_ZONE_DOTNET_set_pszZoneName,
13590 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
13591 : },
13592 : {
13593 : .name = discard_const_p(char, "Flags"),
13594 : .get = py_DNS_RPC_ZONE_DOTNET_get_Flags,
13595 : .set = py_DNS_RPC_ZONE_DOTNET_set_Flags,
13596 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_ZONE_FLAGS")
13597 : },
13598 : {
13599 : .name = discard_const_p(char, "ZoneType"),
13600 : .get = py_DNS_RPC_ZONE_DOTNET_get_ZoneType,
13601 : .set = py_DNS_RPC_ZONE_DOTNET_set_ZoneType,
13602 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
13603 : },
13604 : {
13605 : .name = discard_const_p(char, "Version"),
13606 : .get = py_DNS_RPC_ZONE_DOTNET_get_Version,
13607 : .set = py_DNS_RPC_ZONE_DOTNET_set_Version,
13608 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
13609 : },
13610 : {
13611 : .name = discard_const_p(char, "dwDpFlags"),
13612 : .get = py_DNS_RPC_ZONE_DOTNET_get_dwDpFlags,
13613 : .set = py_DNS_RPC_ZONE_DOTNET_set_dwDpFlags,
13614 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_DP_FLAGS")
13615 : },
13616 : {
13617 : .name = discard_const_p(char, "pszDpFqdn"),
13618 : .get = py_DNS_RPC_ZONE_DOTNET_get_pszDpFqdn,
13619 : .set = py_DNS_RPC_ZONE_DOTNET_set_pszDpFqdn,
13620 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
13621 : },
13622 : { .name = NULL }
13623 : };
13624 :
13625 0 : static PyObject *py_DNS_RPC_ZONE_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
13626 : {
13627 0 : return pytalloc_new(struct DNS_RPC_ZONE_DOTNET, type);
13628 : }
13629 :
13630 :
13631 : static PyTypeObject DNS_RPC_ZONE_DOTNET_Type = {
13632 : PyVarObject_HEAD_INIT(NULL, 0)
13633 : .tp_name = "dnsserver.DNS_RPC_ZONE_DOTNET",
13634 : .tp_getset = py_DNS_RPC_ZONE_DOTNET_getsetters,
13635 : .tp_methods = NULL,
13636 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
13637 : .tp_new = py_DNS_RPC_ZONE_DOTNET_new,
13638 : };
13639 :
13640 :
13641 0 : static PyObject *py_DNS_RPC_ZONE_LIST_W2K_get_dwZoneCount(PyObject *obj, void *closure)
13642 : {
13643 0 : struct DNS_RPC_ZONE_LIST_W2K *object = pytalloc_get_ptr(obj);
13644 0 : PyObject *py_dwZoneCount;
13645 0 : py_dwZoneCount = PyLong_FromUnsignedLongLong((uint32_t)(object->dwZoneCount));
13646 0 : return py_dwZoneCount;
13647 : }
13648 :
13649 0 : static int py_DNS_RPC_ZONE_LIST_W2K_set_dwZoneCount(PyObject *py_obj, PyObject *value, void *closure)
13650 : {
13651 0 : struct DNS_RPC_ZONE_LIST_W2K *object = pytalloc_get_ptr(py_obj);
13652 0 : if (value == NULL) {
13653 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwZoneCount");
13654 0 : return -1;
13655 : }
13656 : {
13657 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwZoneCount));
13658 0 : if (PyLong_Check(value)) {
13659 0 : unsigned long long test_var;
13660 0 : test_var = PyLong_AsUnsignedLongLong(value);
13661 0 : if (PyErr_Occurred() != NULL) {
13662 0 : return -1;
13663 : }
13664 0 : if (test_var > uint_max) {
13665 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13666 : PyLong_Type.tp_name, uint_max, test_var);
13667 0 : return -1;
13668 : }
13669 0 : object->dwZoneCount = test_var;
13670 : } else {
13671 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13672 : PyLong_Type.tp_name);
13673 0 : return -1;
13674 : }
13675 : }
13676 0 : return 0;
13677 : }
13678 :
13679 0 : static PyObject *py_DNS_RPC_ZONE_LIST_W2K_get_ZoneArray(PyObject *obj, void *closure)
13680 : {
13681 0 : struct DNS_RPC_ZONE_LIST_W2K *object = pytalloc_get_ptr(obj);
13682 0 : PyObject *py_ZoneArray;
13683 0 : py_ZoneArray = PyList_New(object->dwZoneCount);
13684 0 : if (py_ZoneArray == NULL) {
13685 0 : return NULL;
13686 : }
13687 : {
13688 : int ZoneArray_cntr_0;
13689 0 : for (ZoneArray_cntr_0 = 0; ZoneArray_cntr_0 < (object->dwZoneCount); ZoneArray_cntr_0++) {
13690 0 : PyObject *py_ZoneArray_0;
13691 0 : if ((object->ZoneArray)[ZoneArray_cntr_0] == NULL) {
13692 0 : py_ZoneArray_0 = Py_None;
13693 0 : Py_INCREF(py_ZoneArray_0);
13694 : } else {
13695 0 : py_ZoneArray_0 = pytalloc_reference_ex(&DNS_RPC_ZONE_W2K_Type, (object->ZoneArray)[ZoneArray_cntr_0], (object->ZoneArray)[ZoneArray_cntr_0]);
13696 : }
13697 0 : PyList_SetItem(py_ZoneArray, ZoneArray_cntr_0, py_ZoneArray_0);
13698 : }
13699 : }
13700 0 : return py_ZoneArray;
13701 : }
13702 :
13703 0 : static int py_DNS_RPC_ZONE_LIST_W2K_set_ZoneArray(PyObject *py_obj, PyObject *value, void *closure)
13704 : {
13705 0 : struct DNS_RPC_ZONE_LIST_W2K *object = pytalloc_get_ptr(py_obj);
13706 0 : if (value == NULL) {
13707 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ZoneArray");
13708 0 : return -1;
13709 : }
13710 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
13711 : {
13712 0 : int ZoneArray_cntr_0;
13713 0 : object->ZoneArray = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->ZoneArray, PyList_GET_SIZE(value));
13714 0 : if (!object->ZoneArray) { return -1; }
13715 0 : talloc_set_name_const(object->ZoneArray, "ARRAY: object->ZoneArray");
13716 0 : for (ZoneArray_cntr_0 = 0; ZoneArray_cntr_0 < PyList_GET_SIZE(value); ZoneArray_cntr_0++) {
13717 0 : if (PyList_GET_ITEM(value, ZoneArray_cntr_0) == NULL) {
13718 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->ZoneArray)[ZoneArray_cntr_0]");
13719 0 : return -1;
13720 : }
13721 0 : if (PyList_GET_ITEM(value, ZoneArray_cntr_0) == Py_None) {
13722 0 : (object->ZoneArray)[ZoneArray_cntr_0] = NULL;
13723 : } else {
13724 0 : (object->ZoneArray)[ZoneArray_cntr_0] = NULL;
13725 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_W2K_Type, PyList_GET_ITEM(value, ZoneArray_cntr_0), return -1;);
13726 0 : if (talloc_reference(object->ZoneArray, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, ZoneArray_cntr_0))) == NULL) {
13727 0 : PyErr_NoMemory();
13728 0 : return -1;
13729 : }
13730 0 : (object->ZoneArray)[ZoneArray_cntr_0] = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(PyList_GET_ITEM(value, ZoneArray_cntr_0));
13731 : }
13732 : }
13733 : }
13734 0 : return 0;
13735 : }
13736 :
13737 : static PyGetSetDef py_DNS_RPC_ZONE_LIST_W2K_getsetters[] = {
13738 : {
13739 : .name = discard_const_p(char, "dwZoneCount"),
13740 : .get = py_DNS_RPC_ZONE_LIST_W2K_get_dwZoneCount,
13741 : .set = py_DNS_RPC_ZONE_LIST_W2K_set_dwZoneCount,
13742 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
13743 : },
13744 : {
13745 : .name = discard_const_p(char, "ZoneArray"),
13746 : .get = py_DNS_RPC_ZONE_LIST_W2K_get_ZoneArray,
13747 : .set = py_DNS_RPC_ZONE_LIST_W2K_set_ZoneArray,
13748 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_ZONE_W2K")
13749 : },
13750 : { .name = NULL }
13751 : };
13752 :
13753 0 : static PyObject *py_DNS_RPC_ZONE_LIST_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
13754 : {
13755 0 : return pytalloc_new(struct DNS_RPC_ZONE_LIST_W2K, type);
13756 : }
13757 :
13758 :
13759 : static PyTypeObject DNS_RPC_ZONE_LIST_W2K_Type = {
13760 : PyVarObject_HEAD_INIT(NULL, 0)
13761 : .tp_name = "dnsserver.DNS_RPC_ZONE_LIST_W2K",
13762 : .tp_getset = py_DNS_RPC_ZONE_LIST_W2K_getsetters,
13763 : .tp_methods = NULL,
13764 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
13765 : .tp_new = py_DNS_RPC_ZONE_LIST_W2K_new,
13766 : };
13767 :
13768 :
13769 0 : static PyObject *py_DNS_RPC_ZONE_LIST_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
13770 : {
13771 0 : struct DNS_RPC_ZONE_LIST_DOTNET *object = pytalloc_get_ptr(obj);
13772 0 : PyObject *py_dwRpcStructureVersion;
13773 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
13774 0 : return py_dwRpcStructureVersion;
13775 : }
13776 :
13777 0 : static int py_DNS_RPC_ZONE_LIST_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
13778 : {
13779 0 : struct DNS_RPC_ZONE_LIST_DOTNET *object = pytalloc_get_ptr(py_obj);
13780 0 : if (value == NULL) {
13781 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
13782 0 : return -1;
13783 : }
13784 : {
13785 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
13786 0 : if (PyLong_Check(value)) {
13787 0 : unsigned long long test_var;
13788 0 : test_var = PyLong_AsUnsignedLongLong(value);
13789 0 : if (PyErr_Occurred() != NULL) {
13790 0 : return -1;
13791 : }
13792 0 : if (test_var > uint_max) {
13793 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13794 : PyLong_Type.tp_name, uint_max, test_var);
13795 0 : return -1;
13796 : }
13797 0 : object->dwRpcStructureVersion = test_var;
13798 : } else {
13799 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13800 : PyLong_Type.tp_name);
13801 0 : return -1;
13802 : }
13803 : }
13804 0 : return 0;
13805 : }
13806 :
13807 0 : static PyObject *py_DNS_RPC_ZONE_LIST_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
13808 : {
13809 0 : struct DNS_RPC_ZONE_LIST_DOTNET *object = pytalloc_get_ptr(obj);
13810 0 : PyObject *py_dwReserved0;
13811 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
13812 0 : return py_dwReserved0;
13813 : }
13814 :
13815 0 : static int py_DNS_RPC_ZONE_LIST_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
13816 : {
13817 0 : struct DNS_RPC_ZONE_LIST_DOTNET *object = pytalloc_get_ptr(py_obj);
13818 0 : if (value == NULL) {
13819 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
13820 0 : return -1;
13821 : }
13822 : {
13823 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
13824 0 : if (PyLong_Check(value)) {
13825 0 : unsigned long long test_var;
13826 0 : test_var = PyLong_AsUnsignedLongLong(value);
13827 0 : if (PyErr_Occurred() != NULL) {
13828 0 : return -1;
13829 : }
13830 0 : if (test_var > uint_max) {
13831 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13832 : PyLong_Type.tp_name, uint_max, test_var);
13833 0 : return -1;
13834 : }
13835 0 : object->dwReserved0 = test_var;
13836 : } else {
13837 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13838 : PyLong_Type.tp_name);
13839 0 : return -1;
13840 : }
13841 : }
13842 0 : return 0;
13843 : }
13844 :
13845 14 : static PyObject *py_DNS_RPC_ZONE_LIST_DOTNET_get_dwZoneCount(PyObject *obj, void *closure)
13846 : {
13847 14 : struct DNS_RPC_ZONE_LIST_DOTNET *object = pytalloc_get_ptr(obj);
13848 0 : PyObject *py_dwZoneCount;
13849 14 : py_dwZoneCount = PyLong_FromUnsignedLongLong((uint32_t)(object->dwZoneCount));
13850 14 : return py_dwZoneCount;
13851 : }
13852 :
13853 0 : static int py_DNS_RPC_ZONE_LIST_DOTNET_set_dwZoneCount(PyObject *py_obj, PyObject *value, void *closure)
13854 : {
13855 0 : struct DNS_RPC_ZONE_LIST_DOTNET *object = pytalloc_get_ptr(py_obj);
13856 0 : if (value == NULL) {
13857 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwZoneCount");
13858 0 : return -1;
13859 : }
13860 : {
13861 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwZoneCount));
13862 0 : if (PyLong_Check(value)) {
13863 0 : unsigned long long test_var;
13864 0 : test_var = PyLong_AsUnsignedLongLong(value);
13865 0 : if (PyErr_Occurred() != NULL) {
13866 0 : return -1;
13867 : }
13868 0 : if (test_var > uint_max) {
13869 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13870 : PyLong_Type.tp_name, uint_max, test_var);
13871 0 : return -1;
13872 : }
13873 0 : object->dwZoneCount = test_var;
13874 : } else {
13875 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13876 : PyLong_Type.tp_name);
13877 0 : return -1;
13878 : }
13879 : }
13880 0 : return 0;
13881 : }
13882 :
13883 5 : static PyObject *py_DNS_RPC_ZONE_LIST_DOTNET_get_ZoneArray(PyObject *obj, void *closure)
13884 : {
13885 5 : struct DNS_RPC_ZONE_LIST_DOTNET *object = pytalloc_get_ptr(obj);
13886 0 : PyObject *py_ZoneArray;
13887 5 : py_ZoneArray = PyList_New(object->dwZoneCount);
13888 5 : if (py_ZoneArray == NULL) {
13889 0 : return NULL;
13890 : }
13891 : {
13892 : int ZoneArray_cntr_0;
13893 23 : for (ZoneArray_cntr_0 = 0; ZoneArray_cntr_0 < (object->dwZoneCount); ZoneArray_cntr_0++) {
13894 0 : PyObject *py_ZoneArray_0;
13895 18 : if ((object->ZoneArray)[ZoneArray_cntr_0] == NULL) {
13896 0 : py_ZoneArray_0 = Py_None;
13897 0 : Py_INCREF(py_ZoneArray_0);
13898 : } else {
13899 18 : py_ZoneArray_0 = pytalloc_reference_ex(&DNS_RPC_ZONE_DOTNET_Type, (object->ZoneArray)[ZoneArray_cntr_0], (object->ZoneArray)[ZoneArray_cntr_0]);
13900 : }
13901 18 : PyList_SetItem(py_ZoneArray, ZoneArray_cntr_0, py_ZoneArray_0);
13902 : }
13903 : }
13904 5 : return py_ZoneArray;
13905 : }
13906 :
13907 0 : static int py_DNS_RPC_ZONE_LIST_DOTNET_set_ZoneArray(PyObject *py_obj, PyObject *value, void *closure)
13908 : {
13909 0 : struct DNS_RPC_ZONE_LIST_DOTNET *object = pytalloc_get_ptr(py_obj);
13910 0 : if (value == NULL) {
13911 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->ZoneArray");
13912 0 : return -1;
13913 : }
13914 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
13915 : {
13916 0 : int ZoneArray_cntr_0;
13917 0 : object->ZoneArray = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->ZoneArray, PyList_GET_SIZE(value));
13918 0 : if (!object->ZoneArray) { return -1; }
13919 0 : talloc_set_name_const(object->ZoneArray, "ARRAY: object->ZoneArray");
13920 0 : for (ZoneArray_cntr_0 = 0; ZoneArray_cntr_0 < PyList_GET_SIZE(value); ZoneArray_cntr_0++) {
13921 0 : if (PyList_GET_ITEM(value, ZoneArray_cntr_0) == NULL) {
13922 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->ZoneArray)[ZoneArray_cntr_0]");
13923 0 : return -1;
13924 : }
13925 0 : if (PyList_GET_ITEM(value, ZoneArray_cntr_0) == Py_None) {
13926 0 : (object->ZoneArray)[ZoneArray_cntr_0] = NULL;
13927 : } else {
13928 0 : (object->ZoneArray)[ZoneArray_cntr_0] = NULL;
13929 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_DOTNET_Type, PyList_GET_ITEM(value, ZoneArray_cntr_0), return -1;);
13930 0 : if (talloc_reference(object->ZoneArray, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, ZoneArray_cntr_0))) == NULL) {
13931 0 : PyErr_NoMemory();
13932 0 : return -1;
13933 : }
13934 0 : (object->ZoneArray)[ZoneArray_cntr_0] = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(PyList_GET_ITEM(value, ZoneArray_cntr_0));
13935 : }
13936 : }
13937 : }
13938 0 : return 0;
13939 : }
13940 :
13941 : static PyGetSetDef py_DNS_RPC_ZONE_LIST_DOTNET_getsetters[] = {
13942 : {
13943 : .name = discard_const_p(char, "dwRpcStructureVersion"),
13944 : .get = py_DNS_RPC_ZONE_LIST_DOTNET_get_dwRpcStructureVersion,
13945 : .set = py_DNS_RPC_ZONE_LIST_DOTNET_set_dwRpcStructureVersion,
13946 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
13947 : },
13948 : {
13949 : .name = discard_const_p(char, "dwReserved0"),
13950 : .get = py_DNS_RPC_ZONE_LIST_DOTNET_get_dwReserved0,
13951 : .set = py_DNS_RPC_ZONE_LIST_DOTNET_set_dwReserved0,
13952 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
13953 : },
13954 : {
13955 : .name = discard_const_p(char, "dwZoneCount"),
13956 : .get = py_DNS_RPC_ZONE_LIST_DOTNET_get_dwZoneCount,
13957 : .set = py_DNS_RPC_ZONE_LIST_DOTNET_set_dwZoneCount,
13958 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
13959 : },
13960 : {
13961 : .name = discard_const_p(char, "ZoneArray"),
13962 : .get = py_DNS_RPC_ZONE_LIST_DOTNET_get_ZoneArray,
13963 : .set = py_DNS_RPC_ZONE_LIST_DOTNET_set_ZoneArray,
13964 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_ZONE_DOTNET")
13965 : },
13966 : { .name = NULL }
13967 : };
13968 :
13969 0 : static PyObject *py_DNS_RPC_ZONE_LIST_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
13970 : {
13971 0 : return pytalloc_new(struct DNS_RPC_ZONE_LIST_DOTNET, type);
13972 : }
13973 :
13974 :
13975 : static PyTypeObject DNS_RPC_ZONE_LIST_DOTNET_Type = {
13976 : PyVarObject_HEAD_INIT(NULL, 0)
13977 : .tp_name = "dnsserver.DNS_RPC_ZONE_LIST_DOTNET",
13978 : .tp_getset = py_DNS_RPC_ZONE_LIST_DOTNET_getsetters,
13979 : .tp_methods = NULL,
13980 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
13981 : .tp_new = py_DNS_RPC_ZONE_LIST_DOTNET_new,
13982 : };
13983 :
13984 :
13985 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_pszZoneName(PyObject *obj, void *closure)
13986 : {
13987 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
13988 0 : PyObject *py_pszZoneName;
13989 0 : if (object->pszZoneName == NULL) {
13990 0 : Py_RETURN_NONE;
13991 : }
13992 0 : if (object->pszZoneName == NULL) {
13993 0 : py_pszZoneName = Py_None;
13994 0 : Py_INCREF(py_pszZoneName);
13995 : } else {
13996 0 : if (object->pszZoneName == NULL) {
13997 0 : py_pszZoneName = Py_None;
13998 0 : Py_INCREF(py_pszZoneName);
13999 : } else {
14000 0 : py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
14001 : }
14002 : }
14003 0 : return py_pszZoneName;
14004 : }
14005 :
14006 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
14007 : {
14008 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14009 0 : if (value == NULL) {
14010 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszZoneName");
14011 0 : return -1;
14012 : }
14013 0 : if (value == Py_None) {
14014 0 : object->pszZoneName = NULL;
14015 : } else {
14016 0 : object->pszZoneName = NULL;
14017 : {
14018 0 : const char *test_str;
14019 0 : const char *talloc_str;
14020 0 : PyObject *unicode = NULL;
14021 0 : if (PyUnicode_Check(value)) {
14022 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
14023 0 : if (unicode == NULL) {
14024 0 : return -1;
14025 : }
14026 0 : test_str = PyBytes_AS_STRING(unicode);
14027 0 : } else if (PyBytes_Check(value)) {
14028 0 : test_str = PyBytes_AS_STRING(value);
14029 : } else {
14030 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
14031 0 : return -1;
14032 : }
14033 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
14034 0 : if (unicode != NULL) {
14035 0 : Py_DECREF(unicode);
14036 : }
14037 0 : if (talloc_str == NULL) {
14038 0 : PyErr_NoMemory();
14039 0 : return -1;
14040 : }
14041 0 : object->pszZoneName = talloc_str;
14042 : }
14043 : }
14044 0 : return 0;
14045 : }
14046 :
14047 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_dwZoneType(PyObject *obj, void *closure)
14048 : {
14049 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14050 0 : PyObject *py_dwZoneType;
14051 0 : py_dwZoneType = PyLong_FromUnsignedLongLong((uint32_t)(object->dwZoneType));
14052 0 : return py_dwZoneType;
14053 : }
14054 :
14055 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_dwZoneType(PyObject *py_obj, PyObject *value, void *closure)
14056 : {
14057 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14058 0 : if (value == NULL) {
14059 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwZoneType");
14060 0 : return -1;
14061 : }
14062 : {
14063 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwZoneType));
14064 0 : if (PyLong_Check(value)) {
14065 0 : unsigned long long test_var;
14066 0 : test_var = PyLong_AsUnsignedLongLong(value);
14067 0 : if (PyErr_Occurred() != NULL) {
14068 0 : return -1;
14069 : }
14070 0 : if (test_var > uint_max) {
14071 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14072 : PyLong_Type.tp_name, uint_max, test_var);
14073 0 : return -1;
14074 : }
14075 0 : object->dwZoneType = test_var;
14076 : } else {
14077 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14078 : PyLong_Type.tp_name);
14079 0 : return -1;
14080 : }
14081 : }
14082 0 : return 0;
14083 : }
14084 :
14085 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fReverse(PyObject *obj, void *closure)
14086 : {
14087 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14088 0 : PyObject *py_fReverse;
14089 0 : py_fReverse = PyLong_FromUnsignedLongLong((uint32_t)(object->fReverse));
14090 0 : return py_fReverse;
14091 : }
14092 :
14093 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fReverse(PyObject *py_obj, PyObject *value, void *closure)
14094 : {
14095 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14096 0 : if (value == NULL) {
14097 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fReverse");
14098 0 : return -1;
14099 : }
14100 : {
14101 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fReverse));
14102 0 : if (PyLong_Check(value)) {
14103 0 : unsigned long long test_var;
14104 0 : test_var = PyLong_AsUnsignedLongLong(value);
14105 0 : if (PyErr_Occurred() != NULL) {
14106 0 : return -1;
14107 : }
14108 0 : if (test_var > uint_max) {
14109 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14110 : PyLong_Type.tp_name, uint_max, test_var);
14111 0 : return -1;
14112 : }
14113 0 : object->fReverse = test_var;
14114 : } else {
14115 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14116 : PyLong_Type.tp_name);
14117 0 : return -1;
14118 : }
14119 : }
14120 0 : return 0;
14121 : }
14122 :
14123 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fAllowUpdate(PyObject *obj, void *closure)
14124 : {
14125 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14126 0 : PyObject *py_fAllowUpdate;
14127 0 : py_fAllowUpdate = PyLong_FromLong((uint16_t)(object->fAllowUpdate));
14128 0 : return py_fAllowUpdate;
14129 : }
14130 :
14131 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
14132 : {
14133 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14134 0 : if (value == NULL) {
14135 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAllowUpdate");
14136 0 : return -1;
14137 : }
14138 : {
14139 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAllowUpdate));
14140 0 : if (PyLong_Check(value)) {
14141 0 : unsigned long long test_var;
14142 0 : test_var = PyLong_AsUnsignedLongLong(value);
14143 0 : if (PyErr_Occurred() != NULL) {
14144 0 : return -1;
14145 : }
14146 0 : if (test_var > uint_max) {
14147 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14148 : PyLong_Type.tp_name, uint_max, test_var);
14149 0 : return -1;
14150 : }
14151 0 : object->fAllowUpdate = test_var;
14152 : } else {
14153 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14154 : PyLong_Type.tp_name);
14155 0 : return -1;
14156 : }
14157 : }
14158 0 : return 0;
14159 : }
14160 :
14161 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fPaused(PyObject *obj, void *closure)
14162 : {
14163 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14164 0 : PyObject *py_fPaused;
14165 0 : py_fPaused = PyLong_FromUnsignedLongLong((uint32_t)(object->fPaused));
14166 0 : return py_fPaused;
14167 : }
14168 :
14169 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fPaused(PyObject *py_obj, PyObject *value, void *closure)
14170 : {
14171 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14172 0 : if (value == NULL) {
14173 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fPaused");
14174 0 : return -1;
14175 : }
14176 : {
14177 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fPaused));
14178 0 : if (PyLong_Check(value)) {
14179 0 : unsigned long long test_var;
14180 0 : test_var = PyLong_AsUnsignedLongLong(value);
14181 0 : if (PyErr_Occurred() != NULL) {
14182 0 : return -1;
14183 : }
14184 0 : if (test_var > uint_max) {
14185 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14186 : PyLong_Type.tp_name, uint_max, test_var);
14187 0 : return -1;
14188 : }
14189 0 : object->fPaused = test_var;
14190 : } else {
14191 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14192 : PyLong_Type.tp_name);
14193 0 : return -1;
14194 : }
14195 : }
14196 0 : return 0;
14197 : }
14198 :
14199 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fShutdown(PyObject *obj, void *closure)
14200 : {
14201 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14202 0 : PyObject *py_fShutdown;
14203 0 : py_fShutdown = PyLong_FromUnsignedLongLong((uint32_t)(object->fShutdown));
14204 0 : return py_fShutdown;
14205 : }
14206 :
14207 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fShutdown(PyObject *py_obj, PyObject *value, void *closure)
14208 : {
14209 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14210 0 : if (value == NULL) {
14211 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fShutdown");
14212 0 : return -1;
14213 : }
14214 : {
14215 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fShutdown));
14216 0 : if (PyLong_Check(value)) {
14217 0 : unsigned long long test_var;
14218 0 : test_var = PyLong_AsUnsignedLongLong(value);
14219 0 : if (PyErr_Occurred() != NULL) {
14220 0 : return -1;
14221 : }
14222 0 : if (test_var > uint_max) {
14223 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14224 : PyLong_Type.tp_name, uint_max, test_var);
14225 0 : return -1;
14226 : }
14227 0 : object->fShutdown = test_var;
14228 : } else {
14229 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14230 : PyLong_Type.tp_name);
14231 0 : return -1;
14232 : }
14233 : }
14234 0 : return 0;
14235 : }
14236 :
14237 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fAutoCreated(PyObject *obj, void *closure)
14238 : {
14239 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14240 0 : PyObject *py_fAutoCreated;
14241 0 : py_fAutoCreated = PyLong_FromUnsignedLongLong((uint32_t)(object->fAutoCreated));
14242 0 : return py_fAutoCreated;
14243 : }
14244 :
14245 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fAutoCreated(PyObject *py_obj, PyObject *value, void *closure)
14246 : {
14247 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14248 0 : if (value == NULL) {
14249 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAutoCreated");
14250 0 : return -1;
14251 : }
14252 : {
14253 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAutoCreated));
14254 0 : if (PyLong_Check(value)) {
14255 0 : unsigned long long test_var;
14256 0 : test_var = PyLong_AsUnsignedLongLong(value);
14257 0 : if (PyErr_Occurred() != NULL) {
14258 0 : return -1;
14259 : }
14260 0 : if (test_var > uint_max) {
14261 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14262 : PyLong_Type.tp_name, uint_max, test_var);
14263 0 : return -1;
14264 : }
14265 0 : object->fAutoCreated = test_var;
14266 : } else {
14267 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14268 : PyLong_Type.tp_name);
14269 0 : return -1;
14270 : }
14271 : }
14272 0 : return 0;
14273 : }
14274 :
14275 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fUseDatabase(PyObject *obj, void *closure)
14276 : {
14277 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14278 0 : PyObject *py_fUseDatabase;
14279 0 : py_fUseDatabase = PyLong_FromUnsignedLongLong((uint32_t)(object->fUseDatabase));
14280 0 : return py_fUseDatabase;
14281 : }
14282 :
14283 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fUseDatabase(PyObject *py_obj, PyObject *value, void *closure)
14284 : {
14285 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14286 0 : if (value == NULL) {
14287 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fUseDatabase");
14288 0 : return -1;
14289 : }
14290 : {
14291 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fUseDatabase));
14292 0 : if (PyLong_Check(value)) {
14293 0 : unsigned long long test_var;
14294 0 : test_var = PyLong_AsUnsignedLongLong(value);
14295 0 : if (PyErr_Occurred() != NULL) {
14296 0 : return -1;
14297 : }
14298 0 : if (test_var > uint_max) {
14299 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14300 : PyLong_Type.tp_name, uint_max, test_var);
14301 0 : return -1;
14302 : }
14303 0 : object->fUseDatabase = test_var;
14304 : } else {
14305 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14306 : PyLong_Type.tp_name);
14307 0 : return -1;
14308 : }
14309 : }
14310 0 : return 0;
14311 : }
14312 :
14313 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_pszDataFile(PyObject *obj, void *closure)
14314 : {
14315 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14316 0 : PyObject *py_pszDataFile;
14317 0 : if (object->pszDataFile == NULL) {
14318 0 : Py_RETURN_NONE;
14319 : }
14320 0 : if (object->pszDataFile == NULL) {
14321 0 : py_pszDataFile = Py_None;
14322 0 : Py_INCREF(py_pszDataFile);
14323 : } else {
14324 0 : if (object->pszDataFile == NULL) {
14325 0 : py_pszDataFile = Py_None;
14326 0 : Py_INCREF(py_pszDataFile);
14327 : } else {
14328 0 : py_pszDataFile = PyUnicode_Decode(object->pszDataFile, strlen(object->pszDataFile), "utf-8", "ignore");
14329 : }
14330 : }
14331 0 : return py_pszDataFile;
14332 : }
14333 :
14334 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_pszDataFile(PyObject *py_obj, PyObject *value, void *closure)
14335 : {
14336 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14337 0 : if (value == NULL) {
14338 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDataFile");
14339 0 : return -1;
14340 : }
14341 0 : if (value == Py_None) {
14342 0 : object->pszDataFile = NULL;
14343 : } else {
14344 0 : object->pszDataFile = NULL;
14345 : {
14346 0 : const char *test_str;
14347 0 : const char *talloc_str;
14348 0 : PyObject *unicode = NULL;
14349 0 : if (PyUnicode_Check(value)) {
14350 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
14351 0 : if (unicode == NULL) {
14352 0 : return -1;
14353 : }
14354 0 : test_str = PyBytes_AS_STRING(unicode);
14355 0 : } else if (PyBytes_Check(value)) {
14356 0 : test_str = PyBytes_AS_STRING(value);
14357 : } else {
14358 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
14359 0 : return -1;
14360 : }
14361 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
14362 0 : if (unicode != NULL) {
14363 0 : Py_DECREF(unicode);
14364 : }
14365 0 : if (talloc_str == NULL) {
14366 0 : PyErr_NoMemory();
14367 0 : return -1;
14368 : }
14369 0 : object->pszDataFile = talloc_str;
14370 : }
14371 : }
14372 0 : return 0;
14373 : }
14374 :
14375 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_aipMasters(PyObject *obj, void *closure)
14376 : {
14377 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14378 0 : PyObject *py_aipMasters;
14379 0 : if (object->aipMasters == NULL) {
14380 0 : Py_RETURN_NONE;
14381 : }
14382 0 : if (object->aipMasters == NULL) {
14383 0 : py_aipMasters = Py_None;
14384 0 : Py_INCREF(py_aipMasters);
14385 : } else {
14386 0 : py_aipMasters = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipMasters, object->aipMasters);
14387 : }
14388 0 : return py_aipMasters;
14389 : }
14390 :
14391 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_aipMasters(PyObject *py_obj, PyObject *value, void *closure)
14392 : {
14393 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14394 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipMasters));
14395 0 : if (value == NULL) {
14396 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipMasters");
14397 0 : return -1;
14398 : }
14399 0 : if (value == Py_None) {
14400 0 : object->aipMasters = NULL;
14401 : } else {
14402 0 : object->aipMasters = NULL;
14403 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
14404 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
14405 0 : PyErr_NoMemory();
14406 0 : return -1;
14407 : }
14408 0 : object->aipMasters = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
14409 : }
14410 0 : return 0;
14411 : }
14412 :
14413 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fSecureSecondaries(PyObject *obj, void *closure)
14414 : {
14415 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14416 0 : PyObject *py_fSecureSecondaries;
14417 0 : py_fSecureSecondaries = PyLong_FromUnsignedLongLong((uint32_t)(object->fSecureSecondaries));
14418 0 : return py_fSecureSecondaries;
14419 : }
14420 :
14421 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
14422 : {
14423 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14424 0 : if (value == NULL) {
14425 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fSecureSecondaries");
14426 0 : return -1;
14427 : }
14428 : {
14429 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureSecondaries));
14430 0 : if (PyLong_Check(value)) {
14431 0 : unsigned long long test_var;
14432 0 : test_var = PyLong_AsUnsignedLongLong(value);
14433 0 : if (PyErr_Occurred() != NULL) {
14434 0 : return -1;
14435 : }
14436 0 : if (test_var > uint_max) {
14437 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14438 : PyLong_Type.tp_name, uint_max, test_var);
14439 0 : return -1;
14440 : }
14441 0 : object->fSecureSecondaries = test_var;
14442 : } else {
14443 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14444 : PyLong_Type.tp_name);
14445 0 : return -1;
14446 : }
14447 : }
14448 0 : return 0;
14449 : }
14450 :
14451 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fNotifyLevel(PyObject *obj, void *closure)
14452 : {
14453 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14454 0 : PyObject *py_fNotifyLevel;
14455 0 : py_fNotifyLevel = PyLong_FromUnsignedLongLong((uint32_t)(object->fNotifyLevel));
14456 0 : return py_fNotifyLevel;
14457 : }
14458 :
14459 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
14460 : {
14461 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14462 0 : if (value == NULL) {
14463 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fNotifyLevel");
14464 0 : return -1;
14465 : }
14466 : {
14467 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNotifyLevel));
14468 0 : if (PyLong_Check(value)) {
14469 0 : unsigned long long test_var;
14470 0 : test_var = PyLong_AsUnsignedLongLong(value);
14471 0 : if (PyErr_Occurred() != NULL) {
14472 0 : return -1;
14473 : }
14474 0 : if (test_var > uint_max) {
14475 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14476 : PyLong_Type.tp_name, uint_max, test_var);
14477 0 : return -1;
14478 : }
14479 0 : object->fNotifyLevel = test_var;
14480 : } else {
14481 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14482 : PyLong_Type.tp_name);
14483 0 : return -1;
14484 : }
14485 : }
14486 0 : return 0;
14487 : }
14488 :
14489 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_aipSecondaries(PyObject *obj, void *closure)
14490 : {
14491 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14492 0 : PyObject *py_aipSecondaries;
14493 0 : if (object->aipSecondaries == NULL) {
14494 0 : Py_RETURN_NONE;
14495 : }
14496 0 : if (object->aipSecondaries == NULL) {
14497 0 : py_aipSecondaries = Py_None;
14498 0 : Py_INCREF(py_aipSecondaries);
14499 : } else {
14500 0 : py_aipSecondaries = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
14501 : }
14502 0 : return py_aipSecondaries;
14503 : }
14504 :
14505 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
14506 : {
14507 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14508 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipSecondaries));
14509 0 : if (value == NULL) {
14510 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipSecondaries");
14511 0 : return -1;
14512 : }
14513 0 : if (value == Py_None) {
14514 0 : object->aipSecondaries = NULL;
14515 : } else {
14516 0 : object->aipSecondaries = NULL;
14517 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
14518 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
14519 0 : PyErr_NoMemory();
14520 0 : return -1;
14521 : }
14522 0 : object->aipSecondaries = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
14523 : }
14524 0 : return 0;
14525 : }
14526 :
14527 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_aipNotify(PyObject *obj, void *closure)
14528 : {
14529 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14530 0 : PyObject *py_aipNotify;
14531 0 : if (object->aipNotify == NULL) {
14532 0 : Py_RETURN_NONE;
14533 : }
14534 0 : if (object->aipNotify == NULL) {
14535 0 : py_aipNotify = Py_None;
14536 0 : Py_INCREF(py_aipNotify);
14537 : } else {
14538 0 : py_aipNotify = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipNotify, object->aipNotify);
14539 : }
14540 0 : return py_aipNotify;
14541 : }
14542 :
14543 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_aipNotify(PyObject *py_obj, PyObject *value, void *closure)
14544 : {
14545 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14546 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipNotify));
14547 0 : if (value == NULL) {
14548 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipNotify");
14549 0 : return -1;
14550 : }
14551 0 : if (value == Py_None) {
14552 0 : object->aipNotify = NULL;
14553 : } else {
14554 0 : object->aipNotify = NULL;
14555 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
14556 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
14557 0 : PyErr_NoMemory();
14558 0 : return -1;
14559 : }
14560 0 : object->aipNotify = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
14561 : }
14562 0 : return 0;
14563 : }
14564 :
14565 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fUseWins(PyObject *obj, void *closure)
14566 : {
14567 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14568 0 : PyObject *py_fUseWins;
14569 0 : py_fUseWins = PyLong_FromUnsignedLongLong((uint32_t)(object->fUseWins));
14570 0 : return py_fUseWins;
14571 : }
14572 :
14573 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fUseWins(PyObject *py_obj, PyObject *value, void *closure)
14574 : {
14575 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14576 0 : if (value == NULL) {
14577 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fUseWins");
14578 0 : return -1;
14579 : }
14580 : {
14581 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fUseWins));
14582 0 : if (PyLong_Check(value)) {
14583 0 : unsigned long long test_var;
14584 0 : test_var = PyLong_AsUnsignedLongLong(value);
14585 0 : if (PyErr_Occurred() != NULL) {
14586 0 : return -1;
14587 : }
14588 0 : if (test_var > uint_max) {
14589 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14590 : PyLong_Type.tp_name, uint_max, test_var);
14591 0 : return -1;
14592 : }
14593 0 : object->fUseWins = test_var;
14594 : } else {
14595 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14596 : PyLong_Type.tp_name);
14597 0 : return -1;
14598 : }
14599 : }
14600 0 : return 0;
14601 : }
14602 :
14603 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fUseNbstat(PyObject *obj, void *closure)
14604 : {
14605 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14606 0 : PyObject *py_fUseNbstat;
14607 0 : py_fUseNbstat = PyLong_FromUnsignedLongLong((uint32_t)(object->fUseNbstat));
14608 0 : return py_fUseNbstat;
14609 : }
14610 :
14611 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fUseNbstat(PyObject *py_obj, PyObject *value, void *closure)
14612 : {
14613 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14614 0 : if (value == NULL) {
14615 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fUseNbstat");
14616 0 : return -1;
14617 : }
14618 : {
14619 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fUseNbstat));
14620 0 : if (PyLong_Check(value)) {
14621 0 : unsigned long long test_var;
14622 0 : test_var = PyLong_AsUnsignedLongLong(value);
14623 0 : if (PyErr_Occurred() != NULL) {
14624 0 : return -1;
14625 : }
14626 0 : if (test_var > uint_max) {
14627 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14628 : PyLong_Type.tp_name, uint_max, test_var);
14629 0 : return -1;
14630 : }
14631 0 : object->fUseNbstat = test_var;
14632 : } else {
14633 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14634 : PyLong_Type.tp_name);
14635 0 : return -1;
14636 : }
14637 : }
14638 0 : return 0;
14639 : }
14640 :
14641 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fAging(PyObject *obj, void *closure)
14642 : {
14643 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14644 0 : PyObject *py_fAging;
14645 0 : py_fAging = PyLong_FromUnsignedLongLong((uint32_t)(object->fAging));
14646 0 : return py_fAging;
14647 : }
14648 :
14649 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fAging(PyObject *py_obj, PyObject *value, void *closure)
14650 : {
14651 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14652 0 : if (value == NULL) {
14653 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAging");
14654 0 : return -1;
14655 : }
14656 : {
14657 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAging));
14658 0 : if (PyLong_Check(value)) {
14659 0 : unsigned long long test_var;
14660 0 : test_var = PyLong_AsUnsignedLongLong(value);
14661 0 : if (PyErr_Occurred() != NULL) {
14662 0 : return -1;
14663 : }
14664 0 : if (test_var > uint_max) {
14665 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14666 : PyLong_Type.tp_name, uint_max, test_var);
14667 0 : return -1;
14668 : }
14669 0 : object->fAging = test_var;
14670 : } else {
14671 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14672 : PyLong_Type.tp_name);
14673 0 : return -1;
14674 : }
14675 : }
14676 0 : return 0;
14677 : }
14678 :
14679 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_dwNoRefreshInterval(PyObject *obj, void *closure)
14680 : {
14681 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14682 0 : PyObject *py_dwNoRefreshInterval;
14683 0 : py_dwNoRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)(object->dwNoRefreshInterval));
14684 0 : return py_dwNoRefreshInterval;
14685 : }
14686 :
14687 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_dwNoRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
14688 : {
14689 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14690 0 : if (value == NULL) {
14691 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwNoRefreshInterval");
14692 0 : return -1;
14693 : }
14694 : {
14695 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwNoRefreshInterval));
14696 0 : if (PyLong_Check(value)) {
14697 0 : unsigned long long test_var;
14698 0 : test_var = PyLong_AsUnsignedLongLong(value);
14699 0 : if (PyErr_Occurred() != NULL) {
14700 0 : return -1;
14701 : }
14702 0 : if (test_var > uint_max) {
14703 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14704 : PyLong_Type.tp_name, uint_max, test_var);
14705 0 : return -1;
14706 : }
14707 0 : object->dwNoRefreshInterval = test_var;
14708 : } else {
14709 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14710 : PyLong_Type.tp_name);
14711 0 : return -1;
14712 : }
14713 : }
14714 0 : return 0;
14715 : }
14716 :
14717 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_dwRefreshInterval(PyObject *obj, void *closure)
14718 : {
14719 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14720 0 : PyObject *py_dwRefreshInterval;
14721 0 : py_dwRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRefreshInterval));
14722 0 : return py_dwRefreshInterval;
14723 : }
14724 :
14725 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_dwRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
14726 : {
14727 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14728 0 : if (value == NULL) {
14729 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRefreshInterval");
14730 0 : return -1;
14731 : }
14732 : {
14733 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRefreshInterval));
14734 0 : if (PyLong_Check(value)) {
14735 0 : unsigned long long test_var;
14736 0 : test_var = PyLong_AsUnsignedLongLong(value);
14737 0 : if (PyErr_Occurred() != NULL) {
14738 0 : return -1;
14739 : }
14740 0 : if (test_var > uint_max) {
14741 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14742 : PyLong_Type.tp_name, uint_max, test_var);
14743 0 : return -1;
14744 : }
14745 0 : object->dwRefreshInterval = test_var;
14746 : } else {
14747 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14748 : PyLong_Type.tp_name);
14749 0 : return -1;
14750 : }
14751 : }
14752 0 : return 0;
14753 : }
14754 :
14755 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_dwAvailForScavengeTime(PyObject *obj, void *closure)
14756 : {
14757 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14758 0 : PyObject *py_dwAvailForScavengeTime;
14759 0 : py_dwAvailForScavengeTime = PyLong_FromUnsignedLongLong((uint32_t)(object->dwAvailForScavengeTime));
14760 0 : return py_dwAvailForScavengeTime;
14761 : }
14762 :
14763 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_dwAvailForScavengeTime(PyObject *py_obj, PyObject *value, void *closure)
14764 : {
14765 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14766 0 : if (value == NULL) {
14767 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwAvailForScavengeTime");
14768 0 : return -1;
14769 : }
14770 : {
14771 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwAvailForScavengeTime));
14772 0 : if (PyLong_Check(value)) {
14773 0 : unsigned long long test_var;
14774 0 : test_var = PyLong_AsUnsignedLongLong(value);
14775 0 : if (PyErr_Occurred() != NULL) {
14776 0 : return -1;
14777 : }
14778 0 : if (test_var > uint_max) {
14779 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14780 : PyLong_Type.tp_name, uint_max, test_var);
14781 0 : return -1;
14782 : }
14783 0 : object->dwAvailForScavengeTime = test_var;
14784 : } else {
14785 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14786 : PyLong_Type.tp_name);
14787 0 : return -1;
14788 : }
14789 : }
14790 0 : return 0;
14791 : }
14792 :
14793 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_aipScavengeServers(PyObject *obj, void *closure)
14794 : {
14795 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14796 0 : PyObject *py_aipScavengeServers;
14797 0 : if (object->aipScavengeServers == NULL) {
14798 0 : Py_RETURN_NONE;
14799 : }
14800 0 : if (object->aipScavengeServers == NULL) {
14801 0 : py_aipScavengeServers = Py_None;
14802 0 : Py_INCREF(py_aipScavengeServers);
14803 : } else {
14804 0 : py_aipScavengeServers = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipScavengeServers, object->aipScavengeServers);
14805 : }
14806 0 : return py_aipScavengeServers;
14807 : }
14808 :
14809 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_aipScavengeServers(PyObject *py_obj, PyObject *value, void *closure)
14810 : {
14811 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14812 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipScavengeServers));
14813 0 : if (value == NULL) {
14814 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipScavengeServers");
14815 0 : return -1;
14816 : }
14817 0 : if (value == Py_None) {
14818 0 : object->aipScavengeServers = NULL;
14819 : } else {
14820 0 : object->aipScavengeServers = NULL;
14821 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
14822 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
14823 0 : PyErr_NoMemory();
14824 0 : return -1;
14825 : }
14826 0 : object->aipScavengeServers = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
14827 : }
14828 0 : return 0;
14829 : }
14830 :
14831 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved1(PyObject *obj, void *closure)
14832 : {
14833 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14834 0 : PyObject *py_pvReserved1;
14835 0 : py_pvReserved1 = PyLong_FromUnsignedLongLong((uint32_t)(object->pvReserved1));
14836 0 : return py_pvReserved1;
14837 : }
14838 :
14839 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved1(PyObject *py_obj, PyObject *value, void *closure)
14840 : {
14841 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14842 0 : if (value == NULL) {
14843 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pvReserved1");
14844 0 : return -1;
14845 : }
14846 : {
14847 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pvReserved1));
14848 0 : if (PyLong_Check(value)) {
14849 0 : unsigned long long test_var;
14850 0 : test_var = PyLong_AsUnsignedLongLong(value);
14851 0 : if (PyErr_Occurred() != NULL) {
14852 0 : return -1;
14853 : }
14854 0 : if (test_var > uint_max) {
14855 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14856 : PyLong_Type.tp_name, uint_max, test_var);
14857 0 : return -1;
14858 : }
14859 0 : object->pvReserved1 = test_var;
14860 : } else {
14861 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14862 : PyLong_Type.tp_name);
14863 0 : return -1;
14864 : }
14865 : }
14866 0 : return 0;
14867 : }
14868 :
14869 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved2(PyObject *obj, void *closure)
14870 : {
14871 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14872 0 : PyObject *py_pvReserved2;
14873 0 : py_pvReserved2 = PyLong_FromUnsignedLongLong((uint32_t)(object->pvReserved2));
14874 0 : return py_pvReserved2;
14875 : }
14876 :
14877 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved2(PyObject *py_obj, PyObject *value, void *closure)
14878 : {
14879 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14880 0 : if (value == NULL) {
14881 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pvReserved2");
14882 0 : return -1;
14883 : }
14884 : {
14885 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pvReserved2));
14886 0 : if (PyLong_Check(value)) {
14887 0 : unsigned long long test_var;
14888 0 : test_var = PyLong_AsUnsignedLongLong(value);
14889 0 : if (PyErr_Occurred() != NULL) {
14890 0 : return -1;
14891 : }
14892 0 : if (test_var > uint_max) {
14893 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14894 : PyLong_Type.tp_name, uint_max, test_var);
14895 0 : return -1;
14896 : }
14897 0 : object->pvReserved2 = test_var;
14898 : } else {
14899 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14900 : PyLong_Type.tp_name);
14901 0 : return -1;
14902 : }
14903 : }
14904 0 : return 0;
14905 : }
14906 :
14907 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved3(PyObject *obj, void *closure)
14908 : {
14909 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14910 0 : PyObject *py_pvReserved3;
14911 0 : py_pvReserved3 = PyLong_FromUnsignedLongLong((uint32_t)(object->pvReserved3));
14912 0 : return py_pvReserved3;
14913 : }
14914 :
14915 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved3(PyObject *py_obj, PyObject *value, void *closure)
14916 : {
14917 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14918 0 : if (value == NULL) {
14919 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pvReserved3");
14920 0 : return -1;
14921 : }
14922 : {
14923 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pvReserved3));
14924 0 : if (PyLong_Check(value)) {
14925 0 : unsigned long long test_var;
14926 0 : test_var = PyLong_AsUnsignedLongLong(value);
14927 0 : if (PyErr_Occurred() != NULL) {
14928 0 : return -1;
14929 : }
14930 0 : if (test_var > uint_max) {
14931 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14932 : PyLong_Type.tp_name, uint_max, test_var);
14933 0 : return -1;
14934 : }
14935 0 : object->pvReserved3 = test_var;
14936 : } else {
14937 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14938 : PyLong_Type.tp_name);
14939 0 : return -1;
14940 : }
14941 : }
14942 0 : return 0;
14943 : }
14944 :
14945 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved4(PyObject *obj, void *closure)
14946 : {
14947 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(obj);
14948 0 : PyObject *py_pvReserved4;
14949 0 : py_pvReserved4 = PyLong_FromUnsignedLongLong((uint32_t)(object->pvReserved4));
14950 0 : return py_pvReserved4;
14951 : }
14952 :
14953 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved4(PyObject *py_obj, PyObject *value, void *closure)
14954 : {
14955 0 : struct DNS_RPC_ZONE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
14956 0 : if (value == NULL) {
14957 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pvReserved4");
14958 0 : return -1;
14959 : }
14960 : {
14961 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pvReserved4));
14962 0 : if (PyLong_Check(value)) {
14963 0 : unsigned long long test_var;
14964 0 : test_var = PyLong_AsUnsignedLongLong(value);
14965 0 : if (PyErr_Occurred() != NULL) {
14966 0 : return -1;
14967 : }
14968 0 : if (test_var > uint_max) {
14969 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14970 : PyLong_Type.tp_name, uint_max, test_var);
14971 0 : return -1;
14972 : }
14973 0 : object->pvReserved4 = test_var;
14974 : } else {
14975 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14976 : PyLong_Type.tp_name);
14977 0 : return -1;
14978 : }
14979 : }
14980 0 : return 0;
14981 : }
14982 :
14983 : static PyGetSetDef py_DNS_RPC_ZONE_INFO_W2K_getsetters[] = {
14984 : {
14985 : .name = discard_const_p(char, "pszZoneName"),
14986 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_pszZoneName,
14987 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_pszZoneName,
14988 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
14989 : },
14990 : {
14991 : .name = discard_const_p(char, "dwZoneType"),
14992 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_dwZoneType,
14993 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_dwZoneType,
14994 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
14995 : },
14996 : {
14997 : .name = discard_const_p(char, "fReverse"),
14998 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fReverse,
14999 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fReverse,
15000 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15001 : },
15002 : {
15003 : .name = discard_const_p(char, "fAllowUpdate"),
15004 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fAllowUpdate,
15005 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fAllowUpdate,
15006 : .doc = discard_const_p(char, "PIDL-generated element of base type dns_zone_update")
15007 : },
15008 : {
15009 : .name = discard_const_p(char, "fPaused"),
15010 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fPaused,
15011 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fPaused,
15012 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15013 : },
15014 : {
15015 : .name = discard_const_p(char, "fShutdown"),
15016 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fShutdown,
15017 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fShutdown,
15018 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15019 : },
15020 : {
15021 : .name = discard_const_p(char, "fAutoCreated"),
15022 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fAutoCreated,
15023 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fAutoCreated,
15024 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15025 : },
15026 : {
15027 : .name = discard_const_p(char, "fUseDatabase"),
15028 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fUseDatabase,
15029 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fUseDatabase,
15030 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15031 : },
15032 : {
15033 : .name = discard_const_p(char, "pszDataFile"),
15034 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_pszDataFile,
15035 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_pszDataFile,
15036 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
15037 : },
15038 : {
15039 : .name = discard_const_p(char, "aipMasters"),
15040 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_aipMasters,
15041 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_aipMasters,
15042 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
15043 : },
15044 : {
15045 : .name = discard_const_p(char, "fSecureSecondaries"),
15046 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fSecureSecondaries,
15047 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fSecureSecondaries,
15048 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_SECONDARY_SECURITY")
15049 : },
15050 : {
15051 : .name = discard_const_p(char, "fNotifyLevel"),
15052 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fNotifyLevel,
15053 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fNotifyLevel,
15054 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_NOTIFY_LEVEL")
15055 : },
15056 : {
15057 : .name = discard_const_p(char, "aipSecondaries"),
15058 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_aipSecondaries,
15059 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_aipSecondaries,
15060 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
15061 : },
15062 : {
15063 : .name = discard_const_p(char, "aipNotify"),
15064 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_aipNotify,
15065 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_aipNotify,
15066 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
15067 : },
15068 : {
15069 : .name = discard_const_p(char, "fUseWins"),
15070 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fUseWins,
15071 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fUseWins,
15072 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15073 : },
15074 : {
15075 : .name = discard_const_p(char, "fUseNbstat"),
15076 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fUseNbstat,
15077 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fUseNbstat,
15078 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15079 : },
15080 : {
15081 : .name = discard_const_p(char, "fAging"),
15082 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fAging,
15083 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fAging,
15084 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15085 : },
15086 : {
15087 : .name = discard_const_p(char, "dwNoRefreshInterval"),
15088 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_dwNoRefreshInterval,
15089 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_dwNoRefreshInterval,
15090 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15091 : },
15092 : {
15093 : .name = discard_const_p(char, "dwRefreshInterval"),
15094 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_dwRefreshInterval,
15095 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_dwRefreshInterval,
15096 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15097 : },
15098 : {
15099 : .name = discard_const_p(char, "dwAvailForScavengeTime"),
15100 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_dwAvailForScavengeTime,
15101 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_dwAvailForScavengeTime,
15102 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15103 : },
15104 : {
15105 : .name = discard_const_p(char, "aipScavengeServers"),
15106 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_aipScavengeServers,
15107 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_aipScavengeServers,
15108 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
15109 : },
15110 : {
15111 : .name = discard_const_p(char, "pvReserved1"),
15112 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved1,
15113 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved1,
15114 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15115 : },
15116 : {
15117 : .name = discard_const_p(char, "pvReserved2"),
15118 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved2,
15119 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved2,
15120 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15121 : },
15122 : {
15123 : .name = discard_const_p(char, "pvReserved3"),
15124 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved3,
15125 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved3,
15126 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15127 : },
15128 : {
15129 : .name = discard_const_p(char, "pvReserved4"),
15130 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved4,
15131 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved4,
15132 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15133 : },
15134 : { .name = NULL }
15135 : };
15136 :
15137 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
15138 : {
15139 0 : return pytalloc_new(struct DNS_RPC_ZONE_INFO_W2K, type);
15140 : }
15141 :
15142 :
15143 : static PyTypeObject DNS_RPC_ZONE_INFO_W2K_Type = {
15144 : PyVarObject_HEAD_INIT(NULL, 0)
15145 : .tp_name = "dnsserver.DNS_RPC_ZONE_INFO_W2K",
15146 : .tp_getset = py_DNS_RPC_ZONE_INFO_W2K_getsetters,
15147 : .tp_methods = NULL,
15148 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
15149 : .tp_new = py_DNS_RPC_ZONE_INFO_W2K_new,
15150 : };
15151 :
15152 :
15153 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
15154 : {
15155 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
15156 0 : PyObject *py_dwRpcStructureVersion;
15157 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
15158 0 : return py_dwRpcStructureVersion;
15159 : }
15160 :
15161 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
15162 : {
15163 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
15164 0 : if (value == NULL) {
15165 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
15166 0 : return -1;
15167 : }
15168 : {
15169 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
15170 0 : if (PyLong_Check(value)) {
15171 0 : unsigned long long test_var;
15172 0 : test_var = PyLong_AsUnsignedLongLong(value);
15173 0 : if (PyErr_Occurred() != NULL) {
15174 0 : return -1;
15175 : }
15176 0 : if (test_var > uint_max) {
15177 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15178 : PyLong_Type.tp_name, uint_max, test_var);
15179 0 : return -1;
15180 : }
15181 0 : object->dwRpcStructureVersion = test_var;
15182 : } else {
15183 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15184 : PyLong_Type.tp_name);
15185 0 : return -1;
15186 : }
15187 : }
15188 0 : return 0;
15189 : }
15190 :
15191 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
15192 : {
15193 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
15194 0 : PyObject *py_dwReserved0;
15195 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
15196 0 : return py_dwReserved0;
15197 : }
15198 :
15199 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
15200 : {
15201 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
15202 0 : if (value == NULL) {
15203 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
15204 0 : return -1;
15205 : }
15206 : {
15207 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
15208 0 : if (PyLong_Check(value)) {
15209 0 : unsigned long long test_var;
15210 0 : test_var = PyLong_AsUnsignedLongLong(value);
15211 0 : if (PyErr_Occurred() != NULL) {
15212 0 : return -1;
15213 : }
15214 0 : if (test_var > uint_max) {
15215 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15216 : PyLong_Type.tp_name, uint_max, test_var);
15217 0 : return -1;
15218 : }
15219 0 : object->dwReserved0 = test_var;
15220 : } else {
15221 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15222 : PyLong_Type.tp_name);
15223 0 : return -1;
15224 : }
15225 : }
15226 0 : return 0;
15227 : }
15228 :
15229 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pszZoneName(PyObject *obj, void *closure)
15230 : {
15231 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
15232 0 : PyObject *py_pszZoneName;
15233 0 : if (object->pszZoneName == NULL) {
15234 0 : Py_RETURN_NONE;
15235 : }
15236 0 : if (object->pszZoneName == NULL) {
15237 0 : py_pszZoneName = Py_None;
15238 0 : Py_INCREF(py_pszZoneName);
15239 : } else {
15240 0 : if (object->pszZoneName == NULL) {
15241 0 : py_pszZoneName = Py_None;
15242 0 : Py_INCREF(py_pszZoneName);
15243 : } else {
15244 0 : py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
15245 : }
15246 : }
15247 0 : return py_pszZoneName;
15248 : }
15249 :
15250 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
15251 : {
15252 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
15253 0 : if (value == NULL) {
15254 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszZoneName");
15255 0 : return -1;
15256 : }
15257 0 : if (value == Py_None) {
15258 0 : object->pszZoneName = NULL;
15259 : } else {
15260 0 : object->pszZoneName = NULL;
15261 : {
15262 0 : const char *test_str;
15263 0 : const char *talloc_str;
15264 0 : PyObject *unicode = NULL;
15265 0 : if (PyUnicode_Check(value)) {
15266 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
15267 0 : if (unicode == NULL) {
15268 0 : return -1;
15269 : }
15270 0 : test_str = PyBytes_AS_STRING(unicode);
15271 0 : } else if (PyBytes_Check(value)) {
15272 0 : test_str = PyBytes_AS_STRING(value);
15273 : } else {
15274 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
15275 0 : return -1;
15276 : }
15277 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
15278 0 : if (unicode != NULL) {
15279 0 : Py_DECREF(unicode);
15280 : }
15281 0 : if (talloc_str == NULL) {
15282 0 : PyErr_NoMemory();
15283 0 : return -1;
15284 : }
15285 0 : object->pszZoneName = talloc_str;
15286 : }
15287 : }
15288 0 : return 0;
15289 : }
15290 :
15291 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwZoneType(PyObject *obj, void *closure)
15292 : {
15293 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
15294 0 : PyObject *py_dwZoneType;
15295 0 : py_dwZoneType = PyLong_FromUnsignedLongLong((uint32_t)(object->dwZoneType));
15296 0 : return py_dwZoneType;
15297 : }
15298 :
15299 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwZoneType(PyObject *py_obj, PyObject *value, void *closure)
15300 : {
15301 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
15302 0 : if (value == NULL) {
15303 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwZoneType");
15304 0 : return -1;
15305 : }
15306 : {
15307 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwZoneType));
15308 0 : if (PyLong_Check(value)) {
15309 0 : unsigned long long test_var;
15310 0 : test_var = PyLong_AsUnsignedLongLong(value);
15311 0 : if (PyErr_Occurred() != NULL) {
15312 0 : return -1;
15313 : }
15314 0 : if (test_var > uint_max) {
15315 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15316 : PyLong_Type.tp_name, uint_max, test_var);
15317 0 : return -1;
15318 : }
15319 0 : object->dwZoneType = test_var;
15320 : } else {
15321 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15322 : PyLong_Type.tp_name);
15323 0 : return -1;
15324 : }
15325 : }
15326 0 : return 0;
15327 : }
15328 :
15329 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fReverse(PyObject *obj, void *closure)
15330 : {
15331 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
15332 0 : PyObject *py_fReverse;
15333 0 : py_fReverse = PyLong_FromUnsignedLongLong((uint32_t)(object->fReverse));
15334 0 : return py_fReverse;
15335 : }
15336 :
15337 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fReverse(PyObject *py_obj, PyObject *value, void *closure)
15338 : {
15339 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
15340 0 : if (value == NULL) {
15341 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fReverse");
15342 0 : return -1;
15343 : }
15344 : {
15345 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fReverse));
15346 0 : if (PyLong_Check(value)) {
15347 0 : unsigned long long test_var;
15348 0 : test_var = PyLong_AsUnsignedLongLong(value);
15349 0 : if (PyErr_Occurred() != NULL) {
15350 0 : return -1;
15351 : }
15352 0 : if (test_var > uint_max) {
15353 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15354 : PyLong_Type.tp_name, uint_max, test_var);
15355 0 : return -1;
15356 : }
15357 0 : object->fReverse = test_var;
15358 : } else {
15359 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15360 : PyLong_Type.tp_name);
15361 0 : return -1;
15362 : }
15363 : }
15364 0 : return 0;
15365 : }
15366 :
15367 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fAllowUpdate(PyObject *obj, void *closure)
15368 : {
15369 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
15370 0 : PyObject *py_fAllowUpdate;
15371 0 : py_fAllowUpdate = PyLong_FromLong((uint16_t)(object->fAllowUpdate));
15372 0 : return py_fAllowUpdate;
15373 : }
15374 :
15375 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
15376 : {
15377 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
15378 0 : if (value == NULL) {
15379 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAllowUpdate");
15380 0 : return -1;
15381 : }
15382 : {
15383 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAllowUpdate));
15384 0 : if (PyLong_Check(value)) {
15385 0 : unsigned long long test_var;
15386 0 : test_var = PyLong_AsUnsignedLongLong(value);
15387 0 : if (PyErr_Occurred() != NULL) {
15388 0 : return -1;
15389 : }
15390 0 : if (test_var > uint_max) {
15391 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15392 : PyLong_Type.tp_name, uint_max, test_var);
15393 0 : return -1;
15394 : }
15395 0 : object->fAllowUpdate = test_var;
15396 : } else {
15397 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15398 : PyLong_Type.tp_name);
15399 0 : return -1;
15400 : }
15401 : }
15402 0 : return 0;
15403 : }
15404 :
15405 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fPaused(PyObject *obj, void *closure)
15406 : {
15407 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
15408 0 : PyObject *py_fPaused;
15409 0 : py_fPaused = PyLong_FromUnsignedLongLong((uint32_t)(object->fPaused));
15410 0 : return py_fPaused;
15411 : }
15412 :
15413 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fPaused(PyObject *py_obj, PyObject *value, void *closure)
15414 : {
15415 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
15416 0 : if (value == NULL) {
15417 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fPaused");
15418 0 : return -1;
15419 : }
15420 : {
15421 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fPaused));
15422 0 : if (PyLong_Check(value)) {
15423 0 : unsigned long long test_var;
15424 0 : test_var = PyLong_AsUnsignedLongLong(value);
15425 0 : if (PyErr_Occurred() != NULL) {
15426 0 : return -1;
15427 : }
15428 0 : if (test_var > uint_max) {
15429 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15430 : PyLong_Type.tp_name, uint_max, test_var);
15431 0 : return -1;
15432 : }
15433 0 : object->fPaused = test_var;
15434 : } else {
15435 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15436 : PyLong_Type.tp_name);
15437 0 : return -1;
15438 : }
15439 : }
15440 0 : return 0;
15441 : }
15442 :
15443 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fShutdown(PyObject *obj, void *closure)
15444 : {
15445 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
15446 0 : PyObject *py_fShutdown;
15447 0 : py_fShutdown = PyLong_FromUnsignedLongLong((uint32_t)(object->fShutdown));
15448 0 : return py_fShutdown;
15449 : }
15450 :
15451 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fShutdown(PyObject *py_obj, PyObject *value, void *closure)
15452 : {
15453 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
15454 0 : if (value == NULL) {
15455 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fShutdown");
15456 0 : return -1;
15457 : }
15458 : {
15459 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fShutdown));
15460 0 : if (PyLong_Check(value)) {
15461 0 : unsigned long long test_var;
15462 0 : test_var = PyLong_AsUnsignedLongLong(value);
15463 0 : if (PyErr_Occurred() != NULL) {
15464 0 : return -1;
15465 : }
15466 0 : if (test_var > uint_max) {
15467 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15468 : PyLong_Type.tp_name, uint_max, test_var);
15469 0 : return -1;
15470 : }
15471 0 : object->fShutdown = test_var;
15472 : } else {
15473 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15474 : PyLong_Type.tp_name);
15475 0 : return -1;
15476 : }
15477 : }
15478 0 : return 0;
15479 : }
15480 :
15481 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fAutoCreated(PyObject *obj, void *closure)
15482 : {
15483 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
15484 0 : PyObject *py_fAutoCreated;
15485 0 : py_fAutoCreated = PyLong_FromUnsignedLongLong((uint32_t)(object->fAutoCreated));
15486 0 : return py_fAutoCreated;
15487 : }
15488 :
15489 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fAutoCreated(PyObject *py_obj, PyObject *value, void *closure)
15490 : {
15491 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
15492 0 : if (value == NULL) {
15493 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAutoCreated");
15494 0 : return -1;
15495 : }
15496 : {
15497 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAutoCreated));
15498 0 : if (PyLong_Check(value)) {
15499 0 : unsigned long long test_var;
15500 0 : test_var = PyLong_AsUnsignedLongLong(value);
15501 0 : if (PyErr_Occurred() != NULL) {
15502 0 : return -1;
15503 : }
15504 0 : if (test_var > uint_max) {
15505 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15506 : PyLong_Type.tp_name, uint_max, test_var);
15507 0 : return -1;
15508 : }
15509 0 : object->fAutoCreated = test_var;
15510 : } else {
15511 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15512 : PyLong_Type.tp_name);
15513 0 : return -1;
15514 : }
15515 : }
15516 0 : return 0;
15517 : }
15518 :
15519 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fUseDatabase(PyObject *obj, void *closure)
15520 : {
15521 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
15522 0 : PyObject *py_fUseDatabase;
15523 0 : py_fUseDatabase = PyLong_FromUnsignedLongLong((uint32_t)(object->fUseDatabase));
15524 0 : return py_fUseDatabase;
15525 : }
15526 :
15527 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fUseDatabase(PyObject *py_obj, PyObject *value, void *closure)
15528 : {
15529 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
15530 0 : if (value == NULL) {
15531 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fUseDatabase");
15532 0 : return -1;
15533 : }
15534 : {
15535 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fUseDatabase));
15536 0 : if (PyLong_Check(value)) {
15537 0 : unsigned long long test_var;
15538 0 : test_var = PyLong_AsUnsignedLongLong(value);
15539 0 : if (PyErr_Occurred() != NULL) {
15540 0 : return -1;
15541 : }
15542 0 : if (test_var > uint_max) {
15543 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15544 : PyLong_Type.tp_name, uint_max, test_var);
15545 0 : return -1;
15546 : }
15547 0 : object->fUseDatabase = test_var;
15548 : } else {
15549 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15550 : PyLong_Type.tp_name);
15551 0 : return -1;
15552 : }
15553 : }
15554 0 : return 0;
15555 : }
15556 :
15557 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pszDataFile(PyObject *obj, void *closure)
15558 : {
15559 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
15560 0 : PyObject *py_pszDataFile;
15561 0 : if (object->pszDataFile == NULL) {
15562 0 : Py_RETURN_NONE;
15563 : }
15564 0 : if (object->pszDataFile == NULL) {
15565 0 : py_pszDataFile = Py_None;
15566 0 : Py_INCREF(py_pszDataFile);
15567 : } else {
15568 0 : if (object->pszDataFile == NULL) {
15569 0 : py_pszDataFile = Py_None;
15570 0 : Py_INCREF(py_pszDataFile);
15571 : } else {
15572 0 : py_pszDataFile = PyUnicode_Decode(object->pszDataFile, strlen(object->pszDataFile), "utf-8", "ignore");
15573 : }
15574 : }
15575 0 : return py_pszDataFile;
15576 : }
15577 :
15578 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pszDataFile(PyObject *py_obj, PyObject *value, void *closure)
15579 : {
15580 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
15581 0 : if (value == NULL) {
15582 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDataFile");
15583 0 : return -1;
15584 : }
15585 0 : if (value == Py_None) {
15586 0 : object->pszDataFile = NULL;
15587 : } else {
15588 0 : object->pszDataFile = NULL;
15589 : {
15590 0 : const char *test_str;
15591 0 : const char *talloc_str;
15592 0 : PyObject *unicode = NULL;
15593 0 : if (PyUnicode_Check(value)) {
15594 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
15595 0 : if (unicode == NULL) {
15596 0 : return -1;
15597 : }
15598 0 : test_str = PyBytes_AS_STRING(unicode);
15599 0 : } else if (PyBytes_Check(value)) {
15600 0 : test_str = PyBytes_AS_STRING(value);
15601 : } else {
15602 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
15603 0 : return -1;
15604 : }
15605 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
15606 0 : if (unicode != NULL) {
15607 0 : Py_DECREF(unicode);
15608 : }
15609 0 : if (talloc_str == NULL) {
15610 0 : PyErr_NoMemory();
15611 0 : return -1;
15612 : }
15613 0 : object->pszDataFile = talloc_str;
15614 : }
15615 : }
15616 0 : return 0;
15617 : }
15618 :
15619 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_aipMasters(PyObject *obj, void *closure)
15620 : {
15621 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
15622 0 : PyObject *py_aipMasters;
15623 0 : if (object->aipMasters == NULL) {
15624 0 : Py_RETURN_NONE;
15625 : }
15626 0 : if (object->aipMasters == NULL) {
15627 0 : py_aipMasters = Py_None;
15628 0 : Py_INCREF(py_aipMasters);
15629 : } else {
15630 0 : py_aipMasters = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipMasters, object->aipMasters);
15631 : }
15632 0 : return py_aipMasters;
15633 : }
15634 :
15635 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_aipMasters(PyObject *py_obj, PyObject *value, void *closure)
15636 : {
15637 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
15638 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipMasters));
15639 0 : if (value == NULL) {
15640 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipMasters");
15641 0 : return -1;
15642 : }
15643 0 : if (value == Py_None) {
15644 0 : object->aipMasters = NULL;
15645 : } else {
15646 0 : object->aipMasters = NULL;
15647 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
15648 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
15649 0 : PyErr_NoMemory();
15650 0 : return -1;
15651 : }
15652 0 : object->aipMasters = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
15653 : }
15654 0 : return 0;
15655 : }
15656 :
15657 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fSecureSecondaries(PyObject *obj, void *closure)
15658 : {
15659 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
15660 0 : PyObject *py_fSecureSecondaries;
15661 0 : py_fSecureSecondaries = PyLong_FromUnsignedLongLong((uint32_t)(object->fSecureSecondaries));
15662 0 : return py_fSecureSecondaries;
15663 : }
15664 :
15665 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
15666 : {
15667 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
15668 0 : if (value == NULL) {
15669 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fSecureSecondaries");
15670 0 : return -1;
15671 : }
15672 : {
15673 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureSecondaries));
15674 0 : if (PyLong_Check(value)) {
15675 0 : unsigned long long test_var;
15676 0 : test_var = PyLong_AsUnsignedLongLong(value);
15677 0 : if (PyErr_Occurred() != NULL) {
15678 0 : return -1;
15679 : }
15680 0 : if (test_var > uint_max) {
15681 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15682 : PyLong_Type.tp_name, uint_max, test_var);
15683 0 : return -1;
15684 : }
15685 0 : object->fSecureSecondaries = test_var;
15686 : } else {
15687 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15688 : PyLong_Type.tp_name);
15689 0 : return -1;
15690 : }
15691 : }
15692 0 : return 0;
15693 : }
15694 :
15695 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fNotifyLevel(PyObject *obj, void *closure)
15696 : {
15697 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
15698 0 : PyObject *py_fNotifyLevel;
15699 0 : py_fNotifyLevel = PyLong_FromUnsignedLongLong((uint32_t)(object->fNotifyLevel));
15700 0 : return py_fNotifyLevel;
15701 : }
15702 :
15703 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
15704 : {
15705 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
15706 0 : if (value == NULL) {
15707 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fNotifyLevel");
15708 0 : return -1;
15709 : }
15710 : {
15711 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNotifyLevel));
15712 0 : if (PyLong_Check(value)) {
15713 0 : unsigned long long test_var;
15714 0 : test_var = PyLong_AsUnsignedLongLong(value);
15715 0 : if (PyErr_Occurred() != NULL) {
15716 0 : return -1;
15717 : }
15718 0 : if (test_var > uint_max) {
15719 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15720 : PyLong_Type.tp_name, uint_max, test_var);
15721 0 : return -1;
15722 : }
15723 0 : object->fNotifyLevel = test_var;
15724 : } else {
15725 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15726 : PyLong_Type.tp_name);
15727 0 : return -1;
15728 : }
15729 : }
15730 0 : return 0;
15731 : }
15732 :
15733 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_aipSecondaries(PyObject *obj, void *closure)
15734 : {
15735 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
15736 0 : PyObject *py_aipSecondaries;
15737 0 : if (object->aipSecondaries == NULL) {
15738 0 : Py_RETURN_NONE;
15739 : }
15740 0 : if (object->aipSecondaries == NULL) {
15741 0 : py_aipSecondaries = Py_None;
15742 0 : Py_INCREF(py_aipSecondaries);
15743 : } else {
15744 0 : py_aipSecondaries = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
15745 : }
15746 0 : return py_aipSecondaries;
15747 : }
15748 :
15749 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
15750 : {
15751 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
15752 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipSecondaries));
15753 0 : if (value == NULL) {
15754 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipSecondaries");
15755 0 : return -1;
15756 : }
15757 0 : if (value == Py_None) {
15758 0 : object->aipSecondaries = NULL;
15759 : } else {
15760 0 : object->aipSecondaries = NULL;
15761 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
15762 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
15763 0 : PyErr_NoMemory();
15764 0 : return -1;
15765 : }
15766 0 : object->aipSecondaries = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
15767 : }
15768 0 : return 0;
15769 : }
15770 :
15771 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_aipNotify(PyObject *obj, void *closure)
15772 : {
15773 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
15774 0 : PyObject *py_aipNotify;
15775 0 : if (object->aipNotify == NULL) {
15776 0 : Py_RETURN_NONE;
15777 : }
15778 0 : if (object->aipNotify == NULL) {
15779 0 : py_aipNotify = Py_None;
15780 0 : Py_INCREF(py_aipNotify);
15781 : } else {
15782 0 : py_aipNotify = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipNotify, object->aipNotify);
15783 : }
15784 0 : return py_aipNotify;
15785 : }
15786 :
15787 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_aipNotify(PyObject *py_obj, PyObject *value, void *closure)
15788 : {
15789 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
15790 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipNotify));
15791 0 : if (value == NULL) {
15792 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipNotify");
15793 0 : return -1;
15794 : }
15795 0 : if (value == Py_None) {
15796 0 : object->aipNotify = NULL;
15797 : } else {
15798 0 : object->aipNotify = NULL;
15799 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
15800 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
15801 0 : PyErr_NoMemory();
15802 0 : return -1;
15803 : }
15804 0 : object->aipNotify = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
15805 : }
15806 0 : return 0;
15807 : }
15808 :
15809 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fUseWins(PyObject *obj, void *closure)
15810 : {
15811 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
15812 0 : PyObject *py_fUseWins;
15813 0 : py_fUseWins = PyLong_FromUnsignedLongLong((uint32_t)(object->fUseWins));
15814 0 : return py_fUseWins;
15815 : }
15816 :
15817 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fUseWins(PyObject *py_obj, PyObject *value, void *closure)
15818 : {
15819 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
15820 0 : if (value == NULL) {
15821 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fUseWins");
15822 0 : return -1;
15823 : }
15824 : {
15825 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fUseWins));
15826 0 : if (PyLong_Check(value)) {
15827 0 : unsigned long long test_var;
15828 0 : test_var = PyLong_AsUnsignedLongLong(value);
15829 0 : if (PyErr_Occurred() != NULL) {
15830 0 : return -1;
15831 : }
15832 0 : if (test_var > uint_max) {
15833 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15834 : PyLong_Type.tp_name, uint_max, test_var);
15835 0 : return -1;
15836 : }
15837 0 : object->fUseWins = test_var;
15838 : } else {
15839 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15840 : PyLong_Type.tp_name);
15841 0 : return -1;
15842 : }
15843 : }
15844 0 : return 0;
15845 : }
15846 :
15847 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fUseNbstat(PyObject *obj, void *closure)
15848 : {
15849 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
15850 0 : PyObject *py_fUseNbstat;
15851 0 : py_fUseNbstat = PyLong_FromUnsignedLongLong((uint32_t)(object->fUseNbstat));
15852 0 : return py_fUseNbstat;
15853 : }
15854 :
15855 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fUseNbstat(PyObject *py_obj, PyObject *value, void *closure)
15856 : {
15857 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
15858 0 : if (value == NULL) {
15859 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fUseNbstat");
15860 0 : return -1;
15861 : }
15862 : {
15863 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fUseNbstat));
15864 0 : if (PyLong_Check(value)) {
15865 0 : unsigned long long test_var;
15866 0 : test_var = PyLong_AsUnsignedLongLong(value);
15867 0 : if (PyErr_Occurred() != NULL) {
15868 0 : return -1;
15869 : }
15870 0 : if (test_var > uint_max) {
15871 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15872 : PyLong_Type.tp_name, uint_max, test_var);
15873 0 : return -1;
15874 : }
15875 0 : object->fUseNbstat = test_var;
15876 : } else {
15877 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15878 : PyLong_Type.tp_name);
15879 0 : return -1;
15880 : }
15881 : }
15882 0 : return 0;
15883 : }
15884 :
15885 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fAging(PyObject *obj, void *closure)
15886 : {
15887 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
15888 0 : PyObject *py_fAging;
15889 0 : py_fAging = PyLong_FromUnsignedLongLong((uint32_t)(object->fAging));
15890 0 : return py_fAging;
15891 : }
15892 :
15893 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fAging(PyObject *py_obj, PyObject *value, void *closure)
15894 : {
15895 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
15896 0 : if (value == NULL) {
15897 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAging");
15898 0 : return -1;
15899 : }
15900 : {
15901 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAging));
15902 0 : if (PyLong_Check(value)) {
15903 0 : unsigned long long test_var;
15904 0 : test_var = PyLong_AsUnsignedLongLong(value);
15905 0 : if (PyErr_Occurred() != NULL) {
15906 0 : return -1;
15907 : }
15908 0 : if (test_var > uint_max) {
15909 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15910 : PyLong_Type.tp_name, uint_max, test_var);
15911 0 : return -1;
15912 : }
15913 0 : object->fAging = test_var;
15914 : } else {
15915 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15916 : PyLong_Type.tp_name);
15917 0 : return -1;
15918 : }
15919 : }
15920 0 : return 0;
15921 : }
15922 :
15923 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwNoRefreshInterval(PyObject *obj, void *closure)
15924 : {
15925 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
15926 0 : PyObject *py_dwNoRefreshInterval;
15927 0 : py_dwNoRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)(object->dwNoRefreshInterval));
15928 0 : return py_dwNoRefreshInterval;
15929 : }
15930 :
15931 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwNoRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
15932 : {
15933 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
15934 0 : if (value == NULL) {
15935 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwNoRefreshInterval");
15936 0 : return -1;
15937 : }
15938 : {
15939 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwNoRefreshInterval));
15940 0 : if (PyLong_Check(value)) {
15941 0 : unsigned long long test_var;
15942 0 : test_var = PyLong_AsUnsignedLongLong(value);
15943 0 : if (PyErr_Occurred() != NULL) {
15944 0 : return -1;
15945 : }
15946 0 : if (test_var > uint_max) {
15947 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15948 : PyLong_Type.tp_name, uint_max, test_var);
15949 0 : return -1;
15950 : }
15951 0 : object->dwNoRefreshInterval = test_var;
15952 : } else {
15953 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15954 : PyLong_Type.tp_name);
15955 0 : return -1;
15956 : }
15957 : }
15958 0 : return 0;
15959 : }
15960 :
15961 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwRefreshInterval(PyObject *obj, void *closure)
15962 : {
15963 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
15964 0 : PyObject *py_dwRefreshInterval;
15965 0 : py_dwRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRefreshInterval));
15966 0 : return py_dwRefreshInterval;
15967 : }
15968 :
15969 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
15970 : {
15971 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
15972 0 : if (value == NULL) {
15973 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRefreshInterval");
15974 0 : return -1;
15975 : }
15976 : {
15977 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRefreshInterval));
15978 0 : if (PyLong_Check(value)) {
15979 0 : unsigned long long test_var;
15980 0 : test_var = PyLong_AsUnsignedLongLong(value);
15981 0 : if (PyErr_Occurred() != NULL) {
15982 0 : return -1;
15983 : }
15984 0 : if (test_var > uint_max) {
15985 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15986 : PyLong_Type.tp_name, uint_max, test_var);
15987 0 : return -1;
15988 : }
15989 0 : object->dwRefreshInterval = test_var;
15990 : } else {
15991 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15992 : PyLong_Type.tp_name);
15993 0 : return -1;
15994 : }
15995 : }
15996 0 : return 0;
15997 : }
15998 :
15999 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwAvailForScavengeTime(PyObject *obj, void *closure)
16000 : {
16001 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
16002 0 : PyObject *py_dwAvailForScavengeTime;
16003 0 : py_dwAvailForScavengeTime = PyLong_FromUnsignedLongLong((uint32_t)(object->dwAvailForScavengeTime));
16004 0 : return py_dwAvailForScavengeTime;
16005 : }
16006 :
16007 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwAvailForScavengeTime(PyObject *py_obj, PyObject *value, void *closure)
16008 : {
16009 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
16010 0 : if (value == NULL) {
16011 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwAvailForScavengeTime");
16012 0 : return -1;
16013 : }
16014 : {
16015 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwAvailForScavengeTime));
16016 0 : if (PyLong_Check(value)) {
16017 0 : unsigned long long test_var;
16018 0 : test_var = PyLong_AsUnsignedLongLong(value);
16019 0 : if (PyErr_Occurred() != NULL) {
16020 0 : return -1;
16021 : }
16022 0 : if (test_var > uint_max) {
16023 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16024 : PyLong_Type.tp_name, uint_max, test_var);
16025 0 : return -1;
16026 : }
16027 0 : object->dwAvailForScavengeTime = test_var;
16028 : } else {
16029 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16030 : PyLong_Type.tp_name);
16031 0 : return -1;
16032 : }
16033 : }
16034 0 : return 0;
16035 : }
16036 :
16037 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_aipScavengeServers(PyObject *obj, void *closure)
16038 : {
16039 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
16040 0 : PyObject *py_aipScavengeServers;
16041 0 : if (object->aipScavengeServers == NULL) {
16042 0 : Py_RETURN_NONE;
16043 : }
16044 0 : if (object->aipScavengeServers == NULL) {
16045 0 : py_aipScavengeServers = Py_None;
16046 0 : Py_INCREF(py_aipScavengeServers);
16047 : } else {
16048 0 : py_aipScavengeServers = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipScavengeServers, object->aipScavengeServers);
16049 : }
16050 0 : return py_aipScavengeServers;
16051 : }
16052 :
16053 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_aipScavengeServers(PyObject *py_obj, PyObject *value, void *closure)
16054 : {
16055 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
16056 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipScavengeServers));
16057 0 : if (value == NULL) {
16058 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipScavengeServers");
16059 0 : return -1;
16060 : }
16061 0 : if (value == Py_None) {
16062 0 : object->aipScavengeServers = NULL;
16063 : } else {
16064 0 : object->aipScavengeServers = NULL;
16065 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
16066 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
16067 0 : PyErr_NoMemory();
16068 0 : return -1;
16069 : }
16070 0 : object->aipScavengeServers = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
16071 : }
16072 0 : return 0;
16073 : }
16074 :
16075 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwForwarderTimeout(PyObject *obj, void *closure)
16076 : {
16077 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
16078 0 : PyObject *py_dwForwarderTimeout;
16079 0 : py_dwForwarderTimeout = PyLong_FromUnsignedLongLong((uint32_t)(object->dwForwarderTimeout));
16080 0 : return py_dwForwarderTimeout;
16081 : }
16082 :
16083 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwForwarderTimeout(PyObject *py_obj, PyObject *value, void *closure)
16084 : {
16085 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
16086 0 : if (value == NULL) {
16087 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwForwarderTimeout");
16088 0 : return -1;
16089 : }
16090 : {
16091 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwForwarderTimeout));
16092 0 : if (PyLong_Check(value)) {
16093 0 : unsigned long long test_var;
16094 0 : test_var = PyLong_AsUnsignedLongLong(value);
16095 0 : if (PyErr_Occurred() != NULL) {
16096 0 : return -1;
16097 : }
16098 0 : if (test_var > uint_max) {
16099 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16100 : PyLong_Type.tp_name, uint_max, test_var);
16101 0 : return -1;
16102 : }
16103 0 : object->dwForwarderTimeout = test_var;
16104 : } else {
16105 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16106 : PyLong_Type.tp_name);
16107 0 : return -1;
16108 : }
16109 : }
16110 0 : return 0;
16111 : }
16112 :
16113 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fForwarderSlave(PyObject *obj, void *closure)
16114 : {
16115 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
16116 0 : PyObject *py_fForwarderSlave;
16117 0 : py_fForwarderSlave = PyLong_FromUnsignedLongLong((uint32_t)(object->fForwarderSlave));
16118 0 : return py_fForwarderSlave;
16119 : }
16120 :
16121 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fForwarderSlave(PyObject *py_obj, PyObject *value, void *closure)
16122 : {
16123 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
16124 0 : if (value == NULL) {
16125 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fForwarderSlave");
16126 0 : return -1;
16127 : }
16128 : {
16129 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fForwarderSlave));
16130 0 : if (PyLong_Check(value)) {
16131 0 : unsigned long long test_var;
16132 0 : test_var = PyLong_AsUnsignedLongLong(value);
16133 0 : if (PyErr_Occurred() != NULL) {
16134 0 : return -1;
16135 : }
16136 0 : if (test_var > uint_max) {
16137 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16138 : PyLong_Type.tp_name, uint_max, test_var);
16139 0 : return -1;
16140 : }
16141 0 : object->fForwarderSlave = test_var;
16142 : } else {
16143 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16144 : PyLong_Type.tp_name);
16145 0 : return -1;
16146 : }
16147 : }
16148 0 : return 0;
16149 : }
16150 :
16151 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_aipLocalMasters(PyObject *obj, void *closure)
16152 : {
16153 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
16154 0 : PyObject *py_aipLocalMasters;
16155 0 : if (object->aipLocalMasters == NULL) {
16156 0 : Py_RETURN_NONE;
16157 : }
16158 0 : if (object->aipLocalMasters == NULL) {
16159 0 : py_aipLocalMasters = Py_None;
16160 0 : Py_INCREF(py_aipLocalMasters);
16161 : } else {
16162 0 : py_aipLocalMasters = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipLocalMasters, object->aipLocalMasters);
16163 : }
16164 0 : return py_aipLocalMasters;
16165 : }
16166 :
16167 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_aipLocalMasters(PyObject *py_obj, PyObject *value, void *closure)
16168 : {
16169 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
16170 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipLocalMasters));
16171 0 : if (value == NULL) {
16172 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipLocalMasters");
16173 0 : return -1;
16174 : }
16175 0 : if (value == Py_None) {
16176 0 : object->aipLocalMasters = NULL;
16177 : } else {
16178 0 : object->aipLocalMasters = NULL;
16179 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
16180 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
16181 0 : PyErr_NoMemory();
16182 0 : return -1;
16183 : }
16184 0 : object->aipLocalMasters = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
16185 : }
16186 0 : return 0;
16187 : }
16188 :
16189 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwDpFlags(PyObject *obj, void *closure)
16190 : {
16191 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
16192 0 : PyObject *py_dwDpFlags;
16193 0 : py_dwDpFlags = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDpFlags));
16194 0 : return py_dwDpFlags;
16195 : }
16196 :
16197 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwDpFlags(PyObject *py_obj, PyObject *value, void *closure)
16198 : {
16199 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
16200 0 : if (value == NULL) {
16201 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDpFlags");
16202 0 : return -1;
16203 : }
16204 : {
16205 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDpFlags));
16206 0 : if (PyLong_Check(value)) {
16207 0 : unsigned long long test_var;
16208 0 : test_var = PyLong_AsUnsignedLongLong(value);
16209 0 : if (PyErr_Occurred() != NULL) {
16210 0 : return -1;
16211 : }
16212 0 : if (test_var > uint_max) {
16213 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16214 : PyLong_Type.tp_name, uint_max, test_var);
16215 0 : return -1;
16216 : }
16217 0 : object->dwDpFlags = test_var;
16218 : } else {
16219 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16220 : PyLong_Type.tp_name);
16221 0 : return -1;
16222 : }
16223 : }
16224 0 : return 0;
16225 : }
16226 :
16227 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pszDpFqdn(PyObject *obj, void *closure)
16228 : {
16229 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
16230 0 : PyObject *py_pszDpFqdn;
16231 0 : if (object->pszDpFqdn == NULL) {
16232 0 : Py_RETURN_NONE;
16233 : }
16234 0 : if (object->pszDpFqdn == NULL) {
16235 0 : py_pszDpFqdn = Py_None;
16236 0 : Py_INCREF(py_pszDpFqdn);
16237 : } else {
16238 0 : if (object->pszDpFqdn == NULL) {
16239 0 : py_pszDpFqdn = Py_None;
16240 0 : Py_INCREF(py_pszDpFqdn);
16241 : } else {
16242 0 : py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
16243 : }
16244 : }
16245 0 : return py_pszDpFqdn;
16246 : }
16247 :
16248 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
16249 : {
16250 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
16251 0 : if (value == NULL) {
16252 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDpFqdn");
16253 0 : return -1;
16254 : }
16255 0 : if (value == Py_None) {
16256 0 : object->pszDpFqdn = NULL;
16257 : } else {
16258 0 : object->pszDpFqdn = NULL;
16259 : {
16260 0 : const char *test_str;
16261 0 : const char *talloc_str;
16262 0 : PyObject *unicode = NULL;
16263 0 : if (PyUnicode_Check(value)) {
16264 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
16265 0 : if (unicode == NULL) {
16266 0 : return -1;
16267 : }
16268 0 : test_str = PyBytes_AS_STRING(unicode);
16269 0 : } else if (PyBytes_Check(value)) {
16270 0 : test_str = PyBytes_AS_STRING(value);
16271 : } else {
16272 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
16273 0 : return -1;
16274 : }
16275 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
16276 0 : if (unicode != NULL) {
16277 0 : Py_DECREF(unicode);
16278 : }
16279 0 : if (talloc_str == NULL) {
16280 0 : PyErr_NoMemory();
16281 0 : return -1;
16282 : }
16283 0 : object->pszDpFqdn = talloc_str;
16284 : }
16285 : }
16286 0 : return 0;
16287 : }
16288 :
16289 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pwszZoneDn(PyObject *obj, void *closure)
16290 : {
16291 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
16292 0 : PyObject *py_pwszZoneDn;
16293 0 : if (object->pwszZoneDn == NULL) {
16294 0 : Py_RETURN_NONE;
16295 : }
16296 0 : if (object->pwszZoneDn == NULL) {
16297 0 : py_pwszZoneDn = Py_None;
16298 0 : Py_INCREF(py_pwszZoneDn);
16299 : } else {
16300 0 : if (object->pwszZoneDn == NULL) {
16301 0 : py_pwszZoneDn = Py_None;
16302 0 : Py_INCREF(py_pwszZoneDn);
16303 : } else {
16304 0 : py_pwszZoneDn = PyUnicode_Decode(object->pwszZoneDn, strlen(object->pwszZoneDn), "utf-8", "ignore");
16305 : }
16306 : }
16307 0 : return py_pwszZoneDn;
16308 : }
16309 :
16310 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pwszZoneDn(PyObject *py_obj, PyObject *value, void *closure)
16311 : {
16312 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
16313 0 : if (value == NULL) {
16314 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pwszZoneDn");
16315 0 : return -1;
16316 : }
16317 0 : if (value == Py_None) {
16318 0 : object->pwszZoneDn = NULL;
16319 : } else {
16320 0 : object->pwszZoneDn = NULL;
16321 : {
16322 0 : const char *test_str;
16323 0 : const char *talloc_str;
16324 0 : PyObject *unicode = NULL;
16325 0 : if (PyUnicode_Check(value)) {
16326 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
16327 0 : if (unicode == NULL) {
16328 0 : return -1;
16329 : }
16330 0 : test_str = PyBytes_AS_STRING(unicode);
16331 0 : } else if (PyBytes_Check(value)) {
16332 0 : test_str = PyBytes_AS_STRING(value);
16333 : } else {
16334 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
16335 0 : return -1;
16336 : }
16337 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
16338 0 : if (unicode != NULL) {
16339 0 : Py_DECREF(unicode);
16340 : }
16341 0 : if (talloc_str == NULL) {
16342 0 : PyErr_NoMemory();
16343 0 : return -1;
16344 : }
16345 0 : object->pwszZoneDn = talloc_str;
16346 : }
16347 : }
16348 0 : return 0;
16349 : }
16350 :
16351 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwLastSuccessfulSoaCheck(PyObject *obj, void *closure)
16352 : {
16353 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
16354 0 : PyObject *py_dwLastSuccessfulSoaCheck;
16355 0 : py_dwLastSuccessfulSoaCheck = PyLong_FromUnsignedLongLong((uint32_t)(object->dwLastSuccessfulSoaCheck));
16356 0 : return py_dwLastSuccessfulSoaCheck;
16357 : }
16358 :
16359 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwLastSuccessfulSoaCheck(PyObject *py_obj, PyObject *value, void *closure)
16360 : {
16361 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
16362 0 : if (value == NULL) {
16363 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwLastSuccessfulSoaCheck");
16364 0 : return -1;
16365 : }
16366 : {
16367 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLastSuccessfulSoaCheck));
16368 0 : if (PyLong_Check(value)) {
16369 0 : unsigned long long test_var;
16370 0 : test_var = PyLong_AsUnsignedLongLong(value);
16371 0 : if (PyErr_Occurred() != NULL) {
16372 0 : return -1;
16373 : }
16374 0 : if (test_var > uint_max) {
16375 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16376 : PyLong_Type.tp_name, uint_max, test_var);
16377 0 : return -1;
16378 : }
16379 0 : object->dwLastSuccessfulSoaCheck = test_var;
16380 : } else {
16381 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16382 : PyLong_Type.tp_name);
16383 0 : return -1;
16384 : }
16385 : }
16386 0 : return 0;
16387 : }
16388 :
16389 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwLastSuccessfulXfr(PyObject *obj, void *closure)
16390 : {
16391 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
16392 0 : PyObject *py_dwLastSuccessfulXfr;
16393 0 : py_dwLastSuccessfulXfr = PyLong_FromUnsignedLongLong((uint32_t)(object->dwLastSuccessfulXfr));
16394 0 : return py_dwLastSuccessfulXfr;
16395 : }
16396 :
16397 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwLastSuccessfulXfr(PyObject *py_obj, PyObject *value, void *closure)
16398 : {
16399 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
16400 0 : if (value == NULL) {
16401 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwLastSuccessfulXfr");
16402 0 : return -1;
16403 : }
16404 : {
16405 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLastSuccessfulXfr));
16406 0 : if (PyLong_Check(value)) {
16407 0 : unsigned long long test_var;
16408 0 : test_var = PyLong_AsUnsignedLongLong(value);
16409 0 : if (PyErr_Occurred() != NULL) {
16410 0 : return -1;
16411 : }
16412 0 : if (test_var > uint_max) {
16413 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16414 : PyLong_Type.tp_name, uint_max, test_var);
16415 0 : return -1;
16416 : }
16417 0 : object->dwLastSuccessfulXfr = test_var;
16418 : } else {
16419 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16420 : PyLong_Type.tp_name);
16421 0 : return -1;
16422 : }
16423 : }
16424 0 : return 0;
16425 : }
16426 :
16427 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved1(PyObject *obj, void *closure)
16428 : {
16429 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
16430 0 : PyObject *py_dwReserved1;
16431 0 : py_dwReserved1 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved1));
16432 0 : return py_dwReserved1;
16433 : }
16434 :
16435 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved1(PyObject *py_obj, PyObject *value, void *closure)
16436 : {
16437 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
16438 0 : if (value == NULL) {
16439 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved1");
16440 0 : return -1;
16441 : }
16442 : {
16443 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved1));
16444 0 : if (PyLong_Check(value)) {
16445 0 : unsigned long long test_var;
16446 0 : test_var = PyLong_AsUnsignedLongLong(value);
16447 0 : if (PyErr_Occurred() != NULL) {
16448 0 : return -1;
16449 : }
16450 0 : if (test_var > uint_max) {
16451 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16452 : PyLong_Type.tp_name, uint_max, test_var);
16453 0 : return -1;
16454 : }
16455 0 : object->dwReserved1 = test_var;
16456 : } else {
16457 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16458 : PyLong_Type.tp_name);
16459 0 : return -1;
16460 : }
16461 : }
16462 0 : return 0;
16463 : }
16464 :
16465 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved2(PyObject *obj, void *closure)
16466 : {
16467 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
16468 0 : PyObject *py_dwReserved2;
16469 0 : py_dwReserved2 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved2));
16470 0 : return py_dwReserved2;
16471 : }
16472 :
16473 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved2(PyObject *py_obj, PyObject *value, void *closure)
16474 : {
16475 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
16476 0 : if (value == NULL) {
16477 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved2");
16478 0 : return -1;
16479 : }
16480 : {
16481 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved2));
16482 0 : if (PyLong_Check(value)) {
16483 0 : unsigned long long test_var;
16484 0 : test_var = PyLong_AsUnsignedLongLong(value);
16485 0 : if (PyErr_Occurred() != NULL) {
16486 0 : return -1;
16487 : }
16488 0 : if (test_var > uint_max) {
16489 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16490 : PyLong_Type.tp_name, uint_max, test_var);
16491 0 : return -1;
16492 : }
16493 0 : object->dwReserved2 = test_var;
16494 : } else {
16495 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16496 : PyLong_Type.tp_name);
16497 0 : return -1;
16498 : }
16499 : }
16500 0 : return 0;
16501 : }
16502 :
16503 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved3(PyObject *obj, void *closure)
16504 : {
16505 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
16506 0 : PyObject *py_dwReserved3;
16507 0 : py_dwReserved3 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved3));
16508 0 : return py_dwReserved3;
16509 : }
16510 :
16511 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved3(PyObject *py_obj, PyObject *value, void *closure)
16512 : {
16513 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
16514 0 : if (value == NULL) {
16515 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved3");
16516 0 : return -1;
16517 : }
16518 : {
16519 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved3));
16520 0 : if (PyLong_Check(value)) {
16521 0 : unsigned long long test_var;
16522 0 : test_var = PyLong_AsUnsignedLongLong(value);
16523 0 : if (PyErr_Occurred() != NULL) {
16524 0 : return -1;
16525 : }
16526 0 : if (test_var > uint_max) {
16527 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16528 : PyLong_Type.tp_name, uint_max, test_var);
16529 0 : return -1;
16530 : }
16531 0 : object->dwReserved3 = test_var;
16532 : } else {
16533 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16534 : PyLong_Type.tp_name);
16535 0 : return -1;
16536 : }
16537 : }
16538 0 : return 0;
16539 : }
16540 :
16541 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved4(PyObject *obj, void *closure)
16542 : {
16543 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
16544 0 : PyObject *py_dwReserved4;
16545 0 : py_dwReserved4 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved4));
16546 0 : return py_dwReserved4;
16547 : }
16548 :
16549 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved4(PyObject *py_obj, PyObject *value, void *closure)
16550 : {
16551 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
16552 0 : if (value == NULL) {
16553 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved4");
16554 0 : return -1;
16555 : }
16556 : {
16557 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved4));
16558 0 : if (PyLong_Check(value)) {
16559 0 : unsigned long long test_var;
16560 0 : test_var = PyLong_AsUnsignedLongLong(value);
16561 0 : if (PyErr_Occurred() != NULL) {
16562 0 : return -1;
16563 : }
16564 0 : if (test_var > uint_max) {
16565 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16566 : PyLong_Type.tp_name, uint_max, test_var);
16567 0 : return -1;
16568 : }
16569 0 : object->dwReserved4 = test_var;
16570 : } else {
16571 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16572 : PyLong_Type.tp_name);
16573 0 : return -1;
16574 : }
16575 : }
16576 0 : return 0;
16577 : }
16578 :
16579 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved5(PyObject *obj, void *closure)
16580 : {
16581 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
16582 0 : PyObject *py_dwReserved5;
16583 0 : py_dwReserved5 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved5));
16584 0 : return py_dwReserved5;
16585 : }
16586 :
16587 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved5(PyObject *py_obj, PyObject *value, void *closure)
16588 : {
16589 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
16590 0 : if (value == NULL) {
16591 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved5");
16592 0 : return -1;
16593 : }
16594 : {
16595 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved5));
16596 0 : if (PyLong_Check(value)) {
16597 0 : unsigned long long test_var;
16598 0 : test_var = PyLong_AsUnsignedLongLong(value);
16599 0 : if (PyErr_Occurred() != NULL) {
16600 0 : return -1;
16601 : }
16602 0 : if (test_var > uint_max) {
16603 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16604 : PyLong_Type.tp_name, uint_max, test_var);
16605 0 : return -1;
16606 : }
16607 0 : object->dwReserved5 = test_var;
16608 : } else {
16609 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16610 : PyLong_Type.tp_name);
16611 0 : return -1;
16612 : }
16613 : }
16614 0 : return 0;
16615 : }
16616 :
16617 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved1(PyObject *obj, void *closure)
16618 : {
16619 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
16620 0 : PyObject *py_pReserved1;
16621 0 : if (object->pReserved1 == NULL) {
16622 0 : Py_RETURN_NONE;
16623 : }
16624 0 : if (object->pReserved1 == NULL) {
16625 0 : py_pReserved1 = Py_None;
16626 0 : Py_INCREF(py_pReserved1);
16627 : } else {
16628 0 : if (object->pReserved1 == NULL) {
16629 0 : py_pReserved1 = Py_None;
16630 0 : Py_INCREF(py_pReserved1);
16631 : } else {
16632 0 : py_pReserved1 = PyUnicode_Decode(object->pReserved1, strlen(object->pReserved1), "utf-8", "ignore");
16633 : }
16634 : }
16635 0 : return py_pReserved1;
16636 : }
16637 :
16638 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved1(PyObject *py_obj, PyObject *value, void *closure)
16639 : {
16640 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
16641 0 : if (value == NULL) {
16642 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pReserved1");
16643 0 : return -1;
16644 : }
16645 0 : if (value == Py_None) {
16646 0 : object->pReserved1 = NULL;
16647 : } else {
16648 0 : object->pReserved1 = NULL;
16649 : {
16650 0 : const char *test_str;
16651 0 : const char *talloc_str;
16652 0 : PyObject *unicode = NULL;
16653 0 : if (PyUnicode_Check(value)) {
16654 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
16655 0 : if (unicode == NULL) {
16656 0 : return -1;
16657 : }
16658 0 : test_str = PyBytes_AS_STRING(unicode);
16659 0 : } else if (PyBytes_Check(value)) {
16660 0 : test_str = PyBytes_AS_STRING(value);
16661 : } else {
16662 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
16663 0 : return -1;
16664 : }
16665 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
16666 0 : if (unicode != NULL) {
16667 0 : Py_DECREF(unicode);
16668 : }
16669 0 : if (talloc_str == NULL) {
16670 0 : PyErr_NoMemory();
16671 0 : return -1;
16672 : }
16673 0 : object->pReserved1 = talloc_str;
16674 : }
16675 : }
16676 0 : return 0;
16677 : }
16678 :
16679 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved2(PyObject *obj, void *closure)
16680 : {
16681 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
16682 0 : PyObject *py_pReserved2;
16683 0 : if (object->pReserved2 == NULL) {
16684 0 : Py_RETURN_NONE;
16685 : }
16686 0 : if (object->pReserved2 == NULL) {
16687 0 : py_pReserved2 = Py_None;
16688 0 : Py_INCREF(py_pReserved2);
16689 : } else {
16690 0 : if (object->pReserved2 == NULL) {
16691 0 : py_pReserved2 = Py_None;
16692 0 : Py_INCREF(py_pReserved2);
16693 : } else {
16694 0 : py_pReserved2 = PyUnicode_Decode(object->pReserved2, strlen(object->pReserved2), "utf-8", "ignore");
16695 : }
16696 : }
16697 0 : return py_pReserved2;
16698 : }
16699 :
16700 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved2(PyObject *py_obj, PyObject *value, void *closure)
16701 : {
16702 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
16703 0 : if (value == NULL) {
16704 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pReserved2");
16705 0 : return -1;
16706 : }
16707 0 : if (value == Py_None) {
16708 0 : object->pReserved2 = NULL;
16709 : } else {
16710 0 : object->pReserved2 = NULL;
16711 : {
16712 0 : const char *test_str;
16713 0 : const char *talloc_str;
16714 0 : PyObject *unicode = NULL;
16715 0 : if (PyUnicode_Check(value)) {
16716 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
16717 0 : if (unicode == NULL) {
16718 0 : return -1;
16719 : }
16720 0 : test_str = PyBytes_AS_STRING(unicode);
16721 0 : } else if (PyBytes_Check(value)) {
16722 0 : test_str = PyBytes_AS_STRING(value);
16723 : } else {
16724 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
16725 0 : return -1;
16726 : }
16727 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
16728 0 : if (unicode != NULL) {
16729 0 : Py_DECREF(unicode);
16730 : }
16731 0 : if (talloc_str == NULL) {
16732 0 : PyErr_NoMemory();
16733 0 : return -1;
16734 : }
16735 0 : object->pReserved2 = talloc_str;
16736 : }
16737 : }
16738 0 : return 0;
16739 : }
16740 :
16741 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved3(PyObject *obj, void *closure)
16742 : {
16743 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
16744 0 : PyObject *py_pReserved3;
16745 0 : if (object->pReserved3 == NULL) {
16746 0 : Py_RETURN_NONE;
16747 : }
16748 0 : if (object->pReserved3 == NULL) {
16749 0 : py_pReserved3 = Py_None;
16750 0 : Py_INCREF(py_pReserved3);
16751 : } else {
16752 0 : if (object->pReserved3 == NULL) {
16753 0 : py_pReserved3 = Py_None;
16754 0 : Py_INCREF(py_pReserved3);
16755 : } else {
16756 0 : py_pReserved3 = PyUnicode_Decode(object->pReserved3, strlen(object->pReserved3), "utf-8", "ignore");
16757 : }
16758 : }
16759 0 : return py_pReserved3;
16760 : }
16761 :
16762 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved3(PyObject *py_obj, PyObject *value, void *closure)
16763 : {
16764 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
16765 0 : if (value == NULL) {
16766 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pReserved3");
16767 0 : return -1;
16768 : }
16769 0 : if (value == Py_None) {
16770 0 : object->pReserved3 = NULL;
16771 : } else {
16772 0 : object->pReserved3 = NULL;
16773 : {
16774 0 : const char *test_str;
16775 0 : const char *talloc_str;
16776 0 : PyObject *unicode = NULL;
16777 0 : if (PyUnicode_Check(value)) {
16778 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
16779 0 : if (unicode == NULL) {
16780 0 : return -1;
16781 : }
16782 0 : test_str = PyBytes_AS_STRING(unicode);
16783 0 : } else if (PyBytes_Check(value)) {
16784 0 : test_str = PyBytes_AS_STRING(value);
16785 : } else {
16786 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
16787 0 : return -1;
16788 : }
16789 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
16790 0 : if (unicode != NULL) {
16791 0 : Py_DECREF(unicode);
16792 : }
16793 0 : if (talloc_str == NULL) {
16794 0 : PyErr_NoMemory();
16795 0 : return -1;
16796 : }
16797 0 : object->pReserved3 = talloc_str;
16798 : }
16799 : }
16800 0 : return 0;
16801 : }
16802 :
16803 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved4(PyObject *obj, void *closure)
16804 : {
16805 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
16806 0 : PyObject *py_pReserved4;
16807 0 : if (object->pReserved4 == NULL) {
16808 0 : Py_RETURN_NONE;
16809 : }
16810 0 : if (object->pReserved4 == NULL) {
16811 0 : py_pReserved4 = Py_None;
16812 0 : Py_INCREF(py_pReserved4);
16813 : } else {
16814 0 : if (object->pReserved4 == NULL) {
16815 0 : py_pReserved4 = Py_None;
16816 0 : Py_INCREF(py_pReserved4);
16817 : } else {
16818 0 : py_pReserved4 = PyUnicode_Decode(object->pReserved4, strlen(object->pReserved4), "utf-8", "ignore");
16819 : }
16820 : }
16821 0 : return py_pReserved4;
16822 : }
16823 :
16824 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved4(PyObject *py_obj, PyObject *value, void *closure)
16825 : {
16826 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
16827 0 : if (value == NULL) {
16828 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pReserved4");
16829 0 : return -1;
16830 : }
16831 0 : if (value == Py_None) {
16832 0 : object->pReserved4 = NULL;
16833 : } else {
16834 0 : object->pReserved4 = NULL;
16835 : {
16836 0 : const char *test_str;
16837 0 : const char *talloc_str;
16838 0 : PyObject *unicode = NULL;
16839 0 : if (PyUnicode_Check(value)) {
16840 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
16841 0 : if (unicode == NULL) {
16842 0 : return -1;
16843 : }
16844 0 : test_str = PyBytes_AS_STRING(unicode);
16845 0 : } else if (PyBytes_Check(value)) {
16846 0 : test_str = PyBytes_AS_STRING(value);
16847 : } else {
16848 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
16849 0 : return -1;
16850 : }
16851 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
16852 0 : if (unicode != NULL) {
16853 0 : Py_DECREF(unicode);
16854 : }
16855 0 : if (talloc_str == NULL) {
16856 0 : PyErr_NoMemory();
16857 0 : return -1;
16858 : }
16859 0 : object->pReserved4 = talloc_str;
16860 : }
16861 : }
16862 0 : return 0;
16863 : }
16864 :
16865 : static PyGetSetDef py_DNS_RPC_ZONE_INFO_DOTNET_getsetters[] = {
16866 : {
16867 : .name = discard_const_p(char, "dwRpcStructureVersion"),
16868 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwRpcStructureVersion,
16869 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwRpcStructureVersion,
16870 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16871 : },
16872 : {
16873 : .name = discard_const_p(char, "dwReserved0"),
16874 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved0,
16875 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved0,
16876 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16877 : },
16878 : {
16879 : .name = discard_const_p(char, "pszZoneName"),
16880 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_pszZoneName,
16881 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_pszZoneName,
16882 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
16883 : },
16884 : {
16885 : .name = discard_const_p(char, "dwZoneType"),
16886 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwZoneType,
16887 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwZoneType,
16888 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16889 : },
16890 : {
16891 : .name = discard_const_p(char, "fReverse"),
16892 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fReverse,
16893 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fReverse,
16894 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16895 : },
16896 : {
16897 : .name = discard_const_p(char, "fAllowUpdate"),
16898 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fAllowUpdate,
16899 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fAllowUpdate,
16900 : .doc = discard_const_p(char, "PIDL-generated element of base type dns_zone_update")
16901 : },
16902 : {
16903 : .name = discard_const_p(char, "fPaused"),
16904 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fPaused,
16905 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fPaused,
16906 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16907 : },
16908 : {
16909 : .name = discard_const_p(char, "fShutdown"),
16910 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fShutdown,
16911 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fShutdown,
16912 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16913 : },
16914 : {
16915 : .name = discard_const_p(char, "fAutoCreated"),
16916 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fAutoCreated,
16917 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fAutoCreated,
16918 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16919 : },
16920 : {
16921 : .name = discard_const_p(char, "fUseDatabase"),
16922 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fUseDatabase,
16923 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fUseDatabase,
16924 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16925 : },
16926 : {
16927 : .name = discard_const_p(char, "pszDataFile"),
16928 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_pszDataFile,
16929 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_pszDataFile,
16930 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
16931 : },
16932 : {
16933 : .name = discard_const_p(char, "aipMasters"),
16934 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_aipMasters,
16935 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_aipMasters,
16936 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
16937 : },
16938 : {
16939 : .name = discard_const_p(char, "fSecureSecondaries"),
16940 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fSecureSecondaries,
16941 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fSecureSecondaries,
16942 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_SECONDARY_SECURITY")
16943 : },
16944 : {
16945 : .name = discard_const_p(char, "fNotifyLevel"),
16946 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fNotifyLevel,
16947 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fNotifyLevel,
16948 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_NOTIFY_LEVEL")
16949 : },
16950 : {
16951 : .name = discard_const_p(char, "aipSecondaries"),
16952 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_aipSecondaries,
16953 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_aipSecondaries,
16954 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
16955 : },
16956 : {
16957 : .name = discard_const_p(char, "aipNotify"),
16958 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_aipNotify,
16959 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_aipNotify,
16960 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
16961 : },
16962 : {
16963 : .name = discard_const_p(char, "fUseWins"),
16964 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fUseWins,
16965 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fUseWins,
16966 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16967 : },
16968 : {
16969 : .name = discard_const_p(char, "fUseNbstat"),
16970 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fUseNbstat,
16971 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fUseNbstat,
16972 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16973 : },
16974 : {
16975 : .name = discard_const_p(char, "fAging"),
16976 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fAging,
16977 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fAging,
16978 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16979 : },
16980 : {
16981 : .name = discard_const_p(char, "dwNoRefreshInterval"),
16982 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwNoRefreshInterval,
16983 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwNoRefreshInterval,
16984 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16985 : },
16986 : {
16987 : .name = discard_const_p(char, "dwRefreshInterval"),
16988 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwRefreshInterval,
16989 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwRefreshInterval,
16990 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16991 : },
16992 : {
16993 : .name = discard_const_p(char, "dwAvailForScavengeTime"),
16994 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwAvailForScavengeTime,
16995 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwAvailForScavengeTime,
16996 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16997 : },
16998 : {
16999 : .name = discard_const_p(char, "aipScavengeServers"),
17000 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_aipScavengeServers,
17001 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_aipScavengeServers,
17002 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
17003 : },
17004 : {
17005 : .name = discard_const_p(char, "dwForwarderTimeout"),
17006 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwForwarderTimeout,
17007 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwForwarderTimeout,
17008 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17009 : },
17010 : {
17011 : .name = discard_const_p(char, "fForwarderSlave"),
17012 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fForwarderSlave,
17013 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fForwarderSlave,
17014 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17015 : },
17016 : {
17017 : .name = discard_const_p(char, "aipLocalMasters"),
17018 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_aipLocalMasters,
17019 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_aipLocalMasters,
17020 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
17021 : },
17022 : {
17023 : .name = discard_const_p(char, "dwDpFlags"),
17024 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwDpFlags,
17025 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwDpFlags,
17026 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17027 : },
17028 : {
17029 : .name = discard_const_p(char, "pszDpFqdn"),
17030 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_pszDpFqdn,
17031 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_pszDpFqdn,
17032 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
17033 : },
17034 : {
17035 : .name = discard_const_p(char, "pwszZoneDn"),
17036 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_pwszZoneDn,
17037 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_pwszZoneDn,
17038 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
17039 : },
17040 : {
17041 : .name = discard_const_p(char, "dwLastSuccessfulSoaCheck"),
17042 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwLastSuccessfulSoaCheck,
17043 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwLastSuccessfulSoaCheck,
17044 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17045 : },
17046 : {
17047 : .name = discard_const_p(char, "dwLastSuccessfulXfr"),
17048 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwLastSuccessfulXfr,
17049 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwLastSuccessfulXfr,
17050 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17051 : },
17052 : {
17053 : .name = discard_const_p(char, "dwReserved1"),
17054 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved1,
17055 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved1,
17056 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17057 : },
17058 : {
17059 : .name = discard_const_p(char, "dwReserved2"),
17060 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved2,
17061 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved2,
17062 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17063 : },
17064 : {
17065 : .name = discard_const_p(char, "dwReserved3"),
17066 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved3,
17067 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved3,
17068 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17069 : },
17070 : {
17071 : .name = discard_const_p(char, "dwReserved4"),
17072 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved4,
17073 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved4,
17074 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17075 : },
17076 : {
17077 : .name = discard_const_p(char, "dwReserved5"),
17078 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved5,
17079 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved5,
17080 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17081 : },
17082 : {
17083 : .name = discard_const_p(char, "pReserved1"),
17084 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved1,
17085 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved1,
17086 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
17087 : },
17088 : {
17089 : .name = discard_const_p(char, "pReserved2"),
17090 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved2,
17091 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved2,
17092 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
17093 : },
17094 : {
17095 : .name = discard_const_p(char, "pReserved3"),
17096 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved3,
17097 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved3,
17098 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
17099 : },
17100 : {
17101 : .name = discard_const_p(char, "pReserved4"),
17102 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved4,
17103 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved4,
17104 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
17105 : },
17106 : { .name = NULL }
17107 : };
17108 :
17109 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
17110 : {
17111 0 : return pytalloc_new(struct DNS_RPC_ZONE_INFO_DOTNET, type);
17112 : }
17113 :
17114 :
17115 : static PyTypeObject DNS_RPC_ZONE_INFO_DOTNET_Type = {
17116 : PyVarObject_HEAD_INIT(NULL, 0)
17117 : .tp_name = "dnsserver.DNS_RPC_ZONE_INFO_DOTNET",
17118 : .tp_getset = py_DNS_RPC_ZONE_INFO_DOTNET_getsetters,
17119 : .tp_methods = NULL,
17120 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
17121 : .tp_new = py_DNS_RPC_ZONE_INFO_DOTNET_new,
17122 : };
17123 :
17124 :
17125 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwRpcStructureVersion(PyObject *obj, void *closure)
17126 : {
17127 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17128 0 : PyObject *py_dwRpcStructureVersion;
17129 17 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
17130 17 : return py_dwRpcStructureVersion;
17131 : }
17132 :
17133 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
17134 : {
17135 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17136 0 : if (value == NULL) {
17137 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
17138 0 : return -1;
17139 : }
17140 : {
17141 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
17142 0 : if (PyLong_Check(value)) {
17143 0 : unsigned long long test_var;
17144 0 : test_var = PyLong_AsUnsignedLongLong(value);
17145 0 : if (PyErr_Occurred() != NULL) {
17146 0 : return -1;
17147 : }
17148 0 : if (test_var > uint_max) {
17149 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17150 : PyLong_Type.tp_name, uint_max, test_var);
17151 0 : return -1;
17152 : }
17153 0 : object->dwRpcStructureVersion = test_var;
17154 : } else {
17155 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17156 : PyLong_Type.tp_name);
17157 0 : return -1;
17158 : }
17159 : }
17160 0 : return 0;
17161 : }
17162 :
17163 0 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwReserved0(PyObject *obj, void *closure)
17164 : {
17165 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17166 0 : PyObject *py_dwReserved0;
17167 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
17168 0 : return py_dwReserved0;
17169 : }
17170 :
17171 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
17172 : {
17173 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17174 0 : if (value == NULL) {
17175 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
17176 0 : return -1;
17177 : }
17178 : {
17179 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
17180 0 : if (PyLong_Check(value)) {
17181 0 : unsigned long long test_var;
17182 0 : test_var = PyLong_AsUnsignedLongLong(value);
17183 0 : if (PyErr_Occurred() != NULL) {
17184 0 : return -1;
17185 : }
17186 0 : if (test_var > uint_max) {
17187 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17188 : PyLong_Type.tp_name, uint_max, test_var);
17189 0 : return -1;
17190 : }
17191 0 : object->dwReserved0 = test_var;
17192 : } else {
17193 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17194 : PyLong_Type.tp_name);
17195 0 : return -1;
17196 : }
17197 : }
17198 0 : return 0;
17199 : }
17200 :
17201 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_pszZoneName(PyObject *obj, void *closure)
17202 : {
17203 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17204 0 : PyObject *py_pszZoneName;
17205 17 : if (object->pszZoneName == NULL) {
17206 0 : Py_RETURN_NONE;
17207 : }
17208 17 : if (object->pszZoneName == NULL) {
17209 0 : py_pszZoneName = Py_None;
17210 0 : Py_INCREF(py_pszZoneName);
17211 : } else {
17212 17 : if (object->pszZoneName == NULL) {
17213 0 : py_pszZoneName = Py_None;
17214 0 : Py_INCREF(py_pszZoneName);
17215 : } else {
17216 17 : py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
17217 : }
17218 : }
17219 17 : return py_pszZoneName;
17220 : }
17221 :
17222 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
17223 : {
17224 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17225 0 : if (value == NULL) {
17226 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszZoneName");
17227 0 : return -1;
17228 : }
17229 0 : if (value == Py_None) {
17230 0 : object->pszZoneName = NULL;
17231 : } else {
17232 0 : object->pszZoneName = NULL;
17233 : {
17234 0 : const char *test_str;
17235 0 : const char *talloc_str;
17236 0 : PyObject *unicode = NULL;
17237 0 : if (PyUnicode_Check(value)) {
17238 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
17239 0 : if (unicode == NULL) {
17240 0 : return -1;
17241 : }
17242 0 : test_str = PyBytes_AS_STRING(unicode);
17243 0 : } else if (PyBytes_Check(value)) {
17244 0 : test_str = PyBytes_AS_STRING(value);
17245 : } else {
17246 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
17247 0 : return -1;
17248 : }
17249 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
17250 0 : if (unicode != NULL) {
17251 0 : Py_DECREF(unicode);
17252 : }
17253 0 : if (talloc_str == NULL) {
17254 0 : PyErr_NoMemory();
17255 0 : return -1;
17256 : }
17257 0 : object->pszZoneName = talloc_str;
17258 : }
17259 : }
17260 0 : return 0;
17261 : }
17262 :
17263 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwZoneType(PyObject *obj, void *closure)
17264 : {
17265 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17266 0 : PyObject *py_dwZoneType;
17267 17 : py_dwZoneType = PyLong_FromUnsignedLongLong((uint32_t)(object->dwZoneType));
17268 17 : return py_dwZoneType;
17269 : }
17270 :
17271 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwZoneType(PyObject *py_obj, PyObject *value, void *closure)
17272 : {
17273 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17274 0 : if (value == NULL) {
17275 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwZoneType");
17276 0 : return -1;
17277 : }
17278 : {
17279 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwZoneType));
17280 0 : if (PyLong_Check(value)) {
17281 0 : unsigned long long test_var;
17282 0 : test_var = PyLong_AsUnsignedLongLong(value);
17283 0 : if (PyErr_Occurred() != NULL) {
17284 0 : return -1;
17285 : }
17286 0 : if (test_var > uint_max) {
17287 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17288 : PyLong_Type.tp_name, uint_max, test_var);
17289 0 : return -1;
17290 : }
17291 0 : object->dwZoneType = test_var;
17292 : } else {
17293 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17294 : PyLong_Type.tp_name);
17295 0 : return -1;
17296 : }
17297 : }
17298 0 : return 0;
17299 : }
17300 :
17301 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fReverse(PyObject *obj, void *closure)
17302 : {
17303 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17304 0 : PyObject *py_fReverse;
17305 17 : py_fReverse = PyLong_FromUnsignedLongLong((uint32_t)(object->fReverse));
17306 17 : return py_fReverse;
17307 : }
17308 :
17309 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fReverse(PyObject *py_obj, PyObject *value, void *closure)
17310 : {
17311 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17312 0 : if (value == NULL) {
17313 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fReverse");
17314 0 : return -1;
17315 : }
17316 : {
17317 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fReverse));
17318 0 : if (PyLong_Check(value)) {
17319 0 : unsigned long long test_var;
17320 0 : test_var = PyLong_AsUnsignedLongLong(value);
17321 0 : if (PyErr_Occurred() != NULL) {
17322 0 : return -1;
17323 : }
17324 0 : if (test_var > uint_max) {
17325 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17326 : PyLong_Type.tp_name, uint_max, test_var);
17327 0 : return -1;
17328 : }
17329 0 : object->fReverse = test_var;
17330 : } else {
17331 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17332 : PyLong_Type.tp_name);
17333 0 : return -1;
17334 : }
17335 : }
17336 0 : return 0;
17337 : }
17338 :
17339 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fAllowUpdate(PyObject *obj, void *closure)
17340 : {
17341 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17342 0 : PyObject *py_fAllowUpdate;
17343 17 : py_fAllowUpdate = PyLong_FromLong((uint16_t)(object->fAllowUpdate));
17344 17 : return py_fAllowUpdate;
17345 : }
17346 :
17347 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
17348 : {
17349 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17350 0 : if (value == NULL) {
17351 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAllowUpdate");
17352 0 : return -1;
17353 : }
17354 : {
17355 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAllowUpdate));
17356 0 : if (PyLong_Check(value)) {
17357 0 : unsigned long long test_var;
17358 0 : test_var = PyLong_AsUnsignedLongLong(value);
17359 0 : if (PyErr_Occurred() != NULL) {
17360 0 : return -1;
17361 : }
17362 0 : if (test_var > uint_max) {
17363 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17364 : PyLong_Type.tp_name, uint_max, test_var);
17365 0 : return -1;
17366 : }
17367 0 : object->fAllowUpdate = test_var;
17368 : } else {
17369 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17370 : PyLong_Type.tp_name);
17371 0 : return -1;
17372 : }
17373 : }
17374 0 : return 0;
17375 : }
17376 :
17377 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fPaused(PyObject *obj, void *closure)
17378 : {
17379 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17380 0 : PyObject *py_fPaused;
17381 17 : py_fPaused = PyLong_FromUnsignedLongLong((uint32_t)(object->fPaused));
17382 17 : return py_fPaused;
17383 : }
17384 :
17385 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fPaused(PyObject *py_obj, PyObject *value, void *closure)
17386 : {
17387 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17388 0 : if (value == NULL) {
17389 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fPaused");
17390 0 : return -1;
17391 : }
17392 : {
17393 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fPaused));
17394 0 : if (PyLong_Check(value)) {
17395 0 : unsigned long long test_var;
17396 0 : test_var = PyLong_AsUnsignedLongLong(value);
17397 0 : if (PyErr_Occurred() != NULL) {
17398 0 : return -1;
17399 : }
17400 0 : if (test_var > uint_max) {
17401 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17402 : PyLong_Type.tp_name, uint_max, test_var);
17403 0 : return -1;
17404 : }
17405 0 : object->fPaused = test_var;
17406 : } else {
17407 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17408 : PyLong_Type.tp_name);
17409 0 : return -1;
17410 : }
17411 : }
17412 0 : return 0;
17413 : }
17414 :
17415 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fShutdown(PyObject *obj, void *closure)
17416 : {
17417 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17418 0 : PyObject *py_fShutdown;
17419 17 : py_fShutdown = PyLong_FromUnsignedLongLong((uint32_t)(object->fShutdown));
17420 17 : return py_fShutdown;
17421 : }
17422 :
17423 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fShutdown(PyObject *py_obj, PyObject *value, void *closure)
17424 : {
17425 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17426 0 : if (value == NULL) {
17427 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fShutdown");
17428 0 : return -1;
17429 : }
17430 : {
17431 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fShutdown));
17432 0 : if (PyLong_Check(value)) {
17433 0 : unsigned long long test_var;
17434 0 : test_var = PyLong_AsUnsignedLongLong(value);
17435 0 : if (PyErr_Occurred() != NULL) {
17436 0 : return -1;
17437 : }
17438 0 : if (test_var > uint_max) {
17439 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17440 : PyLong_Type.tp_name, uint_max, test_var);
17441 0 : return -1;
17442 : }
17443 0 : object->fShutdown = test_var;
17444 : } else {
17445 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17446 : PyLong_Type.tp_name);
17447 0 : return -1;
17448 : }
17449 : }
17450 0 : return 0;
17451 : }
17452 :
17453 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fAutoCreated(PyObject *obj, void *closure)
17454 : {
17455 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17456 0 : PyObject *py_fAutoCreated;
17457 17 : py_fAutoCreated = PyLong_FromUnsignedLongLong((uint32_t)(object->fAutoCreated));
17458 17 : return py_fAutoCreated;
17459 : }
17460 :
17461 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fAutoCreated(PyObject *py_obj, PyObject *value, void *closure)
17462 : {
17463 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17464 0 : if (value == NULL) {
17465 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAutoCreated");
17466 0 : return -1;
17467 : }
17468 : {
17469 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAutoCreated));
17470 0 : if (PyLong_Check(value)) {
17471 0 : unsigned long long test_var;
17472 0 : test_var = PyLong_AsUnsignedLongLong(value);
17473 0 : if (PyErr_Occurred() != NULL) {
17474 0 : return -1;
17475 : }
17476 0 : if (test_var > uint_max) {
17477 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17478 : PyLong_Type.tp_name, uint_max, test_var);
17479 0 : return -1;
17480 : }
17481 0 : object->fAutoCreated = test_var;
17482 : } else {
17483 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17484 : PyLong_Type.tp_name);
17485 0 : return -1;
17486 : }
17487 : }
17488 0 : return 0;
17489 : }
17490 :
17491 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fUseDatabase(PyObject *obj, void *closure)
17492 : {
17493 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17494 0 : PyObject *py_fUseDatabase;
17495 17 : py_fUseDatabase = PyLong_FromUnsignedLongLong((uint32_t)(object->fUseDatabase));
17496 17 : return py_fUseDatabase;
17497 : }
17498 :
17499 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fUseDatabase(PyObject *py_obj, PyObject *value, void *closure)
17500 : {
17501 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17502 0 : if (value == NULL) {
17503 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fUseDatabase");
17504 0 : return -1;
17505 : }
17506 : {
17507 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fUseDatabase));
17508 0 : if (PyLong_Check(value)) {
17509 0 : unsigned long long test_var;
17510 0 : test_var = PyLong_AsUnsignedLongLong(value);
17511 0 : if (PyErr_Occurred() != NULL) {
17512 0 : return -1;
17513 : }
17514 0 : if (test_var > uint_max) {
17515 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17516 : PyLong_Type.tp_name, uint_max, test_var);
17517 0 : return -1;
17518 : }
17519 0 : object->fUseDatabase = test_var;
17520 : } else {
17521 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17522 : PyLong_Type.tp_name);
17523 0 : return -1;
17524 : }
17525 : }
17526 0 : return 0;
17527 : }
17528 :
17529 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_pszDataFile(PyObject *obj, void *closure)
17530 : {
17531 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17532 0 : PyObject *py_pszDataFile;
17533 17 : if (object->pszDataFile == NULL) {
17534 17 : Py_RETURN_NONE;
17535 : }
17536 0 : if (object->pszDataFile == NULL) {
17537 0 : py_pszDataFile = Py_None;
17538 0 : Py_INCREF(py_pszDataFile);
17539 : } else {
17540 0 : if (object->pszDataFile == NULL) {
17541 0 : py_pszDataFile = Py_None;
17542 0 : Py_INCREF(py_pszDataFile);
17543 : } else {
17544 0 : py_pszDataFile = PyUnicode_Decode(object->pszDataFile, strlen(object->pszDataFile), "utf-8", "ignore");
17545 : }
17546 : }
17547 0 : return py_pszDataFile;
17548 : }
17549 :
17550 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_pszDataFile(PyObject *py_obj, PyObject *value, void *closure)
17551 : {
17552 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17553 0 : if (value == NULL) {
17554 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDataFile");
17555 0 : return -1;
17556 : }
17557 0 : if (value == Py_None) {
17558 0 : object->pszDataFile = NULL;
17559 : } else {
17560 0 : object->pszDataFile = NULL;
17561 : {
17562 0 : const char *test_str;
17563 0 : const char *talloc_str;
17564 0 : PyObject *unicode = NULL;
17565 0 : if (PyUnicode_Check(value)) {
17566 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
17567 0 : if (unicode == NULL) {
17568 0 : return -1;
17569 : }
17570 0 : test_str = PyBytes_AS_STRING(unicode);
17571 0 : } else if (PyBytes_Check(value)) {
17572 0 : test_str = PyBytes_AS_STRING(value);
17573 : } else {
17574 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
17575 0 : return -1;
17576 : }
17577 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
17578 0 : if (unicode != NULL) {
17579 0 : Py_DECREF(unicode);
17580 : }
17581 0 : if (talloc_str == NULL) {
17582 0 : PyErr_NoMemory();
17583 0 : return -1;
17584 : }
17585 0 : object->pszDataFile = talloc_str;
17586 : }
17587 : }
17588 0 : return 0;
17589 : }
17590 :
17591 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipMasters(PyObject *obj, void *closure)
17592 : {
17593 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17594 0 : PyObject *py_aipMasters;
17595 17 : if (object->aipMasters == NULL) {
17596 17 : Py_RETURN_NONE;
17597 : }
17598 0 : if (object->aipMasters == NULL) {
17599 0 : py_aipMasters = Py_None;
17600 0 : Py_INCREF(py_aipMasters);
17601 : } else {
17602 0 : py_aipMasters = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipMasters, object->aipMasters);
17603 : }
17604 0 : return py_aipMasters;
17605 : }
17606 :
17607 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipMasters(PyObject *py_obj, PyObject *value, void *closure)
17608 : {
17609 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17610 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipMasters));
17611 0 : if (value == NULL) {
17612 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipMasters");
17613 0 : return -1;
17614 : }
17615 0 : if (value == Py_None) {
17616 0 : object->aipMasters = NULL;
17617 : } else {
17618 0 : object->aipMasters = NULL;
17619 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
17620 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
17621 0 : PyErr_NoMemory();
17622 0 : return -1;
17623 : }
17624 0 : object->aipMasters = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
17625 : }
17626 0 : return 0;
17627 : }
17628 :
17629 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fSecureSecondaries(PyObject *obj, void *closure)
17630 : {
17631 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17632 0 : PyObject *py_fSecureSecondaries;
17633 17 : py_fSecureSecondaries = PyLong_FromUnsignedLongLong((uint32_t)(object->fSecureSecondaries));
17634 17 : return py_fSecureSecondaries;
17635 : }
17636 :
17637 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
17638 : {
17639 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17640 0 : if (value == NULL) {
17641 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fSecureSecondaries");
17642 0 : return -1;
17643 : }
17644 : {
17645 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureSecondaries));
17646 0 : if (PyLong_Check(value)) {
17647 0 : unsigned long long test_var;
17648 0 : test_var = PyLong_AsUnsignedLongLong(value);
17649 0 : if (PyErr_Occurred() != NULL) {
17650 0 : return -1;
17651 : }
17652 0 : if (test_var > uint_max) {
17653 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17654 : PyLong_Type.tp_name, uint_max, test_var);
17655 0 : return -1;
17656 : }
17657 0 : object->fSecureSecondaries = test_var;
17658 : } else {
17659 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17660 : PyLong_Type.tp_name);
17661 0 : return -1;
17662 : }
17663 : }
17664 0 : return 0;
17665 : }
17666 :
17667 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fNotifyLevel(PyObject *obj, void *closure)
17668 : {
17669 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17670 0 : PyObject *py_fNotifyLevel;
17671 17 : py_fNotifyLevel = PyLong_FromUnsignedLongLong((uint32_t)(object->fNotifyLevel));
17672 17 : return py_fNotifyLevel;
17673 : }
17674 :
17675 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
17676 : {
17677 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17678 0 : if (value == NULL) {
17679 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fNotifyLevel");
17680 0 : return -1;
17681 : }
17682 : {
17683 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNotifyLevel));
17684 0 : if (PyLong_Check(value)) {
17685 0 : unsigned long long test_var;
17686 0 : test_var = PyLong_AsUnsignedLongLong(value);
17687 0 : if (PyErr_Occurred() != NULL) {
17688 0 : return -1;
17689 : }
17690 0 : if (test_var > uint_max) {
17691 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17692 : PyLong_Type.tp_name, uint_max, test_var);
17693 0 : return -1;
17694 : }
17695 0 : object->fNotifyLevel = test_var;
17696 : } else {
17697 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17698 : PyLong_Type.tp_name);
17699 0 : return -1;
17700 : }
17701 : }
17702 0 : return 0;
17703 : }
17704 :
17705 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipSecondaries(PyObject *obj, void *closure)
17706 : {
17707 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17708 0 : PyObject *py_aipSecondaries;
17709 17 : if (object->aipSecondaries == NULL) {
17710 17 : Py_RETURN_NONE;
17711 : }
17712 0 : if (object->aipSecondaries == NULL) {
17713 0 : py_aipSecondaries = Py_None;
17714 0 : Py_INCREF(py_aipSecondaries);
17715 : } else {
17716 0 : py_aipSecondaries = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
17717 : }
17718 0 : return py_aipSecondaries;
17719 : }
17720 :
17721 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
17722 : {
17723 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17724 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipSecondaries));
17725 0 : if (value == NULL) {
17726 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipSecondaries");
17727 0 : return -1;
17728 : }
17729 0 : if (value == Py_None) {
17730 0 : object->aipSecondaries = NULL;
17731 : } else {
17732 0 : object->aipSecondaries = NULL;
17733 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
17734 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
17735 0 : PyErr_NoMemory();
17736 0 : return -1;
17737 : }
17738 0 : object->aipSecondaries = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
17739 : }
17740 0 : return 0;
17741 : }
17742 :
17743 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipNotify(PyObject *obj, void *closure)
17744 : {
17745 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17746 0 : PyObject *py_aipNotify;
17747 17 : if (object->aipNotify == NULL) {
17748 17 : Py_RETURN_NONE;
17749 : }
17750 0 : if (object->aipNotify == NULL) {
17751 0 : py_aipNotify = Py_None;
17752 0 : Py_INCREF(py_aipNotify);
17753 : } else {
17754 0 : py_aipNotify = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipNotify, object->aipNotify);
17755 : }
17756 0 : return py_aipNotify;
17757 : }
17758 :
17759 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipNotify(PyObject *py_obj, PyObject *value, void *closure)
17760 : {
17761 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17762 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipNotify));
17763 0 : if (value == NULL) {
17764 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipNotify");
17765 0 : return -1;
17766 : }
17767 0 : if (value == Py_None) {
17768 0 : object->aipNotify = NULL;
17769 : } else {
17770 0 : object->aipNotify = NULL;
17771 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
17772 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
17773 0 : PyErr_NoMemory();
17774 0 : return -1;
17775 : }
17776 0 : object->aipNotify = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
17777 : }
17778 0 : return 0;
17779 : }
17780 :
17781 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fUseWins(PyObject *obj, void *closure)
17782 : {
17783 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17784 0 : PyObject *py_fUseWins;
17785 17 : py_fUseWins = PyLong_FromUnsignedLongLong((uint32_t)(object->fUseWins));
17786 17 : return py_fUseWins;
17787 : }
17788 :
17789 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fUseWins(PyObject *py_obj, PyObject *value, void *closure)
17790 : {
17791 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17792 0 : if (value == NULL) {
17793 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fUseWins");
17794 0 : return -1;
17795 : }
17796 : {
17797 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fUseWins));
17798 0 : if (PyLong_Check(value)) {
17799 0 : unsigned long long test_var;
17800 0 : test_var = PyLong_AsUnsignedLongLong(value);
17801 0 : if (PyErr_Occurred() != NULL) {
17802 0 : return -1;
17803 : }
17804 0 : if (test_var > uint_max) {
17805 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17806 : PyLong_Type.tp_name, uint_max, test_var);
17807 0 : return -1;
17808 : }
17809 0 : object->fUseWins = test_var;
17810 : } else {
17811 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17812 : PyLong_Type.tp_name);
17813 0 : return -1;
17814 : }
17815 : }
17816 0 : return 0;
17817 : }
17818 :
17819 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fUseNbstat(PyObject *obj, void *closure)
17820 : {
17821 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17822 0 : PyObject *py_fUseNbstat;
17823 17 : py_fUseNbstat = PyLong_FromUnsignedLongLong((uint32_t)(object->fUseNbstat));
17824 17 : return py_fUseNbstat;
17825 : }
17826 :
17827 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fUseNbstat(PyObject *py_obj, PyObject *value, void *closure)
17828 : {
17829 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17830 0 : if (value == NULL) {
17831 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fUseNbstat");
17832 0 : return -1;
17833 : }
17834 : {
17835 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fUseNbstat));
17836 0 : if (PyLong_Check(value)) {
17837 0 : unsigned long long test_var;
17838 0 : test_var = PyLong_AsUnsignedLongLong(value);
17839 0 : if (PyErr_Occurred() != NULL) {
17840 0 : return -1;
17841 : }
17842 0 : if (test_var > uint_max) {
17843 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17844 : PyLong_Type.tp_name, uint_max, test_var);
17845 0 : return -1;
17846 : }
17847 0 : object->fUseNbstat = test_var;
17848 : } else {
17849 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17850 : PyLong_Type.tp_name);
17851 0 : return -1;
17852 : }
17853 : }
17854 0 : return 0;
17855 : }
17856 :
17857 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fAging(PyObject *obj, void *closure)
17858 : {
17859 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17860 0 : PyObject *py_fAging;
17861 17 : py_fAging = PyLong_FromUnsignedLongLong((uint32_t)(object->fAging));
17862 17 : return py_fAging;
17863 : }
17864 :
17865 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fAging(PyObject *py_obj, PyObject *value, void *closure)
17866 : {
17867 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17868 0 : if (value == NULL) {
17869 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAging");
17870 0 : return -1;
17871 : }
17872 : {
17873 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAging));
17874 0 : if (PyLong_Check(value)) {
17875 0 : unsigned long long test_var;
17876 0 : test_var = PyLong_AsUnsignedLongLong(value);
17877 0 : if (PyErr_Occurred() != NULL) {
17878 0 : return -1;
17879 : }
17880 0 : if (test_var > uint_max) {
17881 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17882 : PyLong_Type.tp_name, uint_max, test_var);
17883 0 : return -1;
17884 : }
17885 0 : object->fAging = test_var;
17886 : } else {
17887 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17888 : PyLong_Type.tp_name);
17889 0 : return -1;
17890 : }
17891 : }
17892 0 : return 0;
17893 : }
17894 :
17895 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwNoRefreshInterval(PyObject *obj, void *closure)
17896 : {
17897 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17898 0 : PyObject *py_dwNoRefreshInterval;
17899 17 : py_dwNoRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)(object->dwNoRefreshInterval));
17900 17 : return py_dwNoRefreshInterval;
17901 : }
17902 :
17903 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwNoRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
17904 : {
17905 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17906 0 : if (value == NULL) {
17907 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwNoRefreshInterval");
17908 0 : return -1;
17909 : }
17910 : {
17911 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwNoRefreshInterval));
17912 0 : if (PyLong_Check(value)) {
17913 0 : unsigned long long test_var;
17914 0 : test_var = PyLong_AsUnsignedLongLong(value);
17915 0 : if (PyErr_Occurred() != NULL) {
17916 0 : return -1;
17917 : }
17918 0 : if (test_var > uint_max) {
17919 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17920 : PyLong_Type.tp_name, uint_max, test_var);
17921 0 : return -1;
17922 : }
17923 0 : object->dwNoRefreshInterval = test_var;
17924 : } else {
17925 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17926 : PyLong_Type.tp_name);
17927 0 : return -1;
17928 : }
17929 : }
17930 0 : return 0;
17931 : }
17932 :
17933 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwRefreshInterval(PyObject *obj, void *closure)
17934 : {
17935 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17936 0 : PyObject *py_dwRefreshInterval;
17937 17 : py_dwRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRefreshInterval));
17938 17 : return py_dwRefreshInterval;
17939 : }
17940 :
17941 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
17942 : {
17943 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17944 0 : if (value == NULL) {
17945 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRefreshInterval");
17946 0 : return -1;
17947 : }
17948 : {
17949 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRefreshInterval));
17950 0 : if (PyLong_Check(value)) {
17951 0 : unsigned long long test_var;
17952 0 : test_var = PyLong_AsUnsignedLongLong(value);
17953 0 : if (PyErr_Occurred() != NULL) {
17954 0 : return -1;
17955 : }
17956 0 : if (test_var > uint_max) {
17957 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17958 : PyLong_Type.tp_name, uint_max, test_var);
17959 0 : return -1;
17960 : }
17961 0 : object->dwRefreshInterval = test_var;
17962 : } else {
17963 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17964 : PyLong_Type.tp_name);
17965 0 : return -1;
17966 : }
17967 : }
17968 0 : return 0;
17969 : }
17970 :
17971 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwAvailForScavengeTime(PyObject *obj, void *closure)
17972 : {
17973 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
17974 0 : PyObject *py_dwAvailForScavengeTime;
17975 17 : py_dwAvailForScavengeTime = PyLong_FromUnsignedLongLong((uint32_t)(object->dwAvailForScavengeTime));
17976 17 : return py_dwAvailForScavengeTime;
17977 : }
17978 :
17979 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwAvailForScavengeTime(PyObject *py_obj, PyObject *value, void *closure)
17980 : {
17981 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
17982 0 : if (value == NULL) {
17983 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwAvailForScavengeTime");
17984 0 : return -1;
17985 : }
17986 : {
17987 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwAvailForScavengeTime));
17988 0 : if (PyLong_Check(value)) {
17989 0 : unsigned long long test_var;
17990 0 : test_var = PyLong_AsUnsignedLongLong(value);
17991 0 : if (PyErr_Occurred() != NULL) {
17992 0 : return -1;
17993 : }
17994 0 : if (test_var > uint_max) {
17995 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17996 : PyLong_Type.tp_name, uint_max, test_var);
17997 0 : return -1;
17998 : }
17999 0 : object->dwAvailForScavengeTime = test_var;
18000 : } else {
18001 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18002 : PyLong_Type.tp_name);
18003 0 : return -1;
18004 : }
18005 : }
18006 0 : return 0;
18007 : }
18008 :
18009 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipScavengeServers(PyObject *obj, void *closure)
18010 : {
18011 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
18012 0 : PyObject *py_aipScavengeServers;
18013 17 : if (object->aipScavengeServers == NULL) {
18014 17 : Py_RETURN_NONE;
18015 : }
18016 0 : if (object->aipScavengeServers == NULL) {
18017 0 : py_aipScavengeServers = Py_None;
18018 0 : Py_INCREF(py_aipScavengeServers);
18019 : } else {
18020 0 : py_aipScavengeServers = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipScavengeServers, object->aipScavengeServers);
18021 : }
18022 0 : return py_aipScavengeServers;
18023 : }
18024 :
18025 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipScavengeServers(PyObject *py_obj, PyObject *value, void *closure)
18026 : {
18027 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
18028 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipScavengeServers));
18029 0 : if (value == NULL) {
18030 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipScavengeServers");
18031 0 : return -1;
18032 : }
18033 0 : if (value == Py_None) {
18034 0 : object->aipScavengeServers = NULL;
18035 : } else {
18036 0 : object->aipScavengeServers = NULL;
18037 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
18038 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
18039 0 : PyErr_NoMemory();
18040 0 : return -1;
18041 : }
18042 0 : object->aipScavengeServers = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
18043 : }
18044 0 : return 0;
18045 : }
18046 :
18047 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwForwarderTimeout(PyObject *obj, void *closure)
18048 : {
18049 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
18050 0 : PyObject *py_dwForwarderTimeout;
18051 17 : py_dwForwarderTimeout = PyLong_FromUnsignedLongLong((uint32_t)(object->dwForwarderTimeout));
18052 17 : return py_dwForwarderTimeout;
18053 : }
18054 :
18055 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwForwarderTimeout(PyObject *py_obj, PyObject *value, void *closure)
18056 : {
18057 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
18058 0 : if (value == NULL) {
18059 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwForwarderTimeout");
18060 0 : return -1;
18061 : }
18062 : {
18063 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwForwarderTimeout));
18064 0 : if (PyLong_Check(value)) {
18065 0 : unsigned long long test_var;
18066 0 : test_var = PyLong_AsUnsignedLongLong(value);
18067 0 : if (PyErr_Occurred() != NULL) {
18068 0 : return -1;
18069 : }
18070 0 : if (test_var > uint_max) {
18071 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18072 : PyLong_Type.tp_name, uint_max, test_var);
18073 0 : return -1;
18074 : }
18075 0 : object->dwForwarderTimeout = test_var;
18076 : } else {
18077 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18078 : PyLong_Type.tp_name);
18079 0 : return -1;
18080 : }
18081 : }
18082 0 : return 0;
18083 : }
18084 :
18085 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fForwarderSlave(PyObject *obj, void *closure)
18086 : {
18087 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
18088 0 : PyObject *py_fForwarderSlave;
18089 17 : py_fForwarderSlave = PyLong_FromUnsignedLongLong((uint32_t)(object->fForwarderSlave));
18090 17 : return py_fForwarderSlave;
18091 : }
18092 :
18093 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fForwarderSlave(PyObject *py_obj, PyObject *value, void *closure)
18094 : {
18095 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
18096 0 : if (value == NULL) {
18097 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fForwarderSlave");
18098 0 : return -1;
18099 : }
18100 : {
18101 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fForwarderSlave));
18102 0 : if (PyLong_Check(value)) {
18103 0 : unsigned long long test_var;
18104 0 : test_var = PyLong_AsUnsignedLongLong(value);
18105 0 : if (PyErr_Occurred() != NULL) {
18106 0 : return -1;
18107 : }
18108 0 : if (test_var > uint_max) {
18109 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18110 : PyLong_Type.tp_name, uint_max, test_var);
18111 0 : return -1;
18112 : }
18113 0 : object->fForwarderSlave = test_var;
18114 : } else {
18115 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18116 : PyLong_Type.tp_name);
18117 0 : return -1;
18118 : }
18119 : }
18120 0 : return 0;
18121 : }
18122 :
18123 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipLocalMasters(PyObject *obj, void *closure)
18124 : {
18125 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
18126 0 : PyObject *py_aipLocalMasters;
18127 17 : if (object->aipLocalMasters == NULL) {
18128 17 : Py_RETURN_NONE;
18129 : }
18130 0 : if (object->aipLocalMasters == NULL) {
18131 0 : py_aipLocalMasters = Py_None;
18132 0 : Py_INCREF(py_aipLocalMasters);
18133 : } else {
18134 0 : py_aipLocalMasters = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipLocalMasters, object->aipLocalMasters);
18135 : }
18136 0 : return py_aipLocalMasters;
18137 : }
18138 :
18139 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipLocalMasters(PyObject *py_obj, PyObject *value, void *closure)
18140 : {
18141 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
18142 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipLocalMasters));
18143 0 : if (value == NULL) {
18144 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipLocalMasters");
18145 0 : return -1;
18146 : }
18147 0 : if (value == Py_None) {
18148 0 : object->aipLocalMasters = NULL;
18149 : } else {
18150 0 : object->aipLocalMasters = NULL;
18151 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
18152 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
18153 0 : PyErr_NoMemory();
18154 0 : return -1;
18155 : }
18156 0 : object->aipLocalMasters = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
18157 : }
18158 0 : return 0;
18159 : }
18160 :
18161 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwDpFlags(PyObject *obj, void *closure)
18162 : {
18163 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
18164 0 : PyObject *py_dwDpFlags;
18165 17 : py_dwDpFlags = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDpFlags));
18166 17 : return py_dwDpFlags;
18167 : }
18168 :
18169 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwDpFlags(PyObject *py_obj, PyObject *value, void *closure)
18170 : {
18171 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
18172 0 : if (value == NULL) {
18173 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDpFlags");
18174 0 : return -1;
18175 : }
18176 : {
18177 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDpFlags));
18178 0 : if (PyLong_Check(value)) {
18179 0 : unsigned long long test_var;
18180 0 : test_var = PyLong_AsUnsignedLongLong(value);
18181 0 : if (PyErr_Occurred() != NULL) {
18182 0 : return -1;
18183 : }
18184 0 : if (test_var > uint_max) {
18185 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18186 : PyLong_Type.tp_name, uint_max, test_var);
18187 0 : return -1;
18188 : }
18189 0 : object->dwDpFlags = test_var;
18190 : } else {
18191 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18192 : PyLong_Type.tp_name);
18193 0 : return -1;
18194 : }
18195 : }
18196 0 : return 0;
18197 : }
18198 :
18199 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_pszDpFqdn(PyObject *obj, void *closure)
18200 : {
18201 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
18202 0 : PyObject *py_pszDpFqdn;
18203 17 : if (object->pszDpFqdn == NULL) {
18204 0 : Py_RETURN_NONE;
18205 : }
18206 17 : if (object->pszDpFqdn == NULL) {
18207 0 : py_pszDpFqdn = Py_None;
18208 0 : Py_INCREF(py_pszDpFqdn);
18209 : } else {
18210 17 : if (object->pszDpFqdn == NULL) {
18211 0 : py_pszDpFqdn = Py_None;
18212 0 : Py_INCREF(py_pszDpFqdn);
18213 : } else {
18214 17 : py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
18215 : }
18216 : }
18217 17 : return py_pszDpFqdn;
18218 : }
18219 :
18220 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
18221 : {
18222 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
18223 0 : if (value == NULL) {
18224 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDpFqdn");
18225 0 : return -1;
18226 : }
18227 0 : if (value == Py_None) {
18228 0 : object->pszDpFqdn = NULL;
18229 : } else {
18230 0 : object->pszDpFqdn = NULL;
18231 : {
18232 0 : const char *test_str;
18233 0 : const char *talloc_str;
18234 0 : PyObject *unicode = NULL;
18235 0 : if (PyUnicode_Check(value)) {
18236 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
18237 0 : if (unicode == NULL) {
18238 0 : return -1;
18239 : }
18240 0 : test_str = PyBytes_AS_STRING(unicode);
18241 0 : } else if (PyBytes_Check(value)) {
18242 0 : test_str = PyBytes_AS_STRING(value);
18243 : } else {
18244 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
18245 0 : return -1;
18246 : }
18247 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
18248 0 : if (unicode != NULL) {
18249 0 : Py_DECREF(unicode);
18250 : }
18251 0 : if (talloc_str == NULL) {
18252 0 : PyErr_NoMemory();
18253 0 : return -1;
18254 : }
18255 0 : object->pszDpFqdn = talloc_str;
18256 : }
18257 : }
18258 0 : return 0;
18259 : }
18260 :
18261 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_pwszZoneDn(PyObject *obj, void *closure)
18262 : {
18263 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
18264 0 : PyObject *py_pwszZoneDn;
18265 17 : if (object->pwszZoneDn == NULL) {
18266 0 : Py_RETURN_NONE;
18267 : }
18268 17 : if (object->pwszZoneDn == NULL) {
18269 0 : py_pwszZoneDn = Py_None;
18270 0 : Py_INCREF(py_pwszZoneDn);
18271 : } else {
18272 17 : if (object->pwszZoneDn == NULL) {
18273 0 : py_pwszZoneDn = Py_None;
18274 0 : Py_INCREF(py_pwszZoneDn);
18275 : } else {
18276 17 : py_pwszZoneDn = PyUnicode_Decode(object->pwszZoneDn, strlen(object->pwszZoneDn), "utf-8", "ignore");
18277 : }
18278 : }
18279 17 : return py_pwszZoneDn;
18280 : }
18281 :
18282 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_pwszZoneDn(PyObject *py_obj, PyObject *value, void *closure)
18283 : {
18284 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
18285 0 : if (value == NULL) {
18286 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pwszZoneDn");
18287 0 : return -1;
18288 : }
18289 0 : if (value == Py_None) {
18290 0 : object->pwszZoneDn = NULL;
18291 : } else {
18292 0 : object->pwszZoneDn = NULL;
18293 : {
18294 0 : const char *test_str;
18295 0 : const char *talloc_str;
18296 0 : PyObject *unicode = NULL;
18297 0 : if (PyUnicode_Check(value)) {
18298 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
18299 0 : if (unicode == NULL) {
18300 0 : return -1;
18301 : }
18302 0 : test_str = PyBytes_AS_STRING(unicode);
18303 0 : } else if (PyBytes_Check(value)) {
18304 0 : test_str = PyBytes_AS_STRING(value);
18305 : } else {
18306 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
18307 0 : return -1;
18308 : }
18309 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
18310 0 : if (unicode != NULL) {
18311 0 : Py_DECREF(unicode);
18312 : }
18313 0 : if (talloc_str == NULL) {
18314 0 : PyErr_NoMemory();
18315 0 : return -1;
18316 : }
18317 0 : object->pwszZoneDn = talloc_str;
18318 : }
18319 : }
18320 0 : return 0;
18321 : }
18322 :
18323 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastSuccessfulSoaCheck(PyObject *obj, void *closure)
18324 : {
18325 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
18326 0 : PyObject *py_dwLastSuccessfulSoaCheck;
18327 17 : py_dwLastSuccessfulSoaCheck = PyLong_FromUnsignedLongLong((uint32_t)(object->dwLastSuccessfulSoaCheck));
18328 17 : return py_dwLastSuccessfulSoaCheck;
18329 : }
18330 :
18331 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastSuccessfulSoaCheck(PyObject *py_obj, PyObject *value, void *closure)
18332 : {
18333 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
18334 0 : if (value == NULL) {
18335 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwLastSuccessfulSoaCheck");
18336 0 : return -1;
18337 : }
18338 : {
18339 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLastSuccessfulSoaCheck));
18340 0 : if (PyLong_Check(value)) {
18341 0 : unsigned long long test_var;
18342 0 : test_var = PyLong_AsUnsignedLongLong(value);
18343 0 : if (PyErr_Occurred() != NULL) {
18344 0 : return -1;
18345 : }
18346 0 : if (test_var > uint_max) {
18347 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18348 : PyLong_Type.tp_name, uint_max, test_var);
18349 0 : return -1;
18350 : }
18351 0 : object->dwLastSuccessfulSoaCheck = test_var;
18352 : } else {
18353 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18354 : PyLong_Type.tp_name);
18355 0 : return -1;
18356 : }
18357 : }
18358 0 : return 0;
18359 : }
18360 :
18361 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastSuccessfulXfr(PyObject *obj, void *closure)
18362 : {
18363 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
18364 0 : PyObject *py_dwLastSuccessfulXfr;
18365 17 : py_dwLastSuccessfulXfr = PyLong_FromUnsignedLongLong((uint32_t)(object->dwLastSuccessfulXfr));
18366 17 : return py_dwLastSuccessfulXfr;
18367 : }
18368 :
18369 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastSuccessfulXfr(PyObject *py_obj, PyObject *value, void *closure)
18370 : {
18371 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
18372 0 : if (value == NULL) {
18373 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwLastSuccessfulXfr");
18374 0 : return -1;
18375 : }
18376 : {
18377 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLastSuccessfulXfr));
18378 0 : if (PyLong_Check(value)) {
18379 0 : unsigned long long test_var;
18380 0 : test_var = PyLong_AsUnsignedLongLong(value);
18381 0 : if (PyErr_Occurred() != NULL) {
18382 0 : return -1;
18383 : }
18384 0 : if (test_var > uint_max) {
18385 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18386 : PyLong_Type.tp_name, uint_max, test_var);
18387 0 : return -1;
18388 : }
18389 0 : object->dwLastSuccessfulXfr = test_var;
18390 : } else {
18391 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18392 : PyLong_Type.tp_name);
18393 0 : return -1;
18394 : }
18395 : }
18396 0 : return 0;
18397 : }
18398 :
18399 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fQueuedForBackgroundLoad(PyObject *obj, void *closure)
18400 : {
18401 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
18402 0 : PyObject *py_fQueuedForBackgroundLoad;
18403 17 : py_fQueuedForBackgroundLoad = PyLong_FromUnsignedLongLong((uint32_t)(object->fQueuedForBackgroundLoad));
18404 17 : return py_fQueuedForBackgroundLoad;
18405 : }
18406 :
18407 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fQueuedForBackgroundLoad(PyObject *py_obj, PyObject *value, void *closure)
18408 : {
18409 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
18410 0 : if (value == NULL) {
18411 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fQueuedForBackgroundLoad");
18412 0 : return -1;
18413 : }
18414 : {
18415 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fQueuedForBackgroundLoad));
18416 0 : if (PyLong_Check(value)) {
18417 0 : unsigned long long test_var;
18418 0 : test_var = PyLong_AsUnsignedLongLong(value);
18419 0 : if (PyErr_Occurred() != NULL) {
18420 0 : return -1;
18421 : }
18422 0 : if (test_var > uint_max) {
18423 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18424 : PyLong_Type.tp_name, uint_max, test_var);
18425 0 : return -1;
18426 : }
18427 0 : object->fQueuedForBackgroundLoad = test_var;
18428 : } else {
18429 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18430 : PyLong_Type.tp_name);
18431 0 : return -1;
18432 : }
18433 : }
18434 0 : return 0;
18435 : }
18436 :
18437 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fBackgroundLoadInProgress(PyObject *obj, void *closure)
18438 : {
18439 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
18440 0 : PyObject *py_fBackgroundLoadInProgress;
18441 17 : py_fBackgroundLoadInProgress = PyLong_FromUnsignedLongLong((uint32_t)(object->fBackgroundLoadInProgress));
18442 17 : return py_fBackgroundLoadInProgress;
18443 : }
18444 :
18445 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fBackgroundLoadInProgress(PyObject *py_obj, PyObject *value, void *closure)
18446 : {
18447 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
18448 0 : if (value == NULL) {
18449 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fBackgroundLoadInProgress");
18450 0 : return -1;
18451 : }
18452 : {
18453 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fBackgroundLoadInProgress));
18454 0 : if (PyLong_Check(value)) {
18455 0 : unsigned long long test_var;
18456 0 : test_var = PyLong_AsUnsignedLongLong(value);
18457 0 : if (PyErr_Occurred() != NULL) {
18458 0 : return -1;
18459 : }
18460 0 : if (test_var > uint_max) {
18461 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18462 : PyLong_Type.tp_name, uint_max, test_var);
18463 0 : return -1;
18464 : }
18465 0 : object->fBackgroundLoadInProgress = test_var;
18466 : } else {
18467 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18468 : PyLong_Type.tp_name);
18469 0 : return -1;
18470 : }
18471 : }
18472 0 : return 0;
18473 : }
18474 :
18475 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fReadOnlyZone(PyObject *obj, void *closure)
18476 : {
18477 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
18478 0 : PyObject *py_fReadOnlyZone;
18479 17 : py_fReadOnlyZone = PyLong_FromUnsignedLongLong((uint32_t)(object->fReadOnlyZone));
18480 17 : return py_fReadOnlyZone;
18481 : }
18482 :
18483 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fReadOnlyZone(PyObject *py_obj, PyObject *value, void *closure)
18484 : {
18485 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
18486 0 : if (value == NULL) {
18487 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fReadOnlyZone");
18488 0 : return -1;
18489 : }
18490 : {
18491 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fReadOnlyZone));
18492 0 : if (PyLong_Check(value)) {
18493 0 : unsigned long long test_var;
18494 0 : test_var = PyLong_AsUnsignedLongLong(value);
18495 0 : if (PyErr_Occurred() != NULL) {
18496 0 : return -1;
18497 : }
18498 0 : if (test_var > uint_max) {
18499 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18500 : PyLong_Type.tp_name, uint_max, test_var);
18501 0 : return -1;
18502 : }
18503 0 : object->fReadOnlyZone = test_var;
18504 : } else {
18505 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18506 : PyLong_Type.tp_name);
18507 0 : return -1;
18508 : }
18509 : }
18510 0 : return 0;
18511 : }
18512 :
18513 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastXfrAttempt(PyObject *obj, void *closure)
18514 : {
18515 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
18516 0 : PyObject *py_dwLastXfrAttempt;
18517 17 : py_dwLastXfrAttempt = PyLong_FromUnsignedLongLong((uint32_t)(object->dwLastXfrAttempt));
18518 17 : return py_dwLastXfrAttempt;
18519 : }
18520 :
18521 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastXfrAttempt(PyObject *py_obj, PyObject *value, void *closure)
18522 : {
18523 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
18524 0 : if (value == NULL) {
18525 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwLastXfrAttempt");
18526 0 : return -1;
18527 : }
18528 : {
18529 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLastXfrAttempt));
18530 0 : if (PyLong_Check(value)) {
18531 0 : unsigned long long test_var;
18532 0 : test_var = PyLong_AsUnsignedLongLong(value);
18533 0 : if (PyErr_Occurred() != NULL) {
18534 0 : return -1;
18535 : }
18536 0 : if (test_var > uint_max) {
18537 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18538 : PyLong_Type.tp_name, uint_max, test_var);
18539 0 : return -1;
18540 : }
18541 0 : object->dwLastXfrAttempt = test_var;
18542 : } else {
18543 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18544 : PyLong_Type.tp_name);
18545 0 : return -1;
18546 : }
18547 : }
18548 0 : return 0;
18549 : }
18550 :
18551 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastXfrResult(PyObject *obj, void *closure)
18552 : {
18553 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
18554 0 : PyObject *py_dwLastXfrResult;
18555 17 : py_dwLastXfrResult = PyLong_FromUnsignedLongLong((uint32_t)(object->dwLastXfrResult));
18556 17 : return py_dwLastXfrResult;
18557 : }
18558 :
18559 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastXfrResult(PyObject *py_obj, PyObject *value, void *closure)
18560 : {
18561 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
18562 0 : if (value == NULL) {
18563 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwLastXfrResult");
18564 0 : return -1;
18565 : }
18566 : {
18567 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLastXfrResult));
18568 0 : if (PyLong_Check(value)) {
18569 0 : unsigned long long test_var;
18570 0 : test_var = PyLong_AsUnsignedLongLong(value);
18571 0 : if (PyErr_Occurred() != NULL) {
18572 0 : return -1;
18573 : }
18574 0 : if (test_var > uint_max) {
18575 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18576 : PyLong_Type.tp_name, uint_max, test_var);
18577 0 : return -1;
18578 : }
18579 0 : object->dwLastXfrResult = test_var;
18580 : } else {
18581 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18582 : PyLong_Type.tp_name);
18583 0 : return -1;
18584 : }
18585 : }
18586 0 : return 0;
18587 : }
18588 :
18589 : static PyGetSetDef py_DNS_RPC_ZONE_INFO_LONGHORN_getsetters[] = {
18590 : {
18591 : .name = discard_const_p(char, "dwRpcStructureVersion"),
18592 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwRpcStructureVersion,
18593 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwRpcStructureVersion,
18594 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18595 : },
18596 : {
18597 : .name = discard_const_p(char, "dwReserved0"),
18598 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwReserved0,
18599 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwReserved0,
18600 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18601 : },
18602 : {
18603 : .name = discard_const_p(char, "pszZoneName"),
18604 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_pszZoneName,
18605 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_pszZoneName,
18606 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
18607 : },
18608 : {
18609 : .name = discard_const_p(char, "dwZoneType"),
18610 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwZoneType,
18611 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwZoneType,
18612 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18613 : },
18614 : {
18615 : .name = discard_const_p(char, "fReverse"),
18616 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fReverse,
18617 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fReverse,
18618 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18619 : },
18620 : {
18621 : .name = discard_const_p(char, "fAllowUpdate"),
18622 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fAllowUpdate,
18623 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fAllowUpdate,
18624 : .doc = discard_const_p(char, "PIDL-generated element of base type dns_zone_update")
18625 : },
18626 : {
18627 : .name = discard_const_p(char, "fPaused"),
18628 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fPaused,
18629 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fPaused,
18630 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18631 : },
18632 : {
18633 : .name = discard_const_p(char, "fShutdown"),
18634 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fShutdown,
18635 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fShutdown,
18636 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18637 : },
18638 : {
18639 : .name = discard_const_p(char, "fAutoCreated"),
18640 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fAutoCreated,
18641 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fAutoCreated,
18642 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18643 : },
18644 : {
18645 : .name = discard_const_p(char, "fUseDatabase"),
18646 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fUseDatabase,
18647 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fUseDatabase,
18648 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18649 : },
18650 : {
18651 : .name = discard_const_p(char, "pszDataFile"),
18652 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_pszDataFile,
18653 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_pszDataFile,
18654 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
18655 : },
18656 : {
18657 : .name = discard_const_p(char, "aipMasters"),
18658 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipMasters,
18659 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipMasters,
18660 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
18661 : },
18662 : {
18663 : .name = discard_const_p(char, "fSecureSecondaries"),
18664 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fSecureSecondaries,
18665 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fSecureSecondaries,
18666 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_SECONDARY_SECURITY")
18667 : },
18668 : {
18669 : .name = discard_const_p(char, "fNotifyLevel"),
18670 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fNotifyLevel,
18671 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fNotifyLevel,
18672 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_NOTIFY_LEVEL")
18673 : },
18674 : {
18675 : .name = discard_const_p(char, "aipSecondaries"),
18676 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipSecondaries,
18677 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipSecondaries,
18678 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
18679 : },
18680 : {
18681 : .name = discard_const_p(char, "aipNotify"),
18682 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipNotify,
18683 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipNotify,
18684 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
18685 : },
18686 : {
18687 : .name = discard_const_p(char, "fUseWins"),
18688 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fUseWins,
18689 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fUseWins,
18690 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18691 : },
18692 : {
18693 : .name = discard_const_p(char, "fUseNbstat"),
18694 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fUseNbstat,
18695 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fUseNbstat,
18696 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18697 : },
18698 : {
18699 : .name = discard_const_p(char, "fAging"),
18700 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fAging,
18701 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fAging,
18702 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18703 : },
18704 : {
18705 : .name = discard_const_p(char, "dwNoRefreshInterval"),
18706 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwNoRefreshInterval,
18707 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwNoRefreshInterval,
18708 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18709 : },
18710 : {
18711 : .name = discard_const_p(char, "dwRefreshInterval"),
18712 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwRefreshInterval,
18713 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwRefreshInterval,
18714 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18715 : },
18716 : {
18717 : .name = discard_const_p(char, "dwAvailForScavengeTime"),
18718 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwAvailForScavengeTime,
18719 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwAvailForScavengeTime,
18720 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18721 : },
18722 : {
18723 : .name = discard_const_p(char, "aipScavengeServers"),
18724 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipScavengeServers,
18725 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipScavengeServers,
18726 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
18727 : },
18728 : {
18729 : .name = discard_const_p(char, "dwForwarderTimeout"),
18730 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwForwarderTimeout,
18731 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwForwarderTimeout,
18732 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18733 : },
18734 : {
18735 : .name = discard_const_p(char, "fForwarderSlave"),
18736 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fForwarderSlave,
18737 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fForwarderSlave,
18738 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18739 : },
18740 : {
18741 : .name = discard_const_p(char, "aipLocalMasters"),
18742 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipLocalMasters,
18743 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipLocalMasters,
18744 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
18745 : },
18746 : {
18747 : .name = discard_const_p(char, "dwDpFlags"),
18748 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwDpFlags,
18749 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwDpFlags,
18750 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18751 : },
18752 : {
18753 : .name = discard_const_p(char, "pszDpFqdn"),
18754 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_pszDpFqdn,
18755 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_pszDpFqdn,
18756 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
18757 : },
18758 : {
18759 : .name = discard_const_p(char, "pwszZoneDn"),
18760 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_pwszZoneDn,
18761 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_pwszZoneDn,
18762 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
18763 : },
18764 : {
18765 : .name = discard_const_p(char, "dwLastSuccessfulSoaCheck"),
18766 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastSuccessfulSoaCheck,
18767 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastSuccessfulSoaCheck,
18768 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18769 : },
18770 : {
18771 : .name = discard_const_p(char, "dwLastSuccessfulXfr"),
18772 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastSuccessfulXfr,
18773 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastSuccessfulXfr,
18774 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18775 : },
18776 : {
18777 : .name = discard_const_p(char, "fQueuedForBackgroundLoad"),
18778 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fQueuedForBackgroundLoad,
18779 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fQueuedForBackgroundLoad,
18780 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18781 : },
18782 : {
18783 : .name = discard_const_p(char, "fBackgroundLoadInProgress"),
18784 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fBackgroundLoadInProgress,
18785 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fBackgroundLoadInProgress,
18786 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18787 : },
18788 : {
18789 : .name = discard_const_p(char, "fReadOnlyZone"),
18790 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fReadOnlyZone,
18791 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fReadOnlyZone,
18792 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18793 : },
18794 : {
18795 : .name = discard_const_p(char, "dwLastXfrAttempt"),
18796 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastXfrAttempt,
18797 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastXfrAttempt,
18798 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18799 : },
18800 : {
18801 : .name = discard_const_p(char, "dwLastXfrResult"),
18802 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastXfrResult,
18803 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastXfrResult,
18804 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18805 : },
18806 : { .name = NULL }
18807 : };
18808 :
18809 0 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
18810 : {
18811 0 : return pytalloc_new(struct DNS_RPC_ZONE_INFO_LONGHORN, type);
18812 : }
18813 :
18814 :
18815 : static PyTypeObject DNS_RPC_ZONE_INFO_LONGHORN_Type = {
18816 : PyVarObject_HEAD_INIT(NULL, 0)
18817 : .tp_name = "dnsserver.DNS_RPC_ZONE_INFO_LONGHORN",
18818 : .tp_getset = py_DNS_RPC_ZONE_INFO_LONGHORN_getsetters,
18819 : .tp_methods = NULL,
18820 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
18821 : .tp_new = py_DNS_RPC_ZONE_INFO_LONGHORN_new,
18822 : };
18823 :
18824 :
18825 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_W2K_get_fSecureSecondaries(PyObject *obj, void *closure)
18826 : {
18827 0 : struct DNS_RPC_ZONE_SECONDARIES_W2K *object = pytalloc_get_ptr(obj);
18828 0 : PyObject *py_fSecureSecondaries;
18829 0 : py_fSecureSecondaries = PyLong_FromUnsignedLongLong((uint32_t)(object->fSecureSecondaries));
18830 0 : return py_fSecureSecondaries;
18831 : }
18832 :
18833 0 : static int py_DNS_RPC_ZONE_SECONDARIES_W2K_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
18834 : {
18835 0 : struct DNS_RPC_ZONE_SECONDARIES_W2K *object = pytalloc_get_ptr(py_obj);
18836 0 : if (value == NULL) {
18837 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fSecureSecondaries");
18838 0 : return -1;
18839 : }
18840 : {
18841 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureSecondaries));
18842 0 : if (PyLong_Check(value)) {
18843 0 : unsigned long long test_var;
18844 0 : test_var = PyLong_AsUnsignedLongLong(value);
18845 0 : if (PyErr_Occurred() != NULL) {
18846 0 : return -1;
18847 : }
18848 0 : if (test_var > uint_max) {
18849 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18850 : PyLong_Type.tp_name, uint_max, test_var);
18851 0 : return -1;
18852 : }
18853 0 : object->fSecureSecondaries = test_var;
18854 : } else {
18855 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18856 : PyLong_Type.tp_name);
18857 0 : return -1;
18858 : }
18859 : }
18860 0 : return 0;
18861 : }
18862 :
18863 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_W2K_get_fNotifyLevel(PyObject *obj, void *closure)
18864 : {
18865 0 : struct DNS_RPC_ZONE_SECONDARIES_W2K *object = pytalloc_get_ptr(obj);
18866 0 : PyObject *py_fNotifyLevel;
18867 0 : py_fNotifyLevel = PyLong_FromUnsignedLongLong((uint32_t)(object->fNotifyLevel));
18868 0 : return py_fNotifyLevel;
18869 : }
18870 :
18871 0 : static int py_DNS_RPC_ZONE_SECONDARIES_W2K_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
18872 : {
18873 0 : struct DNS_RPC_ZONE_SECONDARIES_W2K *object = pytalloc_get_ptr(py_obj);
18874 0 : if (value == NULL) {
18875 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fNotifyLevel");
18876 0 : return -1;
18877 : }
18878 : {
18879 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNotifyLevel));
18880 0 : if (PyLong_Check(value)) {
18881 0 : unsigned long long test_var;
18882 0 : test_var = PyLong_AsUnsignedLongLong(value);
18883 0 : if (PyErr_Occurred() != NULL) {
18884 0 : return -1;
18885 : }
18886 0 : if (test_var > uint_max) {
18887 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18888 : PyLong_Type.tp_name, uint_max, test_var);
18889 0 : return -1;
18890 : }
18891 0 : object->fNotifyLevel = test_var;
18892 : } else {
18893 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18894 : PyLong_Type.tp_name);
18895 0 : return -1;
18896 : }
18897 : }
18898 0 : return 0;
18899 : }
18900 :
18901 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_W2K_get_aipSecondaries(PyObject *obj, void *closure)
18902 : {
18903 0 : struct DNS_RPC_ZONE_SECONDARIES_W2K *object = pytalloc_get_ptr(obj);
18904 0 : PyObject *py_aipSecondaries;
18905 0 : if (object->aipSecondaries == NULL) {
18906 0 : Py_RETURN_NONE;
18907 : }
18908 0 : if (object->aipSecondaries == NULL) {
18909 0 : py_aipSecondaries = Py_None;
18910 0 : Py_INCREF(py_aipSecondaries);
18911 : } else {
18912 0 : py_aipSecondaries = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
18913 : }
18914 0 : return py_aipSecondaries;
18915 : }
18916 :
18917 0 : static int py_DNS_RPC_ZONE_SECONDARIES_W2K_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
18918 : {
18919 0 : struct DNS_RPC_ZONE_SECONDARIES_W2K *object = pytalloc_get_ptr(py_obj);
18920 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipSecondaries));
18921 0 : if (value == NULL) {
18922 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipSecondaries");
18923 0 : return -1;
18924 : }
18925 0 : if (value == Py_None) {
18926 0 : object->aipSecondaries = NULL;
18927 : } else {
18928 0 : object->aipSecondaries = NULL;
18929 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
18930 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
18931 0 : PyErr_NoMemory();
18932 0 : return -1;
18933 : }
18934 0 : object->aipSecondaries = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
18935 : }
18936 0 : return 0;
18937 : }
18938 :
18939 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_W2K_get_aipNotify(PyObject *obj, void *closure)
18940 : {
18941 0 : struct DNS_RPC_ZONE_SECONDARIES_W2K *object = pytalloc_get_ptr(obj);
18942 0 : PyObject *py_aipNotify;
18943 0 : if (object->aipNotify == NULL) {
18944 0 : Py_RETURN_NONE;
18945 : }
18946 0 : if (object->aipNotify == NULL) {
18947 0 : py_aipNotify = Py_None;
18948 0 : Py_INCREF(py_aipNotify);
18949 : } else {
18950 0 : py_aipNotify = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipNotify, object->aipNotify);
18951 : }
18952 0 : return py_aipNotify;
18953 : }
18954 :
18955 0 : static int py_DNS_RPC_ZONE_SECONDARIES_W2K_set_aipNotify(PyObject *py_obj, PyObject *value, void *closure)
18956 : {
18957 0 : struct DNS_RPC_ZONE_SECONDARIES_W2K *object = pytalloc_get_ptr(py_obj);
18958 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipNotify));
18959 0 : if (value == NULL) {
18960 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipNotify");
18961 0 : return -1;
18962 : }
18963 0 : if (value == Py_None) {
18964 0 : object->aipNotify = NULL;
18965 : } else {
18966 0 : object->aipNotify = NULL;
18967 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
18968 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
18969 0 : PyErr_NoMemory();
18970 0 : return -1;
18971 : }
18972 0 : object->aipNotify = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
18973 : }
18974 0 : return 0;
18975 : }
18976 :
18977 : static PyGetSetDef py_DNS_RPC_ZONE_SECONDARIES_W2K_getsetters[] = {
18978 : {
18979 : .name = discard_const_p(char, "fSecureSecondaries"),
18980 : .get = py_DNS_RPC_ZONE_SECONDARIES_W2K_get_fSecureSecondaries,
18981 : .set = py_DNS_RPC_ZONE_SECONDARIES_W2K_set_fSecureSecondaries,
18982 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_SECONDARY_SECURITY")
18983 : },
18984 : {
18985 : .name = discard_const_p(char, "fNotifyLevel"),
18986 : .get = py_DNS_RPC_ZONE_SECONDARIES_W2K_get_fNotifyLevel,
18987 : .set = py_DNS_RPC_ZONE_SECONDARIES_W2K_set_fNotifyLevel,
18988 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_NOTIFY_LEVEL")
18989 : },
18990 : {
18991 : .name = discard_const_p(char, "aipSecondaries"),
18992 : .get = py_DNS_RPC_ZONE_SECONDARIES_W2K_get_aipSecondaries,
18993 : .set = py_DNS_RPC_ZONE_SECONDARIES_W2K_set_aipSecondaries,
18994 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
18995 : },
18996 : {
18997 : .name = discard_const_p(char, "aipNotify"),
18998 : .get = py_DNS_RPC_ZONE_SECONDARIES_W2K_get_aipNotify,
18999 : .set = py_DNS_RPC_ZONE_SECONDARIES_W2K_set_aipNotify,
19000 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
19001 : },
19002 : { .name = NULL }
19003 : };
19004 :
19005 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
19006 : {
19007 0 : return pytalloc_new(struct DNS_RPC_ZONE_SECONDARIES_W2K, type);
19008 : }
19009 :
19010 :
19011 : static PyTypeObject DNS_RPC_ZONE_SECONDARIES_W2K_Type = {
19012 : PyVarObject_HEAD_INIT(NULL, 0)
19013 : .tp_name = "dnsserver.DNS_RPC_ZONE_SECONDARIES_W2K",
19014 : .tp_getset = py_DNS_RPC_ZONE_SECONDARIES_W2K_getsetters,
19015 : .tp_methods = NULL,
19016 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
19017 : .tp_new = py_DNS_RPC_ZONE_SECONDARIES_W2K_new,
19018 : };
19019 :
19020 :
19021 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
19022 : {
19023 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = pytalloc_get_ptr(obj);
19024 0 : PyObject *py_dwRpcStructureVersion;
19025 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
19026 0 : return py_dwRpcStructureVersion;
19027 : }
19028 :
19029 0 : static int py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
19030 : {
19031 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = pytalloc_get_ptr(py_obj);
19032 0 : if (value == NULL) {
19033 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
19034 0 : return -1;
19035 : }
19036 : {
19037 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
19038 0 : if (PyLong_Check(value)) {
19039 0 : unsigned long long test_var;
19040 0 : test_var = PyLong_AsUnsignedLongLong(value);
19041 0 : if (PyErr_Occurred() != NULL) {
19042 0 : return -1;
19043 : }
19044 0 : if (test_var > uint_max) {
19045 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19046 : PyLong_Type.tp_name, uint_max, test_var);
19047 0 : return -1;
19048 : }
19049 0 : object->dwRpcStructureVersion = test_var;
19050 : } else {
19051 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19052 : PyLong_Type.tp_name);
19053 0 : return -1;
19054 : }
19055 : }
19056 0 : return 0;
19057 : }
19058 :
19059 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
19060 : {
19061 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = pytalloc_get_ptr(obj);
19062 0 : PyObject *py_dwReserved0;
19063 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
19064 0 : return py_dwReserved0;
19065 : }
19066 :
19067 0 : static int py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
19068 : {
19069 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = pytalloc_get_ptr(py_obj);
19070 0 : if (value == NULL) {
19071 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
19072 0 : return -1;
19073 : }
19074 : {
19075 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
19076 0 : if (PyLong_Check(value)) {
19077 0 : unsigned long long test_var;
19078 0 : test_var = PyLong_AsUnsignedLongLong(value);
19079 0 : if (PyErr_Occurred() != NULL) {
19080 0 : return -1;
19081 : }
19082 0 : if (test_var > uint_max) {
19083 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19084 : PyLong_Type.tp_name, uint_max, test_var);
19085 0 : return -1;
19086 : }
19087 0 : object->dwReserved0 = test_var;
19088 : } else {
19089 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19090 : PyLong_Type.tp_name);
19091 0 : return -1;
19092 : }
19093 : }
19094 0 : return 0;
19095 : }
19096 :
19097 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_fSecureSecondaries(PyObject *obj, void *closure)
19098 : {
19099 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = pytalloc_get_ptr(obj);
19100 0 : PyObject *py_fSecureSecondaries;
19101 0 : py_fSecureSecondaries = PyLong_FromUnsignedLongLong((uint32_t)(object->fSecureSecondaries));
19102 0 : return py_fSecureSecondaries;
19103 : }
19104 :
19105 0 : static int py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
19106 : {
19107 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = pytalloc_get_ptr(py_obj);
19108 0 : if (value == NULL) {
19109 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fSecureSecondaries");
19110 0 : return -1;
19111 : }
19112 : {
19113 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureSecondaries));
19114 0 : if (PyLong_Check(value)) {
19115 0 : unsigned long long test_var;
19116 0 : test_var = PyLong_AsUnsignedLongLong(value);
19117 0 : if (PyErr_Occurred() != NULL) {
19118 0 : return -1;
19119 : }
19120 0 : if (test_var > uint_max) {
19121 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19122 : PyLong_Type.tp_name, uint_max, test_var);
19123 0 : return -1;
19124 : }
19125 0 : object->fSecureSecondaries = test_var;
19126 : } else {
19127 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19128 : PyLong_Type.tp_name);
19129 0 : return -1;
19130 : }
19131 : }
19132 0 : return 0;
19133 : }
19134 :
19135 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_fNotifyLevel(PyObject *obj, void *closure)
19136 : {
19137 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = pytalloc_get_ptr(obj);
19138 0 : PyObject *py_fNotifyLevel;
19139 0 : py_fNotifyLevel = PyLong_FromUnsignedLongLong((uint32_t)(object->fNotifyLevel));
19140 0 : return py_fNotifyLevel;
19141 : }
19142 :
19143 0 : static int py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
19144 : {
19145 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = pytalloc_get_ptr(py_obj);
19146 0 : if (value == NULL) {
19147 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fNotifyLevel");
19148 0 : return -1;
19149 : }
19150 : {
19151 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNotifyLevel));
19152 0 : if (PyLong_Check(value)) {
19153 0 : unsigned long long test_var;
19154 0 : test_var = PyLong_AsUnsignedLongLong(value);
19155 0 : if (PyErr_Occurred() != NULL) {
19156 0 : return -1;
19157 : }
19158 0 : if (test_var > uint_max) {
19159 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19160 : PyLong_Type.tp_name, uint_max, test_var);
19161 0 : return -1;
19162 : }
19163 0 : object->fNotifyLevel = test_var;
19164 : } else {
19165 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19166 : PyLong_Type.tp_name);
19167 0 : return -1;
19168 : }
19169 : }
19170 0 : return 0;
19171 : }
19172 :
19173 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_aipSecondaries(PyObject *obj, void *closure)
19174 : {
19175 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = pytalloc_get_ptr(obj);
19176 0 : PyObject *py_aipSecondaries;
19177 0 : if (object->aipSecondaries == NULL) {
19178 0 : Py_RETURN_NONE;
19179 : }
19180 0 : if (object->aipSecondaries == NULL) {
19181 0 : py_aipSecondaries = Py_None;
19182 0 : Py_INCREF(py_aipSecondaries);
19183 : } else {
19184 0 : py_aipSecondaries = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
19185 : }
19186 0 : return py_aipSecondaries;
19187 : }
19188 :
19189 0 : static int py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
19190 : {
19191 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = pytalloc_get_ptr(py_obj);
19192 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipSecondaries));
19193 0 : if (value == NULL) {
19194 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipSecondaries");
19195 0 : return -1;
19196 : }
19197 0 : if (value == Py_None) {
19198 0 : object->aipSecondaries = NULL;
19199 : } else {
19200 0 : object->aipSecondaries = NULL;
19201 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
19202 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
19203 0 : PyErr_NoMemory();
19204 0 : return -1;
19205 : }
19206 0 : object->aipSecondaries = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
19207 : }
19208 0 : return 0;
19209 : }
19210 :
19211 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_aipNotify(PyObject *obj, void *closure)
19212 : {
19213 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = pytalloc_get_ptr(obj);
19214 0 : PyObject *py_aipNotify;
19215 0 : if (object->aipNotify == NULL) {
19216 0 : Py_RETURN_NONE;
19217 : }
19218 0 : if (object->aipNotify == NULL) {
19219 0 : py_aipNotify = Py_None;
19220 0 : Py_INCREF(py_aipNotify);
19221 : } else {
19222 0 : py_aipNotify = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipNotify, object->aipNotify);
19223 : }
19224 0 : return py_aipNotify;
19225 : }
19226 :
19227 0 : static int py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_aipNotify(PyObject *py_obj, PyObject *value, void *closure)
19228 : {
19229 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = pytalloc_get_ptr(py_obj);
19230 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipNotify));
19231 0 : if (value == NULL) {
19232 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipNotify");
19233 0 : return -1;
19234 : }
19235 0 : if (value == Py_None) {
19236 0 : object->aipNotify = NULL;
19237 : } else {
19238 0 : object->aipNotify = NULL;
19239 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
19240 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
19241 0 : PyErr_NoMemory();
19242 0 : return -1;
19243 : }
19244 0 : object->aipNotify = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
19245 : }
19246 0 : return 0;
19247 : }
19248 :
19249 : static PyGetSetDef py_DNS_RPC_ZONE_SECONDARIES_DOTNET_getsetters[] = {
19250 : {
19251 : .name = discard_const_p(char, "dwRpcStructureVersion"),
19252 : .get = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_dwRpcStructureVersion,
19253 : .set = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_dwRpcStructureVersion,
19254 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
19255 : },
19256 : {
19257 : .name = discard_const_p(char, "dwReserved0"),
19258 : .get = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_dwReserved0,
19259 : .set = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_dwReserved0,
19260 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
19261 : },
19262 : {
19263 : .name = discard_const_p(char, "fSecureSecondaries"),
19264 : .get = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_fSecureSecondaries,
19265 : .set = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_fSecureSecondaries,
19266 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_SECONDARY_SECURITY")
19267 : },
19268 : {
19269 : .name = discard_const_p(char, "fNotifyLevel"),
19270 : .get = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_fNotifyLevel,
19271 : .set = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_fNotifyLevel,
19272 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_NOTIFY_LEVEL")
19273 : },
19274 : {
19275 : .name = discard_const_p(char, "aipSecondaries"),
19276 : .get = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_aipSecondaries,
19277 : .set = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_aipSecondaries,
19278 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
19279 : },
19280 : {
19281 : .name = discard_const_p(char, "aipNotify"),
19282 : .get = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_aipNotify,
19283 : .set = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_aipNotify,
19284 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
19285 : },
19286 : { .name = NULL }
19287 : };
19288 :
19289 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
19290 : {
19291 0 : return pytalloc_new(struct DNS_RPC_ZONE_SECONDARIES_DOTNET, type);
19292 : }
19293 :
19294 :
19295 : static PyTypeObject DNS_RPC_ZONE_SECONDARIES_DOTNET_Type = {
19296 : PyVarObject_HEAD_INIT(NULL, 0)
19297 : .tp_name = "dnsserver.DNS_RPC_ZONE_SECONDARIES_DOTNET",
19298 : .tp_getset = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_getsetters,
19299 : .tp_methods = NULL,
19300 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
19301 : .tp_new = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_new,
19302 : };
19303 :
19304 :
19305 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_dwRpcStructureVersion(PyObject *obj, void *closure)
19306 : {
19307 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = pytalloc_get_ptr(obj);
19308 0 : PyObject *py_dwRpcStructureVersion;
19309 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
19310 0 : return py_dwRpcStructureVersion;
19311 : }
19312 :
19313 0 : static int py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
19314 : {
19315 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = pytalloc_get_ptr(py_obj);
19316 0 : if (value == NULL) {
19317 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
19318 0 : return -1;
19319 : }
19320 : {
19321 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
19322 0 : if (PyLong_Check(value)) {
19323 0 : unsigned long long test_var;
19324 0 : test_var = PyLong_AsUnsignedLongLong(value);
19325 0 : if (PyErr_Occurred() != NULL) {
19326 0 : return -1;
19327 : }
19328 0 : if (test_var > uint_max) {
19329 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19330 : PyLong_Type.tp_name, uint_max, test_var);
19331 0 : return -1;
19332 : }
19333 0 : object->dwRpcStructureVersion = test_var;
19334 : } else {
19335 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19336 : PyLong_Type.tp_name);
19337 0 : return -1;
19338 : }
19339 : }
19340 0 : return 0;
19341 : }
19342 :
19343 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_dwReserved0(PyObject *obj, void *closure)
19344 : {
19345 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = pytalloc_get_ptr(obj);
19346 0 : PyObject *py_dwReserved0;
19347 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
19348 0 : return py_dwReserved0;
19349 : }
19350 :
19351 0 : static int py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
19352 : {
19353 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = pytalloc_get_ptr(py_obj);
19354 0 : if (value == NULL) {
19355 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
19356 0 : return -1;
19357 : }
19358 : {
19359 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
19360 0 : if (PyLong_Check(value)) {
19361 0 : unsigned long long test_var;
19362 0 : test_var = PyLong_AsUnsignedLongLong(value);
19363 0 : if (PyErr_Occurred() != NULL) {
19364 0 : return -1;
19365 : }
19366 0 : if (test_var > uint_max) {
19367 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19368 : PyLong_Type.tp_name, uint_max, test_var);
19369 0 : return -1;
19370 : }
19371 0 : object->dwReserved0 = test_var;
19372 : } else {
19373 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19374 : PyLong_Type.tp_name);
19375 0 : return -1;
19376 : }
19377 : }
19378 0 : return 0;
19379 : }
19380 :
19381 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_fSecureSecondaries(PyObject *obj, void *closure)
19382 : {
19383 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = pytalloc_get_ptr(obj);
19384 0 : PyObject *py_fSecureSecondaries;
19385 0 : py_fSecureSecondaries = PyLong_FromUnsignedLongLong((uint32_t)(object->fSecureSecondaries));
19386 0 : return py_fSecureSecondaries;
19387 : }
19388 :
19389 0 : static int py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
19390 : {
19391 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = pytalloc_get_ptr(py_obj);
19392 0 : if (value == NULL) {
19393 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fSecureSecondaries");
19394 0 : return -1;
19395 : }
19396 : {
19397 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureSecondaries));
19398 0 : if (PyLong_Check(value)) {
19399 0 : unsigned long long test_var;
19400 0 : test_var = PyLong_AsUnsignedLongLong(value);
19401 0 : if (PyErr_Occurred() != NULL) {
19402 0 : return -1;
19403 : }
19404 0 : if (test_var > uint_max) {
19405 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19406 : PyLong_Type.tp_name, uint_max, test_var);
19407 0 : return -1;
19408 : }
19409 0 : object->fSecureSecondaries = test_var;
19410 : } else {
19411 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19412 : PyLong_Type.tp_name);
19413 0 : return -1;
19414 : }
19415 : }
19416 0 : return 0;
19417 : }
19418 :
19419 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_fNotifyLevel(PyObject *obj, void *closure)
19420 : {
19421 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = pytalloc_get_ptr(obj);
19422 0 : PyObject *py_fNotifyLevel;
19423 0 : py_fNotifyLevel = PyLong_FromUnsignedLongLong((uint32_t)(object->fNotifyLevel));
19424 0 : return py_fNotifyLevel;
19425 : }
19426 :
19427 0 : static int py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
19428 : {
19429 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = pytalloc_get_ptr(py_obj);
19430 0 : if (value == NULL) {
19431 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fNotifyLevel");
19432 0 : return -1;
19433 : }
19434 : {
19435 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNotifyLevel));
19436 0 : if (PyLong_Check(value)) {
19437 0 : unsigned long long test_var;
19438 0 : test_var = PyLong_AsUnsignedLongLong(value);
19439 0 : if (PyErr_Occurred() != NULL) {
19440 0 : return -1;
19441 : }
19442 0 : if (test_var > uint_max) {
19443 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19444 : PyLong_Type.tp_name, uint_max, test_var);
19445 0 : return -1;
19446 : }
19447 0 : object->fNotifyLevel = test_var;
19448 : } else {
19449 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19450 : PyLong_Type.tp_name);
19451 0 : return -1;
19452 : }
19453 : }
19454 0 : return 0;
19455 : }
19456 :
19457 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_aipSecondaries(PyObject *obj, void *closure)
19458 : {
19459 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = pytalloc_get_ptr(obj);
19460 0 : PyObject *py_aipSecondaries;
19461 0 : if (object->aipSecondaries == NULL) {
19462 0 : Py_RETURN_NONE;
19463 : }
19464 0 : if (object->aipSecondaries == NULL) {
19465 0 : py_aipSecondaries = Py_None;
19466 0 : Py_INCREF(py_aipSecondaries);
19467 : } else {
19468 0 : py_aipSecondaries = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
19469 : }
19470 0 : return py_aipSecondaries;
19471 : }
19472 :
19473 0 : static int py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
19474 : {
19475 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = pytalloc_get_ptr(py_obj);
19476 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipSecondaries));
19477 0 : if (value == NULL) {
19478 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipSecondaries");
19479 0 : return -1;
19480 : }
19481 0 : if (value == Py_None) {
19482 0 : object->aipSecondaries = NULL;
19483 : } else {
19484 0 : object->aipSecondaries = NULL;
19485 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
19486 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
19487 0 : PyErr_NoMemory();
19488 0 : return -1;
19489 : }
19490 0 : object->aipSecondaries = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
19491 : }
19492 0 : return 0;
19493 : }
19494 :
19495 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_aipNotify(PyObject *obj, void *closure)
19496 : {
19497 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = pytalloc_get_ptr(obj);
19498 0 : PyObject *py_aipNotify;
19499 0 : if (object->aipNotify == NULL) {
19500 0 : Py_RETURN_NONE;
19501 : }
19502 0 : if (object->aipNotify == NULL) {
19503 0 : py_aipNotify = Py_None;
19504 0 : Py_INCREF(py_aipNotify);
19505 : } else {
19506 0 : py_aipNotify = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipNotify, object->aipNotify);
19507 : }
19508 0 : return py_aipNotify;
19509 : }
19510 :
19511 0 : static int py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_aipNotify(PyObject *py_obj, PyObject *value, void *closure)
19512 : {
19513 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = pytalloc_get_ptr(py_obj);
19514 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipNotify));
19515 0 : if (value == NULL) {
19516 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipNotify");
19517 0 : return -1;
19518 : }
19519 0 : if (value == Py_None) {
19520 0 : object->aipNotify = NULL;
19521 : } else {
19522 0 : object->aipNotify = NULL;
19523 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
19524 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
19525 0 : PyErr_NoMemory();
19526 0 : return -1;
19527 : }
19528 0 : object->aipNotify = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
19529 : }
19530 0 : return 0;
19531 : }
19532 :
19533 : static PyGetSetDef py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_getsetters[] = {
19534 : {
19535 : .name = discard_const_p(char, "dwRpcStructureVersion"),
19536 : .get = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_dwRpcStructureVersion,
19537 : .set = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_dwRpcStructureVersion,
19538 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
19539 : },
19540 : {
19541 : .name = discard_const_p(char, "dwReserved0"),
19542 : .get = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_dwReserved0,
19543 : .set = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_dwReserved0,
19544 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
19545 : },
19546 : {
19547 : .name = discard_const_p(char, "fSecureSecondaries"),
19548 : .get = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_fSecureSecondaries,
19549 : .set = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_fSecureSecondaries,
19550 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_SECONDARY_SECURITY")
19551 : },
19552 : {
19553 : .name = discard_const_p(char, "fNotifyLevel"),
19554 : .get = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_fNotifyLevel,
19555 : .set = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_fNotifyLevel,
19556 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_NOTIFY_LEVEL")
19557 : },
19558 : {
19559 : .name = discard_const_p(char, "aipSecondaries"),
19560 : .get = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_aipSecondaries,
19561 : .set = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_aipSecondaries,
19562 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
19563 : },
19564 : {
19565 : .name = discard_const_p(char, "aipNotify"),
19566 : .get = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_aipNotify,
19567 : .set = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_aipNotify,
19568 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
19569 : },
19570 : { .name = NULL }
19571 : };
19572 :
19573 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
19574 : {
19575 0 : return pytalloc_new(struct DNS_RPC_ZONE_SECONDARIES_LONGHORN, type);
19576 : }
19577 :
19578 :
19579 : static PyTypeObject DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type = {
19580 : PyVarObject_HEAD_INIT(NULL, 0)
19581 : .tp_name = "dnsserver.DNS_RPC_ZONE_SECONDARIES_LONGHORN",
19582 : .tp_getset = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_getsetters,
19583 : .tp_methods = NULL,
19584 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
19585 : .tp_new = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_new,
19586 : };
19587 :
19588 :
19589 0 : static PyObject *py_DNS_RPC_ZONE_DATABASE_W2K_get_fDsIntegrated(PyObject *obj, void *closure)
19590 : {
19591 0 : struct DNS_RPC_ZONE_DATABASE_W2K *object = pytalloc_get_ptr(obj);
19592 0 : PyObject *py_fDsIntegrated;
19593 0 : py_fDsIntegrated = PyLong_FromUnsignedLongLong((uint32_t)(object->fDsIntegrated));
19594 0 : return py_fDsIntegrated;
19595 : }
19596 :
19597 0 : static int py_DNS_RPC_ZONE_DATABASE_W2K_set_fDsIntegrated(PyObject *py_obj, PyObject *value, void *closure)
19598 : {
19599 0 : struct DNS_RPC_ZONE_DATABASE_W2K *object = pytalloc_get_ptr(py_obj);
19600 0 : if (value == NULL) {
19601 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fDsIntegrated");
19602 0 : return -1;
19603 : }
19604 : {
19605 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDsIntegrated));
19606 0 : if (PyLong_Check(value)) {
19607 0 : unsigned long long test_var;
19608 0 : test_var = PyLong_AsUnsignedLongLong(value);
19609 0 : if (PyErr_Occurred() != NULL) {
19610 0 : return -1;
19611 : }
19612 0 : if (test_var > uint_max) {
19613 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19614 : PyLong_Type.tp_name, uint_max, test_var);
19615 0 : return -1;
19616 : }
19617 0 : object->fDsIntegrated = test_var;
19618 : } else {
19619 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19620 : PyLong_Type.tp_name);
19621 0 : return -1;
19622 : }
19623 : }
19624 0 : return 0;
19625 : }
19626 :
19627 0 : static PyObject *py_DNS_RPC_ZONE_DATABASE_W2K_get_pszFileName(PyObject *obj, void *closure)
19628 : {
19629 0 : struct DNS_RPC_ZONE_DATABASE_W2K *object = pytalloc_get_ptr(obj);
19630 0 : PyObject *py_pszFileName;
19631 0 : if (object->pszFileName == NULL) {
19632 0 : Py_RETURN_NONE;
19633 : }
19634 0 : if (object->pszFileName == NULL) {
19635 0 : py_pszFileName = Py_None;
19636 0 : Py_INCREF(py_pszFileName);
19637 : } else {
19638 0 : if (object->pszFileName == NULL) {
19639 0 : py_pszFileName = Py_None;
19640 0 : Py_INCREF(py_pszFileName);
19641 : } else {
19642 0 : py_pszFileName = PyUnicode_Decode(object->pszFileName, strlen(object->pszFileName), "utf-8", "ignore");
19643 : }
19644 : }
19645 0 : return py_pszFileName;
19646 : }
19647 :
19648 0 : static int py_DNS_RPC_ZONE_DATABASE_W2K_set_pszFileName(PyObject *py_obj, PyObject *value, void *closure)
19649 : {
19650 0 : struct DNS_RPC_ZONE_DATABASE_W2K *object = pytalloc_get_ptr(py_obj);
19651 0 : if (value == NULL) {
19652 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszFileName");
19653 0 : return -1;
19654 : }
19655 0 : if (value == Py_None) {
19656 0 : object->pszFileName = NULL;
19657 : } else {
19658 0 : object->pszFileName = NULL;
19659 : {
19660 0 : const char *test_str;
19661 0 : const char *talloc_str;
19662 0 : PyObject *unicode = NULL;
19663 0 : if (PyUnicode_Check(value)) {
19664 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
19665 0 : if (unicode == NULL) {
19666 0 : return -1;
19667 : }
19668 0 : test_str = PyBytes_AS_STRING(unicode);
19669 0 : } else if (PyBytes_Check(value)) {
19670 0 : test_str = PyBytes_AS_STRING(value);
19671 : } else {
19672 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
19673 0 : return -1;
19674 : }
19675 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
19676 0 : if (unicode != NULL) {
19677 0 : Py_DECREF(unicode);
19678 : }
19679 0 : if (talloc_str == NULL) {
19680 0 : PyErr_NoMemory();
19681 0 : return -1;
19682 : }
19683 0 : object->pszFileName = talloc_str;
19684 : }
19685 : }
19686 0 : return 0;
19687 : }
19688 :
19689 : static PyGetSetDef py_DNS_RPC_ZONE_DATABASE_W2K_getsetters[] = {
19690 : {
19691 : .name = discard_const_p(char, "fDsIntegrated"),
19692 : .get = py_DNS_RPC_ZONE_DATABASE_W2K_get_fDsIntegrated,
19693 : .set = py_DNS_RPC_ZONE_DATABASE_W2K_set_fDsIntegrated,
19694 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
19695 : },
19696 : {
19697 : .name = discard_const_p(char, "pszFileName"),
19698 : .get = py_DNS_RPC_ZONE_DATABASE_W2K_get_pszFileName,
19699 : .set = py_DNS_RPC_ZONE_DATABASE_W2K_set_pszFileName,
19700 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
19701 : },
19702 : { .name = NULL }
19703 : };
19704 :
19705 0 : static PyObject *py_DNS_RPC_ZONE_DATABASE_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
19706 : {
19707 0 : return pytalloc_new(struct DNS_RPC_ZONE_DATABASE_W2K, type);
19708 : }
19709 :
19710 :
19711 : static PyTypeObject DNS_RPC_ZONE_DATABASE_W2K_Type = {
19712 : PyVarObject_HEAD_INIT(NULL, 0)
19713 : .tp_name = "dnsserver.DNS_RPC_ZONE_DATABASE_W2K",
19714 : .tp_getset = py_DNS_RPC_ZONE_DATABASE_W2K_getsetters,
19715 : .tp_methods = NULL,
19716 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
19717 : .tp_new = py_DNS_RPC_ZONE_DATABASE_W2K_new,
19718 : };
19719 :
19720 :
19721 0 : static PyObject *py_DNS_RPC_ZONE_DATABASE_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
19722 : {
19723 0 : struct DNS_RPC_ZONE_DATABASE_DOTNET *object = pytalloc_get_ptr(obj);
19724 0 : PyObject *py_dwRpcStructureVersion;
19725 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
19726 0 : return py_dwRpcStructureVersion;
19727 : }
19728 :
19729 0 : static int py_DNS_RPC_ZONE_DATABASE_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
19730 : {
19731 0 : struct DNS_RPC_ZONE_DATABASE_DOTNET *object = pytalloc_get_ptr(py_obj);
19732 0 : if (value == NULL) {
19733 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
19734 0 : return -1;
19735 : }
19736 : {
19737 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
19738 0 : if (PyLong_Check(value)) {
19739 0 : unsigned long long test_var;
19740 0 : test_var = PyLong_AsUnsignedLongLong(value);
19741 0 : if (PyErr_Occurred() != NULL) {
19742 0 : return -1;
19743 : }
19744 0 : if (test_var > uint_max) {
19745 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19746 : PyLong_Type.tp_name, uint_max, test_var);
19747 0 : return -1;
19748 : }
19749 0 : object->dwRpcStructureVersion = test_var;
19750 : } else {
19751 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19752 : PyLong_Type.tp_name);
19753 0 : return -1;
19754 : }
19755 : }
19756 0 : return 0;
19757 : }
19758 :
19759 0 : static PyObject *py_DNS_RPC_ZONE_DATABASE_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
19760 : {
19761 0 : struct DNS_RPC_ZONE_DATABASE_DOTNET *object = pytalloc_get_ptr(obj);
19762 0 : PyObject *py_dwReserved0;
19763 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
19764 0 : return py_dwReserved0;
19765 : }
19766 :
19767 0 : static int py_DNS_RPC_ZONE_DATABASE_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
19768 : {
19769 0 : struct DNS_RPC_ZONE_DATABASE_DOTNET *object = pytalloc_get_ptr(py_obj);
19770 0 : if (value == NULL) {
19771 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
19772 0 : return -1;
19773 : }
19774 : {
19775 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
19776 0 : if (PyLong_Check(value)) {
19777 0 : unsigned long long test_var;
19778 0 : test_var = PyLong_AsUnsignedLongLong(value);
19779 0 : if (PyErr_Occurred() != NULL) {
19780 0 : return -1;
19781 : }
19782 0 : if (test_var > uint_max) {
19783 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19784 : PyLong_Type.tp_name, uint_max, test_var);
19785 0 : return -1;
19786 : }
19787 0 : object->dwReserved0 = test_var;
19788 : } else {
19789 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19790 : PyLong_Type.tp_name);
19791 0 : return -1;
19792 : }
19793 : }
19794 0 : return 0;
19795 : }
19796 :
19797 0 : static PyObject *py_DNS_RPC_ZONE_DATABASE_DOTNET_get_fDsIntegrated(PyObject *obj, void *closure)
19798 : {
19799 0 : struct DNS_RPC_ZONE_DATABASE_DOTNET *object = pytalloc_get_ptr(obj);
19800 0 : PyObject *py_fDsIntegrated;
19801 0 : py_fDsIntegrated = PyLong_FromUnsignedLongLong((uint32_t)(object->fDsIntegrated));
19802 0 : return py_fDsIntegrated;
19803 : }
19804 :
19805 0 : static int py_DNS_RPC_ZONE_DATABASE_DOTNET_set_fDsIntegrated(PyObject *py_obj, PyObject *value, void *closure)
19806 : {
19807 0 : struct DNS_RPC_ZONE_DATABASE_DOTNET *object = pytalloc_get_ptr(py_obj);
19808 0 : if (value == NULL) {
19809 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fDsIntegrated");
19810 0 : return -1;
19811 : }
19812 : {
19813 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDsIntegrated));
19814 0 : if (PyLong_Check(value)) {
19815 0 : unsigned long long test_var;
19816 0 : test_var = PyLong_AsUnsignedLongLong(value);
19817 0 : if (PyErr_Occurred() != NULL) {
19818 0 : return -1;
19819 : }
19820 0 : if (test_var > uint_max) {
19821 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19822 : PyLong_Type.tp_name, uint_max, test_var);
19823 0 : return -1;
19824 : }
19825 0 : object->fDsIntegrated = test_var;
19826 : } else {
19827 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19828 : PyLong_Type.tp_name);
19829 0 : return -1;
19830 : }
19831 : }
19832 0 : return 0;
19833 : }
19834 :
19835 0 : static PyObject *py_DNS_RPC_ZONE_DATABASE_DOTNET_get_pszFileName(PyObject *obj, void *closure)
19836 : {
19837 0 : struct DNS_RPC_ZONE_DATABASE_DOTNET *object = pytalloc_get_ptr(obj);
19838 0 : PyObject *py_pszFileName;
19839 0 : if (object->pszFileName == NULL) {
19840 0 : Py_RETURN_NONE;
19841 : }
19842 0 : if (object->pszFileName == NULL) {
19843 0 : py_pszFileName = Py_None;
19844 0 : Py_INCREF(py_pszFileName);
19845 : } else {
19846 0 : if (object->pszFileName == NULL) {
19847 0 : py_pszFileName = Py_None;
19848 0 : Py_INCREF(py_pszFileName);
19849 : } else {
19850 0 : py_pszFileName = PyUnicode_Decode(object->pszFileName, strlen(object->pszFileName), "utf-8", "ignore");
19851 : }
19852 : }
19853 0 : return py_pszFileName;
19854 : }
19855 :
19856 0 : static int py_DNS_RPC_ZONE_DATABASE_DOTNET_set_pszFileName(PyObject *py_obj, PyObject *value, void *closure)
19857 : {
19858 0 : struct DNS_RPC_ZONE_DATABASE_DOTNET *object = pytalloc_get_ptr(py_obj);
19859 0 : if (value == NULL) {
19860 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszFileName");
19861 0 : return -1;
19862 : }
19863 0 : if (value == Py_None) {
19864 0 : object->pszFileName = NULL;
19865 : } else {
19866 0 : object->pszFileName = NULL;
19867 : {
19868 0 : const char *test_str;
19869 0 : const char *talloc_str;
19870 0 : PyObject *unicode = NULL;
19871 0 : if (PyUnicode_Check(value)) {
19872 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
19873 0 : if (unicode == NULL) {
19874 0 : return -1;
19875 : }
19876 0 : test_str = PyBytes_AS_STRING(unicode);
19877 0 : } else if (PyBytes_Check(value)) {
19878 0 : test_str = PyBytes_AS_STRING(value);
19879 : } else {
19880 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
19881 0 : return -1;
19882 : }
19883 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
19884 0 : if (unicode != NULL) {
19885 0 : Py_DECREF(unicode);
19886 : }
19887 0 : if (talloc_str == NULL) {
19888 0 : PyErr_NoMemory();
19889 0 : return -1;
19890 : }
19891 0 : object->pszFileName = talloc_str;
19892 : }
19893 : }
19894 0 : return 0;
19895 : }
19896 :
19897 : static PyGetSetDef py_DNS_RPC_ZONE_DATABASE_DOTNET_getsetters[] = {
19898 : {
19899 : .name = discard_const_p(char, "dwRpcStructureVersion"),
19900 : .get = py_DNS_RPC_ZONE_DATABASE_DOTNET_get_dwRpcStructureVersion,
19901 : .set = py_DNS_RPC_ZONE_DATABASE_DOTNET_set_dwRpcStructureVersion,
19902 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
19903 : },
19904 : {
19905 : .name = discard_const_p(char, "dwReserved0"),
19906 : .get = py_DNS_RPC_ZONE_DATABASE_DOTNET_get_dwReserved0,
19907 : .set = py_DNS_RPC_ZONE_DATABASE_DOTNET_set_dwReserved0,
19908 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
19909 : },
19910 : {
19911 : .name = discard_const_p(char, "fDsIntegrated"),
19912 : .get = py_DNS_RPC_ZONE_DATABASE_DOTNET_get_fDsIntegrated,
19913 : .set = py_DNS_RPC_ZONE_DATABASE_DOTNET_set_fDsIntegrated,
19914 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
19915 : },
19916 : {
19917 : .name = discard_const_p(char, "pszFileName"),
19918 : .get = py_DNS_RPC_ZONE_DATABASE_DOTNET_get_pszFileName,
19919 : .set = py_DNS_RPC_ZONE_DATABASE_DOTNET_set_pszFileName,
19920 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
19921 : },
19922 : { .name = NULL }
19923 : };
19924 :
19925 0 : static PyObject *py_DNS_RPC_ZONE_DATABASE_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
19926 : {
19927 0 : return pytalloc_new(struct DNS_RPC_ZONE_DATABASE_DOTNET, type);
19928 : }
19929 :
19930 :
19931 : static PyTypeObject DNS_RPC_ZONE_DATABASE_DOTNET_Type = {
19932 : PyVarObject_HEAD_INIT(NULL, 0)
19933 : .tp_name = "dnsserver.DNS_RPC_ZONE_DATABASE_DOTNET",
19934 : .tp_getset = py_DNS_RPC_ZONE_DATABASE_DOTNET_getsetters,
19935 : .tp_methods = NULL,
19936 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
19937 : .tp_new = py_DNS_RPC_ZONE_DATABASE_DOTNET_new,
19938 : };
19939 :
19940 :
19941 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pszZoneName(PyObject *obj, void *closure)
19942 : {
19943 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
19944 0 : PyObject *py_pszZoneName;
19945 0 : if (object->pszZoneName == NULL) {
19946 0 : Py_RETURN_NONE;
19947 : }
19948 0 : if (object->pszZoneName == NULL) {
19949 0 : py_pszZoneName = Py_None;
19950 0 : Py_INCREF(py_pszZoneName);
19951 : } else {
19952 0 : if (object->pszZoneName == NULL) {
19953 0 : py_pszZoneName = Py_None;
19954 0 : Py_INCREF(py_pszZoneName);
19955 : } else {
19956 0 : py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
19957 : }
19958 : }
19959 0 : return py_pszZoneName;
19960 : }
19961 :
19962 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
19963 : {
19964 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
19965 0 : if (value == NULL) {
19966 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszZoneName");
19967 0 : return -1;
19968 : }
19969 0 : if (value == Py_None) {
19970 0 : object->pszZoneName = NULL;
19971 : } else {
19972 0 : object->pszZoneName = NULL;
19973 : {
19974 0 : const char *test_str;
19975 0 : const char *talloc_str;
19976 0 : PyObject *unicode = NULL;
19977 0 : if (PyUnicode_Check(value)) {
19978 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
19979 0 : if (unicode == NULL) {
19980 0 : return -1;
19981 : }
19982 0 : test_str = PyBytes_AS_STRING(unicode);
19983 0 : } else if (PyBytes_Check(value)) {
19984 0 : test_str = PyBytes_AS_STRING(value);
19985 : } else {
19986 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
19987 0 : return -1;
19988 : }
19989 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
19990 0 : if (unicode != NULL) {
19991 0 : Py_DECREF(unicode);
19992 : }
19993 0 : if (talloc_str == NULL) {
19994 0 : PyErr_NoMemory();
19995 0 : return -1;
19996 : }
19997 0 : object->pszZoneName = talloc_str;
19998 : }
19999 : }
20000 0 : return 0;
20001 : }
20002 :
20003 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwZoneType(PyObject *obj, void *closure)
20004 : {
20005 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
20006 0 : PyObject *py_dwZoneType;
20007 0 : py_dwZoneType = PyLong_FromUnsignedLongLong((uint32_t)(object->dwZoneType));
20008 0 : return py_dwZoneType;
20009 : }
20010 :
20011 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwZoneType(PyObject *py_obj, PyObject *value, void *closure)
20012 : {
20013 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
20014 0 : if (value == NULL) {
20015 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwZoneType");
20016 0 : return -1;
20017 : }
20018 : {
20019 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwZoneType));
20020 0 : if (PyLong_Check(value)) {
20021 0 : unsigned long long test_var;
20022 0 : test_var = PyLong_AsUnsignedLongLong(value);
20023 0 : if (PyErr_Occurred() != NULL) {
20024 0 : return -1;
20025 : }
20026 0 : if (test_var > uint_max) {
20027 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20028 : PyLong_Type.tp_name, uint_max, test_var);
20029 0 : return -1;
20030 : }
20031 0 : object->dwZoneType = test_var;
20032 : } else {
20033 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20034 : PyLong_Type.tp_name);
20035 0 : return -1;
20036 : }
20037 : }
20038 0 : return 0;
20039 : }
20040 :
20041 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fAllowUpdate(PyObject *obj, void *closure)
20042 : {
20043 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
20044 0 : PyObject *py_fAllowUpdate;
20045 0 : py_fAllowUpdate = PyLong_FromLong((uint16_t)(object->fAllowUpdate));
20046 0 : return py_fAllowUpdate;
20047 : }
20048 :
20049 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
20050 : {
20051 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
20052 0 : if (value == NULL) {
20053 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAllowUpdate");
20054 0 : return -1;
20055 : }
20056 : {
20057 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAllowUpdate));
20058 0 : if (PyLong_Check(value)) {
20059 0 : unsigned long long test_var;
20060 0 : test_var = PyLong_AsUnsignedLongLong(value);
20061 0 : if (PyErr_Occurred() != NULL) {
20062 0 : return -1;
20063 : }
20064 0 : if (test_var > uint_max) {
20065 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20066 : PyLong_Type.tp_name, uint_max, test_var);
20067 0 : return -1;
20068 : }
20069 0 : object->fAllowUpdate = test_var;
20070 : } else {
20071 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20072 : PyLong_Type.tp_name);
20073 0 : return -1;
20074 : }
20075 : }
20076 0 : return 0;
20077 : }
20078 :
20079 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fAging(PyObject *obj, void *closure)
20080 : {
20081 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
20082 0 : PyObject *py_fAging;
20083 0 : py_fAging = PyLong_FromUnsignedLongLong((uint32_t)(object->fAging));
20084 0 : return py_fAging;
20085 : }
20086 :
20087 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fAging(PyObject *py_obj, PyObject *value, void *closure)
20088 : {
20089 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
20090 0 : if (value == NULL) {
20091 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAging");
20092 0 : return -1;
20093 : }
20094 : {
20095 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAging));
20096 0 : if (PyLong_Check(value)) {
20097 0 : unsigned long long test_var;
20098 0 : test_var = PyLong_AsUnsignedLongLong(value);
20099 0 : if (PyErr_Occurred() != NULL) {
20100 0 : return -1;
20101 : }
20102 0 : if (test_var > uint_max) {
20103 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20104 : PyLong_Type.tp_name, uint_max, test_var);
20105 0 : return -1;
20106 : }
20107 0 : object->fAging = test_var;
20108 : } else {
20109 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20110 : PyLong_Type.tp_name);
20111 0 : return -1;
20112 : }
20113 : }
20114 0 : return 0;
20115 : }
20116 :
20117 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwFlags(PyObject *obj, void *closure)
20118 : {
20119 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
20120 0 : PyObject *py_dwFlags;
20121 0 : py_dwFlags = PyLong_FromUnsignedLongLong((uint32_t)(object->dwFlags));
20122 0 : return py_dwFlags;
20123 : }
20124 :
20125 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
20126 : {
20127 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
20128 0 : if (value == NULL) {
20129 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwFlags");
20130 0 : return -1;
20131 : }
20132 : {
20133 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwFlags));
20134 0 : if (PyLong_Check(value)) {
20135 0 : unsigned long long test_var;
20136 0 : test_var = PyLong_AsUnsignedLongLong(value);
20137 0 : if (PyErr_Occurred() != NULL) {
20138 0 : return -1;
20139 : }
20140 0 : if (test_var > uint_max) {
20141 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20142 : PyLong_Type.tp_name, uint_max, test_var);
20143 0 : return -1;
20144 : }
20145 0 : object->dwFlags = test_var;
20146 : } else {
20147 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20148 : PyLong_Type.tp_name);
20149 0 : return -1;
20150 : }
20151 : }
20152 0 : return 0;
20153 : }
20154 :
20155 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pszDataFile(PyObject *obj, void *closure)
20156 : {
20157 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
20158 0 : PyObject *py_pszDataFile;
20159 0 : if (object->pszDataFile == NULL) {
20160 0 : Py_RETURN_NONE;
20161 : }
20162 0 : if (object->pszDataFile == NULL) {
20163 0 : py_pszDataFile = Py_None;
20164 0 : Py_INCREF(py_pszDataFile);
20165 : } else {
20166 0 : if (object->pszDataFile == NULL) {
20167 0 : py_pszDataFile = Py_None;
20168 0 : Py_INCREF(py_pszDataFile);
20169 : } else {
20170 0 : py_pszDataFile = PyUnicode_Decode(object->pszDataFile, strlen(object->pszDataFile), "utf-8", "ignore");
20171 : }
20172 : }
20173 0 : return py_pszDataFile;
20174 : }
20175 :
20176 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pszDataFile(PyObject *py_obj, PyObject *value, void *closure)
20177 : {
20178 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
20179 0 : if (value == NULL) {
20180 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDataFile");
20181 0 : return -1;
20182 : }
20183 0 : if (value == Py_None) {
20184 0 : object->pszDataFile = NULL;
20185 : } else {
20186 0 : object->pszDataFile = NULL;
20187 : {
20188 0 : const char *test_str;
20189 0 : const char *talloc_str;
20190 0 : PyObject *unicode = NULL;
20191 0 : if (PyUnicode_Check(value)) {
20192 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20193 0 : if (unicode == NULL) {
20194 0 : return -1;
20195 : }
20196 0 : test_str = PyBytes_AS_STRING(unicode);
20197 0 : } else if (PyBytes_Check(value)) {
20198 0 : test_str = PyBytes_AS_STRING(value);
20199 : } else {
20200 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20201 0 : return -1;
20202 : }
20203 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20204 0 : if (unicode != NULL) {
20205 0 : Py_DECREF(unicode);
20206 : }
20207 0 : if (talloc_str == NULL) {
20208 0 : PyErr_NoMemory();
20209 0 : return -1;
20210 : }
20211 0 : object->pszDataFile = talloc_str;
20212 : }
20213 : }
20214 0 : return 0;
20215 : }
20216 :
20217 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fDsIntegrated(PyObject *obj, void *closure)
20218 : {
20219 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
20220 0 : PyObject *py_fDsIntegrated;
20221 0 : py_fDsIntegrated = PyLong_FromUnsignedLongLong((uint32_t)(object->fDsIntegrated));
20222 0 : return py_fDsIntegrated;
20223 : }
20224 :
20225 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fDsIntegrated(PyObject *py_obj, PyObject *value, void *closure)
20226 : {
20227 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
20228 0 : if (value == NULL) {
20229 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fDsIntegrated");
20230 0 : return -1;
20231 : }
20232 : {
20233 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDsIntegrated));
20234 0 : if (PyLong_Check(value)) {
20235 0 : unsigned long long test_var;
20236 0 : test_var = PyLong_AsUnsignedLongLong(value);
20237 0 : if (PyErr_Occurred() != NULL) {
20238 0 : return -1;
20239 : }
20240 0 : if (test_var > uint_max) {
20241 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20242 : PyLong_Type.tp_name, uint_max, test_var);
20243 0 : return -1;
20244 : }
20245 0 : object->fDsIntegrated = test_var;
20246 : } else {
20247 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20248 : PyLong_Type.tp_name);
20249 0 : return -1;
20250 : }
20251 : }
20252 0 : return 0;
20253 : }
20254 :
20255 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fLoadExisting(PyObject *obj, void *closure)
20256 : {
20257 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
20258 0 : PyObject *py_fLoadExisting;
20259 0 : py_fLoadExisting = PyLong_FromUnsignedLongLong((uint32_t)(object->fLoadExisting));
20260 0 : return py_fLoadExisting;
20261 : }
20262 :
20263 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fLoadExisting(PyObject *py_obj, PyObject *value, void *closure)
20264 : {
20265 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
20266 0 : if (value == NULL) {
20267 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fLoadExisting");
20268 0 : return -1;
20269 : }
20270 : {
20271 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fLoadExisting));
20272 0 : if (PyLong_Check(value)) {
20273 0 : unsigned long long test_var;
20274 0 : test_var = PyLong_AsUnsignedLongLong(value);
20275 0 : if (PyErr_Occurred() != NULL) {
20276 0 : return -1;
20277 : }
20278 0 : if (test_var > uint_max) {
20279 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20280 : PyLong_Type.tp_name, uint_max, test_var);
20281 0 : return -1;
20282 : }
20283 0 : object->fLoadExisting = test_var;
20284 : } else {
20285 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20286 : PyLong_Type.tp_name);
20287 0 : return -1;
20288 : }
20289 : }
20290 0 : return 0;
20291 : }
20292 :
20293 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pszAdmin(PyObject *obj, void *closure)
20294 : {
20295 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
20296 0 : PyObject *py_pszAdmin;
20297 0 : if (object->pszAdmin == NULL) {
20298 0 : Py_RETURN_NONE;
20299 : }
20300 0 : if (object->pszAdmin == NULL) {
20301 0 : py_pszAdmin = Py_None;
20302 0 : Py_INCREF(py_pszAdmin);
20303 : } else {
20304 0 : if (object->pszAdmin == NULL) {
20305 0 : py_pszAdmin = Py_None;
20306 0 : Py_INCREF(py_pszAdmin);
20307 : } else {
20308 0 : py_pszAdmin = PyUnicode_Decode(object->pszAdmin, strlen(object->pszAdmin), "utf-8", "ignore");
20309 : }
20310 : }
20311 0 : return py_pszAdmin;
20312 : }
20313 :
20314 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pszAdmin(PyObject *py_obj, PyObject *value, void *closure)
20315 : {
20316 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
20317 0 : if (value == NULL) {
20318 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszAdmin");
20319 0 : return -1;
20320 : }
20321 0 : if (value == Py_None) {
20322 0 : object->pszAdmin = NULL;
20323 : } else {
20324 0 : object->pszAdmin = NULL;
20325 : {
20326 0 : const char *test_str;
20327 0 : const char *talloc_str;
20328 0 : PyObject *unicode = NULL;
20329 0 : if (PyUnicode_Check(value)) {
20330 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20331 0 : if (unicode == NULL) {
20332 0 : return -1;
20333 : }
20334 0 : test_str = PyBytes_AS_STRING(unicode);
20335 0 : } else if (PyBytes_Check(value)) {
20336 0 : test_str = PyBytes_AS_STRING(value);
20337 : } else {
20338 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20339 0 : return -1;
20340 : }
20341 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20342 0 : if (unicode != NULL) {
20343 0 : Py_DECREF(unicode);
20344 : }
20345 0 : if (talloc_str == NULL) {
20346 0 : PyErr_NoMemory();
20347 0 : return -1;
20348 : }
20349 0 : object->pszAdmin = talloc_str;
20350 : }
20351 : }
20352 0 : return 0;
20353 : }
20354 :
20355 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_aipMasters(PyObject *obj, void *closure)
20356 : {
20357 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
20358 0 : PyObject *py_aipMasters;
20359 0 : if (object->aipMasters == NULL) {
20360 0 : Py_RETURN_NONE;
20361 : }
20362 0 : if (object->aipMasters == NULL) {
20363 0 : py_aipMasters = Py_None;
20364 0 : Py_INCREF(py_aipMasters);
20365 : } else {
20366 0 : py_aipMasters = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipMasters, object->aipMasters);
20367 : }
20368 0 : return py_aipMasters;
20369 : }
20370 :
20371 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_aipMasters(PyObject *py_obj, PyObject *value, void *closure)
20372 : {
20373 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
20374 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipMasters));
20375 0 : if (value == NULL) {
20376 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipMasters");
20377 0 : return -1;
20378 : }
20379 0 : if (value == Py_None) {
20380 0 : object->aipMasters = NULL;
20381 : } else {
20382 0 : object->aipMasters = NULL;
20383 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
20384 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
20385 0 : PyErr_NoMemory();
20386 0 : return -1;
20387 : }
20388 0 : object->aipMasters = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
20389 : }
20390 0 : return 0;
20391 : }
20392 :
20393 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_aipSecondaries(PyObject *obj, void *closure)
20394 : {
20395 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
20396 0 : PyObject *py_aipSecondaries;
20397 0 : if (object->aipSecondaries == NULL) {
20398 0 : Py_RETURN_NONE;
20399 : }
20400 0 : if (object->aipSecondaries == NULL) {
20401 0 : py_aipSecondaries = Py_None;
20402 0 : Py_INCREF(py_aipSecondaries);
20403 : } else {
20404 0 : py_aipSecondaries = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
20405 : }
20406 0 : return py_aipSecondaries;
20407 : }
20408 :
20409 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
20410 : {
20411 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
20412 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipSecondaries));
20413 0 : if (value == NULL) {
20414 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipSecondaries");
20415 0 : return -1;
20416 : }
20417 0 : if (value == Py_None) {
20418 0 : object->aipSecondaries = NULL;
20419 : } else {
20420 0 : object->aipSecondaries = NULL;
20421 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
20422 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
20423 0 : PyErr_NoMemory();
20424 0 : return -1;
20425 : }
20426 0 : object->aipSecondaries = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
20427 : }
20428 0 : return 0;
20429 : }
20430 :
20431 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fSecureSecondaries(PyObject *obj, void *closure)
20432 : {
20433 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
20434 0 : PyObject *py_fSecureSecondaries;
20435 0 : py_fSecureSecondaries = PyLong_FromUnsignedLongLong((uint32_t)(object->fSecureSecondaries));
20436 0 : return py_fSecureSecondaries;
20437 : }
20438 :
20439 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
20440 : {
20441 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
20442 0 : if (value == NULL) {
20443 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fSecureSecondaries");
20444 0 : return -1;
20445 : }
20446 : {
20447 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureSecondaries));
20448 0 : if (PyLong_Check(value)) {
20449 0 : unsigned long long test_var;
20450 0 : test_var = PyLong_AsUnsignedLongLong(value);
20451 0 : if (PyErr_Occurred() != NULL) {
20452 0 : return -1;
20453 : }
20454 0 : if (test_var > uint_max) {
20455 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20456 : PyLong_Type.tp_name, uint_max, test_var);
20457 0 : return -1;
20458 : }
20459 0 : object->fSecureSecondaries = test_var;
20460 : } else {
20461 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20462 : PyLong_Type.tp_name);
20463 0 : return -1;
20464 : }
20465 : }
20466 0 : return 0;
20467 : }
20468 :
20469 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fNotifyLevel(PyObject *obj, void *closure)
20470 : {
20471 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
20472 0 : PyObject *py_fNotifyLevel;
20473 0 : py_fNotifyLevel = PyLong_FromUnsignedLongLong((uint32_t)(object->fNotifyLevel));
20474 0 : return py_fNotifyLevel;
20475 : }
20476 :
20477 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
20478 : {
20479 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
20480 0 : if (value == NULL) {
20481 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fNotifyLevel");
20482 0 : return -1;
20483 : }
20484 : {
20485 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNotifyLevel));
20486 0 : if (PyLong_Check(value)) {
20487 0 : unsigned long long test_var;
20488 0 : test_var = PyLong_AsUnsignedLongLong(value);
20489 0 : if (PyErr_Occurred() != NULL) {
20490 0 : return -1;
20491 : }
20492 0 : if (test_var > uint_max) {
20493 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20494 : PyLong_Type.tp_name, uint_max, test_var);
20495 0 : return -1;
20496 : }
20497 0 : object->fNotifyLevel = test_var;
20498 : } else {
20499 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20500 : PyLong_Type.tp_name);
20501 0 : return -1;
20502 : }
20503 : }
20504 0 : return 0;
20505 : }
20506 :
20507 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved1(PyObject *obj, void *closure)
20508 : {
20509 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
20510 0 : PyObject *py_pvReserved1;
20511 0 : if (object->pvReserved1 == NULL) {
20512 0 : Py_RETURN_NONE;
20513 : }
20514 0 : if (object->pvReserved1 == NULL) {
20515 0 : py_pvReserved1 = Py_None;
20516 0 : Py_INCREF(py_pvReserved1);
20517 : } else {
20518 0 : if (object->pvReserved1 == NULL) {
20519 0 : py_pvReserved1 = Py_None;
20520 0 : Py_INCREF(py_pvReserved1);
20521 : } else {
20522 0 : py_pvReserved1 = PyUnicode_Decode(object->pvReserved1, strlen(object->pvReserved1), "utf-8", "ignore");
20523 : }
20524 : }
20525 0 : return py_pvReserved1;
20526 : }
20527 :
20528 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved1(PyObject *py_obj, PyObject *value, void *closure)
20529 : {
20530 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
20531 0 : if (value == NULL) {
20532 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pvReserved1");
20533 0 : return -1;
20534 : }
20535 0 : if (value == Py_None) {
20536 0 : object->pvReserved1 = NULL;
20537 : } else {
20538 0 : object->pvReserved1 = NULL;
20539 : {
20540 0 : const char *test_str;
20541 0 : const char *talloc_str;
20542 0 : PyObject *unicode = NULL;
20543 0 : if (PyUnicode_Check(value)) {
20544 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20545 0 : if (unicode == NULL) {
20546 0 : return -1;
20547 : }
20548 0 : test_str = PyBytes_AS_STRING(unicode);
20549 0 : } else if (PyBytes_Check(value)) {
20550 0 : test_str = PyBytes_AS_STRING(value);
20551 : } else {
20552 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20553 0 : return -1;
20554 : }
20555 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20556 0 : if (unicode != NULL) {
20557 0 : Py_DECREF(unicode);
20558 : }
20559 0 : if (talloc_str == NULL) {
20560 0 : PyErr_NoMemory();
20561 0 : return -1;
20562 : }
20563 0 : object->pvReserved1 = talloc_str;
20564 : }
20565 : }
20566 0 : return 0;
20567 : }
20568 :
20569 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved2(PyObject *obj, void *closure)
20570 : {
20571 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
20572 0 : PyObject *py_pvReserved2;
20573 0 : if (object->pvReserved2 == NULL) {
20574 0 : Py_RETURN_NONE;
20575 : }
20576 0 : if (object->pvReserved2 == NULL) {
20577 0 : py_pvReserved2 = Py_None;
20578 0 : Py_INCREF(py_pvReserved2);
20579 : } else {
20580 0 : if (object->pvReserved2 == NULL) {
20581 0 : py_pvReserved2 = Py_None;
20582 0 : Py_INCREF(py_pvReserved2);
20583 : } else {
20584 0 : py_pvReserved2 = PyUnicode_Decode(object->pvReserved2, strlen(object->pvReserved2), "utf-8", "ignore");
20585 : }
20586 : }
20587 0 : return py_pvReserved2;
20588 : }
20589 :
20590 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved2(PyObject *py_obj, PyObject *value, void *closure)
20591 : {
20592 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
20593 0 : if (value == NULL) {
20594 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pvReserved2");
20595 0 : return -1;
20596 : }
20597 0 : if (value == Py_None) {
20598 0 : object->pvReserved2 = NULL;
20599 : } else {
20600 0 : object->pvReserved2 = NULL;
20601 : {
20602 0 : const char *test_str;
20603 0 : const char *talloc_str;
20604 0 : PyObject *unicode = NULL;
20605 0 : if (PyUnicode_Check(value)) {
20606 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20607 0 : if (unicode == NULL) {
20608 0 : return -1;
20609 : }
20610 0 : test_str = PyBytes_AS_STRING(unicode);
20611 0 : } else if (PyBytes_Check(value)) {
20612 0 : test_str = PyBytes_AS_STRING(value);
20613 : } else {
20614 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20615 0 : return -1;
20616 : }
20617 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20618 0 : if (unicode != NULL) {
20619 0 : Py_DECREF(unicode);
20620 : }
20621 0 : if (talloc_str == NULL) {
20622 0 : PyErr_NoMemory();
20623 0 : return -1;
20624 : }
20625 0 : object->pvReserved2 = talloc_str;
20626 : }
20627 : }
20628 0 : return 0;
20629 : }
20630 :
20631 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved3(PyObject *obj, void *closure)
20632 : {
20633 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
20634 0 : PyObject *py_pvReserved3;
20635 0 : if (object->pvReserved3 == NULL) {
20636 0 : Py_RETURN_NONE;
20637 : }
20638 0 : if (object->pvReserved3 == NULL) {
20639 0 : py_pvReserved3 = Py_None;
20640 0 : Py_INCREF(py_pvReserved3);
20641 : } else {
20642 0 : if (object->pvReserved3 == NULL) {
20643 0 : py_pvReserved3 = Py_None;
20644 0 : Py_INCREF(py_pvReserved3);
20645 : } else {
20646 0 : py_pvReserved3 = PyUnicode_Decode(object->pvReserved3, strlen(object->pvReserved3), "utf-8", "ignore");
20647 : }
20648 : }
20649 0 : return py_pvReserved3;
20650 : }
20651 :
20652 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved3(PyObject *py_obj, PyObject *value, void *closure)
20653 : {
20654 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
20655 0 : if (value == NULL) {
20656 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pvReserved3");
20657 0 : return -1;
20658 : }
20659 0 : if (value == Py_None) {
20660 0 : object->pvReserved3 = NULL;
20661 : } else {
20662 0 : object->pvReserved3 = NULL;
20663 : {
20664 0 : const char *test_str;
20665 0 : const char *talloc_str;
20666 0 : PyObject *unicode = NULL;
20667 0 : if (PyUnicode_Check(value)) {
20668 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20669 0 : if (unicode == NULL) {
20670 0 : return -1;
20671 : }
20672 0 : test_str = PyBytes_AS_STRING(unicode);
20673 0 : } else if (PyBytes_Check(value)) {
20674 0 : test_str = PyBytes_AS_STRING(value);
20675 : } else {
20676 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20677 0 : return -1;
20678 : }
20679 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20680 0 : if (unicode != NULL) {
20681 0 : Py_DECREF(unicode);
20682 : }
20683 0 : if (talloc_str == NULL) {
20684 0 : PyErr_NoMemory();
20685 0 : return -1;
20686 : }
20687 0 : object->pvReserved3 = talloc_str;
20688 : }
20689 : }
20690 0 : return 0;
20691 : }
20692 :
20693 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved4(PyObject *obj, void *closure)
20694 : {
20695 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
20696 0 : PyObject *py_pvReserved4;
20697 0 : if (object->pvReserved4 == NULL) {
20698 0 : Py_RETURN_NONE;
20699 : }
20700 0 : if (object->pvReserved4 == NULL) {
20701 0 : py_pvReserved4 = Py_None;
20702 0 : Py_INCREF(py_pvReserved4);
20703 : } else {
20704 0 : if (object->pvReserved4 == NULL) {
20705 0 : py_pvReserved4 = Py_None;
20706 0 : Py_INCREF(py_pvReserved4);
20707 : } else {
20708 0 : py_pvReserved4 = PyUnicode_Decode(object->pvReserved4, strlen(object->pvReserved4), "utf-8", "ignore");
20709 : }
20710 : }
20711 0 : return py_pvReserved4;
20712 : }
20713 :
20714 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved4(PyObject *py_obj, PyObject *value, void *closure)
20715 : {
20716 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
20717 0 : if (value == NULL) {
20718 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pvReserved4");
20719 0 : return -1;
20720 : }
20721 0 : if (value == Py_None) {
20722 0 : object->pvReserved4 = NULL;
20723 : } else {
20724 0 : object->pvReserved4 = NULL;
20725 : {
20726 0 : const char *test_str;
20727 0 : const char *talloc_str;
20728 0 : PyObject *unicode = NULL;
20729 0 : if (PyUnicode_Check(value)) {
20730 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20731 0 : if (unicode == NULL) {
20732 0 : return -1;
20733 : }
20734 0 : test_str = PyBytes_AS_STRING(unicode);
20735 0 : } else if (PyBytes_Check(value)) {
20736 0 : test_str = PyBytes_AS_STRING(value);
20737 : } else {
20738 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20739 0 : return -1;
20740 : }
20741 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20742 0 : if (unicode != NULL) {
20743 0 : Py_DECREF(unicode);
20744 : }
20745 0 : if (talloc_str == NULL) {
20746 0 : PyErr_NoMemory();
20747 0 : return -1;
20748 : }
20749 0 : object->pvReserved4 = talloc_str;
20750 : }
20751 : }
20752 0 : return 0;
20753 : }
20754 :
20755 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved5(PyObject *obj, void *closure)
20756 : {
20757 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
20758 0 : PyObject *py_pvReserved5;
20759 0 : if (object->pvReserved5 == NULL) {
20760 0 : Py_RETURN_NONE;
20761 : }
20762 0 : if (object->pvReserved5 == NULL) {
20763 0 : py_pvReserved5 = Py_None;
20764 0 : Py_INCREF(py_pvReserved5);
20765 : } else {
20766 0 : if (object->pvReserved5 == NULL) {
20767 0 : py_pvReserved5 = Py_None;
20768 0 : Py_INCREF(py_pvReserved5);
20769 : } else {
20770 0 : py_pvReserved5 = PyUnicode_Decode(object->pvReserved5, strlen(object->pvReserved5), "utf-8", "ignore");
20771 : }
20772 : }
20773 0 : return py_pvReserved5;
20774 : }
20775 :
20776 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved5(PyObject *py_obj, PyObject *value, void *closure)
20777 : {
20778 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
20779 0 : if (value == NULL) {
20780 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pvReserved5");
20781 0 : return -1;
20782 : }
20783 0 : if (value == Py_None) {
20784 0 : object->pvReserved5 = NULL;
20785 : } else {
20786 0 : object->pvReserved5 = NULL;
20787 : {
20788 0 : const char *test_str;
20789 0 : const char *talloc_str;
20790 0 : PyObject *unicode = NULL;
20791 0 : if (PyUnicode_Check(value)) {
20792 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20793 0 : if (unicode == NULL) {
20794 0 : return -1;
20795 : }
20796 0 : test_str = PyBytes_AS_STRING(unicode);
20797 0 : } else if (PyBytes_Check(value)) {
20798 0 : test_str = PyBytes_AS_STRING(value);
20799 : } else {
20800 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20801 0 : return -1;
20802 : }
20803 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20804 0 : if (unicode != NULL) {
20805 0 : Py_DECREF(unicode);
20806 : }
20807 0 : if (talloc_str == NULL) {
20808 0 : PyErr_NoMemory();
20809 0 : return -1;
20810 : }
20811 0 : object->pvReserved5 = talloc_str;
20812 : }
20813 : }
20814 0 : return 0;
20815 : }
20816 :
20817 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved6(PyObject *obj, void *closure)
20818 : {
20819 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
20820 0 : PyObject *py_pvReserved6;
20821 0 : if (object->pvReserved6 == NULL) {
20822 0 : Py_RETURN_NONE;
20823 : }
20824 0 : if (object->pvReserved6 == NULL) {
20825 0 : py_pvReserved6 = Py_None;
20826 0 : Py_INCREF(py_pvReserved6);
20827 : } else {
20828 0 : if (object->pvReserved6 == NULL) {
20829 0 : py_pvReserved6 = Py_None;
20830 0 : Py_INCREF(py_pvReserved6);
20831 : } else {
20832 0 : py_pvReserved6 = PyUnicode_Decode(object->pvReserved6, strlen(object->pvReserved6), "utf-8", "ignore");
20833 : }
20834 : }
20835 0 : return py_pvReserved6;
20836 : }
20837 :
20838 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved6(PyObject *py_obj, PyObject *value, void *closure)
20839 : {
20840 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
20841 0 : if (value == NULL) {
20842 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pvReserved6");
20843 0 : return -1;
20844 : }
20845 0 : if (value == Py_None) {
20846 0 : object->pvReserved6 = NULL;
20847 : } else {
20848 0 : object->pvReserved6 = NULL;
20849 : {
20850 0 : const char *test_str;
20851 0 : const char *talloc_str;
20852 0 : PyObject *unicode = NULL;
20853 0 : if (PyUnicode_Check(value)) {
20854 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20855 0 : if (unicode == NULL) {
20856 0 : return -1;
20857 : }
20858 0 : test_str = PyBytes_AS_STRING(unicode);
20859 0 : } else if (PyBytes_Check(value)) {
20860 0 : test_str = PyBytes_AS_STRING(value);
20861 : } else {
20862 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20863 0 : return -1;
20864 : }
20865 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20866 0 : if (unicode != NULL) {
20867 0 : Py_DECREF(unicode);
20868 : }
20869 0 : if (talloc_str == NULL) {
20870 0 : PyErr_NoMemory();
20871 0 : return -1;
20872 : }
20873 0 : object->pvReserved6 = talloc_str;
20874 : }
20875 : }
20876 0 : return 0;
20877 : }
20878 :
20879 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved7(PyObject *obj, void *closure)
20880 : {
20881 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
20882 0 : PyObject *py_pvReserved7;
20883 0 : if (object->pvReserved7 == NULL) {
20884 0 : Py_RETURN_NONE;
20885 : }
20886 0 : if (object->pvReserved7 == NULL) {
20887 0 : py_pvReserved7 = Py_None;
20888 0 : Py_INCREF(py_pvReserved7);
20889 : } else {
20890 0 : if (object->pvReserved7 == NULL) {
20891 0 : py_pvReserved7 = Py_None;
20892 0 : Py_INCREF(py_pvReserved7);
20893 : } else {
20894 0 : py_pvReserved7 = PyUnicode_Decode(object->pvReserved7, strlen(object->pvReserved7), "utf-8", "ignore");
20895 : }
20896 : }
20897 0 : return py_pvReserved7;
20898 : }
20899 :
20900 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved7(PyObject *py_obj, PyObject *value, void *closure)
20901 : {
20902 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
20903 0 : if (value == NULL) {
20904 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pvReserved7");
20905 0 : return -1;
20906 : }
20907 0 : if (value == Py_None) {
20908 0 : object->pvReserved7 = NULL;
20909 : } else {
20910 0 : object->pvReserved7 = NULL;
20911 : {
20912 0 : const char *test_str;
20913 0 : const char *talloc_str;
20914 0 : PyObject *unicode = NULL;
20915 0 : if (PyUnicode_Check(value)) {
20916 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20917 0 : if (unicode == NULL) {
20918 0 : return -1;
20919 : }
20920 0 : test_str = PyBytes_AS_STRING(unicode);
20921 0 : } else if (PyBytes_Check(value)) {
20922 0 : test_str = PyBytes_AS_STRING(value);
20923 : } else {
20924 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20925 0 : return -1;
20926 : }
20927 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20928 0 : if (unicode != NULL) {
20929 0 : Py_DECREF(unicode);
20930 : }
20931 0 : if (talloc_str == NULL) {
20932 0 : PyErr_NoMemory();
20933 0 : return -1;
20934 : }
20935 0 : object->pvReserved7 = talloc_str;
20936 : }
20937 : }
20938 0 : return 0;
20939 : }
20940 :
20941 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved8(PyObject *obj, void *closure)
20942 : {
20943 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
20944 0 : PyObject *py_pvReserved8;
20945 0 : if (object->pvReserved8 == NULL) {
20946 0 : Py_RETURN_NONE;
20947 : }
20948 0 : if (object->pvReserved8 == NULL) {
20949 0 : py_pvReserved8 = Py_None;
20950 0 : Py_INCREF(py_pvReserved8);
20951 : } else {
20952 0 : if (object->pvReserved8 == NULL) {
20953 0 : py_pvReserved8 = Py_None;
20954 0 : Py_INCREF(py_pvReserved8);
20955 : } else {
20956 0 : py_pvReserved8 = PyUnicode_Decode(object->pvReserved8, strlen(object->pvReserved8), "utf-8", "ignore");
20957 : }
20958 : }
20959 0 : return py_pvReserved8;
20960 : }
20961 :
20962 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved8(PyObject *py_obj, PyObject *value, void *closure)
20963 : {
20964 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
20965 0 : if (value == NULL) {
20966 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pvReserved8");
20967 0 : return -1;
20968 : }
20969 0 : if (value == Py_None) {
20970 0 : object->pvReserved8 = NULL;
20971 : } else {
20972 0 : object->pvReserved8 = NULL;
20973 : {
20974 0 : const char *test_str;
20975 0 : const char *talloc_str;
20976 0 : PyObject *unicode = NULL;
20977 0 : if (PyUnicode_Check(value)) {
20978 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20979 0 : if (unicode == NULL) {
20980 0 : return -1;
20981 : }
20982 0 : test_str = PyBytes_AS_STRING(unicode);
20983 0 : } else if (PyBytes_Check(value)) {
20984 0 : test_str = PyBytes_AS_STRING(value);
20985 : } else {
20986 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20987 0 : return -1;
20988 : }
20989 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20990 0 : if (unicode != NULL) {
20991 0 : Py_DECREF(unicode);
20992 : }
20993 0 : if (talloc_str == NULL) {
20994 0 : PyErr_NoMemory();
20995 0 : return -1;
20996 : }
20997 0 : object->pvReserved8 = talloc_str;
20998 : }
20999 : }
21000 0 : return 0;
21001 : }
21002 :
21003 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved1(PyObject *obj, void *closure)
21004 : {
21005 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
21006 0 : PyObject *py_dwReserved1;
21007 0 : py_dwReserved1 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved1));
21008 0 : return py_dwReserved1;
21009 : }
21010 :
21011 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved1(PyObject *py_obj, PyObject *value, void *closure)
21012 : {
21013 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
21014 0 : if (value == NULL) {
21015 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved1");
21016 0 : return -1;
21017 : }
21018 : {
21019 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved1));
21020 0 : if (PyLong_Check(value)) {
21021 0 : unsigned long long test_var;
21022 0 : test_var = PyLong_AsUnsignedLongLong(value);
21023 0 : if (PyErr_Occurred() != NULL) {
21024 0 : return -1;
21025 : }
21026 0 : if (test_var > uint_max) {
21027 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21028 : PyLong_Type.tp_name, uint_max, test_var);
21029 0 : return -1;
21030 : }
21031 0 : object->dwReserved1 = test_var;
21032 : } else {
21033 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21034 : PyLong_Type.tp_name);
21035 0 : return -1;
21036 : }
21037 : }
21038 0 : return 0;
21039 : }
21040 :
21041 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved2(PyObject *obj, void *closure)
21042 : {
21043 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
21044 0 : PyObject *py_dwReserved2;
21045 0 : py_dwReserved2 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved2));
21046 0 : return py_dwReserved2;
21047 : }
21048 :
21049 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved2(PyObject *py_obj, PyObject *value, void *closure)
21050 : {
21051 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
21052 0 : if (value == NULL) {
21053 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved2");
21054 0 : return -1;
21055 : }
21056 : {
21057 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved2));
21058 0 : if (PyLong_Check(value)) {
21059 0 : unsigned long long test_var;
21060 0 : test_var = PyLong_AsUnsignedLongLong(value);
21061 0 : if (PyErr_Occurred() != NULL) {
21062 0 : return -1;
21063 : }
21064 0 : if (test_var > uint_max) {
21065 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21066 : PyLong_Type.tp_name, uint_max, test_var);
21067 0 : return -1;
21068 : }
21069 0 : object->dwReserved2 = test_var;
21070 : } else {
21071 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21072 : PyLong_Type.tp_name);
21073 0 : return -1;
21074 : }
21075 : }
21076 0 : return 0;
21077 : }
21078 :
21079 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved3(PyObject *obj, void *closure)
21080 : {
21081 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
21082 0 : PyObject *py_dwReserved3;
21083 0 : py_dwReserved3 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved3));
21084 0 : return py_dwReserved3;
21085 : }
21086 :
21087 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved3(PyObject *py_obj, PyObject *value, void *closure)
21088 : {
21089 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
21090 0 : if (value == NULL) {
21091 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved3");
21092 0 : return -1;
21093 : }
21094 : {
21095 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved3));
21096 0 : if (PyLong_Check(value)) {
21097 0 : unsigned long long test_var;
21098 0 : test_var = PyLong_AsUnsignedLongLong(value);
21099 0 : if (PyErr_Occurred() != NULL) {
21100 0 : return -1;
21101 : }
21102 0 : if (test_var > uint_max) {
21103 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21104 : PyLong_Type.tp_name, uint_max, test_var);
21105 0 : return -1;
21106 : }
21107 0 : object->dwReserved3 = test_var;
21108 : } else {
21109 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21110 : PyLong_Type.tp_name);
21111 0 : return -1;
21112 : }
21113 : }
21114 0 : return 0;
21115 : }
21116 :
21117 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved4(PyObject *obj, void *closure)
21118 : {
21119 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
21120 0 : PyObject *py_dwReserved4;
21121 0 : py_dwReserved4 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved4));
21122 0 : return py_dwReserved4;
21123 : }
21124 :
21125 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved4(PyObject *py_obj, PyObject *value, void *closure)
21126 : {
21127 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
21128 0 : if (value == NULL) {
21129 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved4");
21130 0 : return -1;
21131 : }
21132 : {
21133 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved4));
21134 0 : if (PyLong_Check(value)) {
21135 0 : unsigned long long test_var;
21136 0 : test_var = PyLong_AsUnsignedLongLong(value);
21137 0 : if (PyErr_Occurred() != NULL) {
21138 0 : return -1;
21139 : }
21140 0 : if (test_var > uint_max) {
21141 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21142 : PyLong_Type.tp_name, uint_max, test_var);
21143 0 : return -1;
21144 : }
21145 0 : object->dwReserved4 = test_var;
21146 : } else {
21147 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21148 : PyLong_Type.tp_name);
21149 0 : return -1;
21150 : }
21151 : }
21152 0 : return 0;
21153 : }
21154 :
21155 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved5(PyObject *obj, void *closure)
21156 : {
21157 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
21158 0 : PyObject *py_dwReserved5;
21159 0 : py_dwReserved5 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved5));
21160 0 : return py_dwReserved5;
21161 : }
21162 :
21163 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved5(PyObject *py_obj, PyObject *value, void *closure)
21164 : {
21165 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
21166 0 : if (value == NULL) {
21167 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved5");
21168 0 : return -1;
21169 : }
21170 : {
21171 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved5));
21172 0 : if (PyLong_Check(value)) {
21173 0 : unsigned long long test_var;
21174 0 : test_var = PyLong_AsUnsignedLongLong(value);
21175 0 : if (PyErr_Occurred() != NULL) {
21176 0 : return -1;
21177 : }
21178 0 : if (test_var > uint_max) {
21179 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21180 : PyLong_Type.tp_name, uint_max, test_var);
21181 0 : return -1;
21182 : }
21183 0 : object->dwReserved5 = test_var;
21184 : } else {
21185 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21186 : PyLong_Type.tp_name);
21187 0 : return -1;
21188 : }
21189 : }
21190 0 : return 0;
21191 : }
21192 :
21193 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved6(PyObject *obj, void *closure)
21194 : {
21195 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
21196 0 : PyObject *py_dwReserved6;
21197 0 : py_dwReserved6 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved6));
21198 0 : return py_dwReserved6;
21199 : }
21200 :
21201 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved6(PyObject *py_obj, PyObject *value, void *closure)
21202 : {
21203 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
21204 0 : if (value == NULL) {
21205 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved6");
21206 0 : return -1;
21207 : }
21208 : {
21209 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved6));
21210 0 : if (PyLong_Check(value)) {
21211 0 : unsigned long long test_var;
21212 0 : test_var = PyLong_AsUnsignedLongLong(value);
21213 0 : if (PyErr_Occurred() != NULL) {
21214 0 : return -1;
21215 : }
21216 0 : if (test_var > uint_max) {
21217 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21218 : PyLong_Type.tp_name, uint_max, test_var);
21219 0 : return -1;
21220 : }
21221 0 : object->dwReserved6 = test_var;
21222 : } else {
21223 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21224 : PyLong_Type.tp_name);
21225 0 : return -1;
21226 : }
21227 : }
21228 0 : return 0;
21229 : }
21230 :
21231 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved7(PyObject *obj, void *closure)
21232 : {
21233 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
21234 0 : PyObject *py_dwReserved7;
21235 0 : py_dwReserved7 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved7));
21236 0 : return py_dwReserved7;
21237 : }
21238 :
21239 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved7(PyObject *py_obj, PyObject *value, void *closure)
21240 : {
21241 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
21242 0 : if (value == NULL) {
21243 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved7");
21244 0 : return -1;
21245 : }
21246 : {
21247 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved7));
21248 0 : if (PyLong_Check(value)) {
21249 0 : unsigned long long test_var;
21250 0 : test_var = PyLong_AsUnsignedLongLong(value);
21251 0 : if (PyErr_Occurred() != NULL) {
21252 0 : return -1;
21253 : }
21254 0 : if (test_var > uint_max) {
21255 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21256 : PyLong_Type.tp_name, uint_max, test_var);
21257 0 : return -1;
21258 : }
21259 0 : object->dwReserved7 = test_var;
21260 : } else {
21261 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21262 : PyLong_Type.tp_name);
21263 0 : return -1;
21264 : }
21265 : }
21266 0 : return 0;
21267 : }
21268 :
21269 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved8(PyObject *obj, void *closure)
21270 : {
21271 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(obj);
21272 0 : PyObject *py_dwReserved8;
21273 0 : py_dwReserved8 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved8));
21274 0 : return py_dwReserved8;
21275 : }
21276 :
21277 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved8(PyObject *py_obj, PyObject *value, void *closure)
21278 : {
21279 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = pytalloc_get_ptr(py_obj);
21280 0 : if (value == NULL) {
21281 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved8");
21282 0 : return -1;
21283 : }
21284 : {
21285 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved8));
21286 0 : if (PyLong_Check(value)) {
21287 0 : unsigned long long test_var;
21288 0 : test_var = PyLong_AsUnsignedLongLong(value);
21289 0 : if (PyErr_Occurred() != NULL) {
21290 0 : return -1;
21291 : }
21292 0 : if (test_var > uint_max) {
21293 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21294 : PyLong_Type.tp_name, uint_max, test_var);
21295 0 : return -1;
21296 : }
21297 0 : object->dwReserved8 = test_var;
21298 : } else {
21299 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21300 : PyLong_Type.tp_name);
21301 0 : return -1;
21302 : }
21303 : }
21304 0 : return 0;
21305 : }
21306 :
21307 : static PyGetSetDef py_DNS_RPC_ZONE_CREATE_INFO_W2K_getsetters[] = {
21308 : {
21309 : .name = discard_const_p(char, "pszZoneName"),
21310 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pszZoneName,
21311 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pszZoneName,
21312 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21313 : },
21314 : {
21315 : .name = discard_const_p(char, "dwZoneType"),
21316 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwZoneType,
21317 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwZoneType,
21318 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21319 : },
21320 : {
21321 : .name = discard_const_p(char, "fAllowUpdate"),
21322 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fAllowUpdate,
21323 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fAllowUpdate,
21324 : .doc = discard_const_p(char, "PIDL-generated element of base type dns_zone_update")
21325 : },
21326 : {
21327 : .name = discard_const_p(char, "fAging"),
21328 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fAging,
21329 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fAging,
21330 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21331 : },
21332 : {
21333 : .name = discard_const_p(char, "dwFlags"),
21334 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwFlags,
21335 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwFlags,
21336 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21337 : },
21338 : {
21339 : .name = discard_const_p(char, "pszDataFile"),
21340 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pszDataFile,
21341 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pszDataFile,
21342 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21343 : },
21344 : {
21345 : .name = discard_const_p(char, "fDsIntegrated"),
21346 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fDsIntegrated,
21347 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fDsIntegrated,
21348 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21349 : },
21350 : {
21351 : .name = discard_const_p(char, "fLoadExisting"),
21352 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fLoadExisting,
21353 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fLoadExisting,
21354 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21355 : },
21356 : {
21357 : .name = discard_const_p(char, "pszAdmin"),
21358 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pszAdmin,
21359 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pszAdmin,
21360 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21361 : },
21362 : {
21363 : .name = discard_const_p(char, "aipMasters"),
21364 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_aipMasters,
21365 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_aipMasters,
21366 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
21367 : },
21368 : {
21369 : .name = discard_const_p(char, "aipSecondaries"),
21370 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_aipSecondaries,
21371 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_aipSecondaries,
21372 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
21373 : },
21374 : {
21375 : .name = discard_const_p(char, "fSecureSecondaries"),
21376 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fSecureSecondaries,
21377 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fSecureSecondaries,
21378 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_SECONDARY_SECURITY")
21379 : },
21380 : {
21381 : .name = discard_const_p(char, "fNotifyLevel"),
21382 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fNotifyLevel,
21383 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fNotifyLevel,
21384 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_NOTIFY_LEVEL")
21385 : },
21386 : {
21387 : .name = discard_const_p(char, "pvReserved1"),
21388 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved1,
21389 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved1,
21390 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21391 : },
21392 : {
21393 : .name = discard_const_p(char, "pvReserved2"),
21394 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved2,
21395 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved2,
21396 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21397 : },
21398 : {
21399 : .name = discard_const_p(char, "pvReserved3"),
21400 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved3,
21401 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved3,
21402 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21403 : },
21404 : {
21405 : .name = discard_const_p(char, "pvReserved4"),
21406 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved4,
21407 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved4,
21408 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21409 : },
21410 : {
21411 : .name = discard_const_p(char, "pvReserved5"),
21412 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved5,
21413 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved5,
21414 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21415 : },
21416 : {
21417 : .name = discard_const_p(char, "pvReserved6"),
21418 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved6,
21419 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved6,
21420 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21421 : },
21422 : {
21423 : .name = discard_const_p(char, "pvReserved7"),
21424 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved7,
21425 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved7,
21426 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21427 : },
21428 : {
21429 : .name = discard_const_p(char, "pvReserved8"),
21430 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved8,
21431 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved8,
21432 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21433 : },
21434 : {
21435 : .name = discard_const_p(char, "dwReserved1"),
21436 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved1,
21437 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved1,
21438 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21439 : },
21440 : {
21441 : .name = discard_const_p(char, "dwReserved2"),
21442 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved2,
21443 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved2,
21444 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21445 : },
21446 : {
21447 : .name = discard_const_p(char, "dwReserved3"),
21448 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved3,
21449 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved3,
21450 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21451 : },
21452 : {
21453 : .name = discard_const_p(char, "dwReserved4"),
21454 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved4,
21455 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved4,
21456 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21457 : },
21458 : {
21459 : .name = discard_const_p(char, "dwReserved5"),
21460 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved5,
21461 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved5,
21462 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21463 : },
21464 : {
21465 : .name = discard_const_p(char, "dwReserved6"),
21466 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved6,
21467 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved6,
21468 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21469 : },
21470 : {
21471 : .name = discard_const_p(char, "dwReserved7"),
21472 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved7,
21473 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved7,
21474 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21475 : },
21476 : {
21477 : .name = discard_const_p(char, "dwReserved8"),
21478 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved8,
21479 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved8,
21480 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21481 : },
21482 : { .name = NULL }
21483 : };
21484 :
21485 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
21486 : {
21487 0 : return pytalloc_new(struct DNS_RPC_ZONE_CREATE_INFO_W2K, type);
21488 : }
21489 :
21490 :
21491 : static PyTypeObject DNS_RPC_ZONE_CREATE_INFO_W2K_Type = {
21492 : PyVarObject_HEAD_INIT(NULL, 0)
21493 : .tp_name = "dnsserver.DNS_RPC_ZONE_CREATE_INFO_W2K",
21494 : .tp_getset = py_DNS_RPC_ZONE_CREATE_INFO_W2K_getsetters,
21495 : .tp_methods = NULL,
21496 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
21497 : .tp_new = py_DNS_RPC_ZONE_CREATE_INFO_W2K_new,
21498 : };
21499 :
21500 :
21501 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
21502 : {
21503 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
21504 0 : PyObject *py_dwRpcStructureVersion;
21505 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
21506 0 : return py_dwRpcStructureVersion;
21507 : }
21508 :
21509 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
21510 : {
21511 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
21512 0 : if (value == NULL) {
21513 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
21514 0 : return -1;
21515 : }
21516 : {
21517 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
21518 0 : if (PyLong_Check(value)) {
21519 0 : unsigned long long test_var;
21520 0 : test_var = PyLong_AsUnsignedLongLong(value);
21521 0 : if (PyErr_Occurred() != NULL) {
21522 0 : return -1;
21523 : }
21524 0 : if (test_var > uint_max) {
21525 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21526 : PyLong_Type.tp_name, uint_max, test_var);
21527 0 : return -1;
21528 : }
21529 0 : object->dwRpcStructureVersion = test_var;
21530 : } else {
21531 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21532 : PyLong_Type.tp_name);
21533 0 : return -1;
21534 : }
21535 : }
21536 0 : return 0;
21537 : }
21538 :
21539 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
21540 : {
21541 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
21542 0 : PyObject *py_dwReserved0;
21543 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
21544 0 : return py_dwReserved0;
21545 : }
21546 :
21547 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
21548 : {
21549 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
21550 0 : if (value == NULL) {
21551 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
21552 0 : return -1;
21553 : }
21554 : {
21555 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
21556 0 : if (PyLong_Check(value)) {
21557 0 : unsigned long long test_var;
21558 0 : test_var = PyLong_AsUnsignedLongLong(value);
21559 0 : if (PyErr_Occurred() != NULL) {
21560 0 : return -1;
21561 : }
21562 0 : if (test_var > uint_max) {
21563 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21564 : PyLong_Type.tp_name, uint_max, test_var);
21565 0 : return -1;
21566 : }
21567 0 : object->dwReserved0 = test_var;
21568 : } else {
21569 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21570 : PyLong_Type.tp_name);
21571 0 : return -1;
21572 : }
21573 : }
21574 0 : return 0;
21575 : }
21576 :
21577 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszZoneName(PyObject *obj, void *closure)
21578 : {
21579 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
21580 0 : PyObject *py_pszZoneName;
21581 0 : if (object->pszZoneName == NULL) {
21582 0 : Py_RETURN_NONE;
21583 : }
21584 0 : if (object->pszZoneName == NULL) {
21585 0 : py_pszZoneName = Py_None;
21586 0 : Py_INCREF(py_pszZoneName);
21587 : } else {
21588 0 : if (object->pszZoneName == NULL) {
21589 0 : py_pszZoneName = Py_None;
21590 0 : Py_INCREF(py_pszZoneName);
21591 : } else {
21592 0 : py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
21593 : }
21594 : }
21595 0 : return py_pszZoneName;
21596 : }
21597 :
21598 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
21599 : {
21600 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
21601 0 : if (value == NULL) {
21602 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszZoneName");
21603 0 : return -1;
21604 : }
21605 0 : if (value == Py_None) {
21606 0 : object->pszZoneName = NULL;
21607 : } else {
21608 0 : object->pszZoneName = NULL;
21609 : {
21610 0 : const char *test_str;
21611 0 : const char *talloc_str;
21612 0 : PyObject *unicode = NULL;
21613 0 : if (PyUnicode_Check(value)) {
21614 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
21615 0 : if (unicode == NULL) {
21616 0 : return -1;
21617 : }
21618 0 : test_str = PyBytes_AS_STRING(unicode);
21619 0 : } else if (PyBytes_Check(value)) {
21620 0 : test_str = PyBytes_AS_STRING(value);
21621 : } else {
21622 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
21623 0 : return -1;
21624 : }
21625 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
21626 0 : if (unicode != NULL) {
21627 0 : Py_DECREF(unicode);
21628 : }
21629 0 : if (talloc_str == NULL) {
21630 0 : PyErr_NoMemory();
21631 0 : return -1;
21632 : }
21633 0 : object->pszZoneName = talloc_str;
21634 : }
21635 : }
21636 0 : return 0;
21637 : }
21638 :
21639 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwZoneType(PyObject *obj, void *closure)
21640 : {
21641 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
21642 0 : PyObject *py_dwZoneType;
21643 0 : py_dwZoneType = PyLong_FromUnsignedLongLong((uint32_t)(object->dwZoneType));
21644 0 : return py_dwZoneType;
21645 : }
21646 :
21647 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwZoneType(PyObject *py_obj, PyObject *value, void *closure)
21648 : {
21649 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
21650 0 : if (value == NULL) {
21651 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwZoneType");
21652 0 : return -1;
21653 : }
21654 : {
21655 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwZoneType));
21656 0 : if (PyLong_Check(value)) {
21657 0 : unsigned long long test_var;
21658 0 : test_var = PyLong_AsUnsignedLongLong(value);
21659 0 : if (PyErr_Occurred() != NULL) {
21660 0 : return -1;
21661 : }
21662 0 : if (test_var > uint_max) {
21663 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21664 : PyLong_Type.tp_name, uint_max, test_var);
21665 0 : return -1;
21666 : }
21667 0 : object->dwZoneType = test_var;
21668 : } else {
21669 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21670 : PyLong_Type.tp_name);
21671 0 : return -1;
21672 : }
21673 : }
21674 0 : return 0;
21675 : }
21676 :
21677 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fAllowUpdate(PyObject *obj, void *closure)
21678 : {
21679 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
21680 0 : PyObject *py_fAllowUpdate;
21681 0 : py_fAllowUpdate = PyLong_FromLong((uint16_t)(object->fAllowUpdate));
21682 0 : return py_fAllowUpdate;
21683 : }
21684 :
21685 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
21686 : {
21687 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
21688 0 : if (value == NULL) {
21689 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAllowUpdate");
21690 0 : return -1;
21691 : }
21692 : {
21693 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAllowUpdate));
21694 0 : if (PyLong_Check(value)) {
21695 0 : unsigned long long test_var;
21696 0 : test_var = PyLong_AsUnsignedLongLong(value);
21697 0 : if (PyErr_Occurred() != NULL) {
21698 0 : return -1;
21699 : }
21700 0 : if (test_var > uint_max) {
21701 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21702 : PyLong_Type.tp_name, uint_max, test_var);
21703 0 : return -1;
21704 : }
21705 0 : object->fAllowUpdate = test_var;
21706 : } else {
21707 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21708 : PyLong_Type.tp_name);
21709 0 : return -1;
21710 : }
21711 : }
21712 0 : return 0;
21713 : }
21714 :
21715 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fAging(PyObject *obj, void *closure)
21716 : {
21717 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
21718 0 : PyObject *py_fAging;
21719 0 : py_fAging = PyLong_FromUnsignedLongLong((uint32_t)(object->fAging));
21720 0 : return py_fAging;
21721 : }
21722 :
21723 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fAging(PyObject *py_obj, PyObject *value, void *closure)
21724 : {
21725 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
21726 0 : if (value == NULL) {
21727 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAging");
21728 0 : return -1;
21729 : }
21730 : {
21731 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAging));
21732 0 : if (PyLong_Check(value)) {
21733 0 : unsigned long long test_var;
21734 0 : test_var = PyLong_AsUnsignedLongLong(value);
21735 0 : if (PyErr_Occurred() != NULL) {
21736 0 : return -1;
21737 : }
21738 0 : if (test_var > uint_max) {
21739 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21740 : PyLong_Type.tp_name, uint_max, test_var);
21741 0 : return -1;
21742 : }
21743 0 : object->fAging = test_var;
21744 : } else {
21745 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21746 : PyLong_Type.tp_name);
21747 0 : return -1;
21748 : }
21749 : }
21750 0 : return 0;
21751 : }
21752 :
21753 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwFlags(PyObject *obj, void *closure)
21754 : {
21755 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
21756 0 : PyObject *py_dwFlags;
21757 0 : py_dwFlags = PyLong_FromUnsignedLongLong((uint32_t)(object->dwFlags));
21758 0 : return py_dwFlags;
21759 : }
21760 :
21761 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
21762 : {
21763 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
21764 0 : if (value == NULL) {
21765 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwFlags");
21766 0 : return -1;
21767 : }
21768 : {
21769 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwFlags));
21770 0 : if (PyLong_Check(value)) {
21771 0 : unsigned long long test_var;
21772 0 : test_var = PyLong_AsUnsignedLongLong(value);
21773 0 : if (PyErr_Occurred() != NULL) {
21774 0 : return -1;
21775 : }
21776 0 : if (test_var > uint_max) {
21777 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21778 : PyLong_Type.tp_name, uint_max, test_var);
21779 0 : return -1;
21780 : }
21781 0 : object->dwFlags = test_var;
21782 : } else {
21783 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21784 : PyLong_Type.tp_name);
21785 0 : return -1;
21786 : }
21787 : }
21788 0 : return 0;
21789 : }
21790 :
21791 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszDataFile(PyObject *obj, void *closure)
21792 : {
21793 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
21794 0 : PyObject *py_pszDataFile;
21795 0 : if (object->pszDataFile == NULL) {
21796 0 : Py_RETURN_NONE;
21797 : }
21798 0 : if (object->pszDataFile == NULL) {
21799 0 : py_pszDataFile = Py_None;
21800 0 : Py_INCREF(py_pszDataFile);
21801 : } else {
21802 0 : if (object->pszDataFile == NULL) {
21803 0 : py_pszDataFile = Py_None;
21804 0 : Py_INCREF(py_pszDataFile);
21805 : } else {
21806 0 : py_pszDataFile = PyUnicode_Decode(object->pszDataFile, strlen(object->pszDataFile), "utf-8", "ignore");
21807 : }
21808 : }
21809 0 : return py_pszDataFile;
21810 : }
21811 :
21812 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszDataFile(PyObject *py_obj, PyObject *value, void *closure)
21813 : {
21814 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
21815 0 : if (value == NULL) {
21816 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDataFile");
21817 0 : return -1;
21818 : }
21819 0 : if (value == Py_None) {
21820 0 : object->pszDataFile = NULL;
21821 : } else {
21822 0 : object->pszDataFile = NULL;
21823 : {
21824 0 : const char *test_str;
21825 0 : const char *talloc_str;
21826 0 : PyObject *unicode = NULL;
21827 0 : if (PyUnicode_Check(value)) {
21828 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
21829 0 : if (unicode == NULL) {
21830 0 : return -1;
21831 : }
21832 0 : test_str = PyBytes_AS_STRING(unicode);
21833 0 : } else if (PyBytes_Check(value)) {
21834 0 : test_str = PyBytes_AS_STRING(value);
21835 : } else {
21836 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
21837 0 : return -1;
21838 : }
21839 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
21840 0 : if (unicode != NULL) {
21841 0 : Py_DECREF(unicode);
21842 : }
21843 0 : if (talloc_str == NULL) {
21844 0 : PyErr_NoMemory();
21845 0 : return -1;
21846 : }
21847 0 : object->pszDataFile = talloc_str;
21848 : }
21849 : }
21850 0 : return 0;
21851 : }
21852 :
21853 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fDsIntegrated(PyObject *obj, void *closure)
21854 : {
21855 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
21856 0 : PyObject *py_fDsIntegrated;
21857 0 : py_fDsIntegrated = PyLong_FromUnsignedLongLong((uint32_t)(object->fDsIntegrated));
21858 0 : return py_fDsIntegrated;
21859 : }
21860 :
21861 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fDsIntegrated(PyObject *py_obj, PyObject *value, void *closure)
21862 : {
21863 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
21864 0 : if (value == NULL) {
21865 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fDsIntegrated");
21866 0 : return -1;
21867 : }
21868 : {
21869 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDsIntegrated));
21870 0 : if (PyLong_Check(value)) {
21871 0 : unsigned long long test_var;
21872 0 : test_var = PyLong_AsUnsignedLongLong(value);
21873 0 : if (PyErr_Occurred() != NULL) {
21874 0 : return -1;
21875 : }
21876 0 : if (test_var > uint_max) {
21877 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21878 : PyLong_Type.tp_name, uint_max, test_var);
21879 0 : return -1;
21880 : }
21881 0 : object->fDsIntegrated = test_var;
21882 : } else {
21883 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21884 : PyLong_Type.tp_name);
21885 0 : return -1;
21886 : }
21887 : }
21888 0 : return 0;
21889 : }
21890 :
21891 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fLoadExisting(PyObject *obj, void *closure)
21892 : {
21893 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
21894 0 : PyObject *py_fLoadExisting;
21895 0 : py_fLoadExisting = PyLong_FromUnsignedLongLong((uint32_t)(object->fLoadExisting));
21896 0 : return py_fLoadExisting;
21897 : }
21898 :
21899 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fLoadExisting(PyObject *py_obj, PyObject *value, void *closure)
21900 : {
21901 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
21902 0 : if (value == NULL) {
21903 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fLoadExisting");
21904 0 : return -1;
21905 : }
21906 : {
21907 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fLoadExisting));
21908 0 : if (PyLong_Check(value)) {
21909 0 : unsigned long long test_var;
21910 0 : test_var = PyLong_AsUnsignedLongLong(value);
21911 0 : if (PyErr_Occurred() != NULL) {
21912 0 : return -1;
21913 : }
21914 0 : if (test_var > uint_max) {
21915 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21916 : PyLong_Type.tp_name, uint_max, test_var);
21917 0 : return -1;
21918 : }
21919 0 : object->fLoadExisting = test_var;
21920 : } else {
21921 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21922 : PyLong_Type.tp_name);
21923 0 : return -1;
21924 : }
21925 : }
21926 0 : return 0;
21927 : }
21928 :
21929 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszAdmin(PyObject *obj, void *closure)
21930 : {
21931 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
21932 0 : PyObject *py_pszAdmin;
21933 0 : if (object->pszAdmin == NULL) {
21934 0 : Py_RETURN_NONE;
21935 : }
21936 0 : if (object->pszAdmin == NULL) {
21937 0 : py_pszAdmin = Py_None;
21938 0 : Py_INCREF(py_pszAdmin);
21939 : } else {
21940 0 : if (object->pszAdmin == NULL) {
21941 0 : py_pszAdmin = Py_None;
21942 0 : Py_INCREF(py_pszAdmin);
21943 : } else {
21944 0 : py_pszAdmin = PyUnicode_Decode(object->pszAdmin, strlen(object->pszAdmin), "utf-8", "ignore");
21945 : }
21946 : }
21947 0 : return py_pszAdmin;
21948 : }
21949 :
21950 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszAdmin(PyObject *py_obj, PyObject *value, void *closure)
21951 : {
21952 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
21953 0 : if (value == NULL) {
21954 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszAdmin");
21955 0 : return -1;
21956 : }
21957 0 : if (value == Py_None) {
21958 0 : object->pszAdmin = NULL;
21959 : } else {
21960 0 : object->pszAdmin = NULL;
21961 : {
21962 0 : const char *test_str;
21963 0 : const char *talloc_str;
21964 0 : PyObject *unicode = NULL;
21965 0 : if (PyUnicode_Check(value)) {
21966 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
21967 0 : if (unicode == NULL) {
21968 0 : return -1;
21969 : }
21970 0 : test_str = PyBytes_AS_STRING(unicode);
21971 0 : } else if (PyBytes_Check(value)) {
21972 0 : test_str = PyBytes_AS_STRING(value);
21973 : } else {
21974 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
21975 0 : return -1;
21976 : }
21977 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
21978 0 : if (unicode != NULL) {
21979 0 : Py_DECREF(unicode);
21980 : }
21981 0 : if (talloc_str == NULL) {
21982 0 : PyErr_NoMemory();
21983 0 : return -1;
21984 : }
21985 0 : object->pszAdmin = talloc_str;
21986 : }
21987 : }
21988 0 : return 0;
21989 : }
21990 :
21991 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_aipMasters(PyObject *obj, void *closure)
21992 : {
21993 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
21994 0 : PyObject *py_aipMasters;
21995 0 : if (object->aipMasters == NULL) {
21996 0 : Py_RETURN_NONE;
21997 : }
21998 0 : if (object->aipMasters == NULL) {
21999 0 : py_aipMasters = Py_None;
22000 0 : Py_INCREF(py_aipMasters);
22001 : } else {
22002 0 : py_aipMasters = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipMasters, object->aipMasters);
22003 : }
22004 0 : return py_aipMasters;
22005 : }
22006 :
22007 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_aipMasters(PyObject *py_obj, PyObject *value, void *closure)
22008 : {
22009 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
22010 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipMasters));
22011 0 : if (value == NULL) {
22012 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipMasters");
22013 0 : return -1;
22014 : }
22015 0 : if (value == Py_None) {
22016 0 : object->aipMasters = NULL;
22017 : } else {
22018 0 : object->aipMasters = NULL;
22019 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
22020 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
22021 0 : PyErr_NoMemory();
22022 0 : return -1;
22023 : }
22024 0 : object->aipMasters = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
22025 : }
22026 0 : return 0;
22027 : }
22028 :
22029 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_aipSecondaries(PyObject *obj, void *closure)
22030 : {
22031 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
22032 0 : PyObject *py_aipSecondaries;
22033 0 : if (object->aipSecondaries == NULL) {
22034 0 : Py_RETURN_NONE;
22035 : }
22036 0 : if (object->aipSecondaries == NULL) {
22037 0 : py_aipSecondaries = Py_None;
22038 0 : Py_INCREF(py_aipSecondaries);
22039 : } else {
22040 0 : py_aipSecondaries = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
22041 : }
22042 0 : return py_aipSecondaries;
22043 : }
22044 :
22045 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
22046 : {
22047 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
22048 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipSecondaries));
22049 0 : if (value == NULL) {
22050 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipSecondaries");
22051 0 : return -1;
22052 : }
22053 0 : if (value == Py_None) {
22054 0 : object->aipSecondaries = NULL;
22055 : } else {
22056 0 : object->aipSecondaries = NULL;
22057 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
22058 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
22059 0 : PyErr_NoMemory();
22060 0 : return -1;
22061 : }
22062 0 : object->aipSecondaries = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
22063 : }
22064 0 : return 0;
22065 : }
22066 :
22067 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fSecureSecondaries(PyObject *obj, void *closure)
22068 : {
22069 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
22070 0 : PyObject *py_fSecureSecondaries;
22071 0 : py_fSecureSecondaries = PyLong_FromUnsignedLongLong((uint32_t)(object->fSecureSecondaries));
22072 0 : return py_fSecureSecondaries;
22073 : }
22074 :
22075 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
22076 : {
22077 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
22078 0 : if (value == NULL) {
22079 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fSecureSecondaries");
22080 0 : return -1;
22081 : }
22082 : {
22083 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureSecondaries));
22084 0 : if (PyLong_Check(value)) {
22085 0 : unsigned long long test_var;
22086 0 : test_var = PyLong_AsUnsignedLongLong(value);
22087 0 : if (PyErr_Occurred() != NULL) {
22088 0 : return -1;
22089 : }
22090 0 : if (test_var > uint_max) {
22091 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22092 : PyLong_Type.tp_name, uint_max, test_var);
22093 0 : return -1;
22094 : }
22095 0 : object->fSecureSecondaries = test_var;
22096 : } else {
22097 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22098 : PyLong_Type.tp_name);
22099 0 : return -1;
22100 : }
22101 : }
22102 0 : return 0;
22103 : }
22104 :
22105 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fNotifyLevel(PyObject *obj, void *closure)
22106 : {
22107 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
22108 0 : PyObject *py_fNotifyLevel;
22109 0 : py_fNotifyLevel = PyLong_FromUnsignedLongLong((uint32_t)(object->fNotifyLevel));
22110 0 : return py_fNotifyLevel;
22111 : }
22112 :
22113 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
22114 : {
22115 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
22116 0 : if (value == NULL) {
22117 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fNotifyLevel");
22118 0 : return -1;
22119 : }
22120 : {
22121 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNotifyLevel));
22122 0 : if (PyLong_Check(value)) {
22123 0 : unsigned long long test_var;
22124 0 : test_var = PyLong_AsUnsignedLongLong(value);
22125 0 : if (PyErr_Occurred() != NULL) {
22126 0 : return -1;
22127 : }
22128 0 : if (test_var > uint_max) {
22129 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22130 : PyLong_Type.tp_name, uint_max, test_var);
22131 0 : return -1;
22132 : }
22133 0 : object->fNotifyLevel = test_var;
22134 : } else {
22135 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22136 : PyLong_Type.tp_name);
22137 0 : return -1;
22138 : }
22139 : }
22140 0 : return 0;
22141 : }
22142 :
22143 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwTimeout(PyObject *obj, void *closure)
22144 : {
22145 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
22146 0 : PyObject *py_dwTimeout;
22147 0 : py_dwTimeout = PyLong_FromUnsignedLongLong((uint32_t)(object->dwTimeout));
22148 0 : return py_dwTimeout;
22149 : }
22150 :
22151 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwTimeout(PyObject *py_obj, PyObject *value, void *closure)
22152 : {
22153 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
22154 0 : if (value == NULL) {
22155 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwTimeout");
22156 0 : return -1;
22157 : }
22158 : {
22159 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwTimeout));
22160 0 : if (PyLong_Check(value)) {
22161 0 : unsigned long long test_var;
22162 0 : test_var = PyLong_AsUnsignedLongLong(value);
22163 0 : if (PyErr_Occurred() != NULL) {
22164 0 : return -1;
22165 : }
22166 0 : if (test_var > uint_max) {
22167 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22168 : PyLong_Type.tp_name, uint_max, test_var);
22169 0 : return -1;
22170 : }
22171 0 : object->dwTimeout = test_var;
22172 : } else {
22173 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22174 : PyLong_Type.tp_name);
22175 0 : return -1;
22176 : }
22177 : }
22178 0 : return 0;
22179 : }
22180 :
22181 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
22182 : {
22183 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
22184 0 : PyObject *py_fRecurseAfterForwarding;
22185 0 : py_fRecurseAfterForwarding = PyLong_FromUnsignedLongLong((uint32_t)(object->fRecurseAfterForwarding));
22186 0 : return py_fRecurseAfterForwarding;
22187 : }
22188 :
22189 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
22190 : {
22191 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
22192 0 : if (value == NULL) {
22193 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fRecurseAfterForwarding");
22194 0 : return -1;
22195 : }
22196 : {
22197 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRecurseAfterForwarding));
22198 0 : if (PyLong_Check(value)) {
22199 0 : unsigned long long test_var;
22200 0 : test_var = PyLong_AsUnsignedLongLong(value);
22201 0 : if (PyErr_Occurred() != NULL) {
22202 0 : return -1;
22203 : }
22204 0 : if (test_var > uint_max) {
22205 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22206 : PyLong_Type.tp_name, uint_max, test_var);
22207 0 : return -1;
22208 : }
22209 0 : object->fRecurseAfterForwarding = test_var;
22210 : } else {
22211 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22212 : PyLong_Type.tp_name);
22213 0 : return -1;
22214 : }
22215 : }
22216 0 : return 0;
22217 : }
22218 :
22219 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwDpFlags(PyObject *obj, void *closure)
22220 : {
22221 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
22222 0 : PyObject *py_dwDpFlags;
22223 0 : py_dwDpFlags = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDpFlags));
22224 0 : return py_dwDpFlags;
22225 : }
22226 :
22227 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwDpFlags(PyObject *py_obj, PyObject *value, void *closure)
22228 : {
22229 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
22230 0 : if (value == NULL) {
22231 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDpFlags");
22232 0 : return -1;
22233 : }
22234 : {
22235 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDpFlags));
22236 0 : if (PyLong_Check(value)) {
22237 0 : unsigned long long test_var;
22238 0 : test_var = PyLong_AsUnsignedLongLong(value);
22239 0 : if (PyErr_Occurred() != NULL) {
22240 0 : return -1;
22241 : }
22242 0 : if (test_var > uint_max) {
22243 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22244 : PyLong_Type.tp_name, uint_max, test_var);
22245 0 : return -1;
22246 : }
22247 0 : object->dwDpFlags = test_var;
22248 : } else {
22249 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22250 : PyLong_Type.tp_name);
22251 0 : return -1;
22252 : }
22253 : }
22254 0 : return 0;
22255 : }
22256 :
22257 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszDpFqdn(PyObject *obj, void *closure)
22258 : {
22259 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
22260 0 : PyObject *py_pszDpFqdn;
22261 0 : if (object->pszDpFqdn == NULL) {
22262 0 : Py_RETURN_NONE;
22263 : }
22264 0 : if (object->pszDpFqdn == NULL) {
22265 0 : py_pszDpFqdn = Py_None;
22266 0 : Py_INCREF(py_pszDpFqdn);
22267 : } else {
22268 0 : if (object->pszDpFqdn == NULL) {
22269 0 : py_pszDpFqdn = Py_None;
22270 0 : Py_INCREF(py_pszDpFqdn);
22271 : } else {
22272 0 : py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
22273 : }
22274 : }
22275 0 : return py_pszDpFqdn;
22276 : }
22277 :
22278 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
22279 : {
22280 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
22281 0 : if (value == NULL) {
22282 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDpFqdn");
22283 0 : return -1;
22284 : }
22285 0 : if (value == Py_None) {
22286 0 : object->pszDpFqdn = NULL;
22287 : } else {
22288 0 : object->pszDpFqdn = NULL;
22289 : {
22290 0 : const char *test_str;
22291 0 : const char *talloc_str;
22292 0 : PyObject *unicode = NULL;
22293 0 : if (PyUnicode_Check(value)) {
22294 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
22295 0 : if (unicode == NULL) {
22296 0 : return -1;
22297 : }
22298 0 : test_str = PyBytes_AS_STRING(unicode);
22299 0 : } else if (PyBytes_Check(value)) {
22300 0 : test_str = PyBytes_AS_STRING(value);
22301 : } else {
22302 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
22303 0 : return -1;
22304 : }
22305 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
22306 0 : if (unicode != NULL) {
22307 0 : Py_DECREF(unicode);
22308 : }
22309 0 : if (talloc_str == NULL) {
22310 0 : PyErr_NoMemory();
22311 0 : return -1;
22312 : }
22313 0 : object->pszDpFqdn = talloc_str;
22314 : }
22315 : }
22316 0 : return 0;
22317 : }
22318 :
22319 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwReserved(PyObject *obj, void *closure)
22320 : {
22321 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(obj);
22322 0 : PyObject *py_dwReserved;
22323 0 : py_dwReserved = PyList_New(32);
22324 0 : if (py_dwReserved == NULL) {
22325 0 : return NULL;
22326 : }
22327 : {
22328 : int dwReserved_cntr_0;
22329 0 : for (dwReserved_cntr_0 = 0; dwReserved_cntr_0 < (32); dwReserved_cntr_0++) {
22330 0 : PyObject *py_dwReserved_0;
22331 0 : py_dwReserved_0 = PyLong_FromUnsignedLongLong((uint32_t)((object->dwReserved)[dwReserved_cntr_0]));
22332 0 : PyList_SetItem(py_dwReserved, dwReserved_cntr_0, py_dwReserved_0);
22333 : }
22334 : }
22335 0 : return py_dwReserved;
22336 : }
22337 :
22338 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwReserved(PyObject *py_obj, PyObject *value, void *closure)
22339 : {
22340 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = pytalloc_get_ptr(py_obj);
22341 0 : if (value == NULL) {
22342 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved");
22343 0 : return -1;
22344 : }
22345 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
22346 : {
22347 0 : int dwReserved_cntr_0;
22348 0 : if (ARRAY_SIZE(object->dwReserved) != PyList_GET_SIZE(value)) {
22349 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));
22350 0 : return -1;
22351 : }
22352 0 : for (dwReserved_cntr_0 = 0; dwReserved_cntr_0 < PyList_GET_SIZE(value); dwReserved_cntr_0++) {
22353 0 : if (PyList_GET_ITEM(value, dwReserved_cntr_0) == NULL) {
22354 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->dwReserved)[dwReserved_cntr_0]");
22355 0 : return -1;
22356 : }
22357 : {
22358 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->dwReserved)[dwReserved_cntr_0]));
22359 0 : if (PyLong_Check(PyList_GET_ITEM(value, dwReserved_cntr_0))) {
22360 0 : unsigned long long test_var;
22361 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, dwReserved_cntr_0));
22362 0 : if (PyErr_Occurred() != NULL) {
22363 0 : return -1;
22364 : }
22365 0 : if (test_var > uint_max) {
22366 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22367 : PyLong_Type.tp_name, uint_max, test_var);
22368 0 : return -1;
22369 : }
22370 0 : (object->dwReserved)[dwReserved_cntr_0] = test_var;
22371 : } else {
22372 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22373 : PyLong_Type.tp_name);
22374 0 : return -1;
22375 : }
22376 : }
22377 : }
22378 : }
22379 0 : return 0;
22380 : }
22381 :
22382 : static PyGetSetDef py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_getsetters[] = {
22383 : {
22384 : .name = discard_const_p(char, "dwRpcStructureVersion"),
22385 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwRpcStructureVersion,
22386 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwRpcStructureVersion,
22387 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22388 : },
22389 : {
22390 : .name = discard_const_p(char, "dwReserved0"),
22391 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwReserved0,
22392 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwReserved0,
22393 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22394 : },
22395 : {
22396 : .name = discard_const_p(char, "pszZoneName"),
22397 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszZoneName,
22398 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszZoneName,
22399 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
22400 : },
22401 : {
22402 : .name = discard_const_p(char, "dwZoneType"),
22403 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwZoneType,
22404 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwZoneType,
22405 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22406 : },
22407 : {
22408 : .name = discard_const_p(char, "fAllowUpdate"),
22409 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fAllowUpdate,
22410 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fAllowUpdate,
22411 : .doc = discard_const_p(char, "PIDL-generated element of base type dns_zone_update")
22412 : },
22413 : {
22414 : .name = discard_const_p(char, "fAging"),
22415 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fAging,
22416 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fAging,
22417 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22418 : },
22419 : {
22420 : .name = discard_const_p(char, "dwFlags"),
22421 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwFlags,
22422 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwFlags,
22423 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22424 : },
22425 : {
22426 : .name = discard_const_p(char, "pszDataFile"),
22427 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszDataFile,
22428 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszDataFile,
22429 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
22430 : },
22431 : {
22432 : .name = discard_const_p(char, "fDsIntegrated"),
22433 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fDsIntegrated,
22434 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fDsIntegrated,
22435 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22436 : },
22437 : {
22438 : .name = discard_const_p(char, "fLoadExisting"),
22439 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fLoadExisting,
22440 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fLoadExisting,
22441 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22442 : },
22443 : {
22444 : .name = discard_const_p(char, "pszAdmin"),
22445 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszAdmin,
22446 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszAdmin,
22447 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
22448 : },
22449 : {
22450 : .name = discard_const_p(char, "aipMasters"),
22451 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_aipMasters,
22452 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_aipMasters,
22453 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
22454 : },
22455 : {
22456 : .name = discard_const_p(char, "aipSecondaries"),
22457 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_aipSecondaries,
22458 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_aipSecondaries,
22459 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
22460 : },
22461 : {
22462 : .name = discard_const_p(char, "fSecureSecondaries"),
22463 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fSecureSecondaries,
22464 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fSecureSecondaries,
22465 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_SECONDARY_SECURITY")
22466 : },
22467 : {
22468 : .name = discard_const_p(char, "fNotifyLevel"),
22469 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fNotifyLevel,
22470 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fNotifyLevel,
22471 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_NOTIFY_LEVEL")
22472 : },
22473 : {
22474 : .name = discard_const_p(char, "dwTimeout"),
22475 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwTimeout,
22476 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwTimeout,
22477 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22478 : },
22479 : {
22480 : .name = discard_const_p(char, "fRecurseAfterForwarding"),
22481 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fRecurseAfterForwarding,
22482 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fRecurseAfterForwarding,
22483 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22484 : },
22485 : {
22486 : .name = discard_const_p(char, "dwDpFlags"),
22487 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwDpFlags,
22488 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwDpFlags,
22489 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22490 : },
22491 : {
22492 : .name = discard_const_p(char, "pszDpFqdn"),
22493 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszDpFqdn,
22494 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszDpFqdn,
22495 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
22496 : },
22497 : {
22498 : .name = discard_const_p(char, "dwReserved"),
22499 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwReserved,
22500 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwReserved,
22501 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22502 : },
22503 : { .name = NULL }
22504 : };
22505 :
22506 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
22507 : {
22508 0 : return pytalloc_new(struct DNS_RPC_ZONE_CREATE_INFO_DOTNET, type);
22509 : }
22510 :
22511 :
22512 : static PyTypeObject DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type = {
22513 : PyVarObject_HEAD_INIT(NULL, 0)
22514 : .tp_name = "dnsserver.DNS_RPC_ZONE_CREATE_INFO_DOTNET",
22515 : .tp_getset = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_getsetters,
22516 : .tp_methods = NULL,
22517 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
22518 : .tp_new = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_new,
22519 : };
22520 :
22521 :
22522 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwRpcStructureVersion(PyObject *obj, void *closure)
22523 : {
22524 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
22525 0 : PyObject *py_dwRpcStructureVersion;
22526 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
22527 0 : return py_dwRpcStructureVersion;
22528 : }
22529 :
22530 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
22531 : {
22532 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
22533 0 : if (value == NULL) {
22534 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
22535 0 : return -1;
22536 : }
22537 : {
22538 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
22539 0 : if (PyLong_Check(value)) {
22540 0 : unsigned long long test_var;
22541 0 : test_var = PyLong_AsUnsignedLongLong(value);
22542 0 : if (PyErr_Occurred() != NULL) {
22543 0 : return -1;
22544 : }
22545 0 : if (test_var > uint_max) {
22546 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22547 : PyLong_Type.tp_name, uint_max, test_var);
22548 0 : return -1;
22549 : }
22550 0 : object->dwRpcStructureVersion = test_var;
22551 : } else {
22552 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22553 : PyLong_Type.tp_name);
22554 0 : return -1;
22555 : }
22556 : }
22557 0 : return 0;
22558 : }
22559 :
22560 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwReserved0(PyObject *obj, void *closure)
22561 : {
22562 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
22563 0 : PyObject *py_dwReserved0;
22564 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
22565 0 : return py_dwReserved0;
22566 : }
22567 :
22568 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
22569 : {
22570 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
22571 0 : if (value == NULL) {
22572 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
22573 0 : return -1;
22574 : }
22575 : {
22576 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
22577 0 : if (PyLong_Check(value)) {
22578 0 : unsigned long long test_var;
22579 0 : test_var = PyLong_AsUnsignedLongLong(value);
22580 0 : if (PyErr_Occurred() != NULL) {
22581 0 : return -1;
22582 : }
22583 0 : if (test_var > uint_max) {
22584 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22585 : PyLong_Type.tp_name, uint_max, test_var);
22586 0 : return -1;
22587 : }
22588 0 : object->dwReserved0 = test_var;
22589 : } else {
22590 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22591 : PyLong_Type.tp_name);
22592 0 : return -1;
22593 : }
22594 : }
22595 0 : return 0;
22596 : }
22597 :
22598 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszZoneName(PyObject *obj, void *closure)
22599 : {
22600 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
22601 0 : PyObject *py_pszZoneName;
22602 0 : if (object->pszZoneName == NULL) {
22603 0 : Py_RETURN_NONE;
22604 : }
22605 0 : if (object->pszZoneName == NULL) {
22606 0 : py_pszZoneName = Py_None;
22607 0 : Py_INCREF(py_pszZoneName);
22608 : } else {
22609 0 : if (object->pszZoneName == NULL) {
22610 0 : py_pszZoneName = Py_None;
22611 0 : Py_INCREF(py_pszZoneName);
22612 : } else {
22613 0 : py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
22614 : }
22615 : }
22616 0 : return py_pszZoneName;
22617 : }
22618 :
22619 427 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
22620 : {
22621 427 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
22622 427 : if (value == NULL) {
22623 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszZoneName");
22624 0 : return -1;
22625 : }
22626 427 : if (value == Py_None) {
22627 0 : object->pszZoneName = NULL;
22628 : } else {
22629 427 : object->pszZoneName = NULL;
22630 : {
22631 0 : const char *test_str;
22632 0 : const char *talloc_str;
22633 427 : PyObject *unicode = NULL;
22634 427 : if (PyUnicode_Check(value)) {
22635 427 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
22636 427 : if (unicode == NULL) {
22637 0 : return -1;
22638 : }
22639 427 : test_str = PyBytes_AS_STRING(unicode);
22640 0 : } else if (PyBytes_Check(value)) {
22641 0 : test_str = PyBytes_AS_STRING(value);
22642 : } else {
22643 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
22644 0 : return -1;
22645 : }
22646 427 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
22647 427 : if (unicode != NULL) {
22648 257 : Py_DECREF(unicode);
22649 : }
22650 427 : if (talloc_str == NULL) {
22651 0 : PyErr_NoMemory();
22652 0 : return -1;
22653 : }
22654 427 : object->pszZoneName = talloc_str;
22655 : }
22656 : }
22657 427 : return 0;
22658 : }
22659 :
22660 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwZoneType(PyObject *obj, void *closure)
22661 : {
22662 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
22663 0 : PyObject *py_dwZoneType;
22664 0 : py_dwZoneType = PyLong_FromUnsignedLongLong((uint32_t)(object->dwZoneType));
22665 0 : return py_dwZoneType;
22666 : }
22667 :
22668 427 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwZoneType(PyObject *py_obj, PyObject *value, void *closure)
22669 : {
22670 427 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
22671 427 : if (value == NULL) {
22672 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwZoneType");
22673 0 : return -1;
22674 : }
22675 : {
22676 427 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwZoneType));
22677 427 : if (PyLong_Check(value)) {
22678 0 : unsigned long long test_var;
22679 427 : test_var = PyLong_AsUnsignedLongLong(value);
22680 427 : if (PyErr_Occurred() != NULL) {
22681 0 : return -1;
22682 : }
22683 427 : if (test_var > uint_max) {
22684 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22685 : PyLong_Type.tp_name, uint_max, test_var);
22686 0 : return -1;
22687 : }
22688 427 : object->dwZoneType = test_var;
22689 : } else {
22690 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22691 : PyLong_Type.tp_name);
22692 0 : return -1;
22693 : }
22694 : }
22695 427 : return 0;
22696 : }
22697 :
22698 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fAllowUpdate(PyObject *obj, void *closure)
22699 : {
22700 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
22701 0 : PyObject *py_fAllowUpdate;
22702 0 : py_fAllowUpdate = PyLong_FromLong((uint16_t)(object->fAllowUpdate));
22703 0 : return py_fAllowUpdate;
22704 : }
22705 :
22706 330 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
22707 : {
22708 330 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
22709 330 : if (value == NULL) {
22710 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAllowUpdate");
22711 0 : return -1;
22712 : }
22713 : {
22714 330 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAllowUpdate));
22715 330 : if (PyLong_Check(value)) {
22716 0 : unsigned long long test_var;
22717 330 : test_var = PyLong_AsUnsignedLongLong(value);
22718 330 : if (PyErr_Occurred() != NULL) {
22719 0 : return -1;
22720 : }
22721 330 : if (test_var > uint_max) {
22722 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22723 : PyLong_Type.tp_name, uint_max, test_var);
22724 0 : return -1;
22725 : }
22726 330 : object->fAllowUpdate = test_var;
22727 : } else {
22728 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22729 : PyLong_Type.tp_name);
22730 0 : return -1;
22731 : }
22732 : }
22733 330 : return 0;
22734 : }
22735 :
22736 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fAging(PyObject *obj, void *closure)
22737 : {
22738 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
22739 0 : PyObject *py_fAging;
22740 0 : py_fAging = PyLong_FromUnsignedLongLong((uint32_t)(object->fAging));
22741 0 : return py_fAging;
22742 : }
22743 :
22744 427 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fAging(PyObject *py_obj, PyObject *value, void *closure)
22745 : {
22746 427 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
22747 427 : if (value == NULL) {
22748 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fAging");
22749 0 : return -1;
22750 : }
22751 : {
22752 427 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAging));
22753 427 : if (PyLong_Check(value)) {
22754 0 : unsigned long long test_var;
22755 427 : test_var = PyLong_AsUnsignedLongLong(value);
22756 427 : if (PyErr_Occurred() != NULL) {
22757 0 : return -1;
22758 : }
22759 427 : if (test_var > uint_max) {
22760 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22761 : PyLong_Type.tp_name, uint_max, test_var);
22762 0 : return -1;
22763 : }
22764 427 : object->fAging = test_var;
22765 : } else {
22766 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22767 : PyLong_Type.tp_name);
22768 0 : return -1;
22769 : }
22770 : }
22771 427 : return 0;
22772 : }
22773 :
22774 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwFlags(PyObject *obj, void *closure)
22775 : {
22776 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
22777 0 : PyObject *py_dwFlags;
22778 0 : py_dwFlags = PyLong_FromUnsignedLongLong((uint32_t)(object->dwFlags));
22779 0 : return py_dwFlags;
22780 : }
22781 :
22782 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
22783 : {
22784 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
22785 0 : if (value == NULL) {
22786 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwFlags");
22787 0 : return -1;
22788 : }
22789 : {
22790 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwFlags));
22791 0 : if (PyLong_Check(value)) {
22792 0 : unsigned long long test_var;
22793 0 : test_var = PyLong_AsUnsignedLongLong(value);
22794 0 : if (PyErr_Occurred() != NULL) {
22795 0 : return -1;
22796 : }
22797 0 : if (test_var > uint_max) {
22798 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22799 : PyLong_Type.tp_name, uint_max, test_var);
22800 0 : return -1;
22801 : }
22802 0 : object->dwFlags = test_var;
22803 : } else {
22804 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22805 : PyLong_Type.tp_name);
22806 0 : return -1;
22807 : }
22808 : }
22809 0 : return 0;
22810 : }
22811 :
22812 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszDataFile(PyObject *obj, void *closure)
22813 : {
22814 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
22815 0 : PyObject *py_pszDataFile;
22816 0 : if (object->pszDataFile == NULL) {
22817 0 : Py_RETURN_NONE;
22818 : }
22819 0 : if (object->pszDataFile == NULL) {
22820 0 : py_pszDataFile = Py_None;
22821 0 : Py_INCREF(py_pszDataFile);
22822 : } else {
22823 0 : if (object->pszDataFile == NULL) {
22824 0 : py_pszDataFile = Py_None;
22825 0 : Py_INCREF(py_pszDataFile);
22826 : } else {
22827 0 : py_pszDataFile = PyUnicode_Decode(object->pszDataFile, strlen(object->pszDataFile), "utf-8", "ignore");
22828 : }
22829 : }
22830 0 : return py_pszDataFile;
22831 : }
22832 :
22833 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszDataFile(PyObject *py_obj, PyObject *value, void *closure)
22834 : {
22835 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
22836 0 : if (value == NULL) {
22837 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDataFile");
22838 0 : return -1;
22839 : }
22840 0 : if (value == Py_None) {
22841 0 : object->pszDataFile = NULL;
22842 : } else {
22843 0 : object->pszDataFile = NULL;
22844 : {
22845 0 : const char *test_str;
22846 0 : const char *talloc_str;
22847 0 : PyObject *unicode = NULL;
22848 0 : if (PyUnicode_Check(value)) {
22849 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
22850 0 : if (unicode == NULL) {
22851 0 : return -1;
22852 : }
22853 0 : test_str = PyBytes_AS_STRING(unicode);
22854 0 : } else if (PyBytes_Check(value)) {
22855 0 : test_str = PyBytes_AS_STRING(value);
22856 : } else {
22857 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
22858 0 : return -1;
22859 : }
22860 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
22861 0 : if (unicode != NULL) {
22862 0 : Py_DECREF(unicode);
22863 : }
22864 0 : if (talloc_str == NULL) {
22865 0 : PyErr_NoMemory();
22866 0 : return -1;
22867 : }
22868 0 : object->pszDataFile = talloc_str;
22869 : }
22870 : }
22871 0 : return 0;
22872 : }
22873 :
22874 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fDsIntegrated(PyObject *obj, void *closure)
22875 : {
22876 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
22877 0 : PyObject *py_fDsIntegrated;
22878 0 : py_fDsIntegrated = PyLong_FromUnsignedLongLong((uint32_t)(object->fDsIntegrated));
22879 0 : return py_fDsIntegrated;
22880 : }
22881 :
22882 424 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fDsIntegrated(PyObject *py_obj, PyObject *value, void *closure)
22883 : {
22884 424 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
22885 424 : if (value == NULL) {
22886 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fDsIntegrated");
22887 0 : return -1;
22888 : }
22889 : {
22890 424 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDsIntegrated));
22891 424 : if (PyLong_Check(value)) {
22892 0 : unsigned long long test_var;
22893 424 : test_var = PyLong_AsUnsignedLongLong(value);
22894 424 : if (PyErr_Occurred() != NULL) {
22895 0 : return -1;
22896 : }
22897 424 : if (test_var > uint_max) {
22898 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22899 : PyLong_Type.tp_name, uint_max, test_var);
22900 0 : return -1;
22901 : }
22902 424 : object->fDsIntegrated = test_var;
22903 : } else {
22904 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22905 : PyLong_Type.tp_name);
22906 0 : return -1;
22907 : }
22908 : }
22909 424 : return 0;
22910 : }
22911 :
22912 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fLoadExisting(PyObject *obj, void *closure)
22913 : {
22914 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
22915 0 : PyObject *py_fLoadExisting;
22916 0 : py_fLoadExisting = PyLong_FromUnsignedLongLong((uint32_t)(object->fLoadExisting));
22917 0 : return py_fLoadExisting;
22918 : }
22919 :
22920 424 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fLoadExisting(PyObject *py_obj, PyObject *value, void *closure)
22921 : {
22922 424 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
22923 424 : if (value == NULL) {
22924 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fLoadExisting");
22925 0 : return -1;
22926 : }
22927 : {
22928 424 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fLoadExisting));
22929 424 : if (PyLong_Check(value)) {
22930 0 : unsigned long long test_var;
22931 424 : test_var = PyLong_AsUnsignedLongLong(value);
22932 424 : if (PyErr_Occurred() != NULL) {
22933 0 : return -1;
22934 : }
22935 424 : if (test_var > uint_max) {
22936 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22937 : PyLong_Type.tp_name, uint_max, test_var);
22938 0 : return -1;
22939 : }
22940 424 : object->fLoadExisting = test_var;
22941 : } else {
22942 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22943 : PyLong_Type.tp_name);
22944 0 : return -1;
22945 : }
22946 : }
22947 424 : return 0;
22948 : }
22949 :
22950 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszAdmin(PyObject *obj, void *closure)
22951 : {
22952 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
22953 0 : PyObject *py_pszAdmin;
22954 0 : if (object->pszAdmin == NULL) {
22955 0 : Py_RETURN_NONE;
22956 : }
22957 0 : if (object->pszAdmin == NULL) {
22958 0 : py_pszAdmin = Py_None;
22959 0 : Py_INCREF(py_pszAdmin);
22960 : } else {
22961 0 : if (object->pszAdmin == NULL) {
22962 0 : py_pszAdmin = Py_None;
22963 0 : Py_INCREF(py_pszAdmin);
22964 : } else {
22965 0 : py_pszAdmin = PyUnicode_Decode(object->pszAdmin, strlen(object->pszAdmin), "utf-8", "ignore");
22966 : }
22967 : }
22968 0 : return py_pszAdmin;
22969 : }
22970 :
22971 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszAdmin(PyObject *py_obj, PyObject *value, void *closure)
22972 : {
22973 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
22974 0 : if (value == NULL) {
22975 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszAdmin");
22976 0 : return -1;
22977 : }
22978 0 : if (value == Py_None) {
22979 0 : object->pszAdmin = NULL;
22980 : } else {
22981 0 : object->pszAdmin = NULL;
22982 : {
22983 0 : const char *test_str;
22984 0 : const char *talloc_str;
22985 0 : PyObject *unicode = NULL;
22986 0 : if (PyUnicode_Check(value)) {
22987 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
22988 0 : if (unicode == NULL) {
22989 0 : return -1;
22990 : }
22991 0 : test_str = PyBytes_AS_STRING(unicode);
22992 0 : } else if (PyBytes_Check(value)) {
22993 0 : test_str = PyBytes_AS_STRING(value);
22994 : } else {
22995 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
22996 0 : return -1;
22997 : }
22998 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
22999 0 : if (unicode != NULL) {
23000 0 : Py_DECREF(unicode);
23001 : }
23002 0 : if (talloc_str == NULL) {
23003 0 : PyErr_NoMemory();
23004 0 : return -1;
23005 : }
23006 0 : object->pszAdmin = talloc_str;
23007 : }
23008 : }
23009 0 : return 0;
23010 : }
23011 :
23012 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_aipMasters(PyObject *obj, void *closure)
23013 : {
23014 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
23015 0 : PyObject *py_aipMasters;
23016 0 : if (object->aipMasters == NULL) {
23017 0 : Py_RETURN_NONE;
23018 : }
23019 0 : if (object->aipMasters == NULL) {
23020 0 : py_aipMasters = Py_None;
23021 0 : Py_INCREF(py_aipMasters);
23022 : } else {
23023 0 : py_aipMasters = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipMasters, object->aipMasters);
23024 : }
23025 0 : return py_aipMasters;
23026 : }
23027 :
23028 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_aipMasters(PyObject *py_obj, PyObject *value, void *closure)
23029 : {
23030 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
23031 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipMasters));
23032 0 : if (value == NULL) {
23033 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipMasters");
23034 0 : return -1;
23035 : }
23036 0 : if (value == Py_None) {
23037 0 : object->aipMasters = NULL;
23038 : } else {
23039 0 : object->aipMasters = NULL;
23040 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
23041 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
23042 0 : PyErr_NoMemory();
23043 0 : return -1;
23044 : }
23045 0 : object->aipMasters = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
23046 : }
23047 0 : return 0;
23048 : }
23049 :
23050 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_aipSecondaries(PyObject *obj, void *closure)
23051 : {
23052 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
23053 0 : PyObject *py_aipSecondaries;
23054 0 : if (object->aipSecondaries == NULL) {
23055 0 : Py_RETURN_NONE;
23056 : }
23057 0 : if (object->aipSecondaries == NULL) {
23058 0 : py_aipSecondaries = Py_None;
23059 0 : Py_INCREF(py_aipSecondaries);
23060 : } else {
23061 0 : py_aipSecondaries = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
23062 : }
23063 0 : return py_aipSecondaries;
23064 : }
23065 :
23066 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
23067 : {
23068 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
23069 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipSecondaries));
23070 0 : if (value == NULL) {
23071 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipSecondaries");
23072 0 : return -1;
23073 : }
23074 0 : if (value == Py_None) {
23075 0 : object->aipSecondaries = NULL;
23076 : } else {
23077 0 : object->aipSecondaries = NULL;
23078 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
23079 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
23080 0 : PyErr_NoMemory();
23081 0 : return -1;
23082 : }
23083 0 : object->aipSecondaries = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
23084 : }
23085 0 : return 0;
23086 : }
23087 :
23088 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fSecureSecondaries(PyObject *obj, void *closure)
23089 : {
23090 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
23091 0 : PyObject *py_fSecureSecondaries;
23092 0 : py_fSecureSecondaries = PyLong_FromUnsignedLongLong((uint32_t)(object->fSecureSecondaries));
23093 0 : return py_fSecureSecondaries;
23094 : }
23095 :
23096 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
23097 : {
23098 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
23099 0 : if (value == NULL) {
23100 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fSecureSecondaries");
23101 0 : return -1;
23102 : }
23103 : {
23104 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureSecondaries));
23105 0 : if (PyLong_Check(value)) {
23106 0 : unsigned long long test_var;
23107 0 : test_var = PyLong_AsUnsignedLongLong(value);
23108 0 : if (PyErr_Occurred() != NULL) {
23109 0 : return -1;
23110 : }
23111 0 : if (test_var > uint_max) {
23112 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23113 : PyLong_Type.tp_name, uint_max, test_var);
23114 0 : return -1;
23115 : }
23116 0 : object->fSecureSecondaries = test_var;
23117 : } else {
23118 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23119 : PyLong_Type.tp_name);
23120 0 : return -1;
23121 : }
23122 : }
23123 0 : return 0;
23124 : }
23125 :
23126 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fNotifyLevel(PyObject *obj, void *closure)
23127 : {
23128 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
23129 0 : PyObject *py_fNotifyLevel;
23130 0 : py_fNotifyLevel = PyLong_FromUnsignedLongLong((uint32_t)(object->fNotifyLevel));
23131 0 : return py_fNotifyLevel;
23132 : }
23133 :
23134 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
23135 : {
23136 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
23137 0 : if (value == NULL) {
23138 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fNotifyLevel");
23139 0 : return -1;
23140 : }
23141 : {
23142 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNotifyLevel));
23143 0 : if (PyLong_Check(value)) {
23144 0 : unsigned long long test_var;
23145 0 : test_var = PyLong_AsUnsignedLongLong(value);
23146 0 : if (PyErr_Occurred() != NULL) {
23147 0 : return -1;
23148 : }
23149 0 : if (test_var > uint_max) {
23150 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23151 : PyLong_Type.tp_name, uint_max, test_var);
23152 0 : return -1;
23153 : }
23154 0 : object->fNotifyLevel = test_var;
23155 : } else {
23156 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23157 : PyLong_Type.tp_name);
23158 0 : return -1;
23159 : }
23160 : }
23161 0 : return 0;
23162 : }
23163 :
23164 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwTimeout(PyObject *obj, void *closure)
23165 : {
23166 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
23167 0 : PyObject *py_dwTimeout;
23168 0 : py_dwTimeout = PyLong_FromUnsignedLongLong((uint32_t)(object->dwTimeout));
23169 0 : return py_dwTimeout;
23170 : }
23171 :
23172 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwTimeout(PyObject *py_obj, PyObject *value, void *closure)
23173 : {
23174 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
23175 0 : if (value == NULL) {
23176 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwTimeout");
23177 0 : return -1;
23178 : }
23179 : {
23180 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwTimeout));
23181 0 : if (PyLong_Check(value)) {
23182 0 : unsigned long long test_var;
23183 0 : test_var = PyLong_AsUnsignedLongLong(value);
23184 0 : if (PyErr_Occurred() != NULL) {
23185 0 : return -1;
23186 : }
23187 0 : if (test_var > uint_max) {
23188 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23189 : PyLong_Type.tp_name, uint_max, test_var);
23190 0 : return -1;
23191 : }
23192 0 : object->dwTimeout = test_var;
23193 : } else {
23194 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23195 : PyLong_Type.tp_name);
23196 0 : return -1;
23197 : }
23198 : }
23199 0 : return 0;
23200 : }
23201 :
23202 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
23203 : {
23204 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
23205 0 : PyObject *py_fRecurseAfterForwarding;
23206 0 : py_fRecurseAfterForwarding = PyLong_FromUnsignedLongLong((uint32_t)(object->fRecurseAfterForwarding));
23207 0 : return py_fRecurseAfterForwarding;
23208 : }
23209 :
23210 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
23211 : {
23212 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
23213 0 : if (value == NULL) {
23214 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fRecurseAfterForwarding");
23215 0 : return -1;
23216 : }
23217 : {
23218 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRecurseAfterForwarding));
23219 0 : if (PyLong_Check(value)) {
23220 0 : unsigned long long test_var;
23221 0 : test_var = PyLong_AsUnsignedLongLong(value);
23222 0 : if (PyErr_Occurred() != NULL) {
23223 0 : return -1;
23224 : }
23225 0 : if (test_var > uint_max) {
23226 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23227 : PyLong_Type.tp_name, uint_max, test_var);
23228 0 : return -1;
23229 : }
23230 0 : object->fRecurseAfterForwarding = test_var;
23231 : } else {
23232 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23233 : PyLong_Type.tp_name);
23234 0 : return -1;
23235 : }
23236 : }
23237 0 : return 0;
23238 : }
23239 :
23240 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwDpFlags(PyObject *obj, void *closure)
23241 : {
23242 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
23243 0 : PyObject *py_dwDpFlags;
23244 0 : py_dwDpFlags = PyLong_FromUnsignedLongLong((uint32_t)(object->dwDpFlags));
23245 0 : return py_dwDpFlags;
23246 : }
23247 :
23248 427 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwDpFlags(PyObject *py_obj, PyObject *value, void *closure)
23249 : {
23250 427 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
23251 427 : if (value == NULL) {
23252 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwDpFlags");
23253 0 : return -1;
23254 : }
23255 : {
23256 427 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDpFlags));
23257 427 : if (PyLong_Check(value)) {
23258 0 : unsigned long long test_var;
23259 427 : test_var = PyLong_AsUnsignedLongLong(value);
23260 427 : if (PyErr_Occurred() != NULL) {
23261 0 : return -1;
23262 : }
23263 427 : if (test_var > uint_max) {
23264 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23265 : PyLong_Type.tp_name, uint_max, test_var);
23266 0 : return -1;
23267 : }
23268 427 : object->dwDpFlags = test_var;
23269 : } else {
23270 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23271 : PyLong_Type.tp_name);
23272 0 : return -1;
23273 : }
23274 : }
23275 427 : return 0;
23276 : }
23277 :
23278 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszDpFqdn(PyObject *obj, void *closure)
23279 : {
23280 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
23281 0 : PyObject *py_pszDpFqdn;
23282 0 : if (object->pszDpFqdn == NULL) {
23283 0 : Py_RETURN_NONE;
23284 : }
23285 0 : if (object->pszDpFqdn == NULL) {
23286 0 : py_pszDpFqdn = Py_None;
23287 0 : Py_INCREF(py_pszDpFqdn);
23288 : } else {
23289 0 : if (object->pszDpFqdn == NULL) {
23290 0 : py_pszDpFqdn = Py_None;
23291 0 : Py_INCREF(py_pszDpFqdn);
23292 : } else {
23293 0 : py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
23294 : }
23295 : }
23296 0 : return py_pszDpFqdn;
23297 : }
23298 :
23299 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
23300 : {
23301 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
23302 0 : if (value == NULL) {
23303 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszDpFqdn");
23304 0 : return -1;
23305 : }
23306 0 : if (value == Py_None) {
23307 0 : object->pszDpFqdn = NULL;
23308 : } else {
23309 0 : object->pszDpFqdn = NULL;
23310 : {
23311 0 : const char *test_str;
23312 0 : const char *talloc_str;
23313 0 : PyObject *unicode = NULL;
23314 0 : if (PyUnicode_Check(value)) {
23315 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
23316 0 : if (unicode == NULL) {
23317 0 : return -1;
23318 : }
23319 0 : test_str = PyBytes_AS_STRING(unicode);
23320 0 : } else if (PyBytes_Check(value)) {
23321 0 : test_str = PyBytes_AS_STRING(value);
23322 : } else {
23323 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
23324 0 : return -1;
23325 : }
23326 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
23327 0 : if (unicode != NULL) {
23328 0 : Py_DECREF(unicode);
23329 : }
23330 0 : if (talloc_str == NULL) {
23331 0 : PyErr_NoMemory();
23332 0 : return -1;
23333 : }
23334 0 : object->pszDpFqdn = talloc_str;
23335 : }
23336 : }
23337 0 : return 0;
23338 : }
23339 :
23340 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwReserved(PyObject *obj, void *closure)
23341 : {
23342 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(obj);
23343 0 : PyObject *py_dwReserved;
23344 0 : py_dwReserved = PyList_New(32);
23345 0 : if (py_dwReserved == NULL) {
23346 0 : return NULL;
23347 : }
23348 : {
23349 : int dwReserved_cntr_0;
23350 0 : for (dwReserved_cntr_0 = 0; dwReserved_cntr_0 < (32); dwReserved_cntr_0++) {
23351 0 : PyObject *py_dwReserved_0;
23352 0 : py_dwReserved_0 = PyLong_FromUnsignedLongLong((uint32_t)((object->dwReserved)[dwReserved_cntr_0]));
23353 0 : PyList_SetItem(py_dwReserved, dwReserved_cntr_0, py_dwReserved_0);
23354 : }
23355 : }
23356 0 : return py_dwReserved;
23357 : }
23358 :
23359 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwReserved(PyObject *py_obj, PyObject *value, void *closure)
23360 : {
23361 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = pytalloc_get_ptr(py_obj);
23362 0 : if (value == NULL) {
23363 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved");
23364 0 : return -1;
23365 : }
23366 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
23367 : {
23368 0 : int dwReserved_cntr_0;
23369 0 : if (ARRAY_SIZE(object->dwReserved) != PyList_GET_SIZE(value)) {
23370 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));
23371 0 : return -1;
23372 : }
23373 0 : for (dwReserved_cntr_0 = 0; dwReserved_cntr_0 < PyList_GET_SIZE(value); dwReserved_cntr_0++) {
23374 0 : if (PyList_GET_ITEM(value, dwReserved_cntr_0) == NULL) {
23375 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->dwReserved)[dwReserved_cntr_0]");
23376 0 : return -1;
23377 : }
23378 : {
23379 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->dwReserved)[dwReserved_cntr_0]));
23380 0 : if (PyLong_Check(PyList_GET_ITEM(value, dwReserved_cntr_0))) {
23381 0 : unsigned long long test_var;
23382 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, dwReserved_cntr_0));
23383 0 : if (PyErr_Occurred() != NULL) {
23384 0 : return -1;
23385 : }
23386 0 : if (test_var > uint_max) {
23387 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23388 : PyLong_Type.tp_name, uint_max, test_var);
23389 0 : return -1;
23390 : }
23391 0 : (object->dwReserved)[dwReserved_cntr_0] = test_var;
23392 : } else {
23393 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23394 : PyLong_Type.tp_name);
23395 0 : return -1;
23396 : }
23397 : }
23398 : }
23399 : }
23400 0 : return 0;
23401 : }
23402 :
23403 : static PyGetSetDef py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_getsetters[] = {
23404 : {
23405 : .name = discard_const_p(char, "dwRpcStructureVersion"),
23406 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwRpcStructureVersion,
23407 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwRpcStructureVersion,
23408 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23409 : },
23410 : {
23411 : .name = discard_const_p(char, "dwReserved0"),
23412 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwReserved0,
23413 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwReserved0,
23414 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23415 : },
23416 : {
23417 : .name = discard_const_p(char, "pszZoneName"),
23418 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszZoneName,
23419 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszZoneName,
23420 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
23421 : },
23422 : {
23423 : .name = discard_const_p(char, "dwZoneType"),
23424 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwZoneType,
23425 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwZoneType,
23426 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23427 : },
23428 : {
23429 : .name = discard_const_p(char, "fAllowUpdate"),
23430 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fAllowUpdate,
23431 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fAllowUpdate,
23432 : .doc = discard_const_p(char, "PIDL-generated element of base type dns_zone_update")
23433 : },
23434 : {
23435 : .name = discard_const_p(char, "fAging"),
23436 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fAging,
23437 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fAging,
23438 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23439 : },
23440 : {
23441 : .name = discard_const_p(char, "dwFlags"),
23442 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwFlags,
23443 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwFlags,
23444 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23445 : },
23446 : {
23447 : .name = discard_const_p(char, "pszDataFile"),
23448 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszDataFile,
23449 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszDataFile,
23450 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
23451 : },
23452 : {
23453 : .name = discard_const_p(char, "fDsIntegrated"),
23454 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fDsIntegrated,
23455 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fDsIntegrated,
23456 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23457 : },
23458 : {
23459 : .name = discard_const_p(char, "fLoadExisting"),
23460 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fLoadExisting,
23461 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fLoadExisting,
23462 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23463 : },
23464 : {
23465 : .name = discard_const_p(char, "pszAdmin"),
23466 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszAdmin,
23467 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszAdmin,
23468 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
23469 : },
23470 : {
23471 : .name = discard_const_p(char, "aipMasters"),
23472 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_aipMasters,
23473 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_aipMasters,
23474 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
23475 : },
23476 : {
23477 : .name = discard_const_p(char, "aipSecondaries"),
23478 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_aipSecondaries,
23479 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_aipSecondaries,
23480 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
23481 : },
23482 : {
23483 : .name = discard_const_p(char, "fSecureSecondaries"),
23484 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fSecureSecondaries,
23485 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fSecureSecondaries,
23486 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_SECONDARY_SECURITY")
23487 : },
23488 : {
23489 : .name = discard_const_p(char, "fNotifyLevel"),
23490 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fNotifyLevel,
23491 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fNotifyLevel,
23492 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_NOTIFY_LEVEL")
23493 : },
23494 : {
23495 : .name = discard_const_p(char, "dwTimeout"),
23496 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwTimeout,
23497 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwTimeout,
23498 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23499 : },
23500 : {
23501 : .name = discard_const_p(char, "fRecurseAfterForwarding"),
23502 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fRecurseAfterForwarding,
23503 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fRecurseAfterForwarding,
23504 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23505 : },
23506 : {
23507 : .name = discard_const_p(char, "dwDpFlags"),
23508 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwDpFlags,
23509 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwDpFlags,
23510 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23511 : },
23512 : {
23513 : .name = discard_const_p(char, "pszDpFqdn"),
23514 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszDpFqdn,
23515 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszDpFqdn,
23516 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
23517 : },
23518 : {
23519 : .name = discard_const_p(char, "dwReserved"),
23520 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwReserved,
23521 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwReserved,
23522 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23523 : },
23524 : { .name = NULL }
23525 : };
23526 :
23527 427 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23528 : {
23529 427 : return pytalloc_new(struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN, type);
23530 : }
23531 :
23532 :
23533 : static PyTypeObject DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type = {
23534 : PyVarObject_HEAD_INIT(NULL, 0)
23535 : .tp_name = "dnsserver.DNS_RPC_ZONE_CREATE_INFO_LONGHORN",
23536 : .tp_getset = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_getsetters,
23537 : .tp_methods = NULL,
23538 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
23539 : .tp_new = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_new,
23540 : };
23541 :
23542 :
23543 0 : static PyObject *py_DNS_RPC_ZONE_EXPORT_INFO_get_dwRpcStructureVersion(PyObject *obj, void *closure)
23544 : {
23545 0 : struct DNS_RPC_ZONE_EXPORT_INFO *object = pytalloc_get_ptr(obj);
23546 0 : PyObject *py_dwRpcStructureVersion;
23547 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
23548 0 : return py_dwRpcStructureVersion;
23549 : }
23550 :
23551 0 : static int py_DNS_RPC_ZONE_EXPORT_INFO_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
23552 : {
23553 0 : struct DNS_RPC_ZONE_EXPORT_INFO *object = pytalloc_get_ptr(py_obj);
23554 0 : if (value == NULL) {
23555 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
23556 0 : return -1;
23557 : }
23558 : {
23559 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
23560 0 : if (PyLong_Check(value)) {
23561 0 : unsigned long long test_var;
23562 0 : test_var = PyLong_AsUnsignedLongLong(value);
23563 0 : if (PyErr_Occurred() != NULL) {
23564 0 : return -1;
23565 : }
23566 0 : if (test_var > uint_max) {
23567 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23568 : PyLong_Type.tp_name, uint_max, test_var);
23569 0 : return -1;
23570 : }
23571 0 : object->dwRpcStructureVersion = test_var;
23572 : } else {
23573 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23574 : PyLong_Type.tp_name);
23575 0 : return -1;
23576 : }
23577 : }
23578 0 : return 0;
23579 : }
23580 :
23581 0 : static PyObject *py_DNS_RPC_ZONE_EXPORT_INFO_get_dwReserved0(PyObject *obj, void *closure)
23582 : {
23583 0 : struct DNS_RPC_ZONE_EXPORT_INFO *object = pytalloc_get_ptr(obj);
23584 0 : PyObject *py_dwReserved0;
23585 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
23586 0 : return py_dwReserved0;
23587 : }
23588 :
23589 0 : static int py_DNS_RPC_ZONE_EXPORT_INFO_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
23590 : {
23591 0 : struct DNS_RPC_ZONE_EXPORT_INFO *object = pytalloc_get_ptr(py_obj);
23592 0 : if (value == NULL) {
23593 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
23594 0 : return -1;
23595 : }
23596 : {
23597 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
23598 0 : if (PyLong_Check(value)) {
23599 0 : unsigned long long test_var;
23600 0 : test_var = PyLong_AsUnsignedLongLong(value);
23601 0 : if (PyErr_Occurred() != NULL) {
23602 0 : return -1;
23603 : }
23604 0 : if (test_var > uint_max) {
23605 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23606 : PyLong_Type.tp_name, uint_max, test_var);
23607 0 : return -1;
23608 : }
23609 0 : object->dwReserved0 = test_var;
23610 : } else {
23611 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23612 : PyLong_Type.tp_name);
23613 0 : return -1;
23614 : }
23615 : }
23616 0 : return 0;
23617 : }
23618 :
23619 0 : static PyObject *py_DNS_RPC_ZONE_EXPORT_INFO_get_pszZoneExportFile(PyObject *obj, void *closure)
23620 : {
23621 0 : struct DNS_RPC_ZONE_EXPORT_INFO *object = pytalloc_get_ptr(obj);
23622 0 : PyObject *py_pszZoneExportFile;
23623 0 : if (object->pszZoneExportFile == NULL) {
23624 0 : Py_RETURN_NONE;
23625 : }
23626 0 : if (object->pszZoneExportFile == NULL) {
23627 0 : py_pszZoneExportFile = Py_None;
23628 0 : Py_INCREF(py_pszZoneExportFile);
23629 : } else {
23630 0 : if (object->pszZoneExportFile == NULL) {
23631 0 : py_pszZoneExportFile = Py_None;
23632 0 : Py_INCREF(py_pszZoneExportFile);
23633 : } else {
23634 0 : py_pszZoneExportFile = PyUnicode_Decode(object->pszZoneExportFile, strlen(object->pszZoneExportFile), "utf-8", "ignore");
23635 : }
23636 : }
23637 0 : return py_pszZoneExportFile;
23638 : }
23639 :
23640 0 : static int py_DNS_RPC_ZONE_EXPORT_INFO_set_pszZoneExportFile(PyObject *py_obj, PyObject *value, void *closure)
23641 : {
23642 0 : struct DNS_RPC_ZONE_EXPORT_INFO *object = pytalloc_get_ptr(py_obj);
23643 0 : if (value == NULL) {
23644 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszZoneExportFile");
23645 0 : return -1;
23646 : }
23647 0 : if (value == Py_None) {
23648 0 : object->pszZoneExportFile = NULL;
23649 : } else {
23650 0 : object->pszZoneExportFile = NULL;
23651 : {
23652 0 : const char *test_str;
23653 0 : const char *talloc_str;
23654 0 : PyObject *unicode = NULL;
23655 0 : if (PyUnicode_Check(value)) {
23656 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
23657 0 : if (unicode == NULL) {
23658 0 : return -1;
23659 : }
23660 0 : test_str = PyBytes_AS_STRING(unicode);
23661 0 : } else if (PyBytes_Check(value)) {
23662 0 : test_str = PyBytes_AS_STRING(value);
23663 : } else {
23664 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
23665 0 : return -1;
23666 : }
23667 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
23668 0 : if (unicode != NULL) {
23669 0 : Py_DECREF(unicode);
23670 : }
23671 0 : if (talloc_str == NULL) {
23672 0 : PyErr_NoMemory();
23673 0 : return -1;
23674 : }
23675 0 : object->pszZoneExportFile = talloc_str;
23676 : }
23677 : }
23678 0 : return 0;
23679 : }
23680 :
23681 : static PyGetSetDef py_DNS_RPC_ZONE_EXPORT_INFO_getsetters[] = {
23682 : {
23683 : .name = discard_const_p(char, "dwRpcStructureVersion"),
23684 : .get = py_DNS_RPC_ZONE_EXPORT_INFO_get_dwRpcStructureVersion,
23685 : .set = py_DNS_RPC_ZONE_EXPORT_INFO_set_dwRpcStructureVersion,
23686 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23687 : },
23688 : {
23689 : .name = discard_const_p(char, "dwReserved0"),
23690 : .get = py_DNS_RPC_ZONE_EXPORT_INFO_get_dwReserved0,
23691 : .set = py_DNS_RPC_ZONE_EXPORT_INFO_set_dwReserved0,
23692 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23693 : },
23694 : {
23695 : .name = discard_const_p(char, "pszZoneExportFile"),
23696 : .get = py_DNS_RPC_ZONE_EXPORT_INFO_get_pszZoneExportFile,
23697 : .set = py_DNS_RPC_ZONE_EXPORT_INFO_set_pszZoneExportFile,
23698 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
23699 : },
23700 : { .name = NULL }
23701 : };
23702 :
23703 0 : static PyObject *py_DNS_RPC_ZONE_EXPORT_INFO_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23704 : {
23705 0 : return pytalloc_new(struct DNS_RPC_ZONE_EXPORT_INFO, type);
23706 : }
23707 :
23708 :
23709 : static PyTypeObject DNS_RPC_ZONE_EXPORT_INFO_Type = {
23710 : PyVarObject_HEAD_INIT(NULL, 0)
23711 : .tp_name = "dnsserver.DNS_RPC_ZONE_EXPORT_INFO",
23712 : .tp_getset = py_DNS_RPC_ZONE_EXPORT_INFO_getsetters,
23713 : .tp_methods = NULL,
23714 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
23715 : .tp_new = py_DNS_RPC_ZONE_EXPORT_INFO_new,
23716 : };
23717 :
23718 :
23719 0 : static PyObject *py_DNS_RPC_ENUM_ZONES_FILTER_get_dwRpcStructureVersion(PyObject *obj, void *closure)
23720 : {
23721 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = pytalloc_get_ptr(obj);
23722 0 : PyObject *py_dwRpcStructureVersion;
23723 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
23724 0 : return py_dwRpcStructureVersion;
23725 : }
23726 :
23727 0 : static int py_DNS_RPC_ENUM_ZONES_FILTER_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
23728 : {
23729 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = pytalloc_get_ptr(py_obj);
23730 0 : if (value == NULL) {
23731 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
23732 0 : return -1;
23733 : }
23734 : {
23735 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
23736 0 : if (PyLong_Check(value)) {
23737 0 : unsigned long long test_var;
23738 0 : test_var = PyLong_AsUnsignedLongLong(value);
23739 0 : if (PyErr_Occurred() != NULL) {
23740 0 : return -1;
23741 : }
23742 0 : if (test_var > uint_max) {
23743 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23744 : PyLong_Type.tp_name, uint_max, test_var);
23745 0 : return -1;
23746 : }
23747 0 : object->dwRpcStructureVersion = test_var;
23748 : } else {
23749 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23750 : PyLong_Type.tp_name);
23751 0 : return -1;
23752 : }
23753 : }
23754 0 : return 0;
23755 : }
23756 :
23757 0 : static PyObject *py_DNS_RPC_ENUM_ZONES_FILTER_get_dwReserved0(PyObject *obj, void *closure)
23758 : {
23759 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = pytalloc_get_ptr(obj);
23760 0 : PyObject *py_dwReserved0;
23761 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
23762 0 : return py_dwReserved0;
23763 : }
23764 :
23765 0 : static int py_DNS_RPC_ENUM_ZONES_FILTER_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
23766 : {
23767 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = pytalloc_get_ptr(py_obj);
23768 0 : if (value == NULL) {
23769 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
23770 0 : return -1;
23771 : }
23772 : {
23773 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
23774 0 : if (PyLong_Check(value)) {
23775 0 : unsigned long long test_var;
23776 0 : test_var = PyLong_AsUnsignedLongLong(value);
23777 0 : if (PyErr_Occurred() != NULL) {
23778 0 : return -1;
23779 : }
23780 0 : if (test_var > uint_max) {
23781 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23782 : PyLong_Type.tp_name, uint_max, test_var);
23783 0 : return -1;
23784 : }
23785 0 : object->dwReserved0 = test_var;
23786 : } else {
23787 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23788 : PyLong_Type.tp_name);
23789 0 : return -1;
23790 : }
23791 : }
23792 0 : return 0;
23793 : }
23794 :
23795 0 : static PyObject *py_DNS_RPC_ENUM_ZONES_FILTER_get_dwFilter(PyObject *obj, void *closure)
23796 : {
23797 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = pytalloc_get_ptr(obj);
23798 0 : PyObject *py_dwFilter;
23799 0 : py_dwFilter = PyLong_FromUnsignedLongLong((uint32_t)(object->dwFilter));
23800 0 : return py_dwFilter;
23801 : }
23802 :
23803 0 : static int py_DNS_RPC_ENUM_ZONES_FILTER_set_dwFilter(PyObject *py_obj, PyObject *value, void *closure)
23804 : {
23805 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = pytalloc_get_ptr(py_obj);
23806 0 : if (value == NULL) {
23807 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwFilter");
23808 0 : return -1;
23809 : }
23810 : {
23811 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwFilter));
23812 0 : if (PyLong_Check(value)) {
23813 0 : unsigned long long test_var;
23814 0 : test_var = PyLong_AsUnsignedLongLong(value);
23815 0 : if (PyErr_Occurred() != NULL) {
23816 0 : return -1;
23817 : }
23818 0 : if (test_var > uint_max) {
23819 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23820 : PyLong_Type.tp_name, uint_max, test_var);
23821 0 : return -1;
23822 : }
23823 0 : object->dwFilter = test_var;
23824 : } else {
23825 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23826 : PyLong_Type.tp_name);
23827 0 : return -1;
23828 : }
23829 : }
23830 0 : return 0;
23831 : }
23832 :
23833 0 : static PyObject *py_DNS_RPC_ENUM_ZONES_FILTER_get_pszPartitionFqdn(PyObject *obj, void *closure)
23834 : {
23835 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = pytalloc_get_ptr(obj);
23836 0 : PyObject *py_pszPartitionFqdn;
23837 0 : if (object->pszPartitionFqdn == NULL) {
23838 0 : Py_RETURN_NONE;
23839 : }
23840 0 : if (object->pszPartitionFqdn == NULL) {
23841 0 : py_pszPartitionFqdn = Py_None;
23842 0 : Py_INCREF(py_pszPartitionFqdn);
23843 : } else {
23844 0 : if (object->pszPartitionFqdn == NULL) {
23845 0 : py_pszPartitionFqdn = Py_None;
23846 0 : Py_INCREF(py_pszPartitionFqdn);
23847 : } else {
23848 0 : py_pszPartitionFqdn = PyUnicode_Decode(object->pszPartitionFqdn, strlen(object->pszPartitionFqdn), "utf-8", "ignore");
23849 : }
23850 : }
23851 0 : return py_pszPartitionFqdn;
23852 : }
23853 :
23854 0 : static int py_DNS_RPC_ENUM_ZONES_FILTER_set_pszPartitionFqdn(PyObject *py_obj, PyObject *value, void *closure)
23855 : {
23856 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = pytalloc_get_ptr(py_obj);
23857 0 : if (value == NULL) {
23858 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszPartitionFqdn");
23859 0 : return -1;
23860 : }
23861 0 : if (value == Py_None) {
23862 0 : object->pszPartitionFqdn = NULL;
23863 : } else {
23864 0 : object->pszPartitionFqdn = NULL;
23865 : {
23866 0 : const char *test_str;
23867 0 : const char *talloc_str;
23868 0 : PyObject *unicode = NULL;
23869 0 : if (PyUnicode_Check(value)) {
23870 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
23871 0 : if (unicode == NULL) {
23872 0 : return -1;
23873 : }
23874 0 : test_str = PyBytes_AS_STRING(unicode);
23875 0 : } else if (PyBytes_Check(value)) {
23876 0 : test_str = PyBytes_AS_STRING(value);
23877 : } else {
23878 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
23879 0 : return -1;
23880 : }
23881 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
23882 0 : if (unicode != NULL) {
23883 0 : Py_DECREF(unicode);
23884 : }
23885 0 : if (talloc_str == NULL) {
23886 0 : PyErr_NoMemory();
23887 0 : return -1;
23888 : }
23889 0 : object->pszPartitionFqdn = talloc_str;
23890 : }
23891 : }
23892 0 : return 0;
23893 : }
23894 :
23895 0 : static PyObject *py_DNS_RPC_ENUM_ZONES_FILTER_get_pszQueryString(PyObject *obj, void *closure)
23896 : {
23897 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = pytalloc_get_ptr(obj);
23898 0 : PyObject *py_pszQueryString;
23899 0 : if (object->pszQueryString == NULL) {
23900 0 : Py_RETURN_NONE;
23901 : }
23902 0 : if (object->pszQueryString == NULL) {
23903 0 : py_pszQueryString = Py_None;
23904 0 : Py_INCREF(py_pszQueryString);
23905 : } else {
23906 0 : if (object->pszQueryString == NULL) {
23907 0 : py_pszQueryString = Py_None;
23908 0 : Py_INCREF(py_pszQueryString);
23909 : } else {
23910 0 : py_pszQueryString = PyUnicode_Decode(object->pszQueryString, strlen(object->pszQueryString), "utf-8", "ignore");
23911 : }
23912 : }
23913 0 : return py_pszQueryString;
23914 : }
23915 :
23916 0 : static int py_DNS_RPC_ENUM_ZONES_FILTER_set_pszQueryString(PyObject *py_obj, PyObject *value, void *closure)
23917 : {
23918 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = pytalloc_get_ptr(py_obj);
23919 0 : if (value == NULL) {
23920 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszQueryString");
23921 0 : return -1;
23922 : }
23923 0 : if (value == Py_None) {
23924 0 : object->pszQueryString = NULL;
23925 : } else {
23926 0 : object->pszQueryString = NULL;
23927 : {
23928 0 : const char *test_str;
23929 0 : const char *talloc_str;
23930 0 : PyObject *unicode = NULL;
23931 0 : if (PyUnicode_Check(value)) {
23932 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
23933 0 : if (unicode == NULL) {
23934 0 : return -1;
23935 : }
23936 0 : test_str = PyBytes_AS_STRING(unicode);
23937 0 : } else if (PyBytes_Check(value)) {
23938 0 : test_str = PyBytes_AS_STRING(value);
23939 : } else {
23940 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
23941 0 : return -1;
23942 : }
23943 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
23944 0 : if (unicode != NULL) {
23945 0 : Py_DECREF(unicode);
23946 : }
23947 0 : if (talloc_str == NULL) {
23948 0 : PyErr_NoMemory();
23949 0 : return -1;
23950 : }
23951 0 : object->pszQueryString = talloc_str;
23952 : }
23953 : }
23954 0 : return 0;
23955 : }
23956 :
23957 0 : static PyObject *py_DNS_RPC_ENUM_ZONES_FILTER_get_pszReserved(PyObject *obj, void *closure)
23958 : {
23959 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = pytalloc_get_ptr(obj);
23960 0 : PyObject *py_pszReserved;
23961 0 : py_pszReserved = PyList_New(6);
23962 0 : if (py_pszReserved == NULL) {
23963 0 : return NULL;
23964 : }
23965 : {
23966 : int pszReserved_cntr_0;
23967 0 : for (pszReserved_cntr_0 = 0; pszReserved_cntr_0 < (6); pszReserved_cntr_0++) {
23968 0 : PyObject *py_pszReserved_0;
23969 0 : py_pszReserved_0 = pytalloc_reference_ex(&DNS_EXTENSION_Type, pytalloc_get_mem_ctx(obj), &(object->pszReserved)[pszReserved_cntr_0]);
23970 0 : PyList_SetItem(py_pszReserved, pszReserved_cntr_0, py_pszReserved_0);
23971 : }
23972 : }
23973 0 : return py_pszReserved;
23974 : }
23975 :
23976 0 : static int py_DNS_RPC_ENUM_ZONES_FILTER_set_pszReserved(PyObject *py_obj, PyObject *value, void *closure)
23977 : {
23978 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = pytalloc_get_ptr(py_obj);
23979 0 : if (value == NULL) {
23980 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszReserved");
23981 0 : return -1;
23982 : }
23983 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
23984 : {
23985 0 : int pszReserved_cntr_0;
23986 0 : if (ARRAY_SIZE(object->pszReserved) != PyList_GET_SIZE(value)) {
23987 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));
23988 0 : return -1;
23989 : }
23990 0 : for (pszReserved_cntr_0 = 0; pszReserved_cntr_0 < PyList_GET_SIZE(value); pszReserved_cntr_0++) {
23991 0 : if (PyList_GET_ITEM(value, pszReserved_cntr_0) == NULL) {
23992 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->pszReserved)[pszReserved_cntr_0]");
23993 0 : return -1;
23994 : }
23995 0 : PY_CHECK_TYPE(&DNS_EXTENSION_Type, PyList_GET_ITEM(value, pszReserved_cntr_0), return -1;);
23996 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(PyList_GET_ITEM(value, pszReserved_cntr_0))) == NULL) {
23997 0 : PyErr_NoMemory();
23998 0 : return -1;
23999 : }
24000 0 : (object->pszReserved)[pszReserved_cntr_0] = *(struct DNS_EXTENSION *)pytalloc_get_ptr(PyList_GET_ITEM(value, pszReserved_cntr_0));
24001 : }
24002 : }
24003 0 : return 0;
24004 : }
24005 :
24006 : static PyGetSetDef py_DNS_RPC_ENUM_ZONES_FILTER_getsetters[] = {
24007 : {
24008 : .name = discard_const_p(char, "dwRpcStructureVersion"),
24009 : .get = py_DNS_RPC_ENUM_ZONES_FILTER_get_dwRpcStructureVersion,
24010 : .set = py_DNS_RPC_ENUM_ZONES_FILTER_set_dwRpcStructureVersion,
24011 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24012 : },
24013 : {
24014 : .name = discard_const_p(char, "dwReserved0"),
24015 : .get = py_DNS_RPC_ENUM_ZONES_FILTER_get_dwReserved0,
24016 : .set = py_DNS_RPC_ENUM_ZONES_FILTER_set_dwReserved0,
24017 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24018 : },
24019 : {
24020 : .name = discard_const_p(char, "dwFilter"),
24021 : .get = py_DNS_RPC_ENUM_ZONES_FILTER_get_dwFilter,
24022 : .set = py_DNS_RPC_ENUM_ZONES_FILTER_set_dwFilter,
24023 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24024 : },
24025 : {
24026 : .name = discard_const_p(char, "pszPartitionFqdn"),
24027 : .get = py_DNS_RPC_ENUM_ZONES_FILTER_get_pszPartitionFqdn,
24028 : .set = py_DNS_RPC_ENUM_ZONES_FILTER_set_pszPartitionFqdn,
24029 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
24030 : },
24031 : {
24032 : .name = discard_const_p(char, "pszQueryString"),
24033 : .get = py_DNS_RPC_ENUM_ZONES_FILTER_get_pszQueryString,
24034 : .set = py_DNS_RPC_ENUM_ZONES_FILTER_set_pszQueryString,
24035 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
24036 : },
24037 : {
24038 : .name = discard_const_p(char, "pszReserved"),
24039 : .get = py_DNS_RPC_ENUM_ZONES_FILTER_get_pszReserved,
24040 : .set = py_DNS_RPC_ENUM_ZONES_FILTER_set_pszReserved,
24041 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_EXTENSION")
24042 : },
24043 : { .name = NULL }
24044 : };
24045 :
24046 0 : static PyObject *py_DNS_RPC_ENUM_ZONES_FILTER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24047 : {
24048 0 : return pytalloc_new(struct DNS_RPC_ENUM_ZONES_FILTER, type);
24049 : }
24050 :
24051 :
24052 : static PyTypeObject DNS_RPC_ENUM_ZONES_FILTER_Type = {
24053 : PyVarObject_HEAD_INIT(NULL, 0)
24054 : .tp_name = "dnsserver.DNS_RPC_ENUM_ZONES_FILTER",
24055 : .tp_getset = py_DNS_RPC_ENUM_ZONES_FILTER_getsetters,
24056 : .tp_methods = NULL,
24057 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24058 : .tp_new = py_DNS_RPC_ENUM_ZONES_FILTER_new,
24059 : };
24060 :
24061 :
24062 0 : static PyObject *py_DNS_RPC_FORWARDERS_W2K_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
24063 : {
24064 0 : struct DNS_RPC_FORWARDERS_W2K *object = pytalloc_get_ptr(obj);
24065 0 : PyObject *py_fRecurseAfterForwarding;
24066 0 : py_fRecurseAfterForwarding = PyLong_FromUnsignedLongLong((uint32_t)(object->fRecurseAfterForwarding));
24067 0 : return py_fRecurseAfterForwarding;
24068 : }
24069 :
24070 0 : static int py_DNS_RPC_FORWARDERS_W2K_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
24071 : {
24072 0 : struct DNS_RPC_FORWARDERS_W2K *object = pytalloc_get_ptr(py_obj);
24073 0 : if (value == NULL) {
24074 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fRecurseAfterForwarding");
24075 0 : return -1;
24076 : }
24077 : {
24078 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRecurseAfterForwarding));
24079 0 : if (PyLong_Check(value)) {
24080 0 : unsigned long long test_var;
24081 0 : test_var = PyLong_AsUnsignedLongLong(value);
24082 0 : if (PyErr_Occurred() != NULL) {
24083 0 : return -1;
24084 : }
24085 0 : if (test_var > uint_max) {
24086 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24087 : PyLong_Type.tp_name, uint_max, test_var);
24088 0 : return -1;
24089 : }
24090 0 : object->fRecurseAfterForwarding = test_var;
24091 : } else {
24092 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24093 : PyLong_Type.tp_name);
24094 0 : return -1;
24095 : }
24096 : }
24097 0 : return 0;
24098 : }
24099 :
24100 0 : static PyObject *py_DNS_RPC_FORWARDERS_W2K_get_dwForwardTimeout(PyObject *obj, void *closure)
24101 : {
24102 0 : struct DNS_RPC_FORWARDERS_W2K *object = pytalloc_get_ptr(obj);
24103 0 : PyObject *py_dwForwardTimeout;
24104 0 : py_dwForwardTimeout = PyLong_FromUnsignedLongLong((uint32_t)(object->dwForwardTimeout));
24105 0 : return py_dwForwardTimeout;
24106 : }
24107 :
24108 0 : static int py_DNS_RPC_FORWARDERS_W2K_set_dwForwardTimeout(PyObject *py_obj, PyObject *value, void *closure)
24109 : {
24110 0 : struct DNS_RPC_FORWARDERS_W2K *object = pytalloc_get_ptr(py_obj);
24111 0 : if (value == NULL) {
24112 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwForwardTimeout");
24113 0 : return -1;
24114 : }
24115 : {
24116 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwForwardTimeout));
24117 0 : if (PyLong_Check(value)) {
24118 0 : unsigned long long test_var;
24119 0 : test_var = PyLong_AsUnsignedLongLong(value);
24120 0 : if (PyErr_Occurred() != NULL) {
24121 0 : return -1;
24122 : }
24123 0 : if (test_var > uint_max) {
24124 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24125 : PyLong_Type.tp_name, uint_max, test_var);
24126 0 : return -1;
24127 : }
24128 0 : object->dwForwardTimeout = test_var;
24129 : } else {
24130 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24131 : PyLong_Type.tp_name);
24132 0 : return -1;
24133 : }
24134 : }
24135 0 : return 0;
24136 : }
24137 :
24138 0 : static PyObject *py_DNS_RPC_FORWARDERS_W2K_get_aipForwarders(PyObject *obj, void *closure)
24139 : {
24140 0 : struct DNS_RPC_FORWARDERS_W2K *object = pytalloc_get_ptr(obj);
24141 0 : PyObject *py_aipForwarders;
24142 0 : if (object->aipForwarders == NULL) {
24143 0 : Py_RETURN_NONE;
24144 : }
24145 0 : if (object->aipForwarders == NULL) {
24146 0 : py_aipForwarders = Py_None;
24147 0 : Py_INCREF(py_aipForwarders);
24148 : } else {
24149 0 : py_aipForwarders = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipForwarders, object->aipForwarders);
24150 : }
24151 0 : return py_aipForwarders;
24152 : }
24153 :
24154 0 : static int py_DNS_RPC_FORWARDERS_W2K_set_aipForwarders(PyObject *py_obj, PyObject *value, void *closure)
24155 : {
24156 0 : struct DNS_RPC_FORWARDERS_W2K *object = pytalloc_get_ptr(py_obj);
24157 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipForwarders));
24158 0 : if (value == NULL) {
24159 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipForwarders");
24160 0 : return -1;
24161 : }
24162 0 : if (value == Py_None) {
24163 0 : object->aipForwarders = NULL;
24164 : } else {
24165 0 : object->aipForwarders = NULL;
24166 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
24167 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
24168 0 : PyErr_NoMemory();
24169 0 : return -1;
24170 : }
24171 0 : object->aipForwarders = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
24172 : }
24173 0 : return 0;
24174 : }
24175 :
24176 : static PyGetSetDef py_DNS_RPC_FORWARDERS_W2K_getsetters[] = {
24177 : {
24178 : .name = discard_const_p(char, "fRecurseAfterForwarding"),
24179 : .get = py_DNS_RPC_FORWARDERS_W2K_get_fRecurseAfterForwarding,
24180 : .set = py_DNS_RPC_FORWARDERS_W2K_set_fRecurseAfterForwarding,
24181 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24182 : },
24183 : {
24184 : .name = discard_const_p(char, "dwForwardTimeout"),
24185 : .get = py_DNS_RPC_FORWARDERS_W2K_get_dwForwardTimeout,
24186 : .set = py_DNS_RPC_FORWARDERS_W2K_set_dwForwardTimeout,
24187 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24188 : },
24189 : {
24190 : .name = discard_const_p(char, "aipForwarders"),
24191 : .get = py_DNS_RPC_FORWARDERS_W2K_get_aipForwarders,
24192 : .set = py_DNS_RPC_FORWARDERS_W2K_set_aipForwarders,
24193 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
24194 : },
24195 : { .name = NULL }
24196 : };
24197 :
24198 0 : static PyObject *py_DNS_RPC_FORWARDERS_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24199 : {
24200 0 : return pytalloc_new(struct DNS_RPC_FORWARDERS_W2K, type);
24201 : }
24202 :
24203 :
24204 : static PyTypeObject DNS_RPC_FORWARDERS_W2K_Type = {
24205 : PyVarObject_HEAD_INIT(NULL, 0)
24206 : .tp_name = "dnsserver.DNS_RPC_FORWARDERS_W2K",
24207 : .tp_getset = py_DNS_RPC_FORWARDERS_W2K_getsetters,
24208 : .tp_methods = NULL,
24209 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24210 : .tp_new = py_DNS_RPC_FORWARDERS_W2K_new,
24211 : };
24212 :
24213 :
24214 0 : static PyObject *py_DNS_RPC_FORWARDERS_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
24215 : {
24216 0 : struct DNS_RPC_FORWARDERS_DOTNET *object = pytalloc_get_ptr(obj);
24217 0 : PyObject *py_dwRpcStructureVersion;
24218 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
24219 0 : return py_dwRpcStructureVersion;
24220 : }
24221 :
24222 0 : static int py_DNS_RPC_FORWARDERS_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
24223 : {
24224 0 : struct DNS_RPC_FORWARDERS_DOTNET *object = pytalloc_get_ptr(py_obj);
24225 0 : if (value == NULL) {
24226 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
24227 0 : return -1;
24228 : }
24229 : {
24230 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
24231 0 : if (PyLong_Check(value)) {
24232 0 : unsigned long long test_var;
24233 0 : test_var = PyLong_AsUnsignedLongLong(value);
24234 0 : if (PyErr_Occurred() != NULL) {
24235 0 : return -1;
24236 : }
24237 0 : if (test_var > uint_max) {
24238 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24239 : PyLong_Type.tp_name, uint_max, test_var);
24240 0 : return -1;
24241 : }
24242 0 : object->dwRpcStructureVersion = test_var;
24243 : } else {
24244 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24245 : PyLong_Type.tp_name);
24246 0 : return -1;
24247 : }
24248 : }
24249 0 : return 0;
24250 : }
24251 :
24252 0 : static PyObject *py_DNS_RPC_FORWARDERS_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
24253 : {
24254 0 : struct DNS_RPC_FORWARDERS_DOTNET *object = pytalloc_get_ptr(obj);
24255 0 : PyObject *py_dwReserved0;
24256 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
24257 0 : return py_dwReserved0;
24258 : }
24259 :
24260 0 : static int py_DNS_RPC_FORWARDERS_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
24261 : {
24262 0 : struct DNS_RPC_FORWARDERS_DOTNET *object = pytalloc_get_ptr(py_obj);
24263 0 : if (value == NULL) {
24264 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
24265 0 : return -1;
24266 : }
24267 : {
24268 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
24269 0 : if (PyLong_Check(value)) {
24270 0 : unsigned long long test_var;
24271 0 : test_var = PyLong_AsUnsignedLongLong(value);
24272 0 : if (PyErr_Occurred() != NULL) {
24273 0 : return -1;
24274 : }
24275 0 : if (test_var > uint_max) {
24276 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24277 : PyLong_Type.tp_name, uint_max, test_var);
24278 0 : return -1;
24279 : }
24280 0 : object->dwReserved0 = test_var;
24281 : } else {
24282 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24283 : PyLong_Type.tp_name);
24284 0 : return -1;
24285 : }
24286 : }
24287 0 : return 0;
24288 : }
24289 :
24290 0 : static PyObject *py_DNS_RPC_FORWARDERS_DOTNET_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
24291 : {
24292 0 : struct DNS_RPC_FORWARDERS_DOTNET *object = pytalloc_get_ptr(obj);
24293 0 : PyObject *py_fRecurseAfterForwarding;
24294 0 : py_fRecurseAfterForwarding = PyLong_FromUnsignedLongLong((uint32_t)(object->fRecurseAfterForwarding));
24295 0 : return py_fRecurseAfterForwarding;
24296 : }
24297 :
24298 0 : static int py_DNS_RPC_FORWARDERS_DOTNET_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
24299 : {
24300 0 : struct DNS_RPC_FORWARDERS_DOTNET *object = pytalloc_get_ptr(py_obj);
24301 0 : if (value == NULL) {
24302 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fRecurseAfterForwarding");
24303 0 : return -1;
24304 : }
24305 : {
24306 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRecurseAfterForwarding));
24307 0 : if (PyLong_Check(value)) {
24308 0 : unsigned long long test_var;
24309 0 : test_var = PyLong_AsUnsignedLongLong(value);
24310 0 : if (PyErr_Occurred() != NULL) {
24311 0 : return -1;
24312 : }
24313 0 : if (test_var > uint_max) {
24314 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24315 : PyLong_Type.tp_name, uint_max, test_var);
24316 0 : return -1;
24317 : }
24318 0 : object->fRecurseAfterForwarding = test_var;
24319 : } else {
24320 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24321 : PyLong_Type.tp_name);
24322 0 : return -1;
24323 : }
24324 : }
24325 0 : return 0;
24326 : }
24327 :
24328 0 : static PyObject *py_DNS_RPC_FORWARDERS_DOTNET_get_dwForwardTimeout(PyObject *obj, void *closure)
24329 : {
24330 0 : struct DNS_RPC_FORWARDERS_DOTNET *object = pytalloc_get_ptr(obj);
24331 0 : PyObject *py_dwForwardTimeout;
24332 0 : py_dwForwardTimeout = PyLong_FromUnsignedLongLong((uint32_t)(object->dwForwardTimeout));
24333 0 : return py_dwForwardTimeout;
24334 : }
24335 :
24336 0 : static int py_DNS_RPC_FORWARDERS_DOTNET_set_dwForwardTimeout(PyObject *py_obj, PyObject *value, void *closure)
24337 : {
24338 0 : struct DNS_RPC_FORWARDERS_DOTNET *object = pytalloc_get_ptr(py_obj);
24339 0 : if (value == NULL) {
24340 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwForwardTimeout");
24341 0 : return -1;
24342 : }
24343 : {
24344 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwForwardTimeout));
24345 0 : if (PyLong_Check(value)) {
24346 0 : unsigned long long test_var;
24347 0 : test_var = PyLong_AsUnsignedLongLong(value);
24348 0 : if (PyErr_Occurred() != NULL) {
24349 0 : return -1;
24350 : }
24351 0 : if (test_var > uint_max) {
24352 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24353 : PyLong_Type.tp_name, uint_max, test_var);
24354 0 : return -1;
24355 : }
24356 0 : object->dwForwardTimeout = test_var;
24357 : } else {
24358 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24359 : PyLong_Type.tp_name);
24360 0 : return -1;
24361 : }
24362 : }
24363 0 : return 0;
24364 : }
24365 :
24366 0 : static PyObject *py_DNS_RPC_FORWARDERS_DOTNET_get_aipForwarders(PyObject *obj, void *closure)
24367 : {
24368 0 : struct DNS_RPC_FORWARDERS_DOTNET *object = pytalloc_get_ptr(obj);
24369 0 : PyObject *py_aipForwarders;
24370 0 : if (object->aipForwarders == NULL) {
24371 0 : Py_RETURN_NONE;
24372 : }
24373 0 : if (object->aipForwarders == NULL) {
24374 0 : py_aipForwarders = Py_None;
24375 0 : Py_INCREF(py_aipForwarders);
24376 : } else {
24377 0 : py_aipForwarders = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipForwarders, object->aipForwarders);
24378 : }
24379 0 : return py_aipForwarders;
24380 : }
24381 :
24382 0 : static int py_DNS_RPC_FORWARDERS_DOTNET_set_aipForwarders(PyObject *py_obj, PyObject *value, void *closure)
24383 : {
24384 0 : struct DNS_RPC_FORWARDERS_DOTNET *object = pytalloc_get_ptr(py_obj);
24385 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipForwarders));
24386 0 : if (value == NULL) {
24387 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipForwarders");
24388 0 : return -1;
24389 : }
24390 0 : if (value == Py_None) {
24391 0 : object->aipForwarders = NULL;
24392 : } else {
24393 0 : object->aipForwarders = NULL;
24394 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
24395 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
24396 0 : PyErr_NoMemory();
24397 0 : return -1;
24398 : }
24399 0 : object->aipForwarders = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
24400 : }
24401 0 : return 0;
24402 : }
24403 :
24404 : static PyGetSetDef py_DNS_RPC_FORWARDERS_DOTNET_getsetters[] = {
24405 : {
24406 : .name = discard_const_p(char, "dwRpcStructureVersion"),
24407 : .get = py_DNS_RPC_FORWARDERS_DOTNET_get_dwRpcStructureVersion,
24408 : .set = py_DNS_RPC_FORWARDERS_DOTNET_set_dwRpcStructureVersion,
24409 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24410 : },
24411 : {
24412 : .name = discard_const_p(char, "dwReserved0"),
24413 : .get = py_DNS_RPC_FORWARDERS_DOTNET_get_dwReserved0,
24414 : .set = py_DNS_RPC_FORWARDERS_DOTNET_set_dwReserved0,
24415 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24416 : },
24417 : {
24418 : .name = discard_const_p(char, "fRecurseAfterForwarding"),
24419 : .get = py_DNS_RPC_FORWARDERS_DOTNET_get_fRecurseAfterForwarding,
24420 : .set = py_DNS_RPC_FORWARDERS_DOTNET_set_fRecurseAfterForwarding,
24421 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24422 : },
24423 : {
24424 : .name = discard_const_p(char, "dwForwardTimeout"),
24425 : .get = py_DNS_RPC_FORWARDERS_DOTNET_get_dwForwardTimeout,
24426 : .set = py_DNS_RPC_FORWARDERS_DOTNET_set_dwForwardTimeout,
24427 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24428 : },
24429 : {
24430 : .name = discard_const_p(char, "aipForwarders"),
24431 : .get = py_DNS_RPC_FORWARDERS_DOTNET_get_aipForwarders,
24432 : .set = py_DNS_RPC_FORWARDERS_DOTNET_set_aipForwarders,
24433 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
24434 : },
24435 : { .name = NULL }
24436 : };
24437 :
24438 0 : static PyObject *py_DNS_RPC_FORWARDERS_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24439 : {
24440 0 : return pytalloc_new(struct DNS_RPC_FORWARDERS_DOTNET, type);
24441 : }
24442 :
24443 :
24444 : static PyTypeObject DNS_RPC_FORWARDERS_DOTNET_Type = {
24445 : PyVarObject_HEAD_INIT(NULL, 0)
24446 : .tp_name = "dnsserver.DNS_RPC_FORWARDERS_DOTNET",
24447 : .tp_getset = py_DNS_RPC_FORWARDERS_DOTNET_getsetters,
24448 : .tp_methods = NULL,
24449 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24450 : .tp_new = py_DNS_RPC_FORWARDERS_DOTNET_new,
24451 : };
24452 :
24453 :
24454 0 : static PyObject *py_DNS_RPC_FORWARDERS_LONGHORN_get_dwRpcStructureVersion(PyObject *obj, void *closure)
24455 : {
24456 0 : struct DNS_RPC_FORWARDERS_LONGHORN *object = pytalloc_get_ptr(obj);
24457 0 : PyObject *py_dwRpcStructureVersion;
24458 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
24459 0 : return py_dwRpcStructureVersion;
24460 : }
24461 :
24462 0 : static int py_DNS_RPC_FORWARDERS_LONGHORN_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
24463 : {
24464 0 : struct DNS_RPC_FORWARDERS_LONGHORN *object = pytalloc_get_ptr(py_obj);
24465 0 : if (value == NULL) {
24466 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
24467 0 : return -1;
24468 : }
24469 : {
24470 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
24471 0 : if (PyLong_Check(value)) {
24472 0 : unsigned long long test_var;
24473 0 : test_var = PyLong_AsUnsignedLongLong(value);
24474 0 : if (PyErr_Occurred() != NULL) {
24475 0 : return -1;
24476 : }
24477 0 : if (test_var > uint_max) {
24478 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24479 : PyLong_Type.tp_name, uint_max, test_var);
24480 0 : return -1;
24481 : }
24482 0 : object->dwRpcStructureVersion = test_var;
24483 : } else {
24484 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24485 : PyLong_Type.tp_name);
24486 0 : return -1;
24487 : }
24488 : }
24489 0 : return 0;
24490 : }
24491 :
24492 0 : static PyObject *py_DNS_RPC_FORWARDERS_LONGHORN_get_dwReserved0(PyObject *obj, void *closure)
24493 : {
24494 0 : struct DNS_RPC_FORWARDERS_LONGHORN *object = pytalloc_get_ptr(obj);
24495 0 : PyObject *py_dwReserved0;
24496 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
24497 0 : return py_dwReserved0;
24498 : }
24499 :
24500 0 : static int py_DNS_RPC_FORWARDERS_LONGHORN_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
24501 : {
24502 0 : struct DNS_RPC_FORWARDERS_LONGHORN *object = pytalloc_get_ptr(py_obj);
24503 0 : if (value == NULL) {
24504 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
24505 0 : return -1;
24506 : }
24507 : {
24508 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
24509 0 : if (PyLong_Check(value)) {
24510 0 : unsigned long long test_var;
24511 0 : test_var = PyLong_AsUnsignedLongLong(value);
24512 0 : if (PyErr_Occurred() != NULL) {
24513 0 : return -1;
24514 : }
24515 0 : if (test_var > uint_max) {
24516 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24517 : PyLong_Type.tp_name, uint_max, test_var);
24518 0 : return -1;
24519 : }
24520 0 : object->dwReserved0 = test_var;
24521 : } else {
24522 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24523 : PyLong_Type.tp_name);
24524 0 : return -1;
24525 : }
24526 : }
24527 0 : return 0;
24528 : }
24529 :
24530 0 : static PyObject *py_DNS_RPC_FORWARDERS_LONGHORN_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
24531 : {
24532 0 : struct DNS_RPC_FORWARDERS_LONGHORN *object = pytalloc_get_ptr(obj);
24533 0 : PyObject *py_fRecurseAfterForwarding;
24534 0 : py_fRecurseAfterForwarding = PyLong_FromUnsignedLongLong((uint32_t)(object->fRecurseAfterForwarding));
24535 0 : return py_fRecurseAfterForwarding;
24536 : }
24537 :
24538 0 : static int py_DNS_RPC_FORWARDERS_LONGHORN_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
24539 : {
24540 0 : struct DNS_RPC_FORWARDERS_LONGHORN *object = pytalloc_get_ptr(py_obj);
24541 0 : if (value == NULL) {
24542 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fRecurseAfterForwarding");
24543 0 : return -1;
24544 : }
24545 : {
24546 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRecurseAfterForwarding));
24547 0 : if (PyLong_Check(value)) {
24548 0 : unsigned long long test_var;
24549 0 : test_var = PyLong_AsUnsignedLongLong(value);
24550 0 : if (PyErr_Occurred() != NULL) {
24551 0 : return -1;
24552 : }
24553 0 : if (test_var > uint_max) {
24554 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24555 : PyLong_Type.tp_name, uint_max, test_var);
24556 0 : return -1;
24557 : }
24558 0 : object->fRecurseAfterForwarding = test_var;
24559 : } else {
24560 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24561 : PyLong_Type.tp_name);
24562 0 : return -1;
24563 : }
24564 : }
24565 0 : return 0;
24566 : }
24567 :
24568 0 : static PyObject *py_DNS_RPC_FORWARDERS_LONGHORN_get_dwForwardTimeout(PyObject *obj, void *closure)
24569 : {
24570 0 : struct DNS_RPC_FORWARDERS_LONGHORN *object = pytalloc_get_ptr(obj);
24571 0 : PyObject *py_dwForwardTimeout;
24572 0 : py_dwForwardTimeout = PyLong_FromUnsignedLongLong((uint32_t)(object->dwForwardTimeout));
24573 0 : return py_dwForwardTimeout;
24574 : }
24575 :
24576 0 : static int py_DNS_RPC_FORWARDERS_LONGHORN_set_dwForwardTimeout(PyObject *py_obj, PyObject *value, void *closure)
24577 : {
24578 0 : struct DNS_RPC_FORWARDERS_LONGHORN *object = pytalloc_get_ptr(py_obj);
24579 0 : if (value == NULL) {
24580 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwForwardTimeout");
24581 0 : return -1;
24582 : }
24583 : {
24584 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwForwardTimeout));
24585 0 : if (PyLong_Check(value)) {
24586 0 : unsigned long long test_var;
24587 0 : test_var = PyLong_AsUnsignedLongLong(value);
24588 0 : if (PyErr_Occurred() != NULL) {
24589 0 : return -1;
24590 : }
24591 0 : if (test_var > uint_max) {
24592 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24593 : PyLong_Type.tp_name, uint_max, test_var);
24594 0 : return -1;
24595 : }
24596 0 : object->dwForwardTimeout = test_var;
24597 : } else {
24598 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24599 : PyLong_Type.tp_name);
24600 0 : return -1;
24601 : }
24602 : }
24603 0 : return 0;
24604 : }
24605 :
24606 0 : static PyObject *py_DNS_RPC_FORWARDERS_LONGHORN_get_aipForwarders(PyObject *obj, void *closure)
24607 : {
24608 0 : struct DNS_RPC_FORWARDERS_LONGHORN *object = pytalloc_get_ptr(obj);
24609 0 : PyObject *py_aipForwarders;
24610 0 : if (object->aipForwarders == NULL) {
24611 0 : Py_RETURN_NONE;
24612 : }
24613 0 : if (object->aipForwarders == NULL) {
24614 0 : py_aipForwarders = Py_None;
24615 0 : Py_INCREF(py_aipForwarders);
24616 : } else {
24617 0 : py_aipForwarders = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipForwarders, object->aipForwarders);
24618 : }
24619 0 : return py_aipForwarders;
24620 : }
24621 :
24622 0 : static int py_DNS_RPC_FORWARDERS_LONGHORN_set_aipForwarders(PyObject *py_obj, PyObject *value, void *closure)
24623 : {
24624 0 : struct DNS_RPC_FORWARDERS_LONGHORN *object = pytalloc_get_ptr(py_obj);
24625 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipForwarders));
24626 0 : if (value == NULL) {
24627 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->aipForwarders");
24628 0 : return -1;
24629 : }
24630 0 : if (value == Py_None) {
24631 0 : object->aipForwarders = NULL;
24632 : } else {
24633 0 : object->aipForwarders = NULL;
24634 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
24635 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
24636 0 : PyErr_NoMemory();
24637 0 : return -1;
24638 : }
24639 0 : object->aipForwarders = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
24640 : }
24641 0 : return 0;
24642 : }
24643 :
24644 : static PyGetSetDef py_DNS_RPC_FORWARDERS_LONGHORN_getsetters[] = {
24645 : {
24646 : .name = discard_const_p(char, "dwRpcStructureVersion"),
24647 : .get = py_DNS_RPC_FORWARDERS_LONGHORN_get_dwRpcStructureVersion,
24648 : .set = py_DNS_RPC_FORWARDERS_LONGHORN_set_dwRpcStructureVersion,
24649 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24650 : },
24651 : {
24652 : .name = discard_const_p(char, "dwReserved0"),
24653 : .get = py_DNS_RPC_FORWARDERS_LONGHORN_get_dwReserved0,
24654 : .set = py_DNS_RPC_FORWARDERS_LONGHORN_set_dwReserved0,
24655 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24656 : },
24657 : {
24658 : .name = discard_const_p(char, "fRecurseAfterForwarding"),
24659 : .get = py_DNS_RPC_FORWARDERS_LONGHORN_get_fRecurseAfterForwarding,
24660 : .set = py_DNS_RPC_FORWARDERS_LONGHORN_set_fRecurseAfterForwarding,
24661 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24662 : },
24663 : {
24664 : .name = discard_const_p(char, "dwForwardTimeout"),
24665 : .get = py_DNS_RPC_FORWARDERS_LONGHORN_get_dwForwardTimeout,
24666 : .set = py_DNS_RPC_FORWARDERS_LONGHORN_set_dwForwardTimeout,
24667 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24668 : },
24669 : {
24670 : .name = discard_const_p(char, "aipForwarders"),
24671 : .get = py_DNS_RPC_FORWARDERS_LONGHORN_get_aipForwarders,
24672 : .set = py_DNS_RPC_FORWARDERS_LONGHORN_set_aipForwarders,
24673 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
24674 : },
24675 : { .name = NULL }
24676 : };
24677 :
24678 0 : static PyObject *py_DNS_RPC_FORWARDERS_LONGHORN_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24679 : {
24680 0 : return pytalloc_new(struct DNS_RPC_FORWARDERS_LONGHORN, type);
24681 : }
24682 :
24683 :
24684 : static PyTypeObject DNS_RPC_FORWARDERS_LONGHORN_Type = {
24685 : PyVarObject_HEAD_INIT(NULL, 0)
24686 : .tp_name = "dnsserver.DNS_RPC_FORWARDERS_LONGHORN",
24687 : .tp_getset = py_DNS_RPC_FORWARDERS_LONGHORN_getsetters,
24688 : .tp_methods = NULL,
24689 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24690 : .tp_new = py_DNS_RPC_FORWARDERS_LONGHORN_new,
24691 : };
24692 :
24693 :
24694 0 : static PyObject *py_DNS_RPC_AUTOCONFIGURE_get_dwRpcStructureVersion(PyObject *obj, void *closure)
24695 : {
24696 0 : struct DNS_RPC_AUTOCONFIGURE *object = pytalloc_get_ptr(obj);
24697 0 : PyObject *py_dwRpcStructureVersion;
24698 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->dwRpcStructureVersion));
24699 0 : return py_dwRpcStructureVersion;
24700 : }
24701 :
24702 0 : static int py_DNS_RPC_AUTOCONFIGURE_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
24703 : {
24704 0 : struct DNS_RPC_AUTOCONFIGURE *object = pytalloc_get_ptr(py_obj);
24705 0 : if (value == NULL) {
24706 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwRpcStructureVersion");
24707 0 : return -1;
24708 : }
24709 : {
24710 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
24711 0 : if (PyLong_Check(value)) {
24712 0 : unsigned long long test_var;
24713 0 : test_var = PyLong_AsUnsignedLongLong(value);
24714 0 : if (PyErr_Occurred() != NULL) {
24715 0 : return -1;
24716 : }
24717 0 : if (test_var > uint_max) {
24718 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24719 : PyLong_Type.tp_name, uint_max, test_var);
24720 0 : return -1;
24721 : }
24722 0 : object->dwRpcStructureVersion = test_var;
24723 : } else {
24724 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24725 : PyLong_Type.tp_name);
24726 0 : return -1;
24727 : }
24728 : }
24729 0 : return 0;
24730 : }
24731 :
24732 0 : static PyObject *py_DNS_RPC_AUTOCONFIGURE_get_dwReserved0(PyObject *obj, void *closure)
24733 : {
24734 0 : struct DNS_RPC_AUTOCONFIGURE *object = pytalloc_get_ptr(obj);
24735 0 : PyObject *py_dwReserved0;
24736 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved0));
24737 0 : return py_dwReserved0;
24738 : }
24739 :
24740 0 : static int py_DNS_RPC_AUTOCONFIGURE_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
24741 : {
24742 0 : struct DNS_RPC_AUTOCONFIGURE *object = pytalloc_get_ptr(py_obj);
24743 0 : if (value == NULL) {
24744 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved0");
24745 0 : return -1;
24746 : }
24747 : {
24748 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
24749 0 : if (PyLong_Check(value)) {
24750 0 : unsigned long long test_var;
24751 0 : test_var = PyLong_AsUnsignedLongLong(value);
24752 0 : if (PyErr_Occurred() != NULL) {
24753 0 : return -1;
24754 : }
24755 0 : if (test_var > uint_max) {
24756 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24757 : PyLong_Type.tp_name, uint_max, test_var);
24758 0 : return -1;
24759 : }
24760 0 : object->dwReserved0 = test_var;
24761 : } else {
24762 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24763 : PyLong_Type.tp_name);
24764 0 : return -1;
24765 : }
24766 : }
24767 0 : return 0;
24768 : }
24769 :
24770 0 : static PyObject *py_DNS_RPC_AUTOCONFIGURE_get_dwAutoConfigFlags(PyObject *obj, void *closure)
24771 : {
24772 0 : struct DNS_RPC_AUTOCONFIGURE *object = pytalloc_get_ptr(obj);
24773 0 : PyObject *py_dwAutoConfigFlags;
24774 0 : py_dwAutoConfigFlags = PyLong_FromUnsignedLongLong((uint32_t)(object->dwAutoConfigFlags));
24775 0 : return py_dwAutoConfigFlags;
24776 : }
24777 :
24778 0 : static int py_DNS_RPC_AUTOCONFIGURE_set_dwAutoConfigFlags(PyObject *py_obj, PyObject *value, void *closure)
24779 : {
24780 0 : struct DNS_RPC_AUTOCONFIGURE *object = pytalloc_get_ptr(py_obj);
24781 0 : if (value == NULL) {
24782 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwAutoConfigFlags");
24783 0 : return -1;
24784 : }
24785 : {
24786 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwAutoConfigFlags));
24787 0 : if (PyLong_Check(value)) {
24788 0 : unsigned long long test_var;
24789 0 : test_var = PyLong_AsUnsignedLongLong(value);
24790 0 : if (PyErr_Occurred() != NULL) {
24791 0 : return -1;
24792 : }
24793 0 : if (test_var > uint_max) {
24794 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24795 : PyLong_Type.tp_name, uint_max, test_var);
24796 0 : return -1;
24797 : }
24798 0 : object->dwAutoConfigFlags = test_var;
24799 : } else {
24800 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24801 : PyLong_Type.tp_name);
24802 0 : return -1;
24803 : }
24804 : }
24805 0 : return 0;
24806 : }
24807 :
24808 0 : static PyObject *py_DNS_RPC_AUTOCONFIGURE_get_dwReserved1(PyObject *obj, void *closure)
24809 : {
24810 0 : struct DNS_RPC_AUTOCONFIGURE *object = pytalloc_get_ptr(obj);
24811 0 : PyObject *py_dwReserved1;
24812 0 : py_dwReserved1 = PyLong_FromUnsignedLongLong((uint32_t)(object->dwReserved1));
24813 0 : return py_dwReserved1;
24814 : }
24815 :
24816 0 : static int py_DNS_RPC_AUTOCONFIGURE_set_dwReserved1(PyObject *py_obj, PyObject *value, void *closure)
24817 : {
24818 0 : struct DNS_RPC_AUTOCONFIGURE *object = pytalloc_get_ptr(py_obj);
24819 0 : if (value == NULL) {
24820 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwReserved1");
24821 0 : return -1;
24822 : }
24823 : {
24824 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved1));
24825 0 : if (PyLong_Check(value)) {
24826 0 : unsigned long long test_var;
24827 0 : test_var = PyLong_AsUnsignedLongLong(value);
24828 0 : if (PyErr_Occurred() != NULL) {
24829 0 : return -1;
24830 : }
24831 0 : if (test_var > uint_max) {
24832 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24833 : PyLong_Type.tp_name, uint_max, test_var);
24834 0 : return -1;
24835 : }
24836 0 : object->dwReserved1 = test_var;
24837 : } else {
24838 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24839 : PyLong_Type.tp_name);
24840 0 : return -1;
24841 : }
24842 : }
24843 0 : return 0;
24844 : }
24845 :
24846 0 : static PyObject *py_DNS_RPC_AUTOCONFIGURE_get_pszNewDomainName(PyObject *obj, void *closure)
24847 : {
24848 0 : struct DNS_RPC_AUTOCONFIGURE *object = pytalloc_get_ptr(obj);
24849 0 : PyObject *py_pszNewDomainName;
24850 0 : if (object->pszNewDomainName == NULL) {
24851 0 : Py_RETURN_NONE;
24852 : }
24853 0 : if (object->pszNewDomainName == NULL) {
24854 0 : py_pszNewDomainName = Py_None;
24855 0 : Py_INCREF(py_pszNewDomainName);
24856 : } else {
24857 0 : if (object->pszNewDomainName == NULL) {
24858 0 : py_pszNewDomainName = Py_None;
24859 0 : Py_INCREF(py_pszNewDomainName);
24860 : } else {
24861 0 : py_pszNewDomainName = PyUnicode_Decode(object->pszNewDomainName, strlen(object->pszNewDomainName), "utf-8", "ignore");
24862 : }
24863 : }
24864 0 : return py_pszNewDomainName;
24865 : }
24866 :
24867 0 : static int py_DNS_RPC_AUTOCONFIGURE_set_pszNewDomainName(PyObject *py_obj, PyObject *value, void *closure)
24868 : {
24869 0 : struct DNS_RPC_AUTOCONFIGURE *object = pytalloc_get_ptr(py_obj);
24870 0 : if (value == NULL) {
24871 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->pszNewDomainName");
24872 0 : return -1;
24873 : }
24874 0 : if (value == Py_None) {
24875 0 : object->pszNewDomainName = NULL;
24876 : } else {
24877 0 : object->pszNewDomainName = NULL;
24878 : {
24879 0 : const char *test_str;
24880 0 : const char *talloc_str;
24881 0 : PyObject *unicode = NULL;
24882 0 : if (PyUnicode_Check(value)) {
24883 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
24884 0 : if (unicode == NULL) {
24885 0 : return -1;
24886 : }
24887 0 : test_str = PyBytes_AS_STRING(unicode);
24888 0 : } else if (PyBytes_Check(value)) {
24889 0 : test_str = PyBytes_AS_STRING(value);
24890 : } else {
24891 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
24892 0 : return -1;
24893 : }
24894 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
24895 0 : if (unicode != NULL) {
24896 0 : Py_DECREF(unicode);
24897 : }
24898 0 : if (talloc_str == NULL) {
24899 0 : PyErr_NoMemory();
24900 0 : return -1;
24901 : }
24902 0 : object->pszNewDomainName = talloc_str;
24903 : }
24904 : }
24905 0 : return 0;
24906 : }
24907 :
24908 : static PyGetSetDef py_DNS_RPC_AUTOCONFIGURE_getsetters[] = {
24909 : {
24910 : .name = discard_const_p(char, "dwRpcStructureVersion"),
24911 : .get = py_DNS_RPC_AUTOCONFIGURE_get_dwRpcStructureVersion,
24912 : .set = py_DNS_RPC_AUTOCONFIGURE_set_dwRpcStructureVersion,
24913 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24914 : },
24915 : {
24916 : .name = discard_const_p(char, "dwReserved0"),
24917 : .get = py_DNS_RPC_AUTOCONFIGURE_get_dwReserved0,
24918 : .set = py_DNS_RPC_AUTOCONFIGURE_set_dwReserved0,
24919 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24920 : },
24921 : {
24922 : .name = discard_const_p(char, "dwAutoConfigFlags"),
24923 : .get = py_DNS_RPC_AUTOCONFIGURE_get_dwAutoConfigFlags,
24924 : .set = py_DNS_RPC_AUTOCONFIGURE_set_dwAutoConfigFlags,
24925 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_AUTOCONFIG")
24926 : },
24927 : {
24928 : .name = discard_const_p(char, "dwReserved1"),
24929 : .get = py_DNS_RPC_AUTOCONFIGURE_get_dwReserved1,
24930 : .set = py_DNS_RPC_AUTOCONFIGURE_set_dwReserved1,
24931 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24932 : },
24933 : {
24934 : .name = discard_const_p(char, "pszNewDomainName"),
24935 : .get = py_DNS_RPC_AUTOCONFIGURE_get_pszNewDomainName,
24936 : .set = py_DNS_RPC_AUTOCONFIGURE_set_pszNewDomainName,
24937 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
24938 : },
24939 : { .name = NULL }
24940 : };
24941 :
24942 0 : static PyObject *py_DNS_RPC_AUTOCONFIGURE_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24943 : {
24944 0 : return pytalloc_new(struct DNS_RPC_AUTOCONFIGURE, type);
24945 : }
24946 :
24947 :
24948 : static PyTypeObject DNS_RPC_AUTOCONFIGURE_Type = {
24949 : PyVarObject_HEAD_INIT(NULL, 0)
24950 : .tp_name = "dnsserver.DNS_RPC_AUTOCONFIGURE",
24951 : .tp_getset = py_DNS_RPC_AUTOCONFIGURE_getsetters,
24952 : .tp_methods = NULL,
24953 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24954 : .tp_new = py_DNS_RPC_AUTOCONFIGURE_new,
24955 : };
24956 :
24957 :
24958 0 : static PyObject *py_DNSSRV_STAT_HEADER_get_StatId(PyObject *obj, void *closure)
24959 : {
24960 0 : struct DNSSRV_STAT_HEADER *object = pytalloc_get_ptr(obj);
24961 0 : PyObject *py_StatId;
24962 0 : py_StatId = PyLong_FromUnsignedLongLong((uint32_t)(object->StatId));
24963 0 : return py_StatId;
24964 : }
24965 :
24966 0 : static int py_DNSSRV_STAT_HEADER_set_StatId(PyObject *py_obj, PyObject *value, void *closure)
24967 : {
24968 0 : struct DNSSRV_STAT_HEADER *object = pytalloc_get_ptr(py_obj);
24969 0 : if (value == NULL) {
24970 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->StatId");
24971 0 : return -1;
24972 : }
24973 : {
24974 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->StatId));
24975 0 : if (PyLong_Check(value)) {
24976 0 : unsigned long long test_var;
24977 0 : test_var = PyLong_AsUnsignedLongLong(value);
24978 0 : if (PyErr_Occurred() != NULL) {
24979 0 : return -1;
24980 : }
24981 0 : if (test_var > uint_max) {
24982 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24983 : PyLong_Type.tp_name, uint_max, test_var);
24984 0 : return -1;
24985 : }
24986 0 : object->StatId = test_var;
24987 : } else {
24988 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24989 : PyLong_Type.tp_name);
24990 0 : return -1;
24991 : }
24992 : }
24993 0 : return 0;
24994 : }
24995 :
24996 0 : static PyObject *py_DNSSRV_STAT_HEADER_get_wLength(PyObject *obj, void *closure)
24997 : {
24998 0 : struct DNSSRV_STAT_HEADER *object = pytalloc_get_ptr(obj);
24999 0 : PyObject *py_wLength;
25000 0 : py_wLength = PyLong_FromLong((uint16_t)(object->wLength));
25001 0 : return py_wLength;
25002 : }
25003 :
25004 0 : static int py_DNSSRV_STAT_HEADER_set_wLength(PyObject *py_obj, PyObject *value, void *closure)
25005 : {
25006 0 : struct DNSSRV_STAT_HEADER *object = pytalloc_get_ptr(py_obj);
25007 0 : if (value == NULL) {
25008 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->wLength");
25009 0 : return -1;
25010 : }
25011 : {
25012 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wLength));
25013 0 : if (PyLong_Check(value)) {
25014 0 : unsigned long long test_var;
25015 0 : test_var = PyLong_AsUnsignedLongLong(value);
25016 0 : if (PyErr_Occurred() != NULL) {
25017 0 : return -1;
25018 : }
25019 0 : if (test_var > uint_max) {
25020 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
25021 : PyLong_Type.tp_name, uint_max, test_var);
25022 0 : return -1;
25023 : }
25024 0 : object->wLength = test_var;
25025 : } else {
25026 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
25027 : PyLong_Type.tp_name);
25028 0 : return -1;
25029 : }
25030 : }
25031 0 : return 0;
25032 : }
25033 :
25034 0 : static PyObject *py_DNSSRV_STAT_HEADER_get_fClear(PyObject *obj, void *closure)
25035 : {
25036 0 : struct DNSSRV_STAT_HEADER *object = pytalloc_get_ptr(obj);
25037 0 : PyObject *py_fClear;
25038 0 : py_fClear = PyLong_FromLong((uint16_t)(object->fClear));
25039 0 : return py_fClear;
25040 : }
25041 :
25042 0 : static int py_DNSSRV_STAT_HEADER_set_fClear(PyObject *py_obj, PyObject *value, void *closure)
25043 : {
25044 0 : struct DNSSRV_STAT_HEADER *object = pytalloc_get_ptr(py_obj);
25045 0 : if (value == NULL) {
25046 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fClear");
25047 0 : return -1;
25048 : }
25049 : {
25050 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fClear));
25051 0 : if (PyLong_Check(value)) {
25052 0 : unsigned long long test_var;
25053 0 : test_var = PyLong_AsUnsignedLongLong(value);
25054 0 : if (PyErr_Occurred() != NULL) {
25055 0 : return -1;
25056 : }
25057 0 : if (test_var > uint_max) {
25058 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
25059 : PyLong_Type.tp_name, uint_max, test_var);
25060 0 : return -1;
25061 : }
25062 0 : object->fClear = test_var;
25063 : } else {
25064 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
25065 : PyLong_Type.tp_name);
25066 0 : return -1;
25067 : }
25068 : }
25069 0 : return 0;
25070 : }
25071 :
25072 0 : static PyObject *py_DNSSRV_STAT_HEADER_get_fReserved(PyObject *obj, void *closure)
25073 : {
25074 0 : struct DNSSRV_STAT_HEADER *object = pytalloc_get_ptr(obj);
25075 0 : PyObject *py_fReserved;
25076 0 : py_fReserved = PyLong_FromLong((uint16_t)(object->fReserved));
25077 0 : return py_fReserved;
25078 : }
25079 :
25080 0 : static int py_DNSSRV_STAT_HEADER_set_fReserved(PyObject *py_obj, PyObject *value, void *closure)
25081 : {
25082 0 : struct DNSSRV_STAT_HEADER *object = pytalloc_get_ptr(py_obj);
25083 0 : if (value == NULL) {
25084 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->fReserved");
25085 0 : return -1;
25086 : }
25087 : {
25088 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fReserved));
25089 0 : if (PyLong_Check(value)) {
25090 0 : unsigned long long test_var;
25091 0 : test_var = PyLong_AsUnsignedLongLong(value);
25092 0 : if (PyErr_Occurred() != NULL) {
25093 0 : return -1;
25094 : }
25095 0 : if (test_var > uint_max) {
25096 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
25097 : PyLong_Type.tp_name, uint_max, test_var);
25098 0 : return -1;
25099 : }
25100 0 : object->fReserved = test_var;
25101 : } else {
25102 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
25103 : PyLong_Type.tp_name);
25104 0 : return -1;
25105 : }
25106 : }
25107 0 : return 0;
25108 : }
25109 :
25110 : static PyGetSetDef py_DNSSRV_STAT_HEADER_getsetters[] = {
25111 : {
25112 : .name = discard_const_p(char, "StatId"),
25113 : .get = py_DNSSRV_STAT_HEADER_get_StatId,
25114 : .set = py_DNSSRV_STAT_HEADER_set_StatId,
25115 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
25116 : },
25117 : {
25118 : .name = discard_const_p(char, "wLength"),
25119 : .get = py_DNSSRV_STAT_HEADER_get_wLength,
25120 : .set = py_DNSSRV_STAT_HEADER_set_wLength,
25121 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
25122 : },
25123 : {
25124 : .name = discard_const_p(char, "fClear"),
25125 : .get = py_DNSSRV_STAT_HEADER_get_fClear,
25126 : .set = py_DNSSRV_STAT_HEADER_set_fClear,
25127 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
25128 : },
25129 : {
25130 : .name = discard_const_p(char, "fReserved"),
25131 : .get = py_DNSSRV_STAT_HEADER_get_fReserved,
25132 : .set = py_DNSSRV_STAT_HEADER_set_fReserved,
25133 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
25134 : },
25135 : { .name = NULL }
25136 : };
25137 :
25138 0 : static PyObject *py_DNSSRV_STAT_HEADER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25139 : {
25140 0 : return pytalloc_new(struct DNSSRV_STAT_HEADER, type);
25141 : }
25142 :
25143 :
25144 : static PyTypeObject DNSSRV_STAT_HEADER_Type = {
25145 : PyVarObject_HEAD_INIT(NULL, 0)
25146 : .tp_name = "dnsserver.DNSSRV_STAT_HEADER",
25147 : .tp_getset = py_DNSSRV_STAT_HEADER_getsetters,
25148 : .tp_methods = NULL,
25149 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25150 : .tp_new = py_DNSSRV_STAT_HEADER_new,
25151 : };
25152 :
25153 :
25154 0 : static PyObject *py_DNSSRV_STAT_get_Header(PyObject *obj, void *closure)
25155 : {
25156 0 : struct DNSSRV_STAT *object = pytalloc_get_ptr(obj);
25157 0 : PyObject *py_Header;
25158 0 : py_Header = pytalloc_reference_ex(&DNSSRV_STAT_HEADER_Type, pytalloc_get_mem_ctx(obj), &object->Header);
25159 0 : return py_Header;
25160 : }
25161 :
25162 0 : static int py_DNSSRV_STAT_set_Header(PyObject *py_obj, PyObject *value, void *closure)
25163 : {
25164 0 : struct DNSSRV_STAT *object = pytalloc_get_ptr(py_obj);
25165 0 : if (value == NULL) {
25166 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->Header");
25167 0 : return -1;
25168 : }
25169 0 : PY_CHECK_TYPE(&DNSSRV_STAT_HEADER_Type, value, return -1;);
25170 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
25171 0 : PyErr_NoMemory();
25172 0 : return -1;
25173 : }
25174 0 : object->Header = *(struct DNSSRV_STAT_HEADER *)pytalloc_get_ptr(value);
25175 0 : return 0;
25176 : }
25177 :
25178 0 : static PyObject *py_DNSSRV_STAT_get_Buffer(PyObject *obj, void *closure)
25179 : {
25180 0 : struct DNSSRV_STAT *object = pytalloc_get_ptr(obj);
25181 0 : PyObject *py_Buffer;
25182 0 : py_Buffer = PyList_New(1);
25183 0 : if (py_Buffer == NULL) {
25184 0 : return NULL;
25185 : }
25186 : {
25187 : int Buffer_cntr_0;
25188 0 : for (Buffer_cntr_0 = 0; Buffer_cntr_0 < (1); Buffer_cntr_0++) {
25189 0 : PyObject *py_Buffer_0;
25190 0 : py_Buffer_0 = PyLong_FromLong((uint16_t)((object->Buffer)[Buffer_cntr_0]));
25191 0 : PyList_SetItem(py_Buffer, Buffer_cntr_0, py_Buffer_0);
25192 : }
25193 : }
25194 0 : return py_Buffer;
25195 : }
25196 :
25197 0 : static int py_DNSSRV_STAT_set_Buffer(PyObject *py_obj, PyObject *value, void *closure)
25198 : {
25199 0 : struct DNSSRV_STAT *object = pytalloc_get_ptr(py_obj);
25200 0 : if (value == NULL) {
25201 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->Buffer");
25202 0 : return -1;
25203 : }
25204 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
25205 : {
25206 0 : int Buffer_cntr_0;
25207 0 : if (ARRAY_SIZE(object->Buffer) != PyList_GET_SIZE(value)) {
25208 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));
25209 0 : return -1;
25210 : }
25211 0 : for (Buffer_cntr_0 = 0; Buffer_cntr_0 < PyList_GET_SIZE(value); Buffer_cntr_0++) {
25212 0 : if (PyList_GET_ITEM(value, Buffer_cntr_0) == NULL) {
25213 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->Buffer)[Buffer_cntr_0]");
25214 0 : return -1;
25215 : }
25216 : {
25217 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->Buffer)[Buffer_cntr_0]));
25218 0 : if (PyLong_Check(PyList_GET_ITEM(value, Buffer_cntr_0))) {
25219 0 : unsigned long long test_var;
25220 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, Buffer_cntr_0));
25221 0 : if (PyErr_Occurred() != NULL) {
25222 0 : return -1;
25223 : }
25224 0 : if (test_var > uint_max) {
25225 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
25226 : PyLong_Type.tp_name, uint_max, test_var);
25227 0 : return -1;
25228 : }
25229 0 : (object->Buffer)[Buffer_cntr_0] = test_var;
25230 : } else {
25231 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
25232 : PyLong_Type.tp_name);
25233 0 : return -1;
25234 : }
25235 : }
25236 : }
25237 : }
25238 0 : return 0;
25239 : }
25240 :
25241 : static PyGetSetDef py_DNSSRV_STAT_getsetters[] = {
25242 : {
25243 : .name = discard_const_p(char, "Header"),
25244 : .get = py_DNSSRV_STAT_get_Header,
25245 : .set = py_DNSSRV_STAT_set_Header,
25246 : .doc = discard_const_p(char, "PIDL-generated element of base type DNSSRV_STAT_HEADER")
25247 : },
25248 : {
25249 : .name = discard_const_p(char, "Buffer"),
25250 : .get = py_DNSSRV_STAT_get_Buffer,
25251 : .set = py_DNSSRV_STAT_set_Buffer,
25252 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
25253 : },
25254 : { .name = NULL }
25255 : };
25256 :
25257 0 : static PyObject *py_DNSSRV_STAT_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25258 : {
25259 0 : return pytalloc_new(struct DNSSRV_STAT, type);
25260 : }
25261 :
25262 :
25263 : static PyTypeObject DNSSRV_STAT_Type = {
25264 : PyVarObject_HEAD_INIT(NULL, 0)
25265 : .tp_name = "dnsserver.DNSSRV_STAT",
25266 : .tp_getset = py_DNSSRV_STAT_getsetters,
25267 : .tp_methods = NULL,
25268 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25269 : .tp_new = py_DNSSRV_STAT_new,
25270 : };
25271 :
25272 49 : static PyObject *py_import_DNSSRV_RPC_UNION(TALLOC_CTX *mem_ctx, int level, union DNSSRV_RPC_UNION *in)
25273 : {
25274 0 : PyObject *ret;
25275 :
25276 49 : switch (level) {
25277 0 : case DNSSRV_TYPEID_NULL:
25278 0 : if (in->Null == NULL) {
25279 0 : ret = Py_None;
25280 0 : Py_INCREF(ret);
25281 : } else {
25282 0 : ret = PyLong_FromLong((uint16_t)(*in->Null));
25283 : }
25284 0 : return ret;
25285 :
25286 0 : case DNSSRV_TYPEID_DWORD:
25287 0 : ret = PyLong_FromUnsignedLongLong((uint32_t)(in->Dword));
25288 0 : return ret;
25289 :
25290 0 : case DNSSRV_TYPEID_LPSTR:
25291 0 : if (in->String == NULL) {
25292 0 : ret = Py_None;
25293 0 : Py_INCREF(ret);
25294 : } else {
25295 0 : if (in->String == NULL) {
25296 0 : ret = Py_None;
25297 0 : Py_INCREF(ret);
25298 : } else {
25299 0 : ret = PyUnicode_Decode(in->String, strlen(in->String), "utf-8", "ignore");
25300 : }
25301 : }
25302 0 : return ret;
25303 :
25304 0 : case DNSSRV_TYPEID_LPWSTR:
25305 0 : if (in->WideString == NULL) {
25306 0 : ret = Py_None;
25307 0 : Py_INCREF(ret);
25308 : } else {
25309 0 : if (in->WideString == NULL) {
25310 0 : ret = Py_None;
25311 0 : Py_INCREF(ret);
25312 : } else {
25313 0 : ret = PyUnicode_Decode(in->WideString, strlen(in->WideString), "utf-8", "ignore");
25314 : }
25315 : }
25316 0 : return ret;
25317 :
25318 0 : case DNSSRV_TYPEID_IPARRAY:
25319 0 : if (in->IpArray == NULL) {
25320 0 : ret = Py_None;
25321 0 : Py_INCREF(ret);
25322 : } else {
25323 0 : ret = pytalloc_reference_ex(&IP4_ARRAY_Type, in->IpArray, in->IpArray);
25324 : }
25325 0 : return ret;
25326 :
25327 0 : case DNSSRV_TYPEID_BUFFER:
25328 0 : if (in->Buffer == NULL) {
25329 0 : ret = Py_None;
25330 0 : Py_INCREF(ret);
25331 : } else {
25332 0 : ret = pytalloc_reference_ex(&DNS_RPC_BUFFER_Type, in->Buffer, in->Buffer);
25333 : }
25334 0 : return ret;
25335 :
25336 4 : case DNSSRV_TYPEID_SERVER_INFO_W2K:
25337 4 : if (in->ServerInfoW2K == NULL) {
25338 0 : ret = Py_None;
25339 0 : Py_INCREF(ret);
25340 : } else {
25341 4 : ret = pytalloc_reference_ex(&DNS_RPC_SERVER_INFO_W2K_Type, in->ServerInfoW2K, in->ServerInfoW2K);
25342 : }
25343 4 : return ret;
25344 :
25345 0 : case DNSSRV_TYPEID_STATS:
25346 0 : if (in->Stats == NULL) {
25347 0 : ret = Py_None;
25348 0 : Py_INCREF(ret);
25349 : } else {
25350 0 : ret = pytalloc_reference_ex(&DNSSRV_STAT_Type, in->Stats, in->Stats);
25351 : }
25352 0 : return ret;
25353 :
25354 0 : case DNSSRV_TYPEID_FORWARDERS_W2K:
25355 0 : if (in->ForwardersW2K == NULL) {
25356 0 : ret = Py_None;
25357 0 : Py_INCREF(ret);
25358 : } else {
25359 0 : ret = pytalloc_reference_ex(&DNS_RPC_FORWARDERS_W2K_Type, in->ForwardersW2K, in->ForwardersW2K);
25360 : }
25361 0 : return ret;
25362 :
25363 0 : case DNSSRV_TYPEID_ZONE_W2K:
25364 0 : if (in->ZoneW2K == NULL) {
25365 0 : ret = Py_None;
25366 0 : Py_INCREF(ret);
25367 : } else {
25368 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_W2K_Type, in->ZoneW2K, in->ZoneW2K);
25369 : }
25370 0 : return ret;
25371 :
25372 0 : case DNSSRV_TYPEID_ZONE_INFO_W2K:
25373 0 : if (in->ZoneInfoW2K == NULL) {
25374 0 : ret = Py_None;
25375 0 : Py_INCREF(ret);
25376 : } else {
25377 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_INFO_W2K_Type, in->ZoneInfoW2K, in->ZoneInfoW2K);
25378 : }
25379 0 : return ret;
25380 :
25381 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_W2K:
25382 0 : if (in->SecondariesW2K == NULL) {
25383 0 : ret = Py_None;
25384 0 : Py_INCREF(ret);
25385 : } else {
25386 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_SECONDARIES_W2K_Type, in->SecondariesW2K, in->SecondariesW2K);
25387 : }
25388 0 : return ret;
25389 :
25390 0 : case DNSSRV_TYPEID_ZONE_DATABASE_W2K:
25391 0 : if (in->DatabaseW2K == NULL) {
25392 0 : ret = Py_None;
25393 0 : Py_INCREF(ret);
25394 : } else {
25395 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_DATABASE_W2K_Type, in->DatabaseW2K, in->DatabaseW2K);
25396 : }
25397 0 : return ret;
25398 :
25399 0 : case DNSSRV_TYPEID_ZONE_CREATE_W2K:
25400 0 : if (in->ZoneCreateW2K == NULL) {
25401 0 : ret = Py_None;
25402 0 : Py_INCREF(ret);
25403 : } else {
25404 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_CREATE_INFO_W2K_Type, in->ZoneCreateW2K, in->ZoneCreateW2K);
25405 : }
25406 0 : return ret;
25407 :
25408 0 : case DNSSRV_TYPEID_NAME_AND_PARAM:
25409 0 : if (in->NameAndParam == NULL) {
25410 0 : ret = Py_None;
25411 0 : Py_INCREF(ret);
25412 : } else {
25413 0 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_AND_PARAM_Type, in->NameAndParam, in->NameAndParam);
25414 : }
25415 0 : return ret;
25416 :
25417 0 : case DNSSRV_TYPEID_ZONE_LIST_W2K:
25418 0 : if (in->ZoneListW2K == NULL) {
25419 0 : ret = Py_None;
25420 0 : Py_INCREF(ret);
25421 : } else {
25422 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_LIST_W2K_Type, in->ZoneListW2K, in->ZoneListW2K);
25423 : }
25424 0 : return ret;
25425 :
25426 4 : case DNSSRV_TYPEID_SERVER_INFO_DOTNET:
25427 4 : if (in->ServerInfoDotNet == NULL) {
25428 0 : ret = Py_None;
25429 0 : Py_INCREF(ret);
25430 : } else {
25431 4 : ret = pytalloc_reference_ex(&DNS_RPC_SERVER_INFO_DOTNET_Type, in->ServerInfoDotNet, in->ServerInfoDotNet);
25432 : }
25433 4 : return ret;
25434 :
25435 0 : case DNSSRV_TYPEID_FORWARDERS_DOTNET:
25436 0 : if (in->ForwardersDotNet == NULL) {
25437 0 : ret = Py_None;
25438 0 : Py_INCREF(ret);
25439 : } else {
25440 0 : ret = pytalloc_reference_ex(&DNS_RPC_FORWARDERS_DOTNET_Type, in->ForwardersDotNet, in->ForwardersDotNet);
25441 : }
25442 0 : return ret;
25443 :
25444 0 : case DNSSRV_TYPEID_ZONE:
25445 0 : if (in->Zone == NULL) {
25446 0 : ret = Py_None;
25447 0 : Py_INCREF(ret);
25448 : } else {
25449 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_DOTNET_Type, in->Zone, in->Zone);
25450 : }
25451 0 : return ret;
25452 :
25453 0 : case DNSSRV_TYPEID_ZONE_INFO_DOTNET:
25454 0 : if (in->ZoneInfoDotNet == NULL) {
25455 0 : ret = Py_None;
25456 0 : Py_INCREF(ret);
25457 : } else {
25458 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_INFO_DOTNET_Type, in->ZoneInfoDotNet, in->ZoneInfoDotNet);
25459 : }
25460 0 : return ret;
25461 :
25462 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET:
25463 0 : if (in->SecondariesDotNet == NULL) {
25464 0 : ret = Py_None;
25465 0 : Py_INCREF(ret);
25466 : } else {
25467 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_SECONDARIES_DOTNET_Type, in->SecondariesDotNet, in->SecondariesDotNet);
25468 : }
25469 0 : return ret;
25470 :
25471 0 : case DNSSRV_TYPEID_ZONE_DATABASE:
25472 0 : if (in->Database == NULL) {
25473 0 : ret = Py_None;
25474 0 : Py_INCREF(ret);
25475 : } else {
25476 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_DATABASE_DOTNET_Type, in->Database, in->Database);
25477 : }
25478 0 : return ret;
25479 :
25480 0 : case DNSSRV_TYPEID_ZONE_CREATE_DOTNET:
25481 0 : if (in->ZoneCreateDotNet == NULL) {
25482 0 : ret = Py_None;
25483 0 : Py_INCREF(ret);
25484 : } else {
25485 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type, in->ZoneCreateDotNet, in->ZoneCreateDotNet);
25486 : }
25487 0 : return ret;
25488 :
25489 20 : case DNSSRV_TYPEID_ZONE_LIST:
25490 20 : if (in->ZoneList == NULL) {
25491 0 : ret = Py_None;
25492 0 : Py_INCREF(ret);
25493 : } else {
25494 20 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_LIST_DOTNET_Type, in->ZoneList, in->ZoneList);
25495 : }
25496 20 : return ret;
25497 :
25498 0 : case DNSSRV_TYPEID_ZONE_EXPORT:
25499 0 : if (in->ZoneExport == NULL) {
25500 0 : ret = Py_None;
25501 0 : Py_INCREF(ret);
25502 : } else {
25503 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_EXPORT_INFO_Type, in->ZoneExport, in->ZoneExport);
25504 : }
25505 0 : return ret;
25506 :
25507 0 : case DNSSRV_TYPEID_DP_INFO:
25508 0 : if (in->DirectoryPartition == NULL) {
25509 0 : ret = Py_None;
25510 0 : Py_INCREF(ret);
25511 : } else {
25512 0 : ret = pytalloc_reference_ex(&DNS_RPC_DP_INFO_Type, in->DirectoryPartition, in->DirectoryPartition);
25513 : }
25514 0 : return ret;
25515 :
25516 0 : case DNSSRV_TYPEID_DP_ENUM:
25517 0 : if (in->DirectoryPartitionEnum == NULL) {
25518 0 : ret = Py_None;
25519 0 : Py_INCREF(ret);
25520 : } else {
25521 0 : ret = pytalloc_reference_ex(&DNS_RPC_DP_ENUM_Type, in->DirectoryPartitionEnum, in->DirectoryPartitionEnum);
25522 : }
25523 0 : return ret;
25524 :
25525 0 : case DNSSRV_TYPEID_DP_LIST:
25526 0 : if (in->DirectoryPartitionList == NULL) {
25527 0 : ret = Py_None;
25528 0 : Py_INCREF(ret);
25529 : } else {
25530 0 : ret = pytalloc_reference_ex(&DNS_RPC_DP_LIST_Type, in->DirectoryPartitionList, in->DirectoryPartitionList);
25531 : }
25532 0 : return ret;
25533 :
25534 0 : case DNSSRV_TYPEID_ENLIST_DP:
25535 0 : if (in->EnlistDirectoryPartition == NULL) {
25536 0 : ret = Py_None;
25537 0 : Py_INCREF(ret);
25538 : } else {
25539 0 : ret = pytalloc_reference_ex(&DNS_RPC_ENLIST_DP_Type, in->EnlistDirectoryPartition, in->EnlistDirectoryPartition);
25540 : }
25541 0 : return ret;
25542 :
25543 0 : case DNSSRV_TYPEID_ZONE_CHANGE_DP:
25544 0 : if (in->ZoneChangeDirectoryPartition == NULL) {
25545 0 : ret = Py_None;
25546 0 : Py_INCREF(ret);
25547 : } else {
25548 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_CHANGE_DP_Type, in->ZoneChangeDirectoryPartition, in->ZoneChangeDirectoryPartition);
25549 : }
25550 0 : return ret;
25551 :
25552 0 : case DNSSRV_TYPEID_ENUM_ZONES_FILTER:
25553 0 : if (in->EnumZonesFilter == NULL) {
25554 0 : ret = Py_None;
25555 0 : Py_INCREF(ret);
25556 : } else {
25557 0 : ret = pytalloc_reference_ex(&DNS_RPC_ENUM_ZONES_FILTER_Type, in->EnumZonesFilter, in->EnumZonesFilter);
25558 : }
25559 0 : return ret;
25560 :
25561 0 : case DNSSRV_TYPEID_ADDRARRAY:
25562 0 : if (in->AddrArray == NULL) {
25563 0 : ret = Py_None;
25564 0 : Py_INCREF(ret);
25565 : } else {
25566 0 : ret = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, in->AddrArray, in->AddrArray);
25567 : }
25568 0 : return ret;
25569 :
25570 4 : case DNSSRV_TYPEID_SERVER_INFO:
25571 4 : if (in->ServerInfo == NULL) {
25572 0 : ret = Py_None;
25573 0 : Py_INCREF(ret);
25574 : } else {
25575 4 : ret = pytalloc_reference_ex(&DNS_RPC_SERVER_INFO_LONGHORN_Type, in->ServerInfo, in->ServerInfo);
25576 : }
25577 4 : return ret;
25578 :
25579 0 : case DNSSRV_TYPEID_ZONE_CREATE:
25580 0 : if (in->ZoneCreate == NULL) {
25581 0 : ret = Py_None;
25582 0 : Py_INCREF(ret);
25583 : } else {
25584 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type, in->ZoneCreate, in->ZoneCreate);
25585 : }
25586 0 : return ret;
25587 :
25588 0 : case DNSSRV_TYPEID_FORWARDERS:
25589 0 : if (in->Forwarders == NULL) {
25590 0 : ret = Py_None;
25591 0 : Py_INCREF(ret);
25592 : } else {
25593 0 : ret = pytalloc_reference_ex(&DNS_RPC_FORWARDERS_LONGHORN_Type, in->Forwarders, in->Forwarders);
25594 : }
25595 0 : return ret;
25596 :
25597 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES:
25598 0 : if (in->Secondaries == NULL) {
25599 0 : ret = Py_None;
25600 0 : Py_INCREF(ret);
25601 : } else {
25602 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type, in->Secondaries, in->Secondaries);
25603 : }
25604 0 : return ret;
25605 :
25606 0 : case DNSSRV_TYPEID_IP_VALIDATE:
25607 0 : if (in->IpValidate == NULL) {
25608 0 : ret = Py_None;
25609 0 : Py_INCREF(ret);
25610 : } else {
25611 0 : ret = pytalloc_reference_ex(&DNS_RPC_IP_VALIDATE_Type, in->IpValidate, in->IpValidate);
25612 : }
25613 0 : return ret;
25614 :
25615 17 : case DNSSRV_TYPEID_ZONE_INFO:
25616 17 : if (in->ZoneInfo == NULL) {
25617 0 : ret = Py_None;
25618 0 : Py_INCREF(ret);
25619 : } else {
25620 17 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_INFO_LONGHORN_Type, in->ZoneInfo, in->ZoneInfo);
25621 : }
25622 17 : return ret;
25623 :
25624 0 : case DNSSRV_TYPEID_AUTOCONFIGURE:
25625 0 : if (in->AutoConfigure == NULL) {
25626 0 : ret = Py_None;
25627 0 : Py_INCREF(ret);
25628 : } else {
25629 0 : ret = pytalloc_reference_ex(&DNS_RPC_AUTOCONFIGURE_Type, in->AutoConfigure, in->AutoConfigure);
25630 : }
25631 0 : return ret;
25632 :
25633 0 : case DNSSRV_TYPEID_UTF8_STRING_LIST:
25634 0 : if (in->Utf8StringList == NULL) {
25635 0 : ret = Py_None;
25636 0 : Py_INCREF(ret);
25637 : } else {
25638 0 : ret = pytalloc_reference_ex(&DNS_RPC_UTF8_STRING_LIST_Type, in->Utf8StringList, in->Utf8StringList);
25639 : }
25640 0 : return ret;
25641 :
25642 : }
25643 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
25644 0 : return NULL;
25645 : }
25646 :
25647 1675 : static union DNSSRV_RPC_UNION *py_export_DNSSRV_RPC_UNION(TALLOC_CTX *mem_ctx, int level, PyObject *in)
25648 : {
25649 1675 : union DNSSRV_RPC_UNION *ret = talloc_zero(mem_ctx, union DNSSRV_RPC_UNION);
25650 1675 : switch (level) {
25651 429 : case DNSSRV_TYPEID_NULL:
25652 429 : if (in == NULL) {
25653 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->Null");
25654 0 : talloc_free(ret); return NULL;
25655 : }
25656 429 : if (in == Py_None) {
25657 429 : ret->Null = NULL;
25658 : } else {
25659 0 : ret->Null = talloc_ptrtype(mem_ctx, ret->Null);
25660 0 : if (ret->Null == NULL) {
25661 0 : PyErr_NoMemory();
25662 0 : talloc_free(ret); return NULL;
25663 : }
25664 : {
25665 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*ret->Null));
25666 0 : if (PyLong_Check(in)) {
25667 0 : unsigned long long test_var;
25668 0 : test_var = PyLong_AsUnsignedLongLong(in);
25669 0 : if (PyErr_Occurred() != NULL) {
25670 0 : talloc_free(ret); return NULL;
25671 : }
25672 0 : if (test_var > uint_max) {
25673 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
25674 : PyLong_Type.tp_name, uint_max, test_var);
25675 0 : talloc_free(ret); return NULL;
25676 : }
25677 0 : *ret->Null = test_var;
25678 : } else {
25679 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
25680 : PyLong_Type.tp_name);
25681 0 : talloc_free(ret); return NULL;
25682 : }
25683 : }
25684 : }
25685 429 : break;
25686 :
25687 20 : case DNSSRV_TYPEID_DWORD:
25688 20 : if (in == NULL) {
25689 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->Dword");
25690 0 : talloc_free(ret); return NULL;
25691 : }
25692 : {
25693 20 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->Dword));
25694 20 : if (PyLong_Check(in)) {
25695 0 : unsigned long long test_var;
25696 20 : test_var = PyLong_AsUnsignedLongLong(in);
25697 20 : if (PyErr_Occurred() != NULL) {
25698 0 : talloc_free(ret); return NULL;
25699 : }
25700 20 : if (test_var > uint_max) {
25701 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
25702 : PyLong_Type.tp_name, uint_max, test_var);
25703 0 : talloc_free(ret); return NULL;
25704 : }
25705 20 : ret->Dword = test_var;
25706 : } else {
25707 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
25708 : PyLong_Type.tp_name);
25709 0 : talloc_free(ret); return NULL;
25710 : }
25711 : }
25712 20 : break;
25713 :
25714 0 : case DNSSRV_TYPEID_LPSTR:
25715 0 : if (in == NULL) {
25716 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->String");
25717 0 : talloc_free(ret); return NULL;
25718 : }
25719 0 : if (in == Py_None) {
25720 0 : ret->String = NULL;
25721 : } else {
25722 0 : ret->String = NULL;
25723 : {
25724 0 : const char *test_str;
25725 0 : const char *talloc_str;
25726 0 : PyObject *unicode = NULL;
25727 0 : if (PyUnicode_Check(in)) {
25728 0 : unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
25729 0 : if (unicode == NULL) {
25730 0 : talloc_free(ret); return NULL;
25731 : }
25732 0 : test_str = PyBytes_AS_STRING(unicode);
25733 0 : } else if (PyBytes_Check(in)) {
25734 0 : test_str = PyBytes_AS_STRING(in);
25735 : } else {
25736 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
25737 0 : talloc_free(ret); return NULL;
25738 : }
25739 0 : talloc_str = talloc_strdup(mem_ctx, test_str);
25740 0 : if (unicode != NULL) {
25741 0 : Py_DECREF(unicode);
25742 : }
25743 0 : if (talloc_str == NULL) {
25744 0 : PyErr_NoMemory();
25745 0 : talloc_free(ret); return NULL;
25746 : }
25747 0 : ret->String = talloc_str;
25748 : }
25749 : }
25750 0 : break;
25751 :
25752 0 : case DNSSRV_TYPEID_LPWSTR:
25753 0 : if (in == NULL) {
25754 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->WideString");
25755 0 : talloc_free(ret); return NULL;
25756 : }
25757 0 : if (in == Py_None) {
25758 0 : ret->WideString = NULL;
25759 : } else {
25760 0 : ret->WideString = NULL;
25761 : {
25762 0 : const char *test_str;
25763 0 : const char *talloc_str;
25764 0 : PyObject *unicode = NULL;
25765 0 : if (PyUnicode_Check(in)) {
25766 0 : unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
25767 0 : if (unicode == NULL) {
25768 0 : talloc_free(ret); return NULL;
25769 : }
25770 0 : test_str = PyBytes_AS_STRING(unicode);
25771 0 : } else if (PyBytes_Check(in)) {
25772 0 : test_str = PyBytes_AS_STRING(in);
25773 : } else {
25774 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
25775 0 : talloc_free(ret); return NULL;
25776 : }
25777 0 : talloc_str = talloc_strdup(mem_ctx, test_str);
25778 0 : if (unicode != NULL) {
25779 0 : Py_DECREF(unicode);
25780 : }
25781 0 : if (talloc_str == NULL) {
25782 0 : PyErr_NoMemory();
25783 0 : talloc_free(ret); return NULL;
25784 : }
25785 0 : ret->WideString = talloc_str;
25786 : }
25787 : }
25788 0 : break;
25789 :
25790 0 : case DNSSRV_TYPEID_IPARRAY:
25791 0 : if (in == NULL) {
25792 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->IpArray");
25793 0 : talloc_free(ret); return NULL;
25794 : }
25795 0 : if (in == Py_None) {
25796 0 : ret->IpArray = NULL;
25797 : } else {
25798 0 : ret->IpArray = NULL;
25799 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, in, talloc_free(ret); return NULL;);
25800 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25801 0 : PyErr_NoMemory();
25802 0 : talloc_free(ret); return NULL;
25803 : }
25804 0 : ret->IpArray = (struct IP4_ARRAY *)pytalloc_get_ptr(in);
25805 : }
25806 0 : break;
25807 :
25808 0 : case DNSSRV_TYPEID_BUFFER:
25809 0 : if (in == NULL) {
25810 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->Buffer");
25811 0 : talloc_free(ret); return NULL;
25812 : }
25813 0 : if (in == Py_None) {
25814 0 : ret->Buffer = NULL;
25815 : } else {
25816 0 : ret->Buffer = NULL;
25817 0 : PY_CHECK_TYPE(&DNS_RPC_BUFFER_Type, in, talloc_free(ret); return NULL;);
25818 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25819 0 : PyErr_NoMemory();
25820 0 : talloc_free(ret); return NULL;
25821 : }
25822 0 : ret->Buffer = (struct DNS_RPC_BUFFER *)pytalloc_get_ptr(in);
25823 : }
25824 0 : break;
25825 :
25826 0 : case DNSSRV_TYPEID_SERVER_INFO_W2K:
25827 0 : if (in == NULL) {
25828 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ServerInfoW2K");
25829 0 : talloc_free(ret); return NULL;
25830 : }
25831 0 : if (in == Py_None) {
25832 0 : ret->ServerInfoW2K = NULL;
25833 : } else {
25834 0 : ret->ServerInfoW2K = NULL;
25835 0 : PY_CHECK_TYPE(&DNS_RPC_SERVER_INFO_W2K_Type, in, talloc_free(ret); return NULL;);
25836 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25837 0 : PyErr_NoMemory();
25838 0 : talloc_free(ret); return NULL;
25839 : }
25840 0 : ret->ServerInfoW2K = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(in);
25841 : }
25842 0 : break;
25843 :
25844 0 : case DNSSRV_TYPEID_STATS:
25845 0 : if (in == NULL) {
25846 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->Stats");
25847 0 : talloc_free(ret); return NULL;
25848 : }
25849 0 : if (in == Py_None) {
25850 0 : ret->Stats = NULL;
25851 : } else {
25852 0 : ret->Stats = NULL;
25853 0 : PY_CHECK_TYPE(&DNSSRV_STAT_Type, in, talloc_free(ret); return NULL;);
25854 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25855 0 : PyErr_NoMemory();
25856 0 : talloc_free(ret); return NULL;
25857 : }
25858 0 : ret->Stats = (struct DNSSRV_STAT *)pytalloc_get_ptr(in);
25859 : }
25860 0 : break;
25861 :
25862 0 : case DNSSRV_TYPEID_FORWARDERS_W2K:
25863 0 : if (in == NULL) {
25864 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ForwardersW2K");
25865 0 : talloc_free(ret); return NULL;
25866 : }
25867 0 : if (in == Py_None) {
25868 0 : ret->ForwardersW2K = NULL;
25869 : } else {
25870 0 : ret->ForwardersW2K = NULL;
25871 0 : PY_CHECK_TYPE(&DNS_RPC_FORWARDERS_W2K_Type, in, talloc_free(ret); return NULL;);
25872 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25873 0 : PyErr_NoMemory();
25874 0 : talloc_free(ret); return NULL;
25875 : }
25876 0 : ret->ForwardersW2K = (struct DNS_RPC_FORWARDERS_W2K *)pytalloc_get_ptr(in);
25877 : }
25878 0 : break;
25879 :
25880 0 : case DNSSRV_TYPEID_ZONE_W2K:
25881 0 : if (in == NULL) {
25882 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ZoneW2K");
25883 0 : talloc_free(ret); return NULL;
25884 : }
25885 0 : if (in == Py_None) {
25886 0 : ret->ZoneW2K = NULL;
25887 : } else {
25888 0 : ret->ZoneW2K = NULL;
25889 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_W2K_Type, in, talloc_free(ret); return NULL;);
25890 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25891 0 : PyErr_NoMemory();
25892 0 : talloc_free(ret); return NULL;
25893 : }
25894 0 : ret->ZoneW2K = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(in);
25895 : }
25896 0 : break;
25897 :
25898 0 : case DNSSRV_TYPEID_ZONE_INFO_W2K:
25899 0 : if (in == NULL) {
25900 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ZoneInfoW2K");
25901 0 : talloc_free(ret); return NULL;
25902 : }
25903 0 : if (in == Py_None) {
25904 0 : ret->ZoneInfoW2K = NULL;
25905 : } else {
25906 0 : ret->ZoneInfoW2K = NULL;
25907 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_INFO_W2K_Type, in, talloc_free(ret); return NULL;);
25908 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25909 0 : PyErr_NoMemory();
25910 0 : talloc_free(ret); return NULL;
25911 : }
25912 0 : ret->ZoneInfoW2K = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(in);
25913 : }
25914 0 : break;
25915 :
25916 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_W2K:
25917 0 : if (in == NULL) {
25918 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->SecondariesW2K");
25919 0 : talloc_free(ret); return NULL;
25920 : }
25921 0 : if (in == Py_None) {
25922 0 : ret->SecondariesW2K = NULL;
25923 : } else {
25924 0 : ret->SecondariesW2K = NULL;
25925 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_SECONDARIES_W2K_Type, in, talloc_free(ret); return NULL;);
25926 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25927 0 : PyErr_NoMemory();
25928 0 : talloc_free(ret); return NULL;
25929 : }
25930 0 : ret->SecondariesW2K = (struct DNS_RPC_ZONE_SECONDARIES_W2K *)pytalloc_get_ptr(in);
25931 : }
25932 0 : break;
25933 :
25934 0 : case DNSSRV_TYPEID_ZONE_DATABASE_W2K:
25935 0 : if (in == NULL) {
25936 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->DatabaseW2K");
25937 0 : talloc_free(ret); return NULL;
25938 : }
25939 0 : if (in == Py_None) {
25940 0 : ret->DatabaseW2K = NULL;
25941 : } else {
25942 0 : ret->DatabaseW2K = NULL;
25943 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_DATABASE_W2K_Type, in, talloc_free(ret); return NULL;);
25944 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25945 0 : PyErr_NoMemory();
25946 0 : talloc_free(ret); return NULL;
25947 : }
25948 0 : ret->DatabaseW2K = (struct DNS_RPC_ZONE_DATABASE_W2K *)pytalloc_get_ptr(in);
25949 : }
25950 0 : break;
25951 :
25952 0 : case DNSSRV_TYPEID_ZONE_CREATE_W2K:
25953 0 : if (in == NULL) {
25954 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ZoneCreateW2K");
25955 0 : talloc_free(ret); return NULL;
25956 : }
25957 0 : if (in == Py_None) {
25958 0 : ret->ZoneCreateW2K = NULL;
25959 : } else {
25960 0 : ret->ZoneCreateW2K = NULL;
25961 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_CREATE_INFO_W2K_Type, in, talloc_free(ret); return NULL;);
25962 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25963 0 : PyErr_NoMemory();
25964 0 : talloc_free(ret); return NULL;
25965 : }
25966 0 : ret->ZoneCreateW2K = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(in);
25967 : }
25968 0 : break;
25969 :
25970 799 : case DNSSRV_TYPEID_NAME_AND_PARAM:
25971 799 : if (in == NULL) {
25972 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->NameAndParam");
25973 0 : talloc_free(ret); return NULL;
25974 : }
25975 799 : if (in == Py_None) {
25976 0 : ret->NameAndParam = NULL;
25977 : } else {
25978 799 : ret->NameAndParam = NULL;
25979 799 : PY_CHECK_TYPE(&DNS_RPC_NAME_AND_PARAM_Type, in, talloc_free(ret); return NULL;);
25980 799 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25981 0 : PyErr_NoMemory();
25982 0 : talloc_free(ret); return NULL;
25983 : }
25984 799 : ret->NameAndParam = (struct DNS_RPC_NAME_AND_PARAM *)pytalloc_get_ptr(in);
25985 : }
25986 799 : break;
25987 :
25988 0 : case DNSSRV_TYPEID_ZONE_LIST_W2K:
25989 0 : if (in == NULL) {
25990 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ZoneListW2K");
25991 0 : talloc_free(ret); return NULL;
25992 : }
25993 0 : if (in == Py_None) {
25994 0 : ret->ZoneListW2K = NULL;
25995 : } else {
25996 0 : ret->ZoneListW2K = NULL;
25997 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_LIST_W2K_Type, in, talloc_free(ret); return NULL;);
25998 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25999 0 : PyErr_NoMemory();
26000 0 : talloc_free(ret); return NULL;
26001 : }
26002 0 : ret->ZoneListW2K = (struct DNS_RPC_ZONE_LIST_W2K *)pytalloc_get_ptr(in);
26003 : }
26004 0 : break;
26005 :
26006 0 : case DNSSRV_TYPEID_SERVER_INFO_DOTNET:
26007 0 : if (in == NULL) {
26008 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ServerInfoDotNet");
26009 0 : talloc_free(ret); return NULL;
26010 : }
26011 0 : if (in == Py_None) {
26012 0 : ret->ServerInfoDotNet = NULL;
26013 : } else {
26014 0 : ret->ServerInfoDotNet = NULL;
26015 0 : PY_CHECK_TYPE(&DNS_RPC_SERVER_INFO_DOTNET_Type, in, talloc_free(ret); return NULL;);
26016 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26017 0 : PyErr_NoMemory();
26018 0 : talloc_free(ret); return NULL;
26019 : }
26020 0 : ret->ServerInfoDotNet = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(in);
26021 : }
26022 0 : break;
26023 :
26024 0 : case DNSSRV_TYPEID_FORWARDERS_DOTNET:
26025 0 : if (in == NULL) {
26026 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ForwardersDotNet");
26027 0 : talloc_free(ret); return NULL;
26028 : }
26029 0 : if (in == Py_None) {
26030 0 : ret->ForwardersDotNet = NULL;
26031 : } else {
26032 0 : ret->ForwardersDotNet = NULL;
26033 0 : PY_CHECK_TYPE(&DNS_RPC_FORWARDERS_DOTNET_Type, in, talloc_free(ret); return NULL;);
26034 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26035 0 : PyErr_NoMemory();
26036 0 : talloc_free(ret); return NULL;
26037 : }
26038 0 : ret->ForwardersDotNet = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(in);
26039 : }
26040 0 : break;
26041 :
26042 0 : case DNSSRV_TYPEID_ZONE:
26043 0 : if (in == NULL) {
26044 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->Zone");
26045 0 : talloc_free(ret); return NULL;
26046 : }
26047 0 : if (in == Py_None) {
26048 0 : ret->Zone = NULL;
26049 : } else {
26050 0 : ret->Zone = NULL;
26051 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_DOTNET_Type, in, talloc_free(ret); return NULL;);
26052 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26053 0 : PyErr_NoMemory();
26054 0 : talloc_free(ret); return NULL;
26055 : }
26056 0 : ret->Zone = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(in);
26057 : }
26058 0 : break;
26059 :
26060 0 : case DNSSRV_TYPEID_ZONE_INFO_DOTNET:
26061 0 : if (in == NULL) {
26062 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ZoneInfoDotNet");
26063 0 : talloc_free(ret); return NULL;
26064 : }
26065 0 : if (in == Py_None) {
26066 0 : ret->ZoneInfoDotNet = NULL;
26067 : } else {
26068 0 : ret->ZoneInfoDotNet = NULL;
26069 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_INFO_DOTNET_Type, in, talloc_free(ret); return NULL;);
26070 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26071 0 : PyErr_NoMemory();
26072 0 : talloc_free(ret); return NULL;
26073 : }
26074 0 : ret->ZoneInfoDotNet = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(in);
26075 : }
26076 0 : break;
26077 :
26078 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET:
26079 0 : if (in == NULL) {
26080 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->SecondariesDotNet");
26081 0 : talloc_free(ret); return NULL;
26082 : }
26083 0 : if (in == Py_None) {
26084 0 : ret->SecondariesDotNet = NULL;
26085 : } else {
26086 0 : ret->SecondariesDotNet = NULL;
26087 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_SECONDARIES_DOTNET_Type, in, talloc_free(ret); return NULL;);
26088 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26089 0 : PyErr_NoMemory();
26090 0 : talloc_free(ret); return NULL;
26091 : }
26092 0 : ret->SecondariesDotNet = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(in);
26093 : }
26094 0 : break;
26095 :
26096 0 : case DNSSRV_TYPEID_ZONE_DATABASE:
26097 0 : if (in == NULL) {
26098 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->Database");
26099 0 : talloc_free(ret); return NULL;
26100 : }
26101 0 : if (in == Py_None) {
26102 0 : ret->Database = NULL;
26103 : } else {
26104 0 : ret->Database = NULL;
26105 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_DATABASE_DOTNET_Type, in, talloc_free(ret); return NULL;);
26106 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26107 0 : PyErr_NoMemory();
26108 0 : talloc_free(ret); return NULL;
26109 : }
26110 0 : ret->Database = (struct DNS_RPC_ZONE_DATABASE_DOTNET *)pytalloc_get_ptr(in);
26111 : }
26112 0 : break;
26113 :
26114 0 : case DNSSRV_TYPEID_ZONE_CREATE_DOTNET:
26115 0 : if (in == NULL) {
26116 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ZoneCreateDotNet");
26117 0 : talloc_free(ret); return NULL;
26118 : }
26119 0 : if (in == Py_None) {
26120 0 : ret->ZoneCreateDotNet = NULL;
26121 : } else {
26122 0 : ret->ZoneCreateDotNet = NULL;
26123 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type, in, talloc_free(ret); return NULL;);
26124 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26125 0 : PyErr_NoMemory();
26126 0 : talloc_free(ret); return NULL;
26127 : }
26128 0 : ret->ZoneCreateDotNet = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(in);
26129 : }
26130 0 : break;
26131 :
26132 0 : case DNSSRV_TYPEID_ZONE_LIST:
26133 0 : if (in == NULL) {
26134 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ZoneList");
26135 0 : talloc_free(ret); return NULL;
26136 : }
26137 0 : if (in == Py_None) {
26138 0 : ret->ZoneList = NULL;
26139 : } else {
26140 0 : ret->ZoneList = NULL;
26141 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_LIST_DOTNET_Type, in, talloc_free(ret); return NULL;);
26142 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26143 0 : PyErr_NoMemory();
26144 0 : talloc_free(ret); return NULL;
26145 : }
26146 0 : ret->ZoneList = (struct DNS_RPC_ZONE_LIST_DOTNET *)pytalloc_get_ptr(in);
26147 : }
26148 0 : break;
26149 :
26150 0 : case DNSSRV_TYPEID_ZONE_EXPORT:
26151 0 : if (in == NULL) {
26152 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ZoneExport");
26153 0 : talloc_free(ret); return NULL;
26154 : }
26155 0 : if (in == Py_None) {
26156 0 : ret->ZoneExport = NULL;
26157 : } else {
26158 0 : ret->ZoneExport = NULL;
26159 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_EXPORT_INFO_Type, in, talloc_free(ret); return NULL;);
26160 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26161 0 : PyErr_NoMemory();
26162 0 : talloc_free(ret); return NULL;
26163 : }
26164 0 : ret->ZoneExport = (struct DNS_RPC_ZONE_EXPORT_INFO *)pytalloc_get_ptr(in);
26165 : }
26166 0 : break;
26167 :
26168 0 : case DNSSRV_TYPEID_DP_INFO:
26169 0 : if (in == NULL) {
26170 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->DirectoryPartition");
26171 0 : talloc_free(ret); return NULL;
26172 : }
26173 0 : if (in == Py_None) {
26174 0 : ret->DirectoryPartition = NULL;
26175 : } else {
26176 0 : ret->DirectoryPartition = NULL;
26177 0 : PY_CHECK_TYPE(&DNS_RPC_DP_INFO_Type, in, talloc_free(ret); return NULL;);
26178 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26179 0 : PyErr_NoMemory();
26180 0 : talloc_free(ret); return NULL;
26181 : }
26182 0 : ret->DirectoryPartition = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(in);
26183 : }
26184 0 : break;
26185 :
26186 0 : case DNSSRV_TYPEID_DP_ENUM:
26187 0 : if (in == NULL) {
26188 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->DirectoryPartitionEnum");
26189 0 : talloc_free(ret); return NULL;
26190 : }
26191 0 : if (in == Py_None) {
26192 0 : ret->DirectoryPartitionEnum = NULL;
26193 : } else {
26194 0 : ret->DirectoryPartitionEnum = NULL;
26195 0 : PY_CHECK_TYPE(&DNS_RPC_DP_ENUM_Type, in, talloc_free(ret); return NULL;);
26196 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26197 0 : PyErr_NoMemory();
26198 0 : talloc_free(ret); return NULL;
26199 : }
26200 0 : ret->DirectoryPartitionEnum = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(in);
26201 : }
26202 0 : break;
26203 :
26204 0 : case DNSSRV_TYPEID_DP_LIST:
26205 0 : if (in == NULL) {
26206 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->DirectoryPartitionList");
26207 0 : talloc_free(ret); return NULL;
26208 : }
26209 0 : if (in == Py_None) {
26210 0 : ret->DirectoryPartitionList = NULL;
26211 : } else {
26212 0 : ret->DirectoryPartitionList = NULL;
26213 0 : PY_CHECK_TYPE(&DNS_RPC_DP_LIST_Type, in, talloc_free(ret); return NULL;);
26214 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26215 0 : PyErr_NoMemory();
26216 0 : talloc_free(ret); return NULL;
26217 : }
26218 0 : ret->DirectoryPartitionList = (struct DNS_RPC_DP_LIST *)pytalloc_get_ptr(in);
26219 : }
26220 0 : break;
26221 :
26222 0 : case DNSSRV_TYPEID_ENLIST_DP:
26223 0 : if (in == NULL) {
26224 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->EnlistDirectoryPartition");
26225 0 : talloc_free(ret); return NULL;
26226 : }
26227 0 : if (in == Py_None) {
26228 0 : ret->EnlistDirectoryPartition = NULL;
26229 : } else {
26230 0 : ret->EnlistDirectoryPartition = NULL;
26231 0 : PY_CHECK_TYPE(&DNS_RPC_ENLIST_DP_Type, in, talloc_free(ret); return NULL;);
26232 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26233 0 : PyErr_NoMemory();
26234 0 : talloc_free(ret); return NULL;
26235 : }
26236 0 : ret->EnlistDirectoryPartition = (struct DNS_RPC_ENLIST_DP *)pytalloc_get_ptr(in);
26237 : }
26238 0 : break;
26239 :
26240 0 : case DNSSRV_TYPEID_ZONE_CHANGE_DP:
26241 0 : if (in == NULL) {
26242 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ZoneChangeDirectoryPartition");
26243 0 : talloc_free(ret); return NULL;
26244 : }
26245 0 : if (in == Py_None) {
26246 0 : ret->ZoneChangeDirectoryPartition = NULL;
26247 : } else {
26248 0 : ret->ZoneChangeDirectoryPartition = NULL;
26249 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_CHANGE_DP_Type, in, talloc_free(ret); return NULL;);
26250 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26251 0 : PyErr_NoMemory();
26252 0 : talloc_free(ret); return NULL;
26253 : }
26254 0 : ret->ZoneChangeDirectoryPartition = (struct DNS_RPC_ZONE_CHANGE_DP *)pytalloc_get_ptr(in);
26255 : }
26256 0 : break;
26257 :
26258 0 : case DNSSRV_TYPEID_ENUM_ZONES_FILTER:
26259 0 : if (in == NULL) {
26260 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->EnumZonesFilter");
26261 0 : talloc_free(ret); return NULL;
26262 : }
26263 0 : if (in == Py_None) {
26264 0 : ret->EnumZonesFilter = NULL;
26265 : } else {
26266 0 : ret->EnumZonesFilter = NULL;
26267 0 : PY_CHECK_TYPE(&DNS_RPC_ENUM_ZONES_FILTER_Type, in, talloc_free(ret); return NULL;);
26268 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26269 0 : PyErr_NoMemory();
26270 0 : talloc_free(ret); return NULL;
26271 : }
26272 0 : ret->EnumZonesFilter = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(in);
26273 : }
26274 0 : break;
26275 :
26276 0 : case DNSSRV_TYPEID_ADDRARRAY:
26277 0 : if (in == NULL) {
26278 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->AddrArray");
26279 0 : talloc_free(ret); return NULL;
26280 : }
26281 0 : if (in == Py_None) {
26282 0 : ret->AddrArray = NULL;
26283 : } else {
26284 0 : ret->AddrArray = NULL;
26285 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, in, talloc_free(ret); return NULL;);
26286 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26287 0 : PyErr_NoMemory();
26288 0 : talloc_free(ret); return NULL;
26289 : }
26290 0 : ret->AddrArray = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(in);
26291 : }
26292 0 : break;
26293 :
26294 0 : case DNSSRV_TYPEID_SERVER_INFO:
26295 0 : if (in == NULL) {
26296 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ServerInfo");
26297 0 : talloc_free(ret); return NULL;
26298 : }
26299 0 : if (in == Py_None) {
26300 0 : ret->ServerInfo = NULL;
26301 : } else {
26302 0 : ret->ServerInfo = NULL;
26303 0 : PY_CHECK_TYPE(&DNS_RPC_SERVER_INFO_LONGHORN_Type, in, talloc_free(ret); return NULL;);
26304 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26305 0 : PyErr_NoMemory();
26306 0 : talloc_free(ret); return NULL;
26307 : }
26308 0 : ret->ServerInfo = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(in);
26309 : }
26310 0 : break;
26311 :
26312 427 : case DNSSRV_TYPEID_ZONE_CREATE:
26313 427 : if (in == NULL) {
26314 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ZoneCreate");
26315 0 : talloc_free(ret); return NULL;
26316 : }
26317 427 : if (in == Py_None) {
26318 0 : ret->ZoneCreate = NULL;
26319 : } else {
26320 427 : ret->ZoneCreate = NULL;
26321 427 : PY_CHECK_TYPE(&DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type, in, talloc_free(ret); return NULL;);
26322 427 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26323 0 : PyErr_NoMemory();
26324 0 : talloc_free(ret); return NULL;
26325 : }
26326 427 : ret->ZoneCreate = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(in);
26327 : }
26328 427 : break;
26329 :
26330 0 : case DNSSRV_TYPEID_FORWARDERS:
26331 0 : if (in == NULL) {
26332 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->Forwarders");
26333 0 : talloc_free(ret); return NULL;
26334 : }
26335 0 : if (in == Py_None) {
26336 0 : ret->Forwarders = NULL;
26337 : } else {
26338 0 : ret->Forwarders = NULL;
26339 0 : PY_CHECK_TYPE(&DNS_RPC_FORWARDERS_LONGHORN_Type, in, talloc_free(ret); return NULL;);
26340 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26341 0 : PyErr_NoMemory();
26342 0 : talloc_free(ret); return NULL;
26343 : }
26344 0 : ret->Forwarders = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(in);
26345 : }
26346 0 : break;
26347 :
26348 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES:
26349 0 : if (in == NULL) {
26350 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->Secondaries");
26351 0 : talloc_free(ret); return NULL;
26352 : }
26353 0 : if (in == Py_None) {
26354 0 : ret->Secondaries = NULL;
26355 : } else {
26356 0 : ret->Secondaries = NULL;
26357 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type, in, talloc_free(ret); return NULL;);
26358 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26359 0 : PyErr_NoMemory();
26360 0 : talloc_free(ret); return NULL;
26361 : }
26362 0 : ret->Secondaries = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(in);
26363 : }
26364 0 : break;
26365 :
26366 0 : case DNSSRV_TYPEID_IP_VALIDATE:
26367 0 : if (in == NULL) {
26368 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->IpValidate");
26369 0 : talloc_free(ret); return NULL;
26370 : }
26371 0 : if (in == Py_None) {
26372 0 : ret->IpValidate = NULL;
26373 : } else {
26374 0 : ret->IpValidate = NULL;
26375 0 : PY_CHECK_TYPE(&DNS_RPC_IP_VALIDATE_Type, in, talloc_free(ret); return NULL;);
26376 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26377 0 : PyErr_NoMemory();
26378 0 : talloc_free(ret); return NULL;
26379 : }
26380 0 : ret->IpValidate = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(in);
26381 : }
26382 0 : break;
26383 :
26384 0 : case DNSSRV_TYPEID_ZONE_INFO:
26385 0 : if (in == NULL) {
26386 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->ZoneInfo");
26387 0 : talloc_free(ret); return NULL;
26388 : }
26389 0 : if (in == Py_None) {
26390 0 : ret->ZoneInfo = NULL;
26391 : } else {
26392 0 : ret->ZoneInfo = NULL;
26393 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_INFO_LONGHORN_Type, in, talloc_free(ret); return NULL;);
26394 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26395 0 : PyErr_NoMemory();
26396 0 : talloc_free(ret); return NULL;
26397 : }
26398 0 : ret->ZoneInfo = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(in);
26399 : }
26400 0 : break;
26401 :
26402 0 : case DNSSRV_TYPEID_AUTOCONFIGURE:
26403 0 : if (in == NULL) {
26404 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->AutoConfigure");
26405 0 : talloc_free(ret); return NULL;
26406 : }
26407 0 : if (in == Py_None) {
26408 0 : ret->AutoConfigure = NULL;
26409 : } else {
26410 0 : ret->AutoConfigure = NULL;
26411 0 : PY_CHECK_TYPE(&DNS_RPC_AUTOCONFIGURE_Type, in, talloc_free(ret); return NULL;);
26412 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26413 0 : PyErr_NoMemory();
26414 0 : talloc_free(ret); return NULL;
26415 : }
26416 0 : ret->AutoConfigure = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(in);
26417 : }
26418 0 : break;
26419 :
26420 0 : case DNSSRV_TYPEID_UTF8_STRING_LIST:
26421 0 : if (in == NULL) {
26422 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->Utf8StringList");
26423 0 : talloc_free(ret); return NULL;
26424 : }
26425 0 : if (in == Py_None) {
26426 0 : ret->Utf8StringList = NULL;
26427 : } else {
26428 0 : ret->Utf8StringList = NULL;
26429 0 : PY_CHECK_TYPE(&DNS_RPC_UTF8_STRING_LIST_Type, in, talloc_free(ret); return NULL;);
26430 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26431 0 : PyErr_NoMemory();
26432 0 : talloc_free(ret); return NULL;
26433 : }
26434 0 : ret->Utf8StringList = (struct DNS_RPC_UTF8_STRING_LIST *)pytalloc_get_ptr(in);
26435 : }
26436 0 : break;
26437 :
26438 0 : default:
26439 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
26440 0 : talloc_free(ret);
26441 0 : ret = NULL;
26442 : }
26443 :
26444 1675 : return ret;
26445 : }
26446 :
26447 49 : static PyObject *py_DNSSRV_RPC_UNION_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
26448 : {
26449 49 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
26450 49 : PyObject *mem_ctx_obj = NULL;
26451 49 : TALLOC_CTX *mem_ctx = NULL;
26452 49 : int level = 0;
26453 49 : PyObject *in_obj = NULL;
26454 49 : union DNSSRV_RPC_UNION *in = NULL;
26455 :
26456 49 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
26457 : discard_const_p(char *, kwnames),
26458 : &mem_ctx_obj,
26459 : &level,
26460 : &in_obj)) {
26461 0 : return NULL;
26462 : }
26463 49 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
26464 49 : if (mem_ctx == NULL) {
26465 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
26466 0 : return NULL;
26467 : }
26468 49 : in = (union DNSSRV_RPC_UNION *)pytalloc_get_ptr(in_obj);
26469 49 : if (in == NULL) {
26470 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union DNSSRV_RPC_UNION!");
26471 0 : return NULL;
26472 : }
26473 :
26474 49 : return py_import_DNSSRV_RPC_UNION(mem_ctx, level, in);
26475 : }
26476 :
26477 1675 : static PyObject *py_DNSSRV_RPC_UNION_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
26478 : {
26479 1675 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
26480 1675 : PyObject *mem_ctx_obj = NULL;
26481 1675 : TALLOC_CTX *mem_ctx = NULL;
26482 1675 : int level = 0;
26483 1675 : PyObject *in = NULL;
26484 1675 : union DNSSRV_RPC_UNION *out = NULL;
26485 :
26486 1675 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
26487 : discard_const_p(char *, kwnames),
26488 : &mem_ctx_obj,
26489 : &level,
26490 : &in)) {
26491 0 : return NULL;
26492 : }
26493 1675 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
26494 1675 : if (mem_ctx == NULL) {
26495 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
26496 0 : return NULL;
26497 : }
26498 :
26499 1675 : out = py_export_DNSSRV_RPC_UNION(mem_ctx, level, in);
26500 1675 : if (out == NULL) {
26501 0 : return NULL;
26502 : }
26503 :
26504 1675 : return pytalloc_GenericObject_reference(out);
26505 : }
26506 :
26507 : static PyMethodDef py_DNSSRV_RPC_UNION_methods[] = {
26508 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DNSSRV_RPC_UNION_import),
26509 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
26510 : "T.__import__(mem_ctx, level, in) => ret." },
26511 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DNSSRV_RPC_UNION_export),
26512 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
26513 : "T.__export__(mem_ctx, level, in) => ret." },
26514 : { NULL, NULL, 0, NULL }
26515 : };
26516 :
26517 0 : static PyObject *py_DNSSRV_RPC_UNION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
26518 : {
26519 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
26520 0 : return NULL;
26521 : }
26522 :
26523 :
26524 : static PyTypeObject DNSSRV_RPC_UNION_Type = {
26525 : PyVarObject_HEAD_INIT(NULL, 0)
26526 : .tp_name = "dnsserver.DNSSRV_RPC_UNION",
26527 : .tp_getset = NULL,
26528 : .tp_methods = py_DNSSRV_RPC_UNION_methods,
26529 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
26530 : .tp_new = py_DNSSRV_RPC_UNION_new,
26531 : };
26532 :
26533 :
26534 0 : static PyObject *py_DNS_RPC_RECORDS_get_wLength(PyObject *obj, void *closure)
26535 : {
26536 0 : struct DNS_RPC_RECORDS *object = pytalloc_get_ptr(obj);
26537 0 : PyObject *py_wLength;
26538 0 : py_wLength = PyLong_FromLong((uint16_t)(object->wLength));
26539 0 : return py_wLength;
26540 : }
26541 :
26542 0 : static int py_DNS_RPC_RECORDS_set_wLength(PyObject *py_obj, PyObject *value, void *closure)
26543 : {
26544 0 : struct DNS_RPC_RECORDS *object = pytalloc_get_ptr(py_obj);
26545 0 : if (value == NULL) {
26546 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->wLength");
26547 0 : return -1;
26548 : }
26549 : {
26550 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wLength));
26551 0 : if (PyLong_Check(value)) {
26552 0 : unsigned long long test_var;
26553 0 : test_var = PyLong_AsUnsignedLongLong(value);
26554 0 : if (PyErr_Occurred() != NULL) {
26555 0 : return -1;
26556 : }
26557 0 : if (test_var > uint_max) {
26558 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
26559 : PyLong_Type.tp_name, uint_max, test_var);
26560 0 : return -1;
26561 : }
26562 0 : object->wLength = test_var;
26563 : } else {
26564 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
26565 : PyLong_Type.tp_name);
26566 0 : return -1;
26567 : }
26568 : }
26569 0 : return 0;
26570 : }
26571 :
26572 134 : static PyObject *py_DNS_RPC_RECORDS_get_wRecordCount(PyObject *obj, void *closure)
26573 : {
26574 134 : struct DNS_RPC_RECORDS *object = pytalloc_get_ptr(obj);
26575 0 : PyObject *py_wRecordCount;
26576 134 : py_wRecordCount = PyLong_FromLong((uint16_t)(object->wRecordCount));
26577 134 : return py_wRecordCount;
26578 : }
26579 :
26580 0 : static int py_DNS_RPC_RECORDS_set_wRecordCount(PyObject *py_obj, PyObject *value, void *closure)
26581 : {
26582 0 : struct DNS_RPC_RECORDS *object = pytalloc_get_ptr(py_obj);
26583 0 : if (value == NULL) {
26584 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->wRecordCount");
26585 0 : return -1;
26586 : }
26587 : {
26588 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wRecordCount));
26589 0 : if (PyLong_Check(value)) {
26590 0 : unsigned long long test_var;
26591 0 : test_var = PyLong_AsUnsignedLongLong(value);
26592 0 : if (PyErr_Occurred() != NULL) {
26593 0 : return -1;
26594 : }
26595 0 : if (test_var > uint_max) {
26596 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
26597 : PyLong_Type.tp_name, uint_max, test_var);
26598 0 : return -1;
26599 : }
26600 0 : object->wRecordCount = test_var;
26601 : } else {
26602 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
26603 : PyLong_Type.tp_name);
26604 0 : return -1;
26605 : }
26606 : }
26607 0 : return 0;
26608 : }
26609 :
26610 0 : static PyObject *py_DNS_RPC_RECORDS_get_dwFlags(PyObject *obj, void *closure)
26611 : {
26612 0 : struct DNS_RPC_RECORDS *object = pytalloc_get_ptr(obj);
26613 0 : PyObject *py_dwFlags;
26614 0 : py_dwFlags = PyLong_FromUnsignedLongLong((uint32_t)(object->dwFlags));
26615 0 : return py_dwFlags;
26616 : }
26617 :
26618 0 : static int py_DNS_RPC_RECORDS_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
26619 : {
26620 0 : struct DNS_RPC_RECORDS *object = pytalloc_get_ptr(py_obj);
26621 0 : if (value == NULL) {
26622 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwFlags");
26623 0 : return -1;
26624 : }
26625 : {
26626 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwFlags));
26627 0 : if (PyLong_Check(value)) {
26628 0 : unsigned long long test_var;
26629 0 : test_var = PyLong_AsUnsignedLongLong(value);
26630 0 : if (PyErr_Occurred() != NULL) {
26631 0 : return -1;
26632 : }
26633 0 : if (test_var > uint_max) {
26634 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
26635 : PyLong_Type.tp_name, uint_max, test_var);
26636 0 : return -1;
26637 : }
26638 0 : object->dwFlags = test_var;
26639 : } else {
26640 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
26641 : PyLong_Type.tp_name);
26642 0 : return -1;
26643 : }
26644 : }
26645 0 : return 0;
26646 : }
26647 :
26648 128 : static PyObject *py_DNS_RPC_RECORDS_get_dwChildCount(PyObject *obj, void *closure)
26649 : {
26650 128 : struct DNS_RPC_RECORDS *object = pytalloc_get_ptr(obj);
26651 0 : PyObject *py_dwChildCount;
26652 128 : py_dwChildCount = PyLong_FromUnsignedLongLong((uint32_t)(object->dwChildCount));
26653 128 : return py_dwChildCount;
26654 : }
26655 :
26656 0 : static int py_DNS_RPC_RECORDS_set_dwChildCount(PyObject *py_obj, PyObject *value, void *closure)
26657 : {
26658 0 : struct DNS_RPC_RECORDS *object = pytalloc_get_ptr(py_obj);
26659 0 : if (value == NULL) {
26660 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dwChildCount");
26661 0 : return -1;
26662 : }
26663 : {
26664 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwChildCount));
26665 0 : if (PyLong_Check(value)) {
26666 0 : unsigned long long test_var;
26667 0 : test_var = PyLong_AsUnsignedLongLong(value);
26668 0 : if (PyErr_Occurred() != NULL) {
26669 0 : return -1;
26670 : }
26671 0 : if (test_var > uint_max) {
26672 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
26673 : PyLong_Type.tp_name, uint_max, test_var);
26674 0 : return -1;
26675 : }
26676 0 : object->dwChildCount = test_var;
26677 : } else {
26678 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
26679 : PyLong_Type.tp_name);
26680 0 : return -1;
26681 : }
26682 : }
26683 0 : return 0;
26684 : }
26685 :
26686 180 : static PyObject *py_DNS_RPC_RECORDS_get_dnsNodeName(PyObject *obj, void *closure)
26687 : {
26688 180 : struct DNS_RPC_RECORDS *object = pytalloc_get_ptr(obj);
26689 0 : PyObject *py_dnsNodeName;
26690 180 : py_dnsNodeName = pytalloc_reference_ex(&DNS_RPC_NAME_Type, pytalloc_get_mem_ctx(obj), &object->dnsNodeName);
26691 180 : return py_dnsNodeName;
26692 : }
26693 :
26694 0 : static int py_DNS_RPC_RECORDS_set_dnsNodeName(PyObject *py_obj, PyObject *value, void *closure)
26695 : {
26696 0 : struct DNS_RPC_RECORDS *object = pytalloc_get_ptr(py_obj);
26697 0 : if (value == NULL) {
26698 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->dnsNodeName");
26699 0 : return -1;
26700 : }
26701 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, value, return -1;);
26702 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
26703 0 : PyErr_NoMemory();
26704 0 : return -1;
26705 : }
26706 0 : object->dnsNodeName = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(value);
26707 0 : return 0;
26708 : }
26709 :
26710 1072 : static PyObject *py_DNS_RPC_RECORDS_get_records(PyObject *obj, void *closure)
26711 : {
26712 1072 : struct DNS_RPC_RECORDS *object = pytalloc_get_ptr(obj);
26713 0 : PyObject *py_records;
26714 1072 : py_records = PyList_New(object->wRecordCount);
26715 1072 : if (py_records == NULL) {
26716 0 : return NULL;
26717 : }
26718 : {
26719 : int records_cntr_0;
26720 2453 : for (records_cntr_0 = 0; records_cntr_0 < (object->wRecordCount); records_cntr_0++) {
26721 0 : PyObject *py_records_0;
26722 1381 : py_records_0 = pytalloc_reference_ex(&DNS_RPC_RECORD_Type, object->records, &(object->records)[records_cntr_0]);
26723 1381 : PyList_SetItem(py_records, records_cntr_0, py_records_0);
26724 : }
26725 : }
26726 1072 : return py_records;
26727 : }
26728 :
26729 0 : static int py_DNS_RPC_RECORDS_set_records(PyObject *py_obj, PyObject *value, void *closure)
26730 : {
26731 0 : struct DNS_RPC_RECORDS *object = pytalloc_get_ptr(py_obj);
26732 0 : if (value == NULL) {
26733 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->records");
26734 0 : return -1;
26735 : }
26736 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
26737 : {
26738 0 : int records_cntr_0;
26739 0 : object->records = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->records, PyList_GET_SIZE(value));
26740 0 : if (!object->records) { return -1; }
26741 0 : talloc_set_name_const(object->records, "ARRAY: object->records");
26742 0 : for (records_cntr_0 = 0; records_cntr_0 < PyList_GET_SIZE(value); records_cntr_0++) {
26743 0 : if (PyList_GET_ITEM(value, records_cntr_0) == NULL) {
26744 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->records)[records_cntr_0]");
26745 0 : return -1;
26746 : }
26747 0 : PY_CHECK_TYPE(&DNS_RPC_RECORD_Type, PyList_GET_ITEM(value, records_cntr_0), return -1;);
26748 0 : if (talloc_reference(object->records, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, records_cntr_0))) == NULL) {
26749 0 : PyErr_NoMemory();
26750 0 : return -1;
26751 : }
26752 0 : (object->records)[records_cntr_0] = *(struct DNS_RPC_RECORD *)pytalloc_get_ptr(PyList_GET_ITEM(value, records_cntr_0));
26753 : }
26754 : }
26755 0 : return 0;
26756 : }
26757 :
26758 : static PyGetSetDef py_DNS_RPC_RECORDS_getsetters[] = {
26759 : {
26760 : .name = discard_const_p(char, "wLength"),
26761 : .get = py_DNS_RPC_RECORDS_get_wLength,
26762 : .set = py_DNS_RPC_RECORDS_set_wLength,
26763 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
26764 : },
26765 : {
26766 : .name = discard_const_p(char, "wRecordCount"),
26767 : .get = py_DNS_RPC_RECORDS_get_wRecordCount,
26768 : .set = py_DNS_RPC_RECORDS_set_wRecordCount,
26769 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
26770 : },
26771 : {
26772 : .name = discard_const_p(char, "dwFlags"),
26773 : .get = py_DNS_RPC_RECORDS_get_dwFlags,
26774 : .set = py_DNS_RPC_RECORDS_set_dwFlags,
26775 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
26776 : },
26777 : {
26778 : .name = discard_const_p(char, "dwChildCount"),
26779 : .get = py_DNS_RPC_RECORDS_get_dwChildCount,
26780 : .set = py_DNS_RPC_RECORDS_set_dwChildCount,
26781 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
26782 : },
26783 : {
26784 : .name = discard_const_p(char, "dnsNodeName"),
26785 : .get = py_DNS_RPC_RECORDS_get_dnsNodeName,
26786 : .set = py_DNS_RPC_RECORDS_set_dnsNodeName,
26787 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_NAME")
26788 : },
26789 : {
26790 : .name = discard_const_p(char, "records"),
26791 : .get = py_DNS_RPC_RECORDS_get_records,
26792 : .set = py_DNS_RPC_RECORDS_set_records,
26793 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_RECORD")
26794 : },
26795 : { .name = NULL }
26796 : };
26797 :
26798 0 : static PyObject *py_DNS_RPC_RECORDS_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
26799 : {
26800 0 : return pytalloc_new(struct DNS_RPC_RECORDS, type);
26801 : }
26802 :
26803 0 : static PyObject *py_DNS_RPC_RECORDS_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
26804 : {
26805 0 : struct DNS_RPC_RECORDS *object = pytalloc_get_ptr(py_obj);
26806 0 : PyObject *ret = NULL;
26807 0 : DATA_BLOB blob;
26808 0 : enum ndr_err_code err;
26809 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
26810 0 : if (tmp_ctx == NULL) {
26811 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
26812 0 : return NULL;
26813 : }
26814 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_RECORDS);
26815 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
26816 0 : TALLOC_FREE(tmp_ctx);
26817 0 : PyErr_SetNdrError(err);
26818 0 : return NULL;
26819 : }
26820 :
26821 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
26822 0 : TALLOC_FREE(tmp_ctx);
26823 0 : return ret;
26824 : }
26825 :
26826 0 : static PyObject *py_DNS_RPC_RECORDS_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
26827 : {
26828 0 : struct DNS_RPC_RECORDS *object = pytalloc_get_ptr(py_obj);
26829 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
26830 0 : Py_ssize_t blob_length = 0;
26831 0 : enum ndr_err_code err;
26832 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
26833 0 : PyObject *allow_remaining_obj = NULL;
26834 0 : bool allow_remaining = false;
26835 :
26836 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
26837 : discard_const_p(char *, kwnames),
26838 : &blob.data, &blob_length,
26839 : &allow_remaining_obj)) {
26840 0 : return NULL;
26841 : }
26842 0 : blob.length = blob_length;
26843 :
26844 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
26845 0 : allow_remaining = true;
26846 : }
26847 :
26848 0 : if (allow_remaining) {
26849 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_RECORDS);
26850 : } else {
26851 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);
26852 : }
26853 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
26854 0 : PyErr_SetNdrError(err);
26855 0 : return NULL;
26856 : }
26857 :
26858 0 : Py_RETURN_NONE;
26859 : }
26860 :
26861 0 : static PyObject *py_DNS_RPC_RECORDS_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
26862 : {
26863 0 : struct DNS_RPC_RECORDS *object = pytalloc_get_ptr(py_obj);
26864 0 : PyObject *ret;
26865 0 : char *retstr;
26866 :
26867 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);
26868 0 : ret = PyUnicode_FromString(retstr);
26869 0 : talloc_free(retstr);
26870 :
26871 0 : return ret;
26872 : }
26873 :
26874 : static PyMethodDef py_DNS_RPC_RECORDS_methods[] = {
26875 : { "__ndr_pack__", (PyCFunction)py_DNS_RPC_RECORDS_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
26876 : { "__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" },
26877 : { "__ndr_print__", (PyCFunction)py_DNS_RPC_RECORDS_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
26878 : { NULL, NULL, 0, NULL }
26879 : };
26880 :
26881 :
26882 : static PyTypeObject DNS_RPC_RECORDS_Type = {
26883 : PyVarObject_HEAD_INIT(NULL, 0)
26884 : .tp_name = "dnsserver.DNS_RPC_RECORDS",
26885 : .tp_getset = py_DNS_RPC_RECORDS_getsetters,
26886 : .tp_methods = py_DNS_RPC_RECORDS_methods,
26887 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
26888 : .tp_new = py_DNS_RPC_RECORDS_new,
26889 : };
26890 :
26891 :
26892 130 : static PyObject *py_DNS_RPC_RECORDS_ARRAY_get_count(PyObject *obj, void *closure)
26893 : {
26894 130 : struct DNS_RPC_RECORDS_ARRAY *object = pytalloc_get_ptr(obj);
26895 0 : PyObject *py_count;
26896 130 : py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
26897 130 : return py_count;
26898 : }
26899 :
26900 0 : static int py_DNS_RPC_RECORDS_ARRAY_set_count(PyObject *py_obj, PyObject *value, void *closure)
26901 : {
26902 0 : struct DNS_RPC_RECORDS_ARRAY *object = pytalloc_get_ptr(py_obj);
26903 0 : if (value == NULL) {
26904 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->count");
26905 0 : return -1;
26906 : }
26907 : {
26908 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
26909 0 : if (PyLong_Check(value)) {
26910 0 : unsigned long long test_var;
26911 0 : test_var = PyLong_AsUnsignedLongLong(value);
26912 0 : if (PyErr_Occurred() != NULL) {
26913 0 : return -1;
26914 : }
26915 0 : if (test_var > uint_max) {
26916 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
26917 : PyLong_Type.tp_name, uint_max, test_var);
26918 0 : return -1;
26919 : }
26920 0 : object->count = test_var;
26921 : } else {
26922 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
26923 : PyLong_Type.tp_name);
26924 0 : return -1;
26925 : }
26926 : }
26927 0 : return 0;
26928 : }
26929 :
26930 1142 : static PyObject *py_DNS_RPC_RECORDS_ARRAY_get_rec(PyObject *obj, void *closure)
26931 : {
26932 1142 : struct DNS_RPC_RECORDS_ARRAY *object = pytalloc_get_ptr(obj);
26933 0 : PyObject *py_rec;
26934 1142 : py_rec = PyList_New(object->count);
26935 1142 : if (py_rec == NULL) {
26936 0 : return NULL;
26937 : }
26938 : {
26939 : int rec_cntr_0;
26940 2631 : for (rec_cntr_0 = 0; rec_cntr_0 < (object->count); rec_cntr_0++) {
26941 0 : PyObject *py_rec_0;
26942 1489 : py_rec_0 = pytalloc_reference_ex(&DNS_RPC_RECORDS_Type, object->rec, &(object->rec)[rec_cntr_0]);
26943 1489 : PyList_SetItem(py_rec, rec_cntr_0, py_rec_0);
26944 : }
26945 : }
26946 1142 : return py_rec;
26947 : }
26948 :
26949 0 : static int py_DNS_RPC_RECORDS_ARRAY_set_rec(PyObject *py_obj, PyObject *value, void *closure)
26950 : {
26951 0 : struct DNS_RPC_RECORDS_ARRAY *object = pytalloc_get_ptr(py_obj);
26952 0 : if (value == NULL) {
26953 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->rec");
26954 0 : return -1;
26955 : }
26956 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
26957 : {
26958 0 : int rec_cntr_0;
26959 0 : object->rec = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->rec, PyList_GET_SIZE(value));
26960 0 : if (!object->rec) { return -1; }
26961 0 : talloc_set_name_const(object->rec, "ARRAY: object->rec");
26962 0 : for (rec_cntr_0 = 0; rec_cntr_0 < PyList_GET_SIZE(value); rec_cntr_0++) {
26963 0 : if (PyList_GET_ITEM(value, rec_cntr_0) == NULL) {
26964 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->rec)[rec_cntr_0]");
26965 0 : return -1;
26966 : }
26967 0 : PY_CHECK_TYPE(&DNS_RPC_RECORDS_Type, PyList_GET_ITEM(value, rec_cntr_0), return -1;);
26968 0 : if (talloc_reference(object->rec, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, rec_cntr_0))) == NULL) {
26969 0 : PyErr_NoMemory();
26970 0 : return -1;
26971 : }
26972 0 : (object->rec)[rec_cntr_0] = *(struct DNS_RPC_RECORDS *)pytalloc_get_ptr(PyList_GET_ITEM(value, rec_cntr_0));
26973 : }
26974 : }
26975 0 : return 0;
26976 : }
26977 :
26978 : static PyGetSetDef py_DNS_RPC_RECORDS_ARRAY_getsetters[] = {
26979 : {
26980 : .name = discard_const_p(char, "count"),
26981 : .get = py_DNS_RPC_RECORDS_ARRAY_get_count,
26982 : .set = py_DNS_RPC_RECORDS_ARRAY_set_count,
26983 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
26984 : },
26985 : {
26986 : .name = discard_const_p(char, "rec"),
26987 : .get = py_DNS_RPC_RECORDS_ARRAY_get_rec,
26988 : .set = py_DNS_RPC_RECORDS_ARRAY_set_rec,
26989 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_RECORDS")
26990 : },
26991 : { .name = NULL }
26992 : };
26993 :
26994 0 : static PyObject *py_DNS_RPC_RECORDS_ARRAY_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
26995 : {
26996 0 : return pytalloc_new(struct DNS_RPC_RECORDS_ARRAY, type);
26997 : }
26998 :
26999 0 : static PyObject *py_DNS_RPC_RECORDS_ARRAY_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
27000 : {
27001 0 : struct DNS_RPC_RECORDS_ARRAY *object = pytalloc_get_ptr(py_obj);
27002 0 : PyObject *ret = NULL;
27003 0 : DATA_BLOB blob;
27004 0 : enum ndr_err_code err;
27005 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
27006 0 : if (tmp_ctx == NULL) {
27007 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
27008 0 : return NULL;
27009 : }
27010 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_RECORDS_ARRAY);
27011 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
27012 0 : TALLOC_FREE(tmp_ctx);
27013 0 : PyErr_SetNdrError(err);
27014 0 : return NULL;
27015 : }
27016 :
27017 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
27018 0 : TALLOC_FREE(tmp_ctx);
27019 0 : return ret;
27020 : }
27021 :
27022 0 : static PyObject *py_DNS_RPC_RECORDS_ARRAY_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
27023 : {
27024 0 : struct DNS_RPC_RECORDS_ARRAY *object = pytalloc_get_ptr(py_obj);
27025 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
27026 0 : Py_ssize_t blob_length = 0;
27027 0 : enum ndr_err_code err;
27028 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
27029 0 : PyObject *allow_remaining_obj = NULL;
27030 0 : bool allow_remaining = false;
27031 :
27032 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
27033 : discard_const_p(char *, kwnames),
27034 : &blob.data, &blob_length,
27035 : &allow_remaining_obj)) {
27036 0 : return NULL;
27037 : }
27038 0 : blob.length = blob_length;
27039 :
27040 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
27041 0 : allow_remaining = true;
27042 : }
27043 :
27044 0 : if (allow_remaining) {
27045 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);
27046 : } else {
27047 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);
27048 : }
27049 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
27050 0 : PyErr_SetNdrError(err);
27051 0 : return NULL;
27052 : }
27053 :
27054 0 : Py_RETURN_NONE;
27055 : }
27056 :
27057 0 : static PyObject *py_DNS_RPC_RECORDS_ARRAY_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
27058 : {
27059 0 : struct DNS_RPC_RECORDS_ARRAY *object = pytalloc_get_ptr(py_obj);
27060 0 : PyObject *ret;
27061 0 : char *retstr;
27062 :
27063 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);
27064 0 : ret = PyUnicode_FromString(retstr);
27065 0 : talloc_free(retstr);
27066 :
27067 0 : return ret;
27068 : }
27069 :
27070 : static PyMethodDef py_DNS_RPC_RECORDS_ARRAY_methods[] = {
27071 : { "__ndr_pack__", (PyCFunction)py_DNS_RPC_RECORDS_ARRAY_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
27072 : { "__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" },
27073 : { "__ndr_print__", (PyCFunction)py_DNS_RPC_RECORDS_ARRAY_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
27074 : { NULL, NULL, 0, NULL }
27075 : };
27076 :
27077 :
27078 : static PyTypeObject DNS_RPC_RECORDS_ARRAY_Type = {
27079 : PyVarObject_HEAD_INIT(NULL, 0)
27080 : .tp_name = "dnsserver.DNS_RPC_RECORDS_ARRAY",
27081 : .tp_getset = py_DNS_RPC_RECORDS_ARRAY_getsetters,
27082 : .tp_methods = py_DNS_RPC_RECORDS_ARRAY_methods,
27083 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
27084 : .tp_new = py_DNS_RPC_RECORDS_ARRAY_new,
27085 : };
27086 :
27087 :
27088 :
27089 0 : static PyObject *py_DnssrvOperation_in_get_pwszServerName(PyObject *obj, void *closure)
27090 : {
27091 0 : struct DnssrvOperation *object = pytalloc_get_ptr(obj);
27092 0 : PyObject *py_pwszServerName;
27093 0 : if (object->in.pwszServerName == NULL) {
27094 0 : Py_RETURN_NONE;
27095 : }
27096 0 : if (object->in.pwszServerName == NULL) {
27097 0 : py_pwszServerName = Py_None;
27098 0 : Py_INCREF(py_pwszServerName);
27099 : } else {
27100 0 : if (object->in.pwszServerName == NULL) {
27101 0 : py_pwszServerName = Py_None;
27102 0 : Py_INCREF(py_pwszServerName);
27103 : } else {
27104 0 : py_pwszServerName = PyUnicode_Decode(object->in.pwszServerName, strlen(object->in.pwszServerName), "utf-8", "ignore");
27105 : }
27106 : }
27107 0 : return py_pwszServerName;
27108 : }
27109 :
27110 0 : static int py_DnssrvOperation_in_set_pwszServerName(PyObject *py_obj, PyObject *value, void *closure)
27111 : {
27112 0 : struct DnssrvOperation *object = pytalloc_get_ptr(py_obj);
27113 0 : if (value == NULL) {
27114 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pwszServerName");
27115 0 : return -1;
27116 : }
27117 0 : if (value == Py_None) {
27118 0 : object->in.pwszServerName = NULL;
27119 : } else {
27120 0 : object->in.pwszServerName = NULL;
27121 : {
27122 0 : const char *test_str;
27123 0 : const char *talloc_str;
27124 0 : PyObject *unicode = NULL;
27125 0 : if (PyUnicode_Check(value)) {
27126 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
27127 0 : if (unicode == NULL) {
27128 0 : return -1;
27129 : }
27130 0 : test_str = PyBytes_AS_STRING(unicode);
27131 0 : } else if (PyBytes_Check(value)) {
27132 0 : test_str = PyBytes_AS_STRING(value);
27133 : } else {
27134 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
27135 0 : return -1;
27136 : }
27137 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
27138 0 : if (unicode != NULL) {
27139 0 : Py_DECREF(unicode);
27140 : }
27141 0 : if (talloc_str == NULL) {
27142 0 : PyErr_NoMemory();
27143 0 : return -1;
27144 : }
27145 0 : object->in.pwszServerName = talloc_str;
27146 : }
27147 : }
27148 0 : return 0;
27149 : }
27150 :
27151 0 : static PyObject *py_DnssrvOperation_in_get_pszZone(PyObject *obj, void *closure)
27152 : {
27153 0 : struct DnssrvOperation *object = pytalloc_get_ptr(obj);
27154 0 : PyObject *py_pszZone;
27155 0 : if (object->in.pszZone == NULL) {
27156 0 : Py_RETURN_NONE;
27157 : }
27158 0 : if (object->in.pszZone == NULL) {
27159 0 : py_pszZone = Py_None;
27160 0 : Py_INCREF(py_pszZone);
27161 : } else {
27162 0 : if (object->in.pszZone == NULL) {
27163 0 : py_pszZone = Py_None;
27164 0 : Py_INCREF(py_pszZone);
27165 : } else {
27166 0 : py_pszZone = PyUnicode_Decode(object->in.pszZone, strlen(object->in.pszZone), "utf-8", "ignore");
27167 : }
27168 : }
27169 0 : return py_pszZone;
27170 : }
27171 :
27172 0 : static int py_DnssrvOperation_in_set_pszZone(PyObject *py_obj, PyObject *value, void *closure)
27173 : {
27174 0 : struct DnssrvOperation *object = pytalloc_get_ptr(py_obj);
27175 0 : if (value == NULL) {
27176 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszZone");
27177 0 : return -1;
27178 : }
27179 0 : if (value == Py_None) {
27180 0 : object->in.pszZone = NULL;
27181 : } else {
27182 0 : object->in.pszZone = NULL;
27183 : {
27184 0 : const char *test_str;
27185 0 : const char *talloc_str;
27186 0 : PyObject *unicode = NULL;
27187 0 : if (PyUnicode_Check(value)) {
27188 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
27189 0 : if (unicode == NULL) {
27190 0 : return -1;
27191 : }
27192 0 : test_str = PyBytes_AS_STRING(unicode);
27193 0 : } else if (PyBytes_Check(value)) {
27194 0 : test_str = PyBytes_AS_STRING(value);
27195 : } else {
27196 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
27197 0 : return -1;
27198 : }
27199 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
27200 0 : if (unicode != NULL) {
27201 0 : Py_DECREF(unicode);
27202 : }
27203 0 : if (talloc_str == NULL) {
27204 0 : PyErr_NoMemory();
27205 0 : return -1;
27206 : }
27207 0 : object->in.pszZone = talloc_str;
27208 : }
27209 : }
27210 0 : return 0;
27211 : }
27212 :
27213 0 : static PyObject *py_DnssrvOperation_in_get_dwContext(PyObject *obj, void *closure)
27214 : {
27215 0 : struct DnssrvOperation *object = pytalloc_get_ptr(obj);
27216 0 : PyObject *py_dwContext;
27217 0 : py_dwContext = PyLong_FromUnsignedLongLong((uint32_t)(object->in.dwContext));
27218 0 : return py_dwContext;
27219 : }
27220 :
27221 0 : static int py_DnssrvOperation_in_set_dwContext(PyObject *py_obj, PyObject *value, void *closure)
27222 : {
27223 0 : struct DnssrvOperation *object = pytalloc_get_ptr(py_obj);
27224 0 : if (value == NULL) {
27225 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dwContext");
27226 0 : return -1;
27227 : }
27228 : {
27229 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwContext));
27230 0 : if (PyLong_Check(value)) {
27231 0 : unsigned long long test_var;
27232 0 : test_var = PyLong_AsUnsignedLongLong(value);
27233 0 : if (PyErr_Occurred() != NULL) {
27234 0 : return -1;
27235 : }
27236 0 : if (test_var > uint_max) {
27237 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27238 : PyLong_Type.tp_name, uint_max, test_var);
27239 0 : return -1;
27240 : }
27241 0 : object->in.dwContext = test_var;
27242 : } else {
27243 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
27244 : PyLong_Type.tp_name);
27245 0 : return -1;
27246 : }
27247 : }
27248 0 : return 0;
27249 : }
27250 :
27251 0 : static PyObject *py_DnssrvOperation_in_get_pszOperation(PyObject *obj, void *closure)
27252 : {
27253 0 : struct DnssrvOperation *object = pytalloc_get_ptr(obj);
27254 0 : PyObject *py_pszOperation;
27255 0 : if (object->in.pszOperation == NULL) {
27256 0 : Py_RETURN_NONE;
27257 : }
27258 0 : if (object->in.pszOperation == NULL) {
27259 0 : py_pszOperation = Py_None;
27260 0 : Py_INCREF(py_pszOperation);
27261 : } else {
27262 0 : if (object->in.pszOperation == NULL) {
27263 0 : py_pszOperation = Py_None;
27264 0 : Py_INCREF(py_pszOperation);
27265 : } else {
27266 0 : py_pszOperation = PyUnicode_Decode(object->in.pszOperation, strlen(object->in.pszOperation), "utf-8", "ignore");
27267 : }
27268 : }
27269 0 : return py_pszOperation;
27270 : }
27271 :
27272 0 : static int py_DnssrvOperation_in_set_pszOperation(PyObject *py_obj, PyObject *value, void *closure)
27273 : {
27274 0 : struct DnssrvOperation *object = pytalloc_get_ptr(py_obj);
27275 0 : if (value == NULL) {
27276 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszOperation");
27277 0 : return -1;
27278 : }
27279 0 : if (value == Py_None) {
27280 0 : object->in.pszOperation = NULL;
27281 : } else {
27282 0 : object->in.pszOperation = NULL;
27283 : {
27284 0 : const char *test_str;
27285 0 : const char *talloc_str;
27286 0 : PyObject *unicode = NULL;
27287 0 : if (PyUnicode_Check(value)) {
27288 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
27289 0 : if (unicode == NULL) {
27290 0 : return -1;
27291 : }
27292 0 : test_str = PyBytes_AS_STRING(unicode);
27293 0 : } else if (PyBytes_Check(value)) {
27294 0 : test_str = PyBytes_AS_STRING(value);
27295 : } else {
27296 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
27297 0 : return -1;
27298 : }
27299 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
27300 0 : if (unicode != NULL) {
27301 0 : Py_DECREF(unicode);
27302 : }
27303 0 : if (talloc_str == NULL) {
27304 0 : PyErr_NoMemory();
27305 0 : return -1;
27306 : }
27307 0 : object->in.pszOperation = talloc_str;
27308 : }
27309 : }
27310 0 : return 0;
27311 : }
27312 :
27313 0 : static PyObject *py_DnssrvOperation_in_get_dwTypeId(PyObject *obj, void *closure)
27314 : {
27315 0 : struct DnssrvOperation *object = pytalloc_get_ptr(obj);
27316 0 : PyObject *py_dwTypeId;
27317 0 : py_dwTypeId = PyLong_FromUnsignedLongLong((uint32_t)(object->in.dwTypeId));
27318 0 : return py_dwTypeId;
27319 : }
27320 :
27321 0 : static int py_DnssrvOperation_in_set_dwTypeId(PyObject *py_obj, PyObject *value, void *closure)
27322 : {
27323 0 : struct DnssrvOperation *object = pytalloc_get_ptr(py_obj);
27324 0 : if (value == NULL) {
27325 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dwTypeId");
27326 0 : return -1;
27327 : }
27328 : {
27329 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwTypeId));
27330 0 : if (PyLong_Check(value)) {
27331 0 : unsigned long long test_var;
27332 0 : test_var = PyLong_AsUnsignedLongLong(value);
27333 0 : if (PyErr_Occurred() != NULL) {
27334 0 : return -1;
27335 : }
27336 0 : if (test_var > uint_max) {
27337 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27338 : PyLong_Type.tp_name, uint_max, test_var);
27339 0 : return -1;
27340 : }
27341 0 : object->in.dwTypeId = test_var;
27342 : } else {
27343 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
27344 : PyLong_Type.tp_name);
27345 0 : return -1;
27346 : }
27347 : }
27348 0 : return 0;
27349 : }
27350 :
27351 0 : static PyObject *py_DnssrvOperation_in_get_pData(PyObject *obj, void *closure)
27352 : {
27353 0 : struct DnssrvOperation *object = pytalloc_get_ptr(obj);
27354 0 : PyObject *py_pData;
27355 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");
27356 0 : if (py_pData == NULL) {
27357 0 : return NULL;
27358 : }
27359 0 : return py_pData;
27360 : }
27361 :
27362 0 : static int py_DnssrvOperation_in_set_pData(PyObject *py_obj, PyObject *value, void *closure)
27363 : {
27364 0 : struct DnssrvOperation *object = pytalloc_get_ptr(py_obj);
27365 0 : if (value == NULL) {
27366 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pData");
27367 0 : return -1;
27368 : }
27369 : {
27370 0 : union DNSSRV_RPC_UNION *pData_switch_0;
27371 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");
27372 0 : if (pData_switch_0 == NULL) {
27373 0 : return -1;
27374 : }
27375 0 : object->in.pData = *pData_switch_0;
27376 : }
27377 0 : return 0;
27378 : }
27379 :
27380 0 : static PyObject *py_DnssrvOperation_get_result(PyObject *obj, void *closure)
27381 : {
27382 0 : struct DnssrvOperation *object = pytalloc_get_ptr(obj);
27383 0 : PyObject *py_result;
27384 0 : py_result = PyErr_FromWERROR(object->out.result);
27385 0 : return py_result;
27386 : }
27387 :
27388 0 : static int py_DnssrvOperation_set_result(PyObject *py_obj, PyObject *value, void *closure)
27389 : {
27390 0 : struct DnssrvOperation *object = pytalloc_get_ptr(py_obj);
27391 0 : if (value == NULL) {
27392 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
27393 0 : return -1;
27394 : }
27395 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
27396 0 : return 0;
27397 : }
27398 :
27399 : static PyGetSetDef py_DnssrvOperation_getsetters[] = {
27400 : {
27401 : .name = discard_const_p(char, "in_pwszServerName"),
27402 : .get = py_DnssrvOperation_in_get_pwszServerName,
27403 : .set = py_DnssrvOperation_in_set_pwszServerName,
27404 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
27405 : },
27406 : {
27407 : .name = discard_const_p(char, "in_pszZone"),
27408 : .get = py_DnssrvOperation_in_get_pszZone,
27409 : .set = py_DnssrvOperation_in_set_pszZone,
27410 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
27411 : },
27412 : {
27413 : .name = discard_const_p(char, "in_dwContext"),
27414 : .get = py_DnssrvOperation_in_get_dwContext,
27415 : .set = py_DnssrvOperation_in_set_dwContext,
27416 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
27417 : },
27418 : {
27419 : .name = discard_const_p(char, "in_pszOperation"),
27420 : .get = py_DnssrvOperation_in_get_pszOperation,
27421 : .set = py_DnssrvOperation_in_set_pszOperation,
27422 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
27423 : },
27424 : {
27425 : .name = discard_const_p(char, "in_dwTypeId"),
27426 : .get = py_DnssrvOperation_in_get_dwTypeId,
27427 : .set = py_DnssrvOperation_in_set_dwTypeId,
27428 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_TYPEID")
27429 : },
27430 : {
27431 : .name = discard_const_p(char, "in_pData"),
27432 : .get = py_DnssrvOperation_in_get_pData,
27433 : .set = py_DnssrvOperation_in_set_pData,
27434 : .doc = discard_const_p(char, "PIDL-generated element of base type DNSSRV_RPC_UNION")
27435 : },
27436 : {
27437 : .name = discard_const_p(char, "result"),
27438 : .get = py_DnssrvOperation_get_result,
27439 : .set = py_DnssrvOperation_set_result,
27440 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
27441 : },
27442 : { .name = NULL }
27443 : };
27444 :
27445 0 : static PyObject *py_DnssrvOperation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
27446 : {
27447 0 : PyObject *self = pytalloc_new(struct DnssrvOperation, type);
27448 0 : return self;
27449 : }
27450 :
27451 0 : static PyObject *py_DnssrvOperation_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
27452 : {
27453 :
27454 :
27455 0 : return PyLong_FromLong(0);
27456 : }
27457 :
27458 0 : static PyObject *py_DnssrvOperation_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
27459 : {
27460 0 : const struct ndr_interface_call *call = NULL;
27461 0 : struct DnssrvOperation *object = pytalloc_get_ptr(py_obj);
27462 0 : PyObject *ret = NULL;
27463 0 : struct ndr_push *push = NULL;
27464 0 : DATA_BLOB blob;
27465 0 : enum ndr_err_code err;
27466 :
27467 0 : if (ndr_table_dnsserver.num_calls < 1) {
27468 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvOperation_ndr_pack");
27469 0 : return NULL;
27470 : }
27471 0 : call = &ndr_table_dnsserver.calls[0];
27472 :
27473 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
27474 0 : if (push == NULL) {
27475 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
27476 0 : return NULL;
27477 : }
27478 :
27479 0 : push->flags |= ndr_push_flags;
27480 :
27481 0 : err = call->ndr_push(push, ndr_inout_flags, object);
27482 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
27483 0 : TALLOC_FREE(push);
27484 0 : PyErr_SetNdrError(err);
27485 0 : return NULL;
27486 : }
27487 0 : blob = ndr_push_blob(push);
27488 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
27489 0 : TALLOC_FREE(push);
27490 0 : return ret;
27491 : }
27492 :
27493 0 : static PyObject *py_DnssrvOperation_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
27494 : {
27495 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
27496 0 : PyObject *bigendian_obj = NULL;
27497 0 : PyObject *ndr64_obj = NULL;
27498 0 : libndr_flags ndr_push_flags = 0;
27499 :
27500 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
27501 : discard_const_p(char *, kwnames),
27502 : &bigendian_obj,
27503 : &ndr64_obj)) {
27504 0 : return NULL;
27505 : }
27506 :
27507 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
27508 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
27509 : }
27510 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
27511 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
27512 : }
27513 :
27514 0 : return py_DnssrvOperation_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
27515 : }
27516 :
27517 0 : static PyObject *py_DnssrvOperation_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
27518 : {
27519 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
27520 0 : PyObject *bigendian_obj = NULL;
27521 0 : PyObject *ndr64_obj = NULL;
27522 0 : libndr_flags ndr_push_flags = 0;
27523 :
27524 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
27525 : discard_const_p(char *, kwnames),
27526 : &bigendian_obj,
27527 : &ndr64_obj)) {
27528 0 : return NULL;
27529 : }
27530 :
27531 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
27532 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
27533 : }
27534 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
27535 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
27536 : }
27537 :
27538 0 : return py_DnssrvOperation_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
27539 : }
27540 :
27541 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)
27542 : {
27543 0 : const struct ndr_interface_call *call = NULL;
27544 0 : struct DnssrvOperation *object = pytalloc_get_ptr(py_obj);
27545 0 : struct ndr_pull *pull = NULL;
27546 0 : enum ndr_err_code err;
27547 :
27548 0 : if (ndr_table_dnsserver.num_calls < 1) {
27549 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvOperation_ndr_unpack");
27550 0 : return NULL;
27551 : }
27552 0 : call = &ndr_table_dnsserver.calls[0];
27553 :
27554 0 : pull = ndr_pull_init_blob(blob, object);
27555 0 : if (pull == NULL) {
27556 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
27557 0 : return NULL;
27558 : }
27559 :
27560 0 : pull->flags |= ndr_pull_flags;
27561 :
27562 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
27563 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
27564 0 : TALLOC_FREE(pull);
27565 0 : PyErr_SetNdrError(err);
27566 0 : return NULL;
27567 : }
27568 0 : if (!allow_remaining) {
27569 0 : uint32_t highest_ofs;
27570 :
27571 0 : if (pull->offset > pull->relative_highest_offset) {
27572 0 : highest_ofs = pull->offset;
27573 : } else {
27574 0 : highest_ofs = pull->relative_highest_offset;
27575 : }
27576 0 : if (highest_ofs < pull->data_size) {
27577 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
27578 : "not all bytes consumed ofs[%u] size[%u]",
27579 : highest_ofs, pull->data_size);
27580 0 : TALLOC_FREE(pull);
27581 0 : PyErr_SetNdrError(err);
27582 0 : return NULL;
27583 : }
27584 : }
27585 :
27586 0 : TALLOC_FREE(pull);
27587 0 : Py_RETURN_NONE;
27588 : }
27589 :
27590 0 : static PyObject *py_DnssrvOperation_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
27591 : {
27592 0 : DATA_BLOB blob;
27593 0 : Py_ssize_t blob_length = 0;
27594 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
27595 0 : PyObject *bigendian_obj = NULL;
27596 0 : PyObject *ndr64_obj = NULL;
27597 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
27598 0 : PyObject *allow_remaining_obj = NULL;
27599 0 : bool allow_remaining = false;
27600 :
27601 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
27602 : discard_const_p(char *, kwnames),
27603 : &blob.data, &blob_length,
27604 : &bigendian_obj,
27605 : &ndr64_obj,
27606 : &allow_remaining_obj)) {
27607 0 : return NULL;
27608 : }
27609 0 : blob.length = blob_length;
27610 :
27611 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
27612 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
27613 : }
27614 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
27615 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
27616 : }
27617 :
27618 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
27619 0 : allow_remaining = true;
27620 : }
27621 :
27622 0 : return py_DnssrvOperation_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
27623 : }
27624 :
27625 0 : static PyObject *py_DnssrvOperation_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
27626 : {
27627 0 : DATA_BLOB blob;
27628 0 : Py_ssize_t blob_length = 0;
27629 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
27630 0 : PyObject *bigendian_obj = NULL;
27631 0 : PyObject *ndr64_obj = NULL;
27632 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
27633 0 : PyObject *allow_remaining_obj = NULL;
27634 0 : bool allow_remaining = false;
27635 :
27636 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
27637 : discard_const_p(char *, kwnames),
27638 : &blob.data, &blob_length,
27639 : &bigendian_obj,
27640 : &ndr64_obj,
27641 : &allow_remaining_obj)) {
27642 0 : return NULL;
27643 : }
27644 0 : blob.length = blob_length;
27645 :
27646 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
27647 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
27648 : }
27649 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
27650 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
27651 : }
27652 :
27653 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
27654 0 : allow_remaining = true;
27655 : }
27656 :
27657 0 : return py_DnssrvOperation_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
27658 : }
27659 :
27660 0 : static PyObject *py_DnssrvOperation_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
27661 : {
27662 0 : const struct ndr_interface_call *call = NULL;
27663 0 : struct DnssrvOperation *object = pytalloc_get_ptr(py_obj);
27664 0 : PyObject *ret;
27665 0 : char *retstr;
27666 :
27667 0 : if (ndr_table_dnsserver.num_calls < 1) {
27668 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvOperation_ndr_print");
27669 0 : return NULL;
27670 : }
27671 0 : call = &ndr_table_dnsserver.calls[0];
27672 :
27673 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
27674 0 : ret = PyUnicode_FromString(retstr);
27675 0 : TALLOC_FREE(retstr);
27676 :
27677 0 : return ret;
27678 : }
27679 :
27680 0 : static PyObject *py_DnssrvOperation_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
27681 : {
27682 0 : return py_DnssrvOperation_ndr_print(py_obj, "DnssrvOperation_in", NDR_IN);
27683 : }
27684 :
27685 0 : static PyObject *py_DnssrvOperation_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
27686 : {
27687 0 : return py_DnssrvOperation_ndr_print(py_obj, "DnssrvOperation_out", NDR_OUT);
27688 : }
27689 :
27690 : static PyMethodDef py_DnssrvOperation_methods[] = {
27691 : { "opnum", (PyCFunction)py_DnssrvOperation_ndr_opnum, METH_NOARGS|METH_CLASS,
27692 : "dnsserver.DnssrvOperation.opnum() -> 0 (0x00) " },
27693 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvOperation_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
27694 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
27695 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvOperation_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
27696 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
27697 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvOperation_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
27698 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
27699 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvOperation_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
27700 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
27701 : { "__ndr_print_in__", (PyCFunction)py_DnssrvOperation_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
27702 : { "__ndr_print_out__", (PyCFunction)py_DnssrvOperation_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
27703 : { NULL, NULL, 0, NULL }
27704 : };
27705 :
27706 :
27707 : static PyTypeObject DnssrvOperation_Type = {
27708 : PyVarObject_HEAD_INIT(NULL, 0)
27709 : .tp_name = "dnsserver.DnssrvOperation",
27710 : .tp_getset = py_DnssrvOperation_getsetters,
27711 : .tp_methods = py_DnssrvOperation_methods,
27712 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
27713 : .tp_new = py_DnssrvOperation_new,
27714 : };
27715 :
27716 3 : static bool pack_py_DnssrvOperation_args_in(PyObject *args, PyObject *kwargs, struct DnssrvOperation *r)
27717 : {
27718 0 : PyObject *py_pwszServerName;
27719 0 : PyObject *py_pszZone;
27720 0 : PyObject *py_dwContext;
27721 0 : PyObject *py_pszOperation;
27722 0 : PyObject *py_dwTypeId;
27723 0 : PyObject *py_pData;
27724 3 : const char *kwnames[] = {
27725 : "pwszServerName", "pszZone", "dwContext", "pszOperation", "dwTypeId", "pData", NULL
27726 : };
27727 :
27728 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)) {
27729 0 : return false;
27730 : }
27731 :
27732 3 : if (py_pwszServerName == NULL) {
27733 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pwszServerName");
27734 0 : return false;
27735 : }
27736 3 : if (py_pwszServerName == Py_None) {
27737 0 : r->in.pwszServerName = NULL;
27738 : } else {
27739 3 : r->in.pwszServerName = NULL;
27740 : {
27741 0 : const char *test_str;
27742 0 : const char *talloc_str;
27743 3 : PyObject *unicode = NULL;
27744 3 : if (PyUnicode_Check(py_pwszServerName)) {
27745 3 : unicode = PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore");
27746 3 : if (unicode == NULL) {
27747 0 : return false;
27748 : }
27749 3 : test_str = PyBytes_AS_STRING(unicode);
27750 0 : } else if (PyBytes_Check(py_pwszServerName)) {
27751 0 : test_str = PyBytes_AS_STRING(py_pwszServerName);
27752 : } else {
27753 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
27754 0 : return false;
27755 : }
27756 3 : talloc_str = talloc_strdup(r, test_str);
27757 3 : if (unicode != NULL) {
27758 2 : Py_DECREF(unicode);
27759 : }
27760 3 : if (talloc_str == NULL) {
27761 0 : PyErr_NoMemory();
27762 0 : return false;
27763 : }
27764 3 : r->in.pwszServerName = talloc_str;
27765 : }
27766 : }
27767 3 : if (py_pszZone == NULL) {
27768 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszZone");
27769 0 : return false;
27770 : }
27771 3 : if (py_pszZone == Py_None) {
27772 0 : r->in.pszZone = NULL;
27773 : } else {
27774 3 : r->in.pszZone = NULL;
27775 : {
27776 0 : const char *test_str;
27777 0 : const char *talloc_str;
27778 3 : PyObject *unicode = NULL;
27779 3 : if (PyUnicode_Check(py_pszZone)) {
27780 3 : unicode = PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore");
27781 3 : if (unicode == NULL) {
27782 0 : return false;
27783 : }
27784 3 : test_str = PyBytes_AS_STRING(unicode);
27785 0 : } else if (PyBytes_Check(py_pszZone)) {
27786 0 : test_str = PyBytes_AS_STRING(py_pszZone);
27787 : } else {
27788 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
27789 0 : return false;
27790 : }
27791 3 : talloc_str = talloc_strdup(r, test_str);
27792 3 : if (unicode != NULL) {
27793 2 : Py_DECREF(unicode);
27794 : }
27795 3 : if (talloc_str == NULL) {
27796 0 : PyErr_NoMemory();
27797 0 : return false;
27798 : }
27799 3 : r->in.pszZone = talloc_str;
27800 : }
27801 : }
27802 3 : if (py_dwContext == NULL) {
27803 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dwContext");
27804 0 : return false;
27805 : }
27806 : {
27807 3 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwContext));
27808 3 : if (PyLong_Check(py_dwContext)) {
27809 0 : unsigned long long test_var;
27810 3 : test_var = PyLong_AsUnsignedLongLong(py_dwContext);
27811 3 : if (PyErr_Occurred() != NULL) {
27812 0 : return false;
27813 : }
27814 3 : if (test_var > uint_max) {
27815 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27816 : PyLong_Type.tp_name, uint_max, test_var);
27817 0 : return false;
27818 : }
27819 3 : r->in.dwContext = test_var;
27820 : } else {
27821 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
27822 : PyLong_Type.tp_name);
27823 0 : return false;
27824 : }
27825 : }
27826 3 : if (py_pszOperation == NULL) {
27827 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszOperation");
27828 0 : return false;
27829 : }
27830 3 : if (py_pszOperation == Py_None) {
27831 0 : r->in.pszOperation = NULL;
27832 : } else {
27833 3 : r->in.pszOperation = NULL;
27834 : {
27835 0 : const char *test_str;
27836 0 : const char *talloc_str;
27837 3 : PyObject *unicode = NULL;
27838 3 : if (PyUnicode_Check(py_pszOperation)) {
27839 3 : unicode = PyUnicode_AsEncodedString(py_pszOperation, "utf-8", "ignore");
27840 3 : if (unicode == NULL) {
27841 0 : return false;
27842 : }
27843 3 : test_str = PyBytes_AS_STRING(unicode);
27844 0 : } else if (PyBytes_Check(py_pszOperation)) {
27845 0 : test_str = PyBytes_AS_STRING(py_pszOperation);
27846 : } else {
27847 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszOperation)->tp_name);
27848 0 : return false;
27849 : }
27850 3 : talloc_str = talloc_strdup(r, test_str);
27851 3 : if (unicode != NULL) {
27852 2 : Py_DECREF(unicode);
27853 : }
27854 3 : if (talloc_str == NULL) {
27855 0 : PyErr_NoMemory();
27856 0 : return false;
27857 : }
27858 3 : r->in.pszOperation = talloc_str;
27859 : }
27860 : }
27861 3 : if (py_dwTypeId == NULL) {
27862 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dwTypeId");
27863 0 : return false;
27864 : }
27865 : {
27866 3 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwTypeId));
27867 3 : if (PyLong_Check(py_dwTypeId)) {
27868 0 : unsigned long long test_var;
27869 3 : test_var = PyLong_AsUnsignedLongLong(py_dwTypeId);
27870 3 : if (PyErr_Occurred() != NULL) {
27871 0 : return false;
27872 : }
27873 3 : if (test_var > uint_max) {
27874 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27875 : PyLong_Type.tp_name, uint_max, test_var);
27876 0 : return false;
27877 : }
27878 3 : r->in.dwTypeId = test_var;
27879 : } else {
27880 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
27881 : PyLong_Type.tp_name);
27882 0 : return false;
27883 : }
27884 : }
27885 3 : if (py_pData == NULL) {
27886 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pData");
27887 0 : return false;
27888 : }
27889 : {
27890 0 : union DNSSRV_RPC_UNION *pData_switch_0;
27891 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");
27892 3 : if (pData_switch_0 == NULL) {
27893 0 : return false;
27894 : }
27895 3 : r->in.pData = *pData_switch_0;
27896 : }
27897 3 : return true;
27898 : }
27899 :
27900 3 : static PyObject *unpack_py_DnssrvOperation_args_out(struct DnssrvOperation *r)
27901 : {
27902 0 : PyObject *result;
27903 3 : result = Py_None;
27904 2 : Py_INCREF(result);
27905 3 : if (!W_ERROR_IS_OK(r->out.result)) {
27906 3 : PyErr_SetWERROR(r->out.result);
27907 3 : return NULL;
27908 : }
27909 :
27910 0 : return result;
27911 : }
27912 :
27913 :
27914 0 : static PyObject *py_DnssrvQuery_in_get_pwszServerName(PyObject *obj, void *closure)
27915 : {
27916 0 : struct DnssrvQuery *object = pytalloc_get_ptr(obj);
27917 0 : PyObject *py_pwszServerName;
27918 0 : if (object->in.pwszServerName == NULL) {
27919 0 : Py_RETURN_NONE;
27920 : }
27921 0 : if (object->in.pwszServerName == NULL) {
27922 0 : py_pwszServerName = Py_None;
27923 0 : Py_INCREF(py_pwszServerName);
27924 : } else {
27925 0 : if (object->in.pwszServerName == NULL) {
27926 0 : py_pwszServerName = Py_None;
27927 0 : Py_INCREF(py_pwszServerName);
27928 : } else {
27929 0 : py_pwszServerName = PyUnicode_Decode(object->in.pwszServerName, strlen(object->in.pwszServerName), "utf-8", "ignore");
27930 : }
27931 : }
27932 0 : return py_pwszServerName;
27933 : }
27934 :
27935 0 : static int py_DnssrvQuery_in_set_pwszServerName(PyObject *py_obj, PyObject *value, void *closure)
27936 : {
27937 0 : struct DnssrvQuery *object = pytalloc_get_ptr(py_obj);
27938 0 : if (value == NULL) {
27939 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pwszServerName");
27940 0 : return -1;
27941 : }
27942 0 : if (value == Py_None) {
27943 0 : object->in.pwszServerName = NULL;
27944 : } else {
27945 0 : object->in.pwszServerName = NULL;
27946 : {
27947 0 : const char *test_str;
27948 0 : const char *talloc_str;
27949 0 : PyObject *unicode = NULL;
27950 0 : if (PyUnicode_Check(value)) {
27951 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
27952 0 : if (unicode == NULL) {
27953 0 : return -1;
27954 : }
27955 0 : test_str = PyBytes_AS_STRING(unicode);
27956 0 : } else if (PyBytes_Check(value)) {
27957 0 : test_str = PyBytes_AS_STRING(value);
27958 : } else {
27959 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
27960 0 : return -1;
27961 : }
27962 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
27963 0 : if (unicode != NULL) {
27964 0 : Py_DECREF(unicode);
27965 : }
27966 0 : if (talloc_str == NULL) {
27967 0 : PyErr_NoMemory();
27968 0 : return -1;
27969 : }
27970 0 : object->in.pwszServerName = talloc_str;
27971 : }
27972 : }
27973 0 : return 0;
27974 : }
27975 :
27976 0 : static PyObject *py_DnssrvQuery_in_get_pszZone(PyObject *obj, void *closure)
27977 : {
27978 0 : struct DnssrvQuery *object = pytalloc_get_ptr(obj);
27979 0 : PyObject *py_pszZone;
27980 0 : if (object->in.pszZone == NULL) {
27981 0 : Py_RETURN_NONE;
27982 : }
27983 0 : if (object->in.pszZone == NULL) {
27984 0 : py_pszZone = Py_None;
27985 0 : Py_INCREF(py_pszZone);
27986 : } else {
27987 0 : if (object->in.pszZone == NULL) {
27988 0 : py_pszZone = Py_None;
27989 0 : Py_INCREF(py_pszZone);
27990 : } else {
27991 0 : py_pszZone = PyUnicode_Decode(object->in.pszZone, strlen(object->in.pszZone), "utf-8", "ignore");
27992 : }
27993 : }
27994 0 : return py_pszZone;
27995 : }
27996 :
27997 0 : static int py_DnssrvQuery_in_set_pszZone(PyObject *py_obj, PyObject *value, void *closure)
27998 : {
27999 0 : struct DnssrvQuery *object = pytalloc_get_ptr(py_obj);
28000 0 : if (value == NULL) {
28001 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszZone");
28002 0 : return -1;
28003 : }
28004 0 : if (value == Py_None) {
28005 0 : object->in.pszZone = NULL;
28006 : } else {
28007 0 : object->in.pszZone = NULL;
28008 : {
28009 0 : const char *test_str;
28010 0 : const char *talloc_str;
28011 0 : PyObject *unicode = NULL;
28012 0 : if (PyUnicode_Check(value)) {
28013 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
28014 0 : if (unicode == NULL) {
28015 0 : return -1;
28016 : }
28017 0 : test_str = PyBytes_AS_STRING(unicode);
28018 0 : } else if (PyBytes_Check(value)) {
28019 0 : test_str = PyBytes_AS_STRING(value);
28020 : } else {
28021 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
28022 0 : return -1;
28023 : }
28024 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
28025 0 : if (unicode != NULL) {
28026 0 : Py_DECREF(unicode);
28027 : }
28028 0 : if (talloc_str == NULL) {
28029 0 : PyErr_NoMemory();
28030 0 : return -1;
28031 : }
28032 0 : object->in.pszZone = talloc_str;
28033 : }
28034 : }
28035 0 : return 0;
28036 : }
28037 :
28038 0 : static PyObject *py_DnssrvQuery_in_get_pszOperation(PyObject *obj, void *closure)
28039 : {
28040 0 : struct DnssrvQuery *object = pytalloc_get_ptr(obj);
28041 0 : PyObject *py_pszOperation;
28042 0 : if (object->in.pszOperation == NULL) {
28043 0 : Py_RETURN_NONE;
28044 : }
28045 0 : if (object->in.pszOperation == NULL) {
28046 0 : py_pszOperation = Py_None;
28047 0 : Py_INCREF(py_pszOperation);
28048 : } else {
28049 0 : if (object->in.pszOperation == NULL) {
28050 0 : py_pszOperation = Py_None;
28051 0 : Py_INCREF(py_pszOperation);
28052 : } else {
28053 0 : py_pszOperation = PyUnicode_Decode(object->in.pszOperation, strlen(object->in.pszOperation), "utf-8", "ignore");
28054 : }
28055 : }
28056 0 : return py_pszOperation;
28057 : }
28058 :
28059 0 : static int py_DnssrvQuery_in_set_pszOperation(PyObject *py_obj, PyObject *value, void *closure)
28060 : {
28061 0 : struct DnssrvQuery *object = pytalloc_get_ptr(py_obj);
28062 0 : if (value == NULL) {
28063 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszOperation");
28064 0 : return -1;
28065 : }
28066 0 : if (value == Py_None) {
28067 0 : object->in.pszOperation = NULL;
28068 : } else {
28069 0 : object->in.pszOperation = NULL;
28070 : {
28071 0 : const char *test_str;
28072 0 : const char *talloc_str;
28073 0 : PyObject *unicode = NULL;
28074 0 : if (PyUnicode_Check(value)) {
28075 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
28076 0 : if (unicode == NULL) {
28077 0 : return -1;
28078 : }
28079 0 : test_str = PyBytes_AS_STRING(unicode);
28080 0 : } else if (PyBytes_Check(value)) {
28081 0 : test_str = PyBytes_AS_STRING(value);
28082 : } else {
28083 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
28084 0 : return -1;
28085 : }
28086 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
28087 0 : if (unicode != NULL) {
28088 0 : Py_DECREF(unicode);
28089 : }
28090 0 : if (talloc_str == NULL) {
28091 0 : PyErr_NoMemory();
28092 0 : return -1;
28093 : }
28094 0 : object->in.pszOperation = talloc_str;
28095 : }
28096 : }
28097 0 : return 0;
28098 : }
28099 :
28100 0 : static PyObject *py_DnssrvQuery_out_get_pdwTypeId(PyObject *obj, void *closure)
28101 : {
28102 0 : struct DnssrvQuery *object = pytalloc_get_ptr(obj);
28103 0 : PyObject *py_pdwTypeId;
28104 0 : if (object->out.pdwTypeId == NULL) {
28105 0 : Py_RETURN_NONE;
28106 : }
28107 0 : py_pdwTypeId = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.pdwTypeId));
28108 0 : return py_pdwTypeId;
28109 : }
28110 :
28111 0 : static int py_DnssrvQuery_out_set_pdwTypeId(PyObject *py_obj, PyObject *value, void *closure)
28112 : {
28113 0 : struct DnssrvQuery *object = pytalloc_get_ptr(py_obj);
28114 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.pdwTypeId));
28115 0 : if (value == NULL) {
28116 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.pdwTypeId");
28117 0 : return -1;
28118 : }
28119 0 : object->out.pdwTypeId = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.pdwTypeId);
28120 0 : if (object->out.pdwTypeId == NULL) {
28121 0 : PyErr_NoMemory();
28122 0 : return -1;
28123 : }
28124 : {
28125 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.pdwTypeId));
28126 0 : if (PyLong_Check(value)) {
28127 0 : unsigned long long test_var;
28128 0 : test_var = PyLong_AsUnsignedLongLong(value);
28129 0 : if (PyErr_Occurred() != NULL) {
28130 0 : return -1;
28131 : }
28132 0 : if (test_var > uint_max) {
28133 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
28134 : PyLong_Type.tp_name, uint_max, test_var);
28135 0 : return -1;
28136 : }
28137 0 : *object->out.pdwTypeId = test_var;
28138 : } else {
28139 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
28140 : PyLong_Type.tp_name);
28141 0 : return -1;
28142 : }
28143 : }
28144 0 : return 0;
28145 : }
28146 :
28147 0 : static PyObject *py_DnssrvQuery_out_get_ppData(PyObject *obj, void *closure)
28148 : {
28149 0 : struct DnssrvQuery *object = pytalloc_get_ptr(obj);
28150 0 : PyObject *py_ppData;
28151 0 : if (object->out.ppData == NULL) {
28152 0 : Py_RETURN_NONE;
28153 : }
28154 0 : py_ppData = pyrpc_import_union(&DNSSRV_RPC_UNION_Type, object->out.ppData, *object->out.pdwTypeId, object->out.ppData, "union DNSSRV_RPC_UNION");
28155 0 : if (py_ppData == NULL) {
28156 0 : return NULL;
28157 : }
28158 0 : return py_ppData;
28159 : }
28160 :
28161 0 : static int py_DnssrvQuery_out_set_ppData(PyObject *py_obj, PyObject *value, void *closure)
28162 : {
28163 0 : struct DnssrvQuery *object = pytalloc_get_ptr(py_obj);
28164 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ppData));
28165 0 : if (value == NULL) {
28166 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.ppData");
28167 0 : return -1;
28168 : }
28169 0 : object->out.ppData = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ppData);
28170 0 : if (object->out.ppData == NULL) {
28171 0 : PyErr_NoMemory();
28172 0 : return -1;
28173 : }
28174 : {
28175 0 : union DNSSRV_RPC_UNION *ppData_switch_1;
28176 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");
28177 0 : if (ppData_switch_1 == NULL) {
28178 0 : return -1;
28179 : }
28180 0 : object->out.ppData = ppData_switch_1;
28181 : }
28182 0 : return 0;
28183 : }
28184 :
28185 0 : static PyObject *py_DnssrvQuery_get_result(PyObject *obj, void *closure)
28186 : {
28187 0 : struct DnssrvQuery *object = pytalloc_get_ptr(obj);
28188 0 : PyObject *py_result;
28189 0 : py_result = PyErr_FromWERROR(object->out.result);
28190 0 : return py_result;
28191 : }
28192 :
28193 0 : static int py_DnssrvQuery_set_result(PyObject *py_obj, PyObject *value, void *closure)
28194 : {
28195 0 : struct DnssrvQuery *object = pytalloc_get_ptr(py_obj);
28196 0 : if (value == NULL) {
28197 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
28198 0 : return -1;
28199 : }
28200 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
28201 0 : return 0;
28202 : }
28203 :
28204 : static PyGetSetDef py_DnssrvQuery_getsetters[] = {
28205 : {
28206 : .name = discard_const_p(char, "in_pwszServerName"),
28207 : .get = py_DnssrvQuery_in_get_pwszServerName,
28208 : .set = py_DnssrvQuery_in_set_pwszServerName,
28209 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
28210 : },
28211 : {
28212 : .name = discard_const_p(char, "in_pszZone"),
28213 : .get = py_DnssrvQuery_in_get_pszZone,
28214 : .set = py_DnssrvQuery_in_set_pszZone,
28215 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
28216 : },
28217 : {
28218 : .name = discard_const_p(char, "in_pszOperation"),
28219 : .get = py_DnssrvQuery_in_get_pszOperation,
28220 : .set = py_DnssrvQuery_in_set_pszOperation,
28221 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
28222 : },
28223 : {
28224 : .name = discard_const_p(char, "out_pdwTypeId"),
28225 : .get = py_DnssrvQuery_out_get_pdwTypeId,
28226 : .set = py_DnssrvQuery_out_set_pdwTypeId,
28227 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_TYPEID")
28228 : },
28229 : {
28230 : .name = discard_const_p(char, "out_ppData"),
28231 : .get = py_DnssrvQuery_out_get_ppData,
28232 : .set = py_DnssrvQuery_out_set_ppData,
28233 : .doc = discard_const_p(char, "PIDL-generated element of base type DNSSRV_RPC_UNION")
28234 : },
28235 : {
28236 : .name = discard_const_p(char, "result"),
28237 : .get = py_DnssrvQuery_get_result,
28238 : .set = py_DnssrvQuery_set_result,
28239 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
28240 : },
28241 : { .name = NULL }
28242 : };
28243 :
28244 0 : static PyObject *py_DnssrvQuery_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
28245 : {
28246 0 : PyObject *self = pytalloc_new(struct DnssrvQuery, type);
28247 0 : struct DnssrvQuery *_self = (struct DnssrvQuery *)pytalloc_get_ptr(self);
28248 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
28249 0 : _self->out.pdwTypeId = talloc_zero(mem_ctx, enum DNS_RPC_TYPEID);
28250 0 : _self->out.ppData = talloc_zero(mem_ctx, union DNSSRV_RPC_UNION);
28251 0 : return self;
28252 : }
28253 :
28254 0 : static PyObject *py_DnssrvQuery_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
28255 : {
28256 :
28257 :
28258 0 : return PyLong_FromLong(1);
28259 : }
28260 :
28261 0 : static PyObject *py_DnssrvQuery_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
28262 : {
28263 0 : const struct ndr_interface_call *call = NULL;
28264 0 : struct DnssrvQuery *object = pytalloc_get_ptr(py_obj);
28265 0 : PyObject *ret = NULL;
28266 0 : struct ndr_push *push = NULL;
28267 0 : DATA_BLOB blob;
28268 0 : enum ndr_err_code err;
28269 :
28270 0 : if (ndr_table_dnsserver.num_calls < 2) {
28271 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvQuery_ndr_pack");
28272 0 : return NULL;
28273 : }
28274 0 : call = &ndr_table_dnsserver.calls[1];
28275 :
28276 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
28277 0 : if (push == NULL) {
28278 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
28279 0 : return NULL;
28280 : }
28281 :
28282 0 : push->flags |= ndr_push_flags;
28283 :
28284 0 : err = call->ndr_push(push, ndr_inout_flags, object);
28285 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
28286 0 : TALLOC_FREE(push);
28287 0 : PyErr_SetNdrError(err);
28288 0 : return NULL;
28289 : }
28290 0 : blob = ndr_push_blob(push);
28291 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
28292 0 : TALLOC_FREE(push);
28293 0 : return ret;
28294 : }
28295 :
28296 0 : static PyObject *py_DnssrvQuery_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
28297 : {
28298 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
28299 0 : PyObject *bigendian_obj = NULL;
28300 0 : PyObject *ndr64_obj = NULL;
28301 0 : libndr_flags ndr_push_flags = 0;
28302 :
28303 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
28304 : discard_const_p(char *, kwnames),
28305 : &bigendian_obj,
28306 : &ndr64_obj)) {
28307 0 : return NULL;
28308 : }
28309 :
28310 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
28311 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
28312 : }
28313 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
28314 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
28315 : }
28316 :
28317 0 : return py_DnssrvQuery_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
28318 : }
28319 :
28320 0 : static PyObject *py_DnssrvQuery_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
28321 : {
28322 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
28323 0 : PyObject *bigendian_obj = NULL;
28324 0 : PyObject *ndr64_obj = NULL;
28325 0 : libndr_flags ndr_push_flags = 0;
28326 :
28327 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
28328 : discard_const_p(char *, kwnames),
28329 : &bigendian_obj,
28330 : &ndr64_obj)) {
28331 0 : return NULL;
28332 : }
28333 :
28334 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
28335 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
28336 : }
28337 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
28338 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
28339 : }
28340 :
28341 0 : return py_DnssrvQuery_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
28342 : }
28343 :
28344 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)
28345 : {
28346 0 : const struct ndr_interface_call *call = NULL;
28347 0 : struct DnssrvQuery *object = pytalloc_get_ptr(py_obj);
28348 0 : struct ndr_pull *pull = NULL;
28349 0 : enum ndr_err_code err;
28350 :
28351 0 : if (ndr_table_dnsserver.num_calls < 2) {
28352 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvQuery_ndr_unpack");
28353 0 : return NULL;
28354 : }
28355 0 : call = &ndr_table_dnsserver.calls[1];
28356 :
28357 0 : pull = ndr_pull_init_blob(blob, object);
28358 0 : if (pull == NULL) {
28359 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
28360 0 : return NULL;
28361 : }
28362 :
28363 0 : pull->flags |= ndr_pull_flags;
28364 :
28365 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
28366 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
28367 0 : TALLOC_FREE(pull);
28368 0 : PyErr_SetNdrError(err);
28369 0 : return NULL;
28370 : }
28371 0 : if (!allow_remaining) {
28372 0 : uint32_t highest_ofs;
28373 :
28374 0 : if (pull->offset > pull->relative_highest_offset) {
28375 0 : highest_ofs = pull->offset;
28376 : } else {
28377 0 : highest_ofs = pull->relative_highest_offset;
28378 : }
28379 0 : if (highest_ofs < pull->data_size) {
28380 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
28381 : "not all bytes consumed ofs[%u] size[%u]",
28382 : highest_ofs, pull->data_size);
28383 0 : TALLOC_FREE(pull);
28384 0 : PyErr_SetNdrError(err);
28385 0 : return NULL;
28386 : }
28387 : }
28388 :
28389 0 : TALLOC_FREE(pull);
28390 0 : Py_RETURN_NONE;
28391 : }
28392 :
28393 0 : static PyObject *py_DnssrvQuery_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
28394 : {
28395 0 : DATA_BLOB blob;
28396 0 : Py_ssize_t blob_length = 0;
28397 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
28398 0 : PyObject *bigendian_obj = NULL;
28399 0 : PyObject *ndr64_obj = NULL;
28400 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
28401 0 : PyObject *allow_remaining_obj = NULL;
28402 0 : bool allow_remaining = false;
28403 :
28404 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
28405 : discard_const_p(char *, kwnames),
28406 : &blob.data, &blob_length,
28407 : &bigendian_obj,
28408 : &ndr64_obj,
28409 : &allow_remaining_obj)) {
28410 0 : return NULL;
28411 : }
28412 0 : blob.length = blob_length;
28413 :
28414 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
28415 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
28416 : }
28417 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
28418 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
28419 : }
28420 :
28421 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
28422 0 : allow_remaining = true;
28423 : }
28424 :
28425 0 : return py_DnssrvQuery_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
28426 : }
28427 :
28428 0 : static PyObject *py_DnssrvQuery_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
28429 : {
28430 0 : DATA_BLOB blob;
28431 0 : Py_ssize_t blob_length = 0;
28432 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
28433 0 : PyObject *bigendian_obj = NULL;
28434 0 : PyObject *ndr64_obj = NULL;
28435 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
28436 0 : PyObject *allow_remaining_obj = NULL;
28437 0 : bool allow_remaining = false;
28438 :
28439 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
28440 : discard_const_p(char *, kwnames),
28441 : &blob.data, &blob_length,
28442 : &bigendian_obj,
28443 : &ndr64_obj,
28444 : &allow_remaining_obj)) {
28445 0 : return NULL;
28446 : }
28447 0 : blob.length = blob_length;
28448 :
28449 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
28450 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
28451 : }
28452 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
28453 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
28454 : }
28455 :
28456 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
28457 0 : allow_remaining = true;
28458 : }
28459 :
28460 0 : return py_DnssrvQuery_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
28461 : }
28462 :
28463 0 : static PyObject *py_DnssrvQuery_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
28464 : {
28465 0 : const struct ndr_interface_call *call = NULL;
28466 0 : struct DnssrvQuery *object = pytalloc_get_ptr(py_obj);
28467 0 : PyObject *ret;
28468 0 : char *retstr;
28469 :
28470 0 : if (ndr_table_dnsserver.num_calls < 2) {
28471 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvQuery_ndr_print");
28472 0 : return NULL;
28473 : }
28474 0 : call = &ndr_table_dnsserver.calls[1];
28475 :
28476 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
28477 0 : ret = PyUnicode_FromString(retstr);
28478 0 : TALLOC_FREE(retstr);
28479 :
28480 0 : return ret;
28481 : }
28482 :
28483 0 : static PyObject *py_DnssrvQuery_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
28484 : {
28485 0 : return py_DnssrvQuery_ndr_print(py_obj, "DnssrvQuery_in", NDR_IN);
28486 : }
28487 :
28488 0 : static PyObject *py_DnssrvQuery_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
28489 : {
28490 0 : return py_DnssrvQuery_ndr_print(py_obj, "DnssrvQuery_out", NDR_OUT);
28491 : }
28492 :
28493 : static PyMethodDef py_DnssrvQuery_methods[] = {
28494 : { "opnum", (PyCFunction)py_DnssrvQuery_ndr_opnum, METH_NOARGS|METH_CLASS,
28495 : "dnsserver.DnssrvQuery.opnum() -> 1 (0x01) " },
28496 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvQuery_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
28497 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
28498 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvQuery_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
28499 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
28500 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvQuery_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
28501 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
28502 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvQuery_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
28503 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
28504 : { "__ndr_print_in__", (PyCFunction)py_DnssrvQuery_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
28505 : { "__ndr_print_out__", (PyCFunction)py_DnssrvQuery_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
28506 : { NULL, NULL, 0, NULL }
28507 : };
28508 :
28509 :
28510 : static PyTypeObject DnssrvQuery_Type = {
28511 : PyVarObject_HEAD_INIT(NULL, 0)
28512 : .tp_name = "dnsserver.DnssrvQuery",
28513 : .tp_getset = py_DnssrvQuery_getsetters,
28514 : .tp_methods = py_DnssrvQuery_methods,
28515 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
28516 : .tp_new = py_DnssrvQuery_new,
28517 : };
28518 :
28519 0 : static bool pack_py_DnssrvQuery_args_in(PyObject *args, PyObject *kwargs, struct DnssrvQuery *r)
28520 : {
28521 0 : PyObject *py_pwszServerName;
28522 0 : PyObject *py_pszZone;
28523 0 : PyObject *py_pszOperation;
28524 0 : const char *kwnames[] = {
28525 : "pwszServerName", "pszZone", "pszOperation", NULL
28526 : };
28527 :
28528 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:DnssrvQuery", discard_const_p(char *, kwnames), &py_pwszServerName, &py_pszZone, &py_pszOperation)) {
28529 0 : return false;
28530 : }
28531 :
28532 0 : if (py_pwszServerName == NULL) {
28533 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pwszServerName");
28534 0 : return false;
28535 : }
28536 0 : if (py_pwszServerName == Py_None) {
28537 0 : r->in.pwszServerName = NULL;
28538 : } else {
28539 0 : r->in.pwszServerName = NULL;
28540 : {
28541 0 : const char *test_str;
28542 0 : const char *talloc_str;
28543 0 : PyObject *unicode = NULL;
28544 0 : if (PyUnicode_Check(py_pwszServerName)) {
28545 0 : unicode = PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore");
28546 0 : if (unicode == NULL) {
28547 0 : return false;
28548 : }
28549 0 : test_str = PyBytes_AS_STRING(unicode);
28550 0 : } else if (PyBytes_Check(py_pwszServerName)) {
28551 0 : test_str = PyBytes_AS_STRING(py_pwszServerName);
28552 : } else {
28553 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
28554 0 : return false;
28555 : }
28556 0 : talloc_str = talloc_strdup(r, test_str);
28557 0 : if (unicode != NULL) {
28558 0 : Py_DECREF(unicode);
28559 : }
28560 0 : if (talloc_str == NULL) {
28561 0 : PyErr_NoMemory();
28562 0 : return false;
28563 : }
28564 0 : r->in.pwszServerName = talloc_str;
28565 : }
28566 : }
28567 0 : if (py_pszZone == NULL) {
28568 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszZone");
28569 0 : return false;
28570 : }
28571 0 : if (py_pszZone == Py_None) {
28572 0 : r->in.pszZone = NULL;
28573 : } else {
28574 0 : r->in.pszZone = NULL;
28575 : {
28576 0 : const char *test_str;
28577 0 : const char *talloc_str;
28578 0 : PyObject *unicode = NULL;
28579 0 : if (PyUnicode_Check(py_pszZone)) {
28580 0 : unicode = PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore");
28581 0 : if (unicode == NULL) {
28582 0 : return false;
28583 : }
28584 0 : test_str = PyBytes_AS_STRING(unicode);
28585 0 : } else if (PyBytes_Check(py_pszZone)) {
28586 0 : test_str = PyBytes_AS_STRING(py_pszZone);
28587 : } else {
28588 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
28589 0 : return false;
28590 : }
28591 0 : talloc_str = talloc_strdup(r, test_str);
28592 0 : if (unicode != NULL) {
28593 0 : Py_DECREF(unicode);
28594 : }
28595 0 : if (talloc_str == NULL) {
28596 0 : PyErr_NoMemory();
28597 0 : return false;
28598 : }
28599 0 : r->in.pszZone = talloc_str;
28600 : }
28601 : }
28602 0 : if (py_pszOperation == NULL) {
28603 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszOperation");
28604 0 : return false;
28605 : }
28606 0 : if (py_pszOperation == Py_None) {
28607 0 : r->in.pszOperation = NULL;
28608 : } else {
28609 0 : r->in.pszOperation = NULL;
28610 : {
28611 0 : const char *test_str;
28612 0 : const char *talloc_str;
28613 0 : PyObject *unicode = NULL;
28614 0 : if (PyUnicode_Check(py_pszOperation)) {
28615 0 : unicode = PyUnicode_AsEncodedString(py_pszOperation, "utf-8", "ignore");
28616 0 : if (unicode == NULL) {
28617 0 : return false;
28618 : }
28619 0 : test_str = PyBytes_AS_STRING(unicode);
28620 0 : } else if (PyBytes_Check(py_pszOperation)) {
28621 0 : test_str = PyBytes_AS_STRING(py_pszOperation);
28622 : } else {
28623 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszOperation)->tp_name);
28624 0 : return false;
28625 : }
28626 0 : talloc_str = talloc_strdup(r, test_str);
28627 0 : if (unicode != NULL) {
28628 0 : Py_DECREF(unicode);
28629 : }
28630 0 : if (talloc_str == NULL) {
28631 0 : PyErr_NoMemory();
28632 0 : return false;
28633 : }
28634 0 : r->in.pszOperation = talloc_str;
28635 : }
28636 : }
28637 0 : return true;
28638 : }
28639 :
28640 0 : static PyObject *unpack_py_DnssrvQuery_args_out(struct DnssrvQuery *r)
28641 : {
28642 0 : PyObject *result;
28643 0 : PyObject *py_pdwTypeId;
28644 0 : PyObject *py_ppData;
28645 0 : result = PyTuple_New(2);
28646 0 : py_pdwTypeId = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.pdwTypeId));
28647 0 : PyTuple_SetItem(result, 0, py_pdwTypeId);
28648 0 : py_ppData = pyrpc_import_union(&DNSSRV_RPC_UNION_Type, r->out.ppData, *r->out.pdwTypeId, r->out.ppData, "union DNSSRV_RPC_UNION");
28649 0 : if (py_ppData == NULL) {
28650 0 : return NULL;
28651 : }
28652 0 : PyTuple_SetItem(result, 1, py_ppData);
28653 0 : if (!W_ERROR_IS_OK(r->out.result)) {
28654 0 : PyErr_SetWERROR(r->out.result);
28655 0 : return NULL;
28656 : }
28657 :
28658 0 : return result;
28659 : }
28660 :
28661 :
28662 0 : static PyObject *py_DnssrvComplexOperation_in_get_pwszServerName(PyObject *obj, void *closure)
28663 : {
28664 0 : struct DnssrvComplexOperation *object = pytalloc_get_ptr(obj);
28665 0 : PyObject *py_pwszServerName;
28666 0 : if (object->in.pwszServerName == NULL) {
28667 0 : Py_RETURN_NONE;
28668 : }
28669 0 : if (object->in.pwszServerName == NULL) {
28670 0 : py_pwszServerName = Py_None;
28671 0 : Py_INCREF(py_pwszServerName);
28672 : } else {
28673 0 : if (object->in.pwszServerName == NULL) {
28674 0 : py_pwszServerName = Py_None;
28675 0 : Py_INCREF(py_pwszServerName);
28676 : } else {
28677 0 : py_pwszServerName = PyUnicode_Decode(object->in.pwszServerName, strlen(object->in.pwszServerName), "utf-8", "ignore");
28678 : }
28679 : }
28680 0 : return py_pwszServerName;
28681 : }
28682 :
28683 0 : static int py_DnssrvComplexOperation_in_set_pwszServerName(PyObject *py_obj, PyObject *value, void *closure)
28684 : {
28685 0 : struct DnssrvComplexOperation *object = pytalloc_get_ptr(py_obj);
28686 0 : if (value == NULL) {
28687 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pwszServerName");
28688 0 : return -1;
28689 : }
28690 0 : if (value == Py_None) {
28691 0 : object->in.pwszServerName = NULL;
28692 : } else {
28693 0 : object->in.pwszServerName = NULL;
28694 : {
28695 0 : const char *test_str;
28696 0 : const char *talloc_str;
28697 0 : PyObject *unicode = NULL;
28698 0 : if (PyUnicode_Check(value)) {
28699 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
28700 0 : if (unicode == NULL) {
28701 0 : return -1;
28702 : }
28703 0 : test_str = PyBytes_AS_STRING(unicode);
28704 0 : } else if (PyBytes_Check(value)) {
28705 0 : test_str = PyBytes_AS_STRING(value);
28706 : } else {
28707 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
28708 0 : return -1;
28709 : }
28710 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
28711 0 : if (unicode != NULL) {
28712 0 : Py_DECREF(unicode);
28713 : }
28714 0 : if (talloc_str == NULL) {
28715 0 : PyErr_NoMemory();
28716 0 : return -1;
28717 : }
28718 0 : object->in.pwszServerName = talloc_str;
28719 : }
28720 : }
28721 0 : return 0;
28722 : }
28723 :
28724 0 : static PyObject *py_DnssrvComplexOperation_in_get_pszZone(PyObject *obj, void *closure)
28725 : {
28726 0 : struct DnssrvComplexOperation *object = pytalloc_get_ptr(obj);
28727 0 : PyObject *py_pszZone;
28728 0 : if (object->in.pszZone == NULL) {
28729 0 : Py_RETURN_NONE;
28730 : }
28731 0 : if (object->in.pszZone == NULL) {
28732 0 : py_pszZone = Py_None;
28733 0 : Py_INCREF(py_pszZone);
28734 : } else {
28735 0 : if (object->in.pszZone == NULL) {
28736 0 : py_pszZone = Py_None;
28737 0 : Py_INCREF(py_pszZone);
28738 : } else {
28739 0 : py_pszZone = PyUnicode_Decode(object->in.pszZone, strlen(object->in.pszZone), "utf-8", "ignore");
28740 : }
28741 : }
28742 0 : return py_pszZone;
28743 : }
28744 :
28745 0 : static int py_DnssrvComplexOperation_in_set_pszZone(PyObject *py_obj, PyObject *value, void *closure)
28746 : {
28747 0 : struct DnssrvComplexOperation *object = pytalloc_get_ptr(py_obj);
28748 0 : if (value == NULL) {
28749 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszZone");
28750 0 : return -1;
28751 : }
28752 0 : if (value == Py_None) {
28753 0 : object->in.pszZone = NULL;
28754 : } else {
28755 0 : object->in.pszZone = NULL;
28756 : {
28757 0 : const char *test_str;
28758 0 : const char *talloc_str;
28759 0 : PyObject *unicode = NULL;
28760 0 : if (PyUnicode_Check(value)) {
28761 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
28762 0 : if (unicode == NULL) {
28763 0 : return -1;
28764 : }
28765 0 : test_str = PyBytes_AS_STRING(unicode);
28766 0 : } else if (PyBytes_Check(value)) {
28767 0 : test_str = PyBytes_AS_STRING(value);
28768 : } else {
28769 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
28770 0 : return -1;
28771 : }
28772 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
28773 0 : if (unicode != NULL) {
28774 0 : Py_DECREF(unicode);
28775 : }
28776 0 : if (talloc_str == NULL) {
28777 0 : PyErr_NoMemory();
28778 0 : return -1;
28779 : }
28780 0 : object->in.pszZone = talloc_str;
28781 : }
28782 : }
28783 0 : return 0;
28784 : }
28785 :
28786 0 : static PyObject *py_DnssrvComplexOperation_in_get_pszOperation(PyObject *obj, void *closure)
28787 : {
28788 0 : struct DnssrvComplexOperation *object = pytalloc_get_ptr(obj);
28789 0 : PyObject *py_pszOperation;
28790 0 : if (object->in.pszOperation == NULL) {
28791 0 : Py_RETURN_NONE;
28792 : }
28793 0 : if (object->in.pszOperation == NULL) {
28794 0 : py_pszOperation = Py_None;
28795 0 : Py_INCREF(py_pszOperation);
28796 : } else {
28797 0 : if (object->in.pszOperation == NULL) {
28798 0 : py_pszOperation = Py_None;
28799 0 : Py_INCREF(py_pszOperation);
28800 : } else {
28801 0 : py_pszOperation = PyUnicode_Decode(object->in.pszOperation, strlen(object->in.pszOperation), "utf-8", "ignore");
28802 : }
28803 : }
28804 0 : return py_pszOperation;
28805 : }
28806 :
28807 0 : static int py_DnssrvComplexOperation_in_set_pszOperation(PyObject *py_obj, PyObject *value, void *closure)
28808 : {
28809 0 : struct DnssrvComplexOperation *object = pytalloc_get_ptr(py_obj);
28810 0 : if (value == NULL) {
28811 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszOperation");
28812 0 : return -1;
28813 : }
28814 0 : if (value == Py_None) {
28815 0 : object->in.pszOperation = NULL;
28816 : } else {
28817 0 : object->in.pszOperation = NULL;
28818 : {
28819 0 : const char *test_str;
28820 0 : const char *talloc_str;
28821 0 : PyObject *unicode = NULL;
28822 0 : if (PyUnicode_Check(value)) {
28823 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
28824 0 : if (unicode == NULL) {
28825 0 : return -1;
28826 : }
28827 0 : test_str = PyBytes_AS_STRING(unicode);
28828 0 : } else if (PyBytes_Check(value)) {
28829 0 : test_str = PyBytes_AS_STRING(value);
28830 : } else {
28831 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
28832 0 : return -1;
28833 : }
28834 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
28835 0 : if (unicode != NULL) {
28836 0 : Py_DECREF(unicode);
28837 : }
28838 0 : if (talloc_str == NULL) {
28839 0 : PyErr_NoMemory();
28840 0 : return -1;
28841 : }
28842 0 : object->in.pszOperation = talloc_str;
28843 : }
28844 : }
28845 0 : return 0;
28846 : }
28847 :
28848 0 : static PyObject *py_DnssrvComplexOperation_in_get_dwTypeIn(PyObject *obj, void *closure)
28849 : {
28850 0 : struct DnssrvComplexOperation *object = pytalloc_get_ptr(obj);
28851 0 : PyObject *py_dwTypeIn;
28852 0 : py_dwTypeIn = PyLong_FromUnsignedLongLong((uint32_t)(object->in.dwTypeIn));
28853 0 : return py_dwTypeIn;
28854 : }
28855 :
28856 0 : static int py_DnssrvComplexOperation_in_set_dwTypeIn(PyObject *py_obj, PyObject *value, void *closure)
28857 : {
28858 0 : struct DnssrvComplexOperation *object = pytalloc_get_ptr(py_obj);
28859 0 : if (value == NULL) {
28860 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dwTypeIn");
28861 0 : return -1;
28862 : }
28863 : {
28864 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwTypeIn));
28865 0 : if (PyLong_Check(value)) {
28866 0 : unsigned long long test_var;
28867 0 : test_var = PyLong_AsUnsignedLongLong(value);
28868 0 : if (PyErr_Occurred() != NULL) {
28869 0 : return -1;
28870 : }
28871 0 : if (test_var > uint_max) {
28872 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
28873 : PyLong_Type.tp_name, uint_max, test_var);
28874 0 : return -1;
28875 : }
28876 0 : object->in.dwTypeIn = test_var;
28877 : } else {
28878 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
28879 : PyLong_Type.tp_name);
28880 0 : return -1;
28881 : }
28882 : }
28883 0 : return 0;
28884 : }
28885 :
28886 0 : static PyObject *py_DnssrvComplexOperation_in_get_pDataIn(PyObject *obj, void *closure)
28887 : {
28888 0 : struct DnssrvComplexOperation *object = pytalloc_get_ptr(obj);
28889 0 : PyObject *py_pDataIn;
28890 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");
28891 0 : if (py_pDataIn == NULL) {
28892 0 : return NULL;
28893 : }
28894 0 : return py_pDataIn;
28895 : }
28896 :
28897 0 : static int py_DnssrvComplexOperation_in_set_pDataIn(PyObject *py_obj, PyObject *value, void *closure)
28898 : {
28899 0 : struct DnssrvComplexOperation *object = pytalloc_get_ptr(py_obj);
28900 0 : if (value == NULL) {
28901 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pDataIn");
28902 0 : return -1;
28903 : }
28904 : {
28905 0 : union DNSSRV_RPC_UNION *pDataIn_switch_0;
28906 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");
28907 0 : if (pDataIn_switch_0 == NULL) {
28908 0 : return -1;
28909 : }
28910 0 : object->in.pDataIn = *pDataIn_switch_0;
28911 : }
28912 0 : return 0;
28913 : }
28914 :
28915 0 : static PyObject *py_DnssrvComplexOperation_out_get_pdwTypeOut(PyObject *obj, void *closure)
28916 : {
28917 0 : struct DnssrvComplexOperation *object = pytalloc_get_ptr(obj);
28918 0 : PyObject *py_pdwTypeOut;
28919 0 : if (object->out.pdwTypeOut == NULL) {
28920 0 : Py_RETURN_NONE;
28921 : }
28922 0 : py_pdwTypeOut = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.pdwTypeOut));
28923 0 : return py_pdwTypeOut;
28924 : }
28925 :
28926 0 : static int py_DnssrvComplexOperation_out_set_pdwTypeOut(PyObject *py_obj, PyObject *value, void *closure)
28927 : {
28928 0 : struct DnssrvComplexOperation *object = pytalloc_get_ptr(py_obj);
28929 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.pdwTypeOut));
28930 0 : if (value == NULL) {
28931 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.pdwTypeOut");
28932 0 : return -1;
28933 : }
28934 0 : object->out.pdwTypeOut = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.pdwTypeOut);
28935 0 : if (object->out.pdwTypeOut == NULL) {
28936 0 : PyErr_NoMemory();
28937 0 : return -1;
28938 : }
28939 : {
28940 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.pdwTypeOut));
28941 0 : if (PyLong_Check(value)) {
28942 0 : unsigned long long test_var;
28943 0 : test_var = PyLong_AsUnsignedLongLong(value);
28944 0 : if (PyErr_Occurred() != NULL) {
28945 0 : return -1;
28946 : }
28947 0 : if (test_var > uint_max) {
28948 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
28949 : PyLong_Type.tp_name, uint_max, test_var);
28950 0 : return -1;
28951 : }
28952 0 : *object->out.pdwTypeOut = test_var;
28953 : } else {
28954 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
28955 : PyLong_Type.tp_name);
28956 0 : return -1;
28957 : }
28958 : }
28959 0 : return 0;
28960 : }
28961 :
28962 0 : static PyObject *py_DnssrvComplexOperation_out_get_ppDataOut(PyObject *obj, void *closure)
28963 : {
28964 0 : struct DnssrvComplexOperation *object = pytalloc_get_ptr(obj);
28965 0 : PyObject *py_ppDataOut;
28966 0 : if (object->out.ppDataOut == NULL) {
28967 0 : Py_RETURN_NONE;
28968 : }
28969 0 : py_ppDataOut = pyrpc_import_union(&DNSSRV_RPC_UNION_Type, object->out.ppDataOut, *object->out.pdwTypeOut, object->out.ppDataOut, "union DNSSRV_RPC_UNION");
28970 0 : if (py_ppDataOut == NULL) {
28971 0 : return NULL;
28972 : }
28973 0 : return py_ppDataOut;
28974 : }
28975 :
28976 0 : static int py_DnssrvComplexOperation_out_set_ppDataOut(PyObject *py_obj, PyObject *value, void *closure)
28977 : {
28978 0 : struct DnssrvComplexOperation *object = pytalloc_get_ptr(py_obj);
28979 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ppDataOut));
28980 0 : if (value == NULL) {
28981 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.ppDataOut");
28982 0 : return -1;
28983 : }
28984 0 : object->out.ppDataOut = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ppDataOut);
28985 0 : if (object->out.ppDataOut == NULL) {
28986 0 : PyErr_NoMemory();
28987 0 : return -1;
28988 : }
28989 : {
28990 0 : union DNSSRV_RPC_UNION *ppDataOut_switch_1;
28991 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");
28992 0 : if (ppDataOut_switch_1 == NULL) {
28993 0 : return -1;
28994 : }
28995 0 : object->out.ppDataOut = ppDataOut_switch_1;
28996 : }
28997 0 : return 0;
28998 : }
28999 :
29000 0 : static PyObject *py_DnssrvComplexOperation_get_result(PyObject *obj, void *closure)
29001 : {
29002 0 : struct DnssrvComplexOperation *object = pytalloc_get_ptr(obj);
29003 0 : PyObject *py_result;
29004 0 : py_result = PyErr_FromWERROR(object->out.result);
29005 0 : return py_result;
29006 : }
29007 :
29008 0 : static int py_DnssrvComplexOperation_set_result(PyObject *py_obj, PyObject *value, void *closure)
29009 : {
29010 0 : struct DnssrvComplexOperation *object = pytalloc_get_ptr(py_obj);
29011 0 : if (value == NULL) {
29012 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
29013 0 : return -1;
29014 : }
29015 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
29016 0 : return 0;
29017 : }
29018 :
29019 : static PyGetSetDef py_DnssrvComplexOperation_getsetters[] = {
29020 : {
29021 : .name = discard_const_p(char, "in_pwszServerName"),
29022 : .get = py_DnssrvComplexOperation_in_get_pwszServerName,
29023 : .set = py_DnssrvComplexOperation_in_set_pwszServerName,
29024 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
29025 : },
29026 : {
29027 : .name = discard_const_p(char, "in_pszZone"),
29028 : .get = py_DnssrvComplexOperation_in_get_pszZone,
29029 : .set = py_DnssrvComplexOperation_in_set_pszZone,
29030 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
29031 : },
29032 : {
29033 : .name = discard_const_p(char, "in_pszOperation"),
29034 : .get = py_DnssrvComplexOperation_in_get_pszOperation,
29035 : .set = py_DnssrvComplexOperation_in_set_pszOperation,
29036 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
29037 : },
29038 : {
29039 : .name = discard_const_p(char, "in_dwTypeIn"),
29040 : .get = py_DnssrvComplexOperation_in_get_dwTypeIn,
29041 : .set = py_DnssrvComplexOperation_in_set_dwTypeIn,
29042 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_TYPEID")
29043 : },
29044 : {
29045 : .name = discard_const_p(char, "in_pDataIn"),
29046 : .get = py_DnssrvComplexOperation_in_get_pDataIn,
29047 : .set = py_DnssrvComplexOperation_in_set_pDataIn,
29048 : .doc = discard_const_p(char, "PIDL-generated element of base type DNSSRV_RPC_UNION")
29049 : },
29050 : {
29051 : .name = discard_const_p(char, "out_pdwTypeOut"),
29052 : .get = py_DnssrvComplexOperation_out_get_pdwTypeOut,
29053 : .set = py_DnssrvComplexOperation_out_set_pdwTypeOut,
29054 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_TYPEID")
29055 : },
29056 : {
29057 : .name = discard_const_p(char, "out_ppDataOut"),
29058 : .get = py_DnssrvComplexOperation_out_get_ppDataOut,
29059 : .set = py_DnssrvComplexOperation_out_set_ppDataOut,
29060 : .doc = discard_const_p(char, "PIDL-generated element of base type DNSSRV_RPC_UNION")
29061 : },
29062 : {
29063 : .name = discard_const_p(char, "result"),
29064 : .get = py_DnssrvComplexOperation_get_result,
29065 : .set = py_DnssrvComplexOperation_set_result,
29066 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
29067 : },
29068 : { .name = NULL }
29069 : };
29070 :
29071 0 : static PyObject *py_DnssrvComplexOperation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
29072 : {
29073 0 : PyObject *self = pytalloc_new(struct DnssrvComplexOperation, type);
29074 0 : struct DnssrvComplexOperation *_self = (struct DnssrvComplexOperation *)pytalloc_get_ptr(self);
29075 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
29076 0 : _self->out.pdwTypeOut = talloc_zero(mem_ctx, enum DNS_RPC_TYPEID);
29077 0 : _self->out.ppDataOut = talloc_zero(mem_ctx, union DNSSRV_RPC_UNION);
29078 0 : return self;
29079 : }
29080 :
29081 0 : static PyObject *py_DnssrvComplexOperation_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
29082 : {
29083 :
29084 :
29085 0 : return PyLong_FromLong(2);
29086 : }
29087 :
29088 0 : static PyObject *py_DnssrvComplexOperation_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
29089 : {
29090 0 : const struct ndr_interface_call *call = NULL;
29091 0 : struct DnssrvComplexOperation *object = pytalloc_get_ptr(py_obj);
29092 0 : PyObject *ret = NULL;
29093 0 : struct ndr_push *push = NULL;
29094 0 : DATA_BLOB blob;
29095 0 : enum ndr_err_code err;
29096 :
29097 0 : if (ndr_table_dnsserver.num_calls < 3) {
29098 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvComplexOperation_ndr_pack");
29099 0 : return NULL;
29100 : }
29101 0 : call = &ndr_table_dnsserver.calls[2];
29102 :
29103 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
29104 0 : if (push == NULL) {
29105 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
29106 0 : return NULL;
29107 : }
29108 :
29109 0 : push->flags |= ndr_push_flags;
29110 :
29111 0 : err = call->ndr_push(push, ndr_inout_flags, object);
29112 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
29113 0 : TALLOC_FREE(push);
29114 0 : PyErr_SetNdrError(err);
29115 0 : return NULL;
29116 : }
29117 0 : blob = ndr_push_blob(push);
29118 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
29119 0 : TALLOC_FREE(push);
29120 0 : return ret;
29121 : }
29122 :
29123 0 : static PyObject *py_DnssrvComplexOperation_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
29124 : {
29125 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
29126 0 : PyObject *bigendian_obj = NULL;
29127 0 : PyObject *ndr64_obj = NULL;
29128 0 : libndr_flags ndr_push_flags = 0;
29129 :
29130 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
29131 : discard_const_p(char *, kwnames),
29132 : &bigendian_obj,
29133 : &ndr64_obj)) {
29134 0 : return NULL;
29135 : }
29136 :
29137 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
29138 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
29139 : }
29140 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
29141 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
29142 : }
29143 :
29144 0 : return py_DnssrvComplexOperation_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
29145 : }
29146 :
29147 0 : static PyObject *py_DnssrvComplexOperation_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
29148 : {
29149 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
29150 0 : PyObject *bigendian_obj = NULL;
29151 0 : PyObject *ndr64_obj = NULL;
29152 0 : libndr_flags ndr_push_flags = 0;
29153 :
29154 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
29155 : discard_const_p(char *, kwnames),
29156 : &bigendian_obj,
29157 : &ndr64_obj)) {
29158 0 : return NULL;
29159 : }
29160 :
29161 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
29162 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
29163 : }
29164 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
29165 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
29166 : }
29167 :
29168 0 : return py_DnssrvComplexOperation_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
29169 : }
29170 :
29171 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)
29172 : {
29173 0 : const struct ndr_interface_call *call = NULL;
29174 0 : struct DnssrvComplexOperation *object = pytalloc_get_ptr(py_obj);
29175 0 : struct ndr_pull *pull = NULL;
29176 0 : enum ndr_err_code err;
29177 :
29178 0 : if (ndr_table_dnsserver.num_calls < 3) {
29179 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvComplexOperation_ndr_unpack");
29180 0 : return NULL;
29181 : }
29182 0 : call = &ndr_table_dnsserver.calls[2];
29183 :
29184 0 : pull = ndr_pull_init_blob(blob, object);
29185 0 : if (pull == NULL) {
29186 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
29187 0 : return NULL;
29188 : }
29189 :
29190 0 : pull->flags |= ndr_pull_flags;
29191 :
29192 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
29193 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
29194 0 : TALLOC_FREE(pull);
29195 0 : PyErr_SetNdrError(err);
29196 0 : return NULL;
29197 : }
29198 0 : if (!allow_remaining) {
29199 0 : uint32_t highest_ofs;
29200 :
29201 0 : if (pull->offset > pull->relative_highest_offset) {
29202 0 : highest_ofs = pull->offset;
29203 : } else {
29204 0 : highest_ofs = pull->relative_highest_offset;
29205 : }
29206 0 : if (highest_ofs < pull->data_size) {
29207 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
29208 : "not all bytes consumed ofs[%u] size[%u]",
29209 : highest_ofs, pull->data_size);
29210 0 : TALLOC_FREE(pull);
29211 0 : PyErr_SetNdrError(err);
29212 0 : return NULL;
29213 : }
29214 : }
29215 :
29216 0 : TALLOC_FREE(pull);
29217 0 : Py_RETURN_NONE;
29218 : }
29219 :
29220 0 : static PyObject *py_DnssrvComplexOperation_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
29221 : {
29222 0 : DATA_BLOB blob;
29223 0 : Py_ssize_t blob_length = 0;
29224 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
29225 0 : PyObject *bigendian_obj = NULL;
29226 0 : PyObject *ndr64_obj = NULL;
29227 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
29228 0 : PyObject *allow_remaining_obj = NULL;
29229 0 : bool allow_remaining = false;
29230 :
29231 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
29232 : discard_const_p(char *, kwnames),
29233 : &blob.data, &blob_length,
29234 : &bigendian_obj,
29235 : &ndr64_obj,
29236 : &allow_remaining_obj)) {
29237 0 : return NULL;
29238 : }
29239 0 : blob.length = blob_length;
29240 :
29241 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
29242 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
29243 : }
29244 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
29245 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
29246 : }
29247 :
29248 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
29249 0 : allow_remaining = true;
29250 : }
29251 :
29252 0 : return py_DnssrvComplexOperation_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
29253 : }
29254 :
29255 0 : static PyObject *py_DnssrvComplexOperation_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
29256 : {
29257 0 : DATA_BLOB blob;
29258 0 : Py_ssize_t blob_length = 0;
29259 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
29260 0 : PyObject *bigendian_obj = NULL;
29261 0 : PyObject *ndr64_obj = NULL;
29262 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
29263 0 : PyObject *allow_remaining_obj = NULL;
29264 0 : bool allow_remaining = false;
29265 :
29266 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
29267 : discard_const_p(char *, kwnames),
29268 : &blob.data, &blob_length,
29269 : &bigendian_obj,
29270 : &ndr64_obj,
29271 : &allow_remaining_obj)) {
29272 0 : return NULL;
29273 : }
29274 0 : blob.length = blob_length;
29275 :
29276 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
29277 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
29278 : }
29279 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
29280 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
29281 : }
29282 :
29283 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
29284 0 : allow_remaining = true;
29285 : }
29286 :
29287 0 : return py_DnssrvComplexOperation_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
29288 : }
29289 :
29290 0 : static PyObject *py_DnssrvComplexOperation_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
29291 : {
29292 0 : const struct ndr_interface_call *call = NULL;
29293 0 : struct DnssrvComplexOperation *object = pytalloc_get_ptr(py_obj);
29294 0 : PyObject *ret;
29295 0 : char *retstr;
29296 :
29297 0 : if (ndr_table_dnsserver.num_calls < 3) {
29298 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvComplexOperation_ndr_print");
29299 0 : return NULL;
29300 : }
29301 0 : call = &ndr_table_dnsserver.calls[2];
29302 :
29303 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
29304 0 : ret = PyUnicode_FromString(retstr);
29305 0 : TALLOC_FREE(retstr);
29306 :
29307 0 : return ret;
29308 : }
29309 :
29310 0 : static PyObject *py_DnssrvComplexOperation_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
29311 : {
29312 0 : return py_DnssrvComplexOperation_ndr_print(py_obj, "DnssrvComplexOperation_in", NDR_IN);
29313 : }
29314 :
29315 0 : static PyObject *py_DnssrvComplexOperation_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
29316 : {
29317 0 : return py_DnssrvComplexOperation_ndr_print(py_obj, "DnssrvComplexOperation_out", NDR_OUT);
29318 : }
29319 :
29320 : static PyMethodDef py_DnssrvComplexOperation_methods[] = {
29321 : { "opnum", (PyCFunction)py_DnssrvComplexOperation_ndr_opnum, METH_NOARGS|METH_CLASS,
29322 : "dnsserver.DnssrvComplexOperation.opnum() -> 2 (0x02) " },
29323 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvComplexOperation_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
29324 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
29325 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvComplexOperation_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
29326 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
29327 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvComplexOperation_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
29328 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
29329 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvComplexOperation_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
29330 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
29331 : { "__ndr_print_in__", (PyCFunction)py_DnssrvComplexOperation_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
29332 : { "__ndr_print_out__", (PyCFunction)py_DnssrvComplexOperation_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
29333 : { NULL, NULL, 0, NULL }
29334 : };
29335 :
29336 :
29337 : static PyTypeObject DnssrvComplexOperation_Type = {
29338 : PyVarObject_HEAD_INIT(NULL, 0)
29339 : .tp_name = "dnsserver.DnssrvComplexOperation",
29340 : .tp_getset = py_DnssrvComplexOperation_getsetters,
29341 : .tp_methods = py_DnssrvComplexOperation_methods,
29342 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
29343 : .tp_new = py_DnssrvComplexOperation_new,
29344 : };
29345 :
29346 0 : static bool pack_py_DnssrvComplexOperation_args_in(PyObject *args, PyObject *kwargs, struct DnssrvComplexOperation *r)
29347 : {
29348 0 : PyObject *py_pwszServerName;
29349 0 : PyObject *py_pszZone;
29350 0 : PyObject *py_pszOperation;
29351 0 : PyObject *py_dwTypeIn;
29352 0 : PyObject *py_pDataIn;
29353 0 : const char *kwnames[] = {
29354 : "pwszServerName", "pszZone", "pszOperation", "dwTypeIn", "pDataIn", NULL
29355 : };
29356 :
29357 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:DnssrvComplexOperation", discard_const_p(char *, kwnames), &py_pwszServerName, &py_pszZone, &py_pszOperation, &py_dwTypeIn, &py_pDataIn)) {
29358 0 : return false;
29359 : }
29360 :
29361 0 : if (py_pwszServerName == NULL) {
29362 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pwszServerName");
29363 0 : return false;
29364 : }
29365 0 : if (py_pwszServerName == Py_None) {
29366 0 : r->in.pwszServerName = NULL;
29367 : } else {
29368 0 : r->in.pwszServerName = NULL;
29369 : {
29370 0 : const char *test_str;
29371 0 : const char *talloc_str;
29372 0 : PyObject *unicode = NULL;
29373 0 : if (PyUnicode_Check(py_pwszServerName)) {
29374 0 : unicode = PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore");
29375 0 : if (unicode == NULL) {
29376 0 : return false;
29377 : }
29378 0 : test_str = PyBytes_AS_STRING(unicode);
29379 0 : } else if (PyBytes_Check(py_pwszServerName)) {
29380 0 : test_str = PyBytes_AS_STRING(py_pwszServerName);
29381 : } else {
29382 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
29383 0 : return false;
29384 : }
29385 0 : talloc_str = talloc_strdup(r, test_str);
29386 0 : if (unicode != NULL) {
29387 0 : Py_DECREF(unicode);
29388 : }
29389 0 : if (talloc_str == NULL) {
29390 0 : PyErr_NoMemory();
29391 0 : return false;
29392 : }
29393 0 : r->in.pwszServerName = talloc_str;
29394 : }
29395 : }
29396 0 : if (py_pszZone == NULL) {
29397 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszZone");
29398 0 : return false;
29399 : }
29400 0 : if (py_pszZone == Py_None) {
29401 0 : r->in.pszZone = NULL;
29402 : } else {
29403 0 : r->in.pszZone = NULL;
29404 : {
29405 0 : const char *test_str;
29406 0 : const char *talloc_str;
29407 0 : PyObject *unicode = NULL;
29408 0 : if (PyUnicode_Check(py_pszZone)) {
29409 0 : unicode = PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore");
29410 0 : if (unicode == NULL) {
29411 0 : return false;
29412 : }
29413 0 : test_str = PyBytes_AS_STRING(unicode);
29414 0 : } else if (PyBytes_Check(py_pszZone)) {
29415 0 : test_str = PyBytes_AS_STRING(py_pszZone);
29416 : } else {
29417 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
29418 0 : return false;
29419 : }
29420 0 : talloc_str = talloc_strdup(r, test_str);
29421 0 : if (unicode != NULL) {
29422 0 : Py_DECREF(unicode);
29423 : }
29424 0 : if (talloc_str == NULL) {
29425 0 : PyErr_NoMemory();
29426 0 : return false;
29427 : }
29428 0 : r->in.pszZone = talloc_str;
29429 : }
29430 : }
29431 0 : if (py_pszOperation == NULL) {
29432 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszOperation");
29433 0 : return false;
29434 : }
29435 0 : if (py_pszOperation == Py_None) {
29436 0 : r->in.pszOperation = NULL;
29437 : } else {
29438 0 : r->in.pszOperation = NULL;
29439 : {
29440 0 : const char *test_str;
29441 0 : const char *talloc_str;
29442 0 : PyObject *unicode = NULL;
29443 0 : if (PyUnicode_Check(py_pszOperation)) {
29444 0 : unicode = PyUnicode_AsEncodedString(py_pszOperation, "utf-8", "ignore");
29445 0 : if (unicode == NULL) {
29446 0 : return false;
29447 : }
29448 0 : test_str = PyBytes_AS_STRING(unicode);
29449 0 : } else if (PyBytes_Check(py_pszOperation)) {
29450 0 : test_str = PyBytes_AS_STRING(py_pszOperation);
29451 : } else {
29452 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszOperation)->tp_name);
29453 0 : return false;
29454 : }
29455 0 : talloc_str = talloc_strdup(r, test_str);
29456 0 : if (unicode != NULL) {
29457 0 : Py_DECREF(unicode);
29458 : }
29459 0 : if (talloc_str == NULL) {
29460 0 : PyErr_NoMemory();
29461 0 : return false;
29462 : }
29463 0 : r->in.pszOperation = talloc_str;
29464 : }
29465 : }
29466 0 : if (py_dwTypeIn == NULL) {
29467 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dwTypeIn");
29468 0 : return false;
29469 : }
29470 : {
29471 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwTypeIn));
29472 0 : if (PyLong_Check(py_dwTypeIn)) {
29473 0 : unsigned long long test_var;
29474 0 : test_var = PyLong_AsUnsignedLongLong(py_dwTypeIn);
29475 0 : if (PyErr_Occurred() != NULL) {
29476 0 : return false;
29477 : }
29478 0 : if (test_var > uint_max) {
29479 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
29480 : PyLong_Type.tp_name, uint_max, test_var);
29481 0 : return false;
29482 : }
29483 0 : r->in.dwTypeIn = test_var;
29484 : } else {
29485 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
29486 : PyLong_Type.tp_name);
29487 0 : return false;
29488 : }
29489 : }
29490 0 : if (py_pDataIn == NULL) {
29491 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pDataIn");
29492 0 : return false;
29493 : }
29494 : {
29495 0 : union DNSSRV_RPC_UNION *pDataIn_switch_0;
29496 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");
29497 0 : if (pDataIn_switch_0 == NULL) {
29498 0 : return false;
29499 : }
29500 0 : r->in.pDataIn = *pDataIn_switch_0;
29501 : }
29502 0 : return true;
29503 : }
29504 :
29505 0 : static PyObject *unpack_py_DnssrvComplexOperation_args_out(struct DnssrvComplexOperation *r)
29506 : {
29507 0 : PyObject *result;
29508 0 : PyObject *py_pdwTypeOut;
29509 0 : PyObject *py_ppDataOut;
29510 0 : result = PyTuple_New(2);
29511 0 : py_pdwTypeOut = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.pdwTypeOut));
29512 0 : PyTuple_SetItem(result, 0, py_pdwTypeOut);
29513 0 : py_ppDataOut = pyrpc_import_union(&DNSSRV_RPC_UNION_Type, r->out.ppDataOut, *r->out.pdwTypeOut, r->out.ppDataOut, "union DNSSRV_RPC_UNION");
29514 0 : if (py_ppDataOut == NULL) {
29515 0 : return NULL;
29516 : }
29517 0 : PyTuple_SetItem(result, 1, py_ppDataOut);
29518 0 : if (!W_ERROR_IS_OK(r->out.result)) {
29519 0 : PyErr_SetWERROR(r->out.result);
29520 0 : return NULL;
29521 : }
29522 :
29523 0 : return result;
29524 : }
29525 :
29526 :
29527 0 : static PyObject *py_DnssrvEnumRecords_in_get_pwszServerName(PyObject *obj, void *closure)
29528 : {
29529 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(obj);
29530 0 : PyObject *py_pwszServerName;
29531 0 : if (object->in.pwszServerName == NULL) {
29532 0 : Py_RETURN_NONE;
29533 : }
29534 0 : if (object->in.pwszServerName == NULL) {
29535 0 : py_pwszServerName = Py_None;
29536 0 : Py_INCREF(py_pwszServerName);
29537 : } else {
29538 0 : if (object->in.pwszServerName == NULL) {
29539 0 : py_pwszServerName = Py_None;
29540 0 : Py_INCREF(py_pwszServerName);
29541 : } else {
29542 0 : py_pwszServerName = PyUnicode_Decode(object->in.pwszServerName, strlen(object->in.pwszServerName), "utf-8", "ignore");
29543 : }
29544 : }
29545 0 : return py_pwszServerName;
29546 : }
29547 :
29548 0 : static int py_DnssrvEnumRecords_in_set_pwszServerName(PyObject *py_obj, PyObject *value, void *closure)
29549 : {
29550 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(py_obj);
29551 0 : if (value == NULL) {
29552 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pwszServerName");
29553 0 : return -1;
29554 : }
29555 0 : if (value == Py_None) {
29556 0 : object->in.pwszServerName = NULL;
29557 : } else {
29558 0 : object->in.pwszServerName = NULL;
29559 : {
29560 0 : const char *test_str;
29561 0 : const char *talloc_str;
29562 0 : PyObject *unicode = NULL;
29563 0 : if (PyUnicode_Check(value)) {
29564 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
29565 0 : if (unicode == NULL) {
29566 0 : return -1;
29567 : }
29568 0 : test_str = PyBytes_AS_STRING(unicode);
29569 0 : } else if (PyBytes_Check(value)) {
29570 0 : test_str = PyBytes_AS_STRING(value);
29571 : } else {
29572 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
29573 0 : return -1;
29574 : }
29575 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
29576 0 : if (unicode != NULL) {
29577 0 : Py_DECREF(unicode);
29578 : }
29579 0 : if (talloc_str == NULL) {
29580 0 : PyErr_NoMemory();
29581 0 : return -1;
29582 : }
29583 0 : object->in.pwszServerName = talloc_str;
29584 : }
29585 : }
29586 0 : return 0;
29587 : }
29588 :
29589 0 : static PyObject *py_DnssrvEnumRecords_in_get_pszZone(PyObject *obj, void *closure)
29590 : {
29591 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(obj);
29592 0 : PyObject *py_pszZone;
29593 0 : if (object->in.pszZone == NULL) {
29594 0 : Py_RETURN_NONE;
29595 : }
29596 0 : if (object->in.pszZone == NULL) {
29597 0 : py_pszZone = Py_None;
29598 0 : Py_INCREF(py_pszZone);
29599 : } else {
29600 0 : if (object->in.pszZone == NULL) {
29601 0 : py_pszZone = Py_None;
29602 0 : Py_INCREF(py_pszZone);
29603 : } else {
29604 0 : py_pszZone = PyUnicode_Decode(object->in.pszZone, strlen(object->in.pszZone), "utf-8", "ignore");
29605 : }
29606 : }
29607 0 : return py_pszZone;
29608 : }
29609 :
29610 0 : static int py_DnssrvEnumRecords_in_set_pszZone(PyObject *py_obj, PyObject *value, void *closure)
29611 : {
29612 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(py_obj);
29613 0 : if (value == NULL) {
29614 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszZone");
29615 0 : return -1;
29616 : }
29617 0 : if (value == Py_None) {
29618 0 : object->in.pszZone = NULL;
29619 : } else {
29620 0 : object->in.pszZone = NULL;
29621 : {
29622 0 : const char *test_str;
29623 0 : const char *talloc_str;
29624 0 : PyObject *unicode = NULL;
29625 0 : if (PyUnicode_Check(value)) {
29626 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
29627 0 : if (unicode == NULL) {
29628 0 : return -1;
29629 : }
29630 0 : test_str = PyBytes_AS_STRING(unicode);
29631 0 : } else if (PyBytes_Check(value)) {
29632 0 : test_str = PyBytes_AS_STRING(value);
29633 : } else {
29634 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
29635 0 : return -1;
29636 : }
29637 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
29638 0 : if (unicode != NULL) {
29639 0 : Py_DECREF(unicode);
29640 : }
29641 0 : if (talloc_str == NULL) {
29642 0 : PyErr_NoMemory();
29643 0 : return -1;
29644 : }
29645 0 : object->in.pszZone = talloc_str;
29646 : }
29647 : }
29648 0 : return 0;
29649 : }
29650 :
29651 0 : static PyObject *py_DnssrvEnumRecords_in_get_pszNodeName(PyObject *obj, void *closure)
29652 : {
29653 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(obj);
29654 0 : PyObject *py_pszNodeName;
29655 0 : if (object->in.pszNodeName == NULL) {
29656 0 : Py_RETURN_NONE;
29657 : }
29658 0 : if (object->in.pszNodeName == NULL) {
29659 0 : py_pszNodeName = Py_None;
29660 0 : Py_INCREF(py_pszNodeName);
29661 : } else {
29662 0 : if (object->in.pszNodeName == NULL) {
29663 0 : py_pszNodeName = Py_None;
29664 0 : Py_INCREF(py_pszNodeName);
29665 : } else {
29666 0 : py_pszNodeName = PyUnicode_Decode(object->in.pszNodeName, strlen(object->in.pszNodeName), "utf-8", "ignore");
29667 : }
29668 : }
29669 0 : return py_pszNodeName;
29670 : }
29671 :
29672 0 : static int py_DnssrvEnumRecords_in_set_pszNodeName(PyObject *py_obj, PyObject *value, void *closure)
29673 : {
29674 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(py_obj);
29675 0 : if (value == NULL) {
29676 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszNodeName");
29677 0 : return -1;
29678 : }
29679 0 : if (value == Py_None) {
29680 0 : object->in.pszNodeName = NULL;
29681 : } else {
29682 0 : object->in.pszNodeName = NULL;
29683 : {
29684 0 : const char *test_str;
29685 0 : const char *talloc_str;
29686 0 : PyObject *unicode = NULL;
29687 0 : if (PyUnicode_Check(value)) {
29688 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
29689 0 : if (unicode == NULL) {
29690 0 : return -1;
29691 : }
29692 0 : test_str = PyBytes_AS_STRING(unicode);
29693 0 : } else if (PyBytes_Check(value)) {
29694 0 : test_str = PyBytes_AS_STRING(value);
29695 : } else {
29696 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
29697 0 : return -1;
29698 : }
29699 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
29700 0 : if (unicode != NULL) {
29701 0 : Py_DECREF(unicode);
29702 : }
29703 0 : if (talloc_str == NULL) {
29704 0 : PyErr_NoMemory();
29705 0 : return -1;
29706 : }
29707 0 : object->in.pszNodeName = talloc_str;
29708 : }
29709 : }
29710 0 : return 0;
29711 : }
29712 :
29713 0 : static PyObject *py_DnssrvEnumRecords_in_get_pszStartChild(PyObject *obj, void *closure)
29714 : {
29715 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(obj);
29716 0 : PyObject *py_pszStartChild;
29717 0 : if (object->in.pszStartChild == NULL) {
29718 0 : Py_RETURN_NONE;
29719 : }
29720 0 : if (object->in.pszStartChild == NULL) {
29721 0 : py_pszStartChild = Py_None;
29722 0 : Py_INCREF(py_pszStartChild);
29723 : } else {
29724 0 : if (object->in.pszStartChild == NULL) {
29725 0 : py_pszStartChild = Py_None;
29726 0 : Py_INCREF(py_pszStartChild);
29727 : } else {
29728 0 : py_pszStartChild = PyUnicode_Decode(object->in.pszStartChild, strlen(object->in.pszStartChild), "utf-8", "ignore");
29729 : }
29730 : }
29731 0 : return py_pszStartChild;
29732 : }
29733 :
29734 0 : static int py_DnssrvEnumRecords_in_set_pszStartChild(PyObject *py_obj, PyObject *value, void *closure)
29735 : {
29736 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(py_obj);
29737 0 : if (value == NULL) {
29738 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszStartChild");
29739 0 : return -1;
29740 : }
29741 0 : if (value == Py_None) {
29742 0 : object->in.pszStartChild = NULL;
29743 : } else {
29744 0 : object->in.pszStartChild = NULL;
29745 : {
29746 0 : const char *test_str;
29747 0 : const char *talloc_str;
29748 0 : PyObject *unicode = NULL;
29749 0 : if (PyUnicode_Check(value)) {
29750 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
29751 0 : if (unicode == NULL) {
29752 0 : return -1;
29753 : }
29754 0 : test_str = PyBytes_AS_STRING(unicode);
29755 0 : } else if (PyBytes_Check(value)) {
29756 0 : test_str = PyBytes_AS_STRING(value);
29757 : } else {
29758 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
29759 0 : return -1;
29760 : }
29761 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
29762 0 : if (unicode != NULL) {
29763 0 : Py_DECREF(unicode);
29764 : }
29765 0 : if (talloc_str == NULL) {
29766 0 : PyErr_NoMemory();
29767 0 : return -1;
29768 : }
29769 0 : object->in.pszStartChild = talloc_str;
29770 : }
29771 : }
29772 0 : return 0;
29773 : }
29774 :
29775 0 : static PyObject *py_DnssrvEnumRecords_in_get_wRecordType(PyObject *obj, void *closure)
29776 : {
29777 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(obj);
29778 0 : PyObject *py_wRecordType;
29779 0 : py_wRecordType = PyLong_FromLong((uint16_t)(object->in.wRecordType));
29780 0 : return py_wRecordType;
29781 : }
29782 :
29783 0 : static int py_DnssrvEnumRecords_in_set_wRecordType(PyObject *py_obj, PyObject *value, void *closure)
29784 : {
29785 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(py_obj);
29786 0 : if (value == NULL) {
29787 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.wRecordType");
29788 0 : return -1;
29789 : }
29790 : {
29791 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.wRecordType));
29792 0 : if (PyLong_Check(value)) {
29793 0 : unsigned long long test_var;
29794 0 : test_var = PyLong_AsUnsignedLongLong(value);
29795 0 : if (PyErr_Occurred() != NULL) {
29796 0 : return -1;
29797 : }
29798 0 : if (test_var > uint_max) {
29799 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
29800 : PyLong_Type.tp_name, uint_max, test_var);
29801 0 : return -1;
29802 : }
29803 0 : object->in.wRecordType = test_var;
29804 : } else {
29805 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
29806 : PyLong_Type.tp_name);
29807 0 : return -1;
29808 : }
29809 : }
29810 0 : return 0;
29811 : }
29812 :
29813 0 : static PyObject *py_DnssrvEnumRecords_in_get_fSelectFlag(PyObject *obj, void *closure)
29814 : {
29815 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(obj);
29816 0 : PyObject *py_fSelectFlag;
29817 0 : py_fSelectFlag = PyLong_FromUnsignedLongLong((uint32_t)(object->in.fSelectFlag));
29818 0 : return py_fSelectFlag;
29819 : }
29820 :
29821 0 : static int py_DnssrvEnumRecords_in_set_fSelectFlag(PyObject *py_obj, PyObject *value, void *closure)
29822 : {
29823 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(py_obj);
29824 0 : if (value == NULL) {
29825 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.fSelectFlag");
29826 0 : return -1;
29827 : }
29828 : {
29829 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.fSelectFlag));
29830 0 : if (PyLong_Check(value)) {
29831 0 : unsigned long long test_var;
29832 0 : test_var = PyLong_AsUnsignedLongLong(value);
29833 0 : if (PyErr_Occurred() != NULL) {
29834 0 : return -1;
29835 : }
29836 0 : if (test_var > uint_max) {
29837 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
29838 : PyLong_Type.tp_name, uint_max, test_var);
29839 0 : return -1;
29840 : }
29841 0 : object->in.fSelectFlag = test_var;
29842 : } else {
29843 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
29844 : PyLong_Type.tp_name);
29845 0 : return -1;
29846 : }
29847 : }
29848 0 : return 0;
29849 : }
29850 :
29851 0 : static PyObject *py_DnssrvEnumRecords_in_get_pszFilterStart(PyObject *obj, void *closure)
29852 : {
29853 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(obj);
29854 0 : PyObject *py_pszFilterStart;
29855 0 : if (object->in.pszFilterStart == NULL) {
29856 0 : Py_RETURN_NONE;
29857 : }
29858 0 : if (object->in.pszFilterStart == NULL) {
29859 0 : py_pszFilterStart = Py_None;
29860 0 : Py_INCREF(py_pszFilterStart);
29861 : } else {
29862 0 : if (object->in.pszFilterStart == NULL) {
29863 0 : py_pszFilterStart = Py_None;
29864 0 : Py_INCREF(py_pszFilterStart);
29865 : } else {
29866 0 : py_pszFilterStart = PyUnicode_Decode(object->in.pszFilterStart, strlen(object->in.pszFilterStart), "utf-8", "ignore");
29867 : }
29868 : }
29869 0 : return py_pszFilterStart;
29870 : }
29871 :
29872 0 : static int py_DnssrvEnumRecords_in_set_pszFilterStart(PyObject *py_obj, PyObject *value, void *closure)
29873 : {
29874 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(py_obj);
29875 0 : if (value == NULL) {
29876 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszFilterStart");
29877 0 : return -1;
29878 : }
29879 0 : if (value == Py_None) {
29880 0 : object->in.pszFilterStart = NULL;
29881 : } else {
29882 0 : object->in.pszFilterStart = NULL;
29883 : {
29884 0 : const char *test_str;
29885 0 : const char *talloc_str;
29886 0 : PyObject *unicode = NULL;
29887 0 : if (PyUnicode_Check(value)) {
29888 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
29889 0 : if (unicode == NULL) {
29890 0 : return -1;
29891 : }
29892 0 : test_str = PyBytes_AS_STRING(unicode);
29893 0 : } else if (PyBytes_Check(value)) {
29894 0 : test_str = PyBytes_AS_STRING(value);
29895 : } else {
29896 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
29897 0 : return -1;
29898 : }
29899 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
29900 0 : if (unicode != NULL) {
29901 0 : Py_DECREF(unicode);
29902 : }
29903 0 : if (talloc_str == NULL) {
29904 0 : PyErr_NoMemory();
29905 0 : return -1;
29906 : }
29907 0 : object->in.pszFilterStart = talloc_str;
29908 : }
29909 : }
29910 0 : return 0;
29911 : }
29912 :
29913 0 : static PyObject *py_DnssrvEnumRecords_in_get_pszFilterStop(PyObject *obj, void *closure)
29914 : {
29915 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(obj);
29916 0 : PyObject *py_pszFilterStop;
29917 0 : if (object->in.pszFilterStop == NULL) {
29918 0 : Py_RETURN_NONE;
29919 : }
29920 0 : if (object->in.pszFilterStop == NULL) {
29921 0 : py_pszFilterStop = Py_None;
29922 0 : Py_INCREF(py_pszFilterStop);
29923 : } else {
29924 0 : if (object->in.pszFilterStop == NULL) {
29925 0 : py_pszFilterStop = Py_None;
29926 0 : Py_INCREF(py_pszFilterStop);
29927 : } else {
29928 0 : py_pszFilterStop = PyUnicode_Decode(object->in.pszFilterStop, strlen(object->in.pszFilterStop), "utf-8", "ignore");
29929 : }
29930 : }
29931 0 : return py_pszFilterStop;
29932 : }
29933 :
29934 0 : static int py_DnssrvEnumRecords_in_set_pszFilterStop(PyObject *py_obj, PyObject *value, void *closure)
29935 : {
29936 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(py_obj);
29937 0 : if (value == NULL) {
29938 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszFilterStop");
29939 0 : return -1;
29940 : }
29941 0 : if (value == Py_None) {
29942 0 : object->in.pszFilterStop = NULL;
29943 : } else {
29944 0 : object->in.pszFilterStop = NULL;
29945 : {
29946 0 : const char *test_str;
29947 0 : const char *talloc_str;
29948 0 : PyObject *unicode = NULL;
29949 0 : if (PyUnicode_Check(value)) {
29950 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
29951 0 : if (unicode == NULL) {
29952 0 : return -1;
29953 : }
29954 0 : test_str = PyBytes_AS_STRING(unicode);
29955 0 : } else if (PyBytes_Check(value)) {
29956 0 : test_str = PyBytes_AS_STRING(value);
29957 : } else {
29958 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
29959 0 : return -1;
29960 : }
29961 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
29962 0 : if (unicode != NULL) {
29963 0 : Py_DECREF(unicode);
29964 : }
29965 0 : if (talloc_str == NULL) {
29966 0 : PyErr_NoMemory();
29967 0 : return -1;
29968 : }
29969 0 : object->in.pszFilterStop = talloc_str;
29970 : }
29971 : }
29972 0 : return 0;
29973 : }
29974 :
29975 0 : static PyObject *py_DnssrvEnumRecords_out_get_pdwBufferLength(PyObject *obj, void *closure)
29976 : {
29977 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(obj);
29978 0 : PyObject *py_pdwBufferLength;
29979 0 : if (object->out.pdwBufferLength == NULL) {
29980 0 : Py_RETURN_NONE;
29981 : }
29982 0 : py_pdwBufferLength = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.pdwBufferLength));
29983 0 : return py_pdwBufferLength;
29984 : }
29985 :
29986 0 : static int py_DnssrvEnumRecords_out_set_pdwBufferLength(PyObject *py_obj, PyObject *value, void *closure)
29987 : {
29988 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(py_obj);
29989 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.pdwBufferLength));
29990 0 : if (value == NULL) {
29991 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.pdwBufferLength");
29992 0 : return -1;
29993 : }
29994 0 : object->out.pdwBufferLength = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.pdwBufferLength);
29995 0 : if (object->out.pdwBufferLength == NULL) {
29996 0 : PyErr_NoMemory();
29997 0 : return -1;
29998 : }
29999 : {
30000 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.pdwBufferLength));
30001 0 : if (PyLong_Check(value)) {
30002 0 : unsigned long long test_var;
30003 0 : test_var = PyLong_AsUnsignedLongLong(value);
30004 0 : if (PyErr_Occurred() != NULL) {
30005 0 : return -1;
30006 : }
30007 0 : if (test_var > uint_max) {
30008 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
30009 : PyLong_Type.tp_name, uint_max, test_var);
30010 0 : return -1;
30011 : }
30012 0 : *object->out.pdwBufferLength = test_var;
30013 : } else {
30014 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
30015 : PyLong_Type.tp_name);
30016 0 : return -1;
30017 : }
30018 : }
30019 0 : return 0;
30020 : }
30021 :
30022 0 : static PyObject *py_DnssrvEnumRecords_out_get_pBuffer(PyObject *obj, void *closure)
30023 : {
30024 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(obj);
30025 0 : PyObject *py_pBuffer;
30026 0 : if (object->out.pBuffer == NULL) {
30027 0 : Py_RETURN_NONE;
30028 : }
30029 0 : if (*object->out.pBuffer == NULL) {
30030 0 : py_pBuffer = Py_None;
30031 0 : Py_INCREF(py_pBuffer);
30032 : } else {
30033 0 : py_pBuffer = pytalloc_reference_ex(&DNS_RPC_RECORDS_ARRAY_Type, *object->out.pBuffer, *object->out.pBuffer);
30034 : }
30035 0 : return py_pBuffer;
30036 : }
30037 :
30038 0 : static int py_DnssrvEnumRecords_out_set_pBuffer(PyObject *py_obj, PyObject *value, void *closure)
30039 : {
30040 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(py_obj);
30041 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.pBuffer));
30042 0 : if (value == NULL) {
30043 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.pBuffer");
30044 0 : return -1;
30045 : }
30046 0 : object->out.pBuffer = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.pBuffer);
30047 0 : if (object->out.pBuffer == NULL) {
30048 0 : PyErr_NoMemory();
30049 0 : return -1;
30050 : }
30051 0 : if (value == Py_None) {
30052 0 : *object->out.pBuffer = NULL;
30053 : } else {
30054 0 : *object->out.pBuffer = NULL;
30055 0 : PY_CHECK_TYPE(&DNS_RPC_RECORDS_ARRAY_Type, value, return -1;);
30056 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
30057 0 : PyErr_NoMemory();
30058 0 : return -1;
30059 : }
30060 0 : *object->out.pBuffer = (struct DNS_RPC_RECORDS_ARRAY *)pytalloc_get_ptr(value);
30061 : }
30062 0 : return 0;
30063 : }
30064 :
30065 0 : static PyObject *py_DnssrvEnumRecords_get_result(PyObject *obj, void *closure)
30066 : {
30067 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(obj);
30068 0 : PyObject *py_result;
30069 0 : py_result = PyErr_FromWERROR(object->out.result);
30070 0 : return py_result;
30071 : }
30072 :
30073 0 : static int py_DnssrvEnumRecords_set_result(PyObject *py_obj, PyObject *value, void *closure)
30074 : {
30075 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(py_obj);
30076 0 : if (value == NULL) {
30077 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
30078 0 : return -1;
30079 : }
30080 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
30081 0 : return 0;
30082 : }
30083 :
30084 : static PyGetSetDef py_DnssrvEnumRecords_getsetters[] = {
30085 : {
30086 : .name = discard_const_p(char, "in_pwszServerName"),
30087 : .get = py_DnssrvEnumRecords_in_get_pwszServerName,
30088 : .set = py_DnssrvEnumRecords_in_set_pwszServerName,
30089 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
30090 : },
30091 : {
30092 : .name = discard_const_p(char, "in_pszZone"),
30093 : .get = py_DnssrvEnumRecords_in_get_pszZone,
30094 : .set = py_DnssrvEnumRecords_in_set_pszZone,
30095 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
30096 : },
30097 : {
30098 : .name = discard_const_p(char, "in_pszNodeName"),
30099 : .get = py_DnssrvEnumRecords_in_get_pszNodeName,
30100 : .set = py_DnssrvEnumRecords_in_set_pszNodeName,
30101 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
30102 : },
30103 : {
30104 : .name = discard_const_p(char, "in_pszStartChild"),
30105 : .get = py_DnssrvEnumRecords_in_get_pszStartChild,
30106 : .set = py_DnssrvEnumRecords_in_set_pszStartChild,
30107 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
30108 : },
30109 : {
30110 : .name = discard_const_p(char, "in_wRecordType"),
30111 : .get = py_DnssrvEnumRecords_in_get_wRecordType,
30112 : .set = py_DnssrvEnumRecords_in_set_wRecordType,
30113 : .doc = discard_const_p(char, "PIDL-generated element of base type dns_record_type")
30114 : },
30115 : {
30116 : .name = discard_const_p(char, "in_fSelectFlag"),
30117 : .get = py_DnssrvEnumRecords_in_get_fSelectFlag,
30118 : .set = py_DnssrvEnumRecords_in_set_fSelectFlag,
30119 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_SELECT_FLAGS")
30120 : },
30121 : {
30122 : .name = discard_const_p(char, "in_pszFilterStart"),
30123 : .get = py_DnssrvEnumRecords_in_get_pszFilterStart,
30124 : .set = py_DnssrvEnumRecords_in_set_pszFilterStart,
30125 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
30126 : },
30127 : {
30128 : .name = discard_const_p(char, "in_pszFilterStop"),
30129 : .get = py_DnssrvEnumRecords_in_get_pszFilterStop,
30130 : .set = py_DnssrvEnumRecords_in_set_pszFilterStop,
30131 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
30132 : },
30133 : {
30134 : .name = discard_const_p(char, "out_pdwBufferLength"),
30135 : .get = py_DnssrvEnumRecords_out_get_pdwBufferLength,
30136 : .set = py_DnssrvEnumRecords_out_set_pdwBufferLength,
30137 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
30138 : },
30139 : {
30140 : .name = discard_const_p(char, "out_pBuffer"),
30141 : .get = py_DnssrvEnumRecords_out_get_pBuffer,
30142 : .set = py_DnssrvEnumRecords_out_set_pBuffer,
30143 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_RECORDS_ARRAY")
30144 : },
30145 : {
30146 : .name = discard_const_p(char, "result"),
30147 : .get = py_DnssrvEnumRecords_get_result,
30148 : .set = py_DnssrvEnumRecords_set_result,
30149 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
30150 : },
30151 : { .name = NULL }
30152 : };
30153 :
30154 0 : static PyObject *py_DnssrvEnumRecords_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
30155 : {
30156 0 : PyObject *self = pytalloc_new(struct DnssrvEnumRecords, type);
30157 0 : struct DnssrvEnumRecords *_self = (struct DnssrvEnumRecords *)pytalloc_get_ptr(self);
30158 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
30159 0 : _self->out.pdwBufferLength = talloc_zero(mem_ctx, uint32_t);
30160 : /* a pointer to a NULL pointer */
30161 0 : _self->out.pBuffer = talloc_zero(mem_ctx, struct DNS_RPC_RECORDS_ARRAY *);
30162 0 : return self;
30163 : }
30164 :
30165 0 : static PyObject *py_DnssrvEnumRecords_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
30166 : {
30167 :
30168 :
30169 0 : return PyLong_FromLong(3);
30170 : }
30171 :
30172 0 : static PyObject *py_DnssrvEnumRecords_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
30173 : {
30174 0 : const struct ndr_interface_call *call = NULL;
30175 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(py_obj);
30176 0 : PyObject *ret = NULL;
30177 0 : struct ndr_push *push = NULL;
30178 0 : DATA_BLOB blob;
30179 0 : enum ndr_err_code err;
30180 :
30181 0 : if (ndr_table_dnsserver.num_calls < 4) {
30182 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvEnumRecords_ndr_pack");
30183 0 : return NULL;
30184 : }
30185 0 : call = &ndr_table_dnsserver.calls[3];
30186 :
30187 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
30188 0 : if (push == NULL) {
30189 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
30190 0 : return NULL;
30191 : }
30192 :
30193 0 : push->flags |= ndr_push_flags;
30194 :
30195 0 : err = call->ndr_push(push, ndr_inout_flags, object);
30196 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
30197 0 : TALLOC_FREE(push);
30198 0 : PyErr_SetNdrError(err);
30199 0 : return NULL;
30200 : }
30201 0 : blob = ndr_push_blob(push);
30202 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
30203 0 : TALLOC_FREE(push);
30204 0 : return ret;
30205 : }
30206 :
30207 0 : static PyObject *py_DnssrvEnumRecords_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
30208 : {
30209 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
30210 0 : PyObject *bigendian_obj = NULL;
30211 0 : PyObject *ndr64_obj = NULL;
30212 0 : libndr_flags ndr_push_flags = 0;
30213 :
30214 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
30215 : discard_const_p(char *, kwnames),
30216 : &bigendian_obj,
30217 : &ndr64_obj)) {
30218 0 : return NULL;
30219 : }
30220 :
30221 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
30222 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
30223 : }
30224 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
30225 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
30226 : }
30227 :
30228 0 : return py_DnssrvEnumRecords_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
30229 : }
30230 :
30231 0 : static PyObject *py_DnssrvEnumRecords_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
30232 : {
30233 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
30234 0 : PyObject *bigendian_obj = NULL;
30235 0 : PyObject *ndr64_obj = NULL;
30236 0 : libndr_flags ndr_push_flags = 0;
30237 :
30238 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
30239 : discard_const_p(char *, kwnames),
30240 : &bigendian_obj,
30241 : &ndr64_obj)) {
30242 0 : return NULL;
30243 : }
30244 :
30245 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
30246 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
30247 : }
30248 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
30249 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
30250 : }
30251 :
30252 0 : return py_DnssrvEnumRecords_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
30253 : }
30254 :
30255 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)
30256 : {
30257 0 : const struct ndr_interface_call *call = NULL;
30258 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(py_obj);
30259 0 : struct ndr_pull *pull = NULL;
30260 0 : enum ndr_err_code err;
30261 :
30262 0 : if (ndr_table_dnsserver.num_calls < 4) {
30263 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvEnumRecords_ndr_unpack");
30264 0 : return NULL;
30265 : }
30266 0 : call = &ndr_table_dnsserver.calls[3];
30267 :
30268 0 : pull = ndr_pull_init_blob(blob, object);
30269 0 : if (pull == NULL) {
30270 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
30271 0 : return NULL;
30272 : }
30273 :
30274 0 : pull->flags |= ndr_pull_flags;
30275 :
30276 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
30277 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
30278 0 : TALLOC_FREE(pull);
30279 0 : PyErr_SetNdrError(err);
30280 0 : return NULL;
30281 : }
30282 0 : if (!allow_remaining) {
30283 0 : uint32_t highest_ofs;
30284 :
30285 0 : if (pull->offset > pull->relative_highest_offset) {
30286 0 : highest_ofs = pull->offset;
30287 : } else {
30288 0 : highest_ofs = pull->relative_highest_offset;
30289 : }
30290 0 : if (highest_ofs < pull->data_size) {
30291 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
30292 : "not all bytes consumed ofs[%u] size[%u]",
30293 : highest_ofs, pull->data_size);
30294 0 : TALLOC_FREE(pull);
30295 0 : PyErr_SetNdrError(err);
30296 0 : return NULL;
30297 : }
30298 : }
30299 :
30300 0 : TALLOC_FREE(pull);
30301 0 : Py_RETURN_NONE;
30302 : }
30303 :
30304 0 : static PyObject *py_DnssrvEnumRecords_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
30305 : {
30306 0 : DATA_BLOB blob;
30307 0 : Py_ssize_t blob_length = 0;
30308 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
30309 0 : PyObject *bigendian_obj = NULL;
30310 0 : PyObject *ndr64_obj = NULL;
30311 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
30312 0 : PyObject *allow_remaining_obj = NULL;
30313 0 : bool allow_remaining = false;
30314 :
30315 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
30316 : discard_const_p(char *, kwnames),
30317 : &blob.data, &blob_length,
30318 : &bigendian_obj,
30319 : &ndr64_obj,
30320 : &allow_remaining_obj)) {
30321 0 : return NULL;
30322 : }
30323 0 : blob.length = blob_length;
30324 :
30325 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
30326 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
30327 : }
30328 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
30329 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
30330 : }
30331 :
30332 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
30333 0 : allow_remaining = true;
30334 : }
30335 :
30336 0 : return py_DnssrvEnumRecords_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
30337 : }
30338 :
30339 0 : static PyObject *py_DnssrvEnumRecords_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
30340 : {
30341 0 : DATA_BLOB blob;
30342 0 : Py_ssize_t blob_length = 0;
30343 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
30344 0 : PyObject *bigendian_obj = NULL;
30345 0 : PyObject *ndr64_obj = NULL;
30346 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
30347 0 : PyObject *allow_remaining_obj = NULL;
30348 0 : bool allow_remaining = false;
30349 :
30350 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
30351 : discard_const_p(char *, kwnames),
30352 : &blob.data, &blob_length,
30353 : &bigendian_obj,
30354 : &ndr64_obj,
30355 : &allow_remaining_obj)) {
30356 0 : return NULL;
30357 : }
30358 0 : blob.length = blob_length;
30359 :
30360 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
30361 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
30362 : }
30363 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
30364 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
30365 : }
30366 :
30367 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
30368 0 : allow_remaining = true;
30369 : }
30370 :
30371 0 : return py_DnssrvEnumRecords_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
30372 : }
30373 :
30374 0 : static PyObject *py_DnssrvEnumRecords_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
30375 : {
30376 0 : const struct ndr_interface_call *call = NULL;
30377 0 : struct DnssrvEnumRecords *object = pytalloc_get_ptr(py_obj);
30378 0 : PyObject *ret;
30379 0 : char *retstr;
30380 :
30381 0 : if (ndr_table_dnsserver.num_calls < 4) {
30382 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvEnumRecords_ndr_print");
30383 0 : return NULL;
30384 : }
30385 0 : call = &ndr_table_dnsserver.calls[3];
30386 :
30387 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
30388 0 : ret = PyUnicode_FromString(retstr);
30389 0 : TALLOC_FREE(retstr);
30390 :
30391 0 : return ret;
30392 : }
30393 :
30394 0 : static PyObject *py_DnssrvEnumRecords_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
30395 : {
30396 0 : return py_DnssrvEnumRecords_ndr_print(py_obj, "DnssrvEnumRecords_in", NDR_IN);
30397 : }
30398 :
30399 0 : static PyObject *py_DnssrvEnumRecords_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
30400 : {
30401 0 : return py_DnssrvEnumRecords_ndr_print(py_obj, "DnssrvEnumRecords_out", NDR_OUT);
30402 : }
30403 :
30404 : static PyMethodDef py_DnssrvEnumRecords_methods[] = {
30405 : { "opnum", (PyCFunction)py_DnssrvEnumRecords_ndr_opnum, METH_NOARGS|METH_CLASS,
30406 : "dnsserver.DnssrvEnumRecords.opnum() -> 3 (0x03) " },
30407 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvEnumRecords_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
30408 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
30409 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvEnumRecords_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
30410 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
30411 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvEnumRecords_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
30412 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
30413 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvEnumRecords_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
30414 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
30415 : { "__ndr_print_in__", (PyCFunction)py_DnssrvEnumRecords_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
30416 : { "__ndr_print_out__", (PyCFunction)py_DnssrvEnumRecords_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
30417 : { NULL, NULL, 0, NULL }
30418 : };
30419 :
30420 :
30421 : static PyTypeObject DnssrvEnumRecords_Type = {
30422 : PyVarObject_HEAD_INIT(NULL, 0)
30423 : .tp_name = "dnsserver.DnssrvEnumRecords",
30424 : .tp_getset = py_DnssrvEnumRecords_getsetters,
30425 : .tp_methods = py_DnssrvEnumRecords_methods,
30426 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
30427 : .tp_new = py_DnssrvEnumRecords_new,
30428 : };
30429 :
30430 0 : static bool pack_py_DnssrvEnumRecords_args_in(PyObject *args, PyObject *kwargs, struct DnssrvEnumRecords *r)
30431 : {
30432 0 : PyObject *py_pwszServerName;
30433 0 : PyObject *py_pszZone;
30434 0 : PyObject *py_pszNodeName;
30435 0 : PyObject *py_pszStartChild;
30436 0 : PyObject *py_wRecordType;
30437 0 : PyObject *py_fSelectFlag;
30438 0 : PyObject *py_pszFilterStart;
30439 0 : PyObject *py_pszFilterStop;
30440 0 : const char *kwnames[] = {
30441 : "pwszServerName", "pszZone", "pszNodeName", "pszStartChild", "wRecordType", "fSelectFlag", "pszFilterStart", "pszFilterStop", NULL
30442 : };
30443 :
30444 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)) {
30445 0 : return false;
30446 : }
30447 :
30448 0 : if (py_pwszServerName == NULL) {
30449 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pwszServerName");
30450 0 : return false;
30451 : }
30452 0 : if (py_pwszServerName == Py_None) {
30453 0 : r->in.pwszServerName = NULL;
30454 : } else {
30455 0 : r->in.pwszServerName = NULL;
30456 : {
30457 0 : const char *test_str;
30458 0 : const char *talloc_str;
30459 0 : PyObject *unicode = NULL;
30460 0 : if (PyUnicode_Check(py_pwszServerName)) {
30461 0 : unicode = PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore");
30462 0 : if (unicode == NULL) {
30463 0 : return false;
30464 : }
30465 0 : test_str = PyBytes_AS_STRING(unicode);
30466 0 : } else if (PyBytes_Check(py_pwszServerName)) {
30467 0 : test_str = PyBytes_AS_STRING(py_pwszServerName);
30468 : } else {
30469 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
30470 0 : return false;
30471 : }
30472 0 : talloc_str = talloc_strdup(r, test_str);
30473 0 : if (unicode != NULL) {
30474 0 : Py_DECREF(unicode);
30475 : }
30476 0 : if (talloc_str == NULL) {
30477 0 : PyErr_NoMemory();
30478 0 : return false;
30479 : }
30480 0 : r->in.pwszServerName = talloc_str;
30481 : }
30482 : }
30483 0 : if (py_pszZone == NULL) {
30484 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszZone");
30485 0 : return false;
30486 : }
30487 0 : if (py_pszZone == Py_None) {
30488 0 : r->in.pszZone = NULL;
30489 : } else {
30490 0 : r->in.pszZone = NULL;
30491 : {
30492 0 : const char *test_str;
30493 0 : const char *talloc_str;
30494 0 : PyObject *unicode = NULL;
30495 0 : if (PyUnicode_Check(py_pszZone)) {
30496 0 : unicode = PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore");
30497 0 : if (unicode == NULL) {
30498 0 : return false;
30499 : }
30500 0 : test_str = PyBytes_AS_STRING(unicode);
30501 0 : } else if (PyBytes_Check(py_pszZone)) {
30502 0 : test_str = PyBytes_AS_STRING(py_pszZone);
30503 : } else {
30504 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
30505 0 : return false;
30506 : }
30507 0 : talloc_str = talloc_strdup(r, test_str);
30508 0 : if (unicode != NULL) {
30509 0 : Py_DECREF(unicode);
30510 : }
30511 0 : if (talloc_str == NULL) {
30512 0 : PyErr_NoMemory();
30513 0 : return false;
30514 : }
30515 0 : r->in.pszZone = talloc_str;
30516 : }
30517 : }
30518 0 : if (py_pszNodeName == NULL) {
30519 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszNodeName");
30520 0 : return false;
30521 : }
30522 0 : if (py_pszNodeName == Py_None) {
30523 0 : r->in.pszNodeName = NULL;
30524 : } else {
30525 0 : r->in.pszNodeName = NULL;
30526 : {
30527 0 : const char *test_str;
30528 0 : const char *talloc_str;
30529 0 : PyObject *unicode = NULL;
30530 0 : if (PyUnicode_Check(py_pszNodeName)) {
30531 0 : unicode = PyUnicode_AsEncodedString(py_pszNodeName, "utf-8", "ignore");
30532 0 : if (unicode == NULL) {
30533 0 : return false;
30534 : }
30535 0 : test_str = PyBytes_AS_STRING(unicode);
30536 0 : } else if (PyBytes_Check(py_pszNodeName)) {
30537 0 : test_str = PyBytes_AS_STRING(py_pszNodeName);
30538 : } else {
30539 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszNodeName)->tp_name);
30540 0 : return false;
30541 : }
30542 0 : talloc_str = talloc_strdup(r, test_str);
30543 0 : if (unicode != NULL) {
30544 0 : Py_DECREF(unicode);
30545 : }
30546 0 : if (talloc_str == NULL) {
30547 0 : PyErr_NoMemory();
30548 0 : return false;
30549 : }
30550 0 : r->in.pszNodeName = talloc_str;
30551 : }
30552 : }
30553 0 : if (py_pszStartChild == NULL) {
30554 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszStartChild");
30555 0 : return false;
30556 : }
30557 0 : if (py_pszStartChild == Py_None) {
30558 0 : r->in.pszStartChild = NULL;
30559 : } else {
30560 0 : r->in.pszStartChild = NULL;
30561 : {
30562 0 : const char *test_str;
30563 0 : const char *talloc_str;
30564 0 : PyObject *unicode = NULL;
30565 0 : if (PyUnicode_Check(py_pszStartChild)) {
30566 0 : unicode = PyUnicode_AsEncodedString(py_pszStartChild, "utf-8", "ignore");
30567 0 : if (unicode == NULL) {
30568 0 : return false;
30569 : }
30570 0 : test_str = PyBytes_AS_STRING(unicode);
30571 0 : } else if (PyBytes_Check(py_pszStartChild)) {
30572 0 : test_str = PyBytes_AS_STRING(py_pszStartChild);
30573 : } else {
30574 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszStartChild)->tp_name);
30575 0 : return false;
30576 : }
30577 0 : talloc_str = talloc_strdup(r, test_str);
30578 0 : if (unicode != NULL) {
30579 0 : Py_DECREF(unicode);
30580 : }
30581 0 : if (talloc_str == NULL) {
30582 0 : PyErr_NoMemory();
30583 0 : return false;
30584 : }
30585 0 : r->in.pszStartChild = talloc_str;
30586 : }
30587 : }
30588 0 : if (py_wRecordType == NULL) {
30589 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.wRecordType");
30590 0 : return false;
30591 : }
30592 : {
30593 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.wRecordType));
30594 0 : if (PyLong_Check(py_wRecordType)) {
30595 0 : unsigned long long test_var;
30596 0 : test_var = PyLong_AsUnsignedLongLong(py_wRecordType);
30597 0 : if (PyErr_Occurred() != NULL) {
30598 0 : return false;
30599 : }
30600 0 : if (test_var > uint_max) {
30601 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
30602 : PyLong_Type.tp_name, uint_max, test_var);
30603 0 : return false;
30604 : }
30605 0 : r->in.wRecordType = test_var;
30606 : } else {
30607 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
30608 : PyLong_Type.tp_name);
30609 0 : return false;
30610 : }
30611 : }
30612 0 : if (py_fSelectFlag == NULL) {
30613 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.fSelectFlag");
30614 0 : return false;
30615 : }
30616 : {
30617 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.fSelectFlag));
30618 0 : if (PyLong_Check(py_fSelectFlag)) {
30619 0 : unsigned long long test_var;
30620 0 : test_var = PyLong_AsUnsignedLongLong(py_fSelectFlag);
30621 0 : if (PyErr_Occurred() != NULL) {
30622 0 : return false;
30623 : }
30624 0 : if (test_var > uint_max) {
30625 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
30626 : PyLong_Type.tp_name, uint_max, test_var);
30627 0 : return false;
30628 : }
30629 0 : r->in.fSelectFlag = test_var;
30630 : } else {
30631 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
30632 : PyLong_Type.tp_name);
30633 0 : return false;
30634 : }
30635 : }
30636 0 : if (py_pszFilterStart == NULL) {
30637 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszFilterStart");
30638 0 : return false;
30639 : }
30640 0 : if (py_pszFilterStart == Py_None) {
30641 0 : r->in.pszFilterStart = NULL;
30642 : } else {
30643 0 : r->in.pszFilterStart = NULL;
30644 : {
30645 0 : const char *test_str;
30646 0 : const char *talloc_str;
30647 0 : PyObject *unicode = NULL;
30648 0 : if (PyUnicode_Check(py_pszFilterStart)) {
30649 0 : unicode = PyUnicode_AsEncodedString(py_pszFilterStart, "utf-8", "ignore");
30650 0 : if (unicode == NULL) {
30651 0 : return false;
30652 : }
30653 0 : test_str = PyBytes_AS_STRING(unicode);
30654 0 : } else if (PyBytes_Check(py_pszFilterStart)) {
30655 0 : test_str = PyBytes_AS_STRING(py_pszFilterStart);
30656 : } else {
30657 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszFilterStart)->tp_name);
30658 0 : return false;
30659 : }
30660 0 : talloc_str = talloc_strdup(r, test_str);
30661 0 : if (unicode != NULL) {
30662 0 : Py_DECREF(unicode);
30663 : }
30664 0 : if (talloc_str == NULL) {
30665 0 : PyErr_NoMemory();
30666 0 : return false;
30667 : }
30668 0 : r->in.pszFilterStart = talloc_str;
30669 : }
30670 : }
30671 0 : if (py_pszFilterStop == NULL) {
30672 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszFilterStop");
30673 0 : return false;
30674 : }
30675 0 : if (py_pszFilterStop == Py_None) {
30676 0 : r->in.pszFilterStop = NULL;
30677 : } else {
30678 0 : r->in.pszFilterStop = NULL;
30679 : {
30680 0 : const char *test_str;
30681 0 : const char *talloc_str;
30682 0 : PyObject *unicode = NULL;
30683 0 : if (PyUnicode_Check(py_pszFilterStop)) {
30684 0 : unicode = PyUnicode_AsEncodedString(py_pszFilterStop, "utf-8", "ignore");
30685 0 : if (unicode == NULL) {
30686 0 : return false;
30687 : }
30688 0 : test_str = PyBytes_AS_STRING(unicode);
30689 0 : } else if (PyBytes_Check(py_pszFilterStop)) {
30690 0 : test_str = PyBytes_AS_STRING(py_pszFilterStop);
30691 : } else {
30692 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszFilterStop)->tp_name);
30693 0 : return false;
30694 : }
30695 0 : talloc_str = talloc_strdup(r, test_str);
30696 0 : if (unicode != NULL) {
30697 0 : Py_DECREF(unicode);
30698 : }
30699 0 : if (talloc_str == NULL) {
30700 0 : PyErr_NoMemory();
30701 0 : return false;
30702 : }
30703 0 : r->in.pszFilterStop = talloc_str;
30704 : }
30705 : }
30706 0 : return true;
30707 : }
30708 :
30709 0 : static PyObject *unpack_py_DnssrvEnumRecords_args_out(struct DnssrvEnumRecords *r)
30710 : {
30711 0 : PyObject *result;
30712 0 : PyObject *py_pdwBufferLength;
30713 0 : PyObject *py_pBuffer;
30714 0 : result = PyTuple_New(2);
30715 0 : py_pdwBufferLength = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.pdwBufferLength));
30716 0 : PyTuple_SetItem(result, 0, py_pdwBufferLength);
30717 0 : if (*r->out.pBuffer == NULL) {
30718 0 : py_pBuffer = Py_None;
30719 0 : Py_INCREF(py_pBuffer);
30720 : } else {
30721 0 : py_pBuffer = pytalloc_reference_ex(&DNS_RPC_RECORDS_ARRAY_Type, *r->out.pBuffer, *r->out.pBuffer);
30722 : }
30723 0 : PyTuple_SetItem(result, 1, py_pBuffer);
30724 0 : if (!W_ERROR_IS_OK(r->out.result)) {
30725 0 : PyErr_SetWERROR(r->out.result);
30726 0 : return NULL;
30727 : }
30728 :
30729 0 : return result;
30730 : }
30731 :
30732 :
30733 0 : static PyObject *py_DnssrvUpdateRecord_in_get_pwszServerName(PyObject *obj, void *closure)
30734 : {
30735 0 : struct DnssrvUpdateRecord *object = pytalloc_get_ptr(obj);
30736 0 : PyObject *py_pwszServerName;
30737 0 : if (object->in.pwszServerName == NULL) {
30738 0 : Py_RETURN_NONE;
30739 : }
30740 0 : if (object->in.pwszServerName == NULL) {
30741 0 : py_pwszServerName = Py_None;
30742 0 : Py_INCREF(py_pwszServerName);
30743 : } else {
30744 0 : if (object->in.pwszServerName == NULL) {
30745 0 : py_pwszServerName = Py_None;
30746 0 : Py_INCREF(py_pwszServerName);
30747 : } else {
30748 0 : py_pwszServerName = PyUnicode_Decode(object->in.pwszServerName, strlen(object->in.pwszServerName), "utf-8", "ignore");
30749 : }
30750 : }
30751 0 : return py_pwszServerName;
30752 : }
30753 :
30754 0 : static int py_DnssrvUpdateRecord_in_set_pwszServerName(PyObject *py_obj, PyObject *value, void *closure)
30755 : {
30756 0 : struct DnssrvUpdateRecord *object = pytalloc_get_ptr(py_obj);
30757 0 : if (value == NULL) {
30758 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pwszServerName");
30759 0 : return -1;
30760 : }
30761 0 : if (value == Py_None) {
30762 0 : object->in.pwszServerName = NULL;
30763 : } else {
30764 0 : object->in.pwszServerName = NULL;
30765 : {
30766 0 : const char *test_str;
30767 0 : const char *talloc_str;
30768 0 : PyObject *unicode = NULL;
30769 0 : if (PyUnicode_Check(value)) {
30770 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
30771 0 : if (unicode == NULL) {
30772 0 : return -1;
30773 : }
30774 0 : test_str = PyBytes_AS_STRING(unicode);
30775 0 : } else if (PyBytes_Check(value)) {
30776 0 : test_str = PyBytes_AS_STRING(value);
30777 : } else {
30778 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
30779 0 : return -1;
30780 : }
30781 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
30782 0 : if (unicode != NULL) {
30783 0 : Py_DECREF(unicode);
30784 : }
30785 0 : if (talloc_str == NULL) {
30786 0 : PyErr_NoMemory();
30787 0 : return -1;
30788 : }
30789 0 : object->in.pwszServerName = talloc_str;
30790 : }
30791 : }
30792 0 : return 0;
30793 : }
30794 :
30795 0 : static PyObject *py_DnssrvUpdateRecord_in_get_pszZone(PyObject *obj, void *closure)
30796 : {
30797 0 : struct DnssrvUpdateRecord *object = pytalloc_get_ptr(obj);
30798 0 : PyObject *py_pszZone;
30799 0 : if (object->in.pszZone == NULL) {
30800 0 : Py_RETURN_NONE;
30801 : }
30802 0 : if (object->in.pszZone == NULL) {
30803 0 : py_pszZone = Py_None;
30804 0 : Py_INCREF(py_pszZone);
30805 : } else {
30806 0 : if (object->in.pszZone == NULL) {
30807 0 : py_pszZone = Py_None;
30808 0 : Py_INCREF(py_pszZone);
30809 : } else {
30810 0 : py_pszZone = PyUnicode_Decode(object->in.pszZone, strlen(object->in.pszZone), "utf-8", "ignore");
30811 : }
30812 : }
30813 0 : return py_pszZone;
30814 : }
30815 :
30816 0 : static int py_DnssrvUpdateRecord_in_set_pszZone(PyObject *py_obj, PyObject *value, void *closure)
30817 : {
30818 0 : struct DnssrvUpdateRecord *object = pytalloc_get_ptr(py_obj);
30819 0 : if (value == NULL) {
30820 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszZone");
30821 0 : return -1;
30822 : }
30823 0 : if (value == Py_None) {
30824 0 : object->in.pszZone = NULL;
30825 : } else {
30826 0 : object->in.pszZone = NULL;
30827 : {
30828 0 : const char *test_str;
30829 0 : const char *talloc_str;
30830 0 : PyObject *unicode = NULL;
30831 0 : if (PyUnicode_Check(value)) {
30832 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
30833 0 : if (unicode == NULL) {
30834 0 : return -1;
30835 : }
30836 0 : test_str = PyBytes_AS_STRING(unicode);
30837 0 : } else if (PyBytes_Check(value)) {
30838 0 : test_str = PyBytes_AS_STRING(value);
30839 : } else {
30840 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
30841 0 : return -1;
30842 : }
30843 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
30844 0 : if (unicode != NULL) {
30845 0 : Py_DECREF(unicode);
30846 : }
30847 0 : if (talloc_str == NULL) {
30848 0 : PyErr_NoMemory();
30849 0 : return -1;
30850 : }
30851 0 : object->in.pszZone = talloc_str;
30852 : }
30853 : }
30854 0 : return 0;
30855 : }
30856 :
30857 0 : static PyObject *py_DnssrvUpdateRecord_in_get_pszNodeName(PyObject *obj, void *closure)
30858 : {
30859 0 : struct DnssrvUpdateRecord *object = pytalloc_get_ptr(obj);
30860 0 : PyObject *py_pszNodeName;
30861 0 : if (object->in.pszNodeName == NULL) {
30862 0 : Py_RETURN_NONE;
30863 : }
30864 0 : if (object->in.pszNodeName == NULL) {
30865 0 : py_pszNodeName = Py_None;
30866 0 : Py_INCREF(py_pszNodeName);
30867 : } else {
30868 0 : if (object->in.pszNodeName == NULL) {
30869 0 : py_pszNodeName = Py_None;
30870 0 : Py_INCREF(py_pszNodeName);
30871 : } else {
30872 0 : py_pszNodeName = PyUnicode_Decode(object->in.pszNodeName, strlen(object->in.pszNodeName), "utf-8", "ignore");
30873 : }
30874 : }
30875 0 : return py_pszNodeName;
30876 : }
30877 :
30878 0 : static int py_DnssrvUpdateRecord_in_set_pszNodeName(PyObject *py_obj, PyObject *value, void *closure)
30879 : {
30880 0 : struct DnssrvUpdateRecord *object = pytalloc_get_ptr(py_obj);
30881 0 : if (value == NULL) {
30882 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszNodeName");
30883 0 : return -1;
30884 : }
30885 0 : if (value == Py_None) {
30886 0 : object->in.pszNodeName = NULL;
30887 : } else {
30888 0 : object->in.pszNodeName = NULL;
30889 : {
30890 0 : const char *test_str;
30891 0 : const char *talloc_str;
30892 0 : PyObject *unicode = NULL;
30893 0 : if (PyUnicode_Check(value)) {
30894 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
30895 0 : if (unicode == NULL) {
30896 0 : return -1;
30897 : }
30898 0 : test_str = PyBytes_AS_STRING(unicode);
30899 0 : } else if (PyBytes_Check(value)) {
30900 0 : test_str = PyBytes_AS_STRING(value);
30901 : } else {
30902 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
30903 0 : return -1;
30904 : }
30905 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
30906 0 : if (unicode != NULL) {
30907 0 : Py_DECREF(unicode);
30908 : }
30909 0 : if (talloc_str == NULL) {
30910 0 : PyErr_NoMemory();
30911 0 : return -1;
30912 : }
30913 0 : object->in.pszNodeName = talloc_str;
30914 : }
30915 : }
30916 0 : return 0;
30917 : }
30918 :
30919 0 : static PyObject *py_DnssrvUpdateRecord_in_get_pAddRecord(PyObject *obj, void *closure)
30920 : {
30921 0 : struct DnssrvUpdateRecord *object = pytalloc_get_ptr(obj);
30922 0 : PyObject *py_pAddRecord;
30923 0 : if (object->in.pAddRecord == NULL) {
30924 0 : Py_RETURN_NONE;
30925 : }
30926 0 : if (object->in.pAddRecord == NULL) {
30927 0 : py_pAddRecord = Py_None;
30928 0 : Py_INCREF(py_pAddRecord);
30929 : } else {
30930 0 : py_pAddRecord = pytalloc_reference_ex(&DNS_RPC_RECORD_BUF_Type, object->in.pAddRecord, object->in.pAddRecord);
30931 : }
30932 0 : return py_pAddRecord;
30933 : }
30934 :
30935 0 : static int py_DnssrvUpdateRecord_in_set_pAddRecord(PyObject *py_obj, PyObject *value, void *closure)
30936 : {
30937 0 : struct DnssrvUpdateRecord *object = pytalloc_get_ptr(py_obj);
30938 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.pAddRecord));
30939 0 : if (value == NULL) {
30940 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pAddRecord");
30941 0 : return -1;
30942 : }
30943 0 : if (value == Py_None) {
30944 0 : object->in.pAddRecord = NULL;
30945 : } else {
30946 0 : object->in.pAddRecord = NULL;
30947 0 : PY_CHECK_TYPE(&DNS_RPC_RECORD_BUF_Type, value, return -1;);
30948 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
30949 0 : PyErr_NoMemory();
30950 0 : return -1;
30951 : }
30952 0 : object->in.pAddRecord = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(value);
30953 : }
30954 0 : return 0;
30955 : }
30956 :
30957 0 : static PyObject *py_DnssrvUpdateRecord_in_get_pDeleteRecord(PyObject *obj, void *closure)
30958 : {
30959 0 : struct DnssrvUpdateRecord *object = pytalloc_get_ptr(obj);
30960 0 : PyObject *py_pDeleteRecord;
30961 0 : if (object->in.pDeleteRecord == NULL) {
30962 0 : Py_RETURN_NONE;
30963 : }
30964 0 : if (object->in.pDeleteRecord == NULL) {
30965 0 : py_pDeleteRecord = Py_None;
30966 0 : Py_INCREF(py_pDeleteRecord);
30967 : } else {
30968 0 : py_pDeleteRecord = pytalloc_reference_ex(&DNS_RPC_RECORD_BUF_Type, object->in.pDeleteRecord, object->in.pDeleteRecord);
30969 : }
30970 0 : return py_pDeleteRecord;
30971 : }
30972 :
30973 0 : static int py_DnssrvUpdateRecord_in_set_pDeleteRecord(PyObject *py_obj, PyObject *value, void *closure)
30974 : {
30975 0 : struct DnssrvUpdateRecord *object = pytalloc_get_ptr(py_obj);
30976 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.pDeleteRecord));
30977 0 : if (value == NULL) {
30978 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pDeleteRecord");
30979 0 : return -1;
30980 : }
30981 0 : if (value == Py_None) {
30982 0 : object->in.pDeleteRecord = NULL;
30983 : } else {
30984 0 : object->in.pDeleteRecord = NULL;
30985 0 : PY_CHECK_TYPE(&DNS_RPC_RECORD_BUF_Type, value, return -1;);
30986 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
30987 0 : PyErr_NoMemory();
30988 0 : return -1;
30989 : }
30990 0 : object->in.pDeleteRecord = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(value);
30991 : }
30992 0 : return 0;
30993 : }
30994 :
30995 0 : static PyObject *py_DnssrvUpdateRecord_get_result(PyObject *obj, void *closure)
30996 : {
30997 0 : struct DnssrvUpdateRecord *object = pytalloc_get_ptr(obj);
30998 0 : PyObject *py_result;
30999 0 : py_result = PyErr_FromWERROR(object->out.result);
31000 0 : return py_result;
31001 : }
31002 :
31003 0 : static int py_DnssrvUpdateRecord_set_result(PyObject *py_obj, PyObject *value, void *closure)
31004 : {
31005 0 : struct DnssrvUpdateRecord *object = pytalloc_get_ptr(py_obj);
31006 0 : if (value == NULL) {
31007 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
31008 0 : return -1;
31009 : }
31010 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
31011 0 : return 0;
31012 : }
31013 :
31014 : static PyGetSetDef py_DnssrvUpdateRecord_getsetters[] = {
31015 : {
31016 : .name = discard_const_p(char, "in_pwszServerName"),
31017 : .get = py_DnssrvUpdateRecord_in_get_pwszServerName,
31018 : .set = py_DnssrvUpdateRecord_in_set_pwszServerName,
31019 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
31020 : },
31021 : {
31022 : .name = discard_const_p(char, "in_pszZone"),
31023 : .get = py_DnssrvUpdateRecord_in_get_pszZone,
31024 : .set = py_DnssrvUpdateRecord_in_set_pszZone,
31025 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
31026 : },
31027 : {
31028 : .name = discard_const_p(char, "in_pszNodeName"),
31029 : .get = py_DnssrvUpdateRecord_in_get_pszNodeName,
31030 : .set = py_DnssrvUpdateRecord_in_set_pszNodeName,
31031 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
31032 : },
31033 : {
31034 : .name = discard_const_p(char, "in_pAddRecord"),
31035 : .get = py_DnssrvUpdateRecord_in_get_pAddRecord,
31036 : .set = py_DnssrvUpdateRecord_in_set_pAddRecord,
31037 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_RECORD_BUF")
31038 : },
31039 : {
31040 : .name = discard_const_p(char, "in_pDeleteRecord"),
31041 : .get = py_DnssrvUpdateRecord_in_get_pDeleteRecord,
31042 : .set = py_DnssrvUpdateRecord_in_set_pDeleteRecord,
31043 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_RECORD_BUF")
31044 : },
31045 : {
31046 : .name = discard_const_p(char, "result"),
31047 : .get = py_DnssrvUpdateRecord_get_result,
31048 : .set = py_DnssrvUpdateRecord_set_result,
31049 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
31050 : },
31051 : { .name = NULL }
31052 : };
31053 :
31054 0 : static PyObject *py_DnssrvUpdateRecord_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
31055 : {
31056 0 : PyObject *self = pytalloc_new(struct DnssrvUpdateRecord, type);
31057 0 : return self;
31058 : }
31059 :
31060 0 : static PyObject *py_DnssrvUpdateRecord_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
31061 : {
31062 :
31063 :
31064 0 : return PyLong_FromLong(4);
31065 : }
31066 :
31067 0 : static PyObject *py_DnssrvUpdateRecord_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
31068 : {
31069 0 : const struct ndr_interface_call *call = NULL;
31070 0 : struct DnssrvUpdateRecord *object = pytalloc_get_ptr(py_obj);
31071 0 : PyObject *ret = NULL;
31072 0 : struct ndr_push *push = NULL;
31073 0 : DATA_BLOB blob;
31074 0 : enum ndr_err_code err;
31075 :
31076 0 : if (ndr_table_dnsserver.num_calls < 5) {
31077 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvUpdateRecord_ndr_pack");
31078 0 : return NULL;
31079 : }
31080 0 : call = &ndr_table_dnsserver.calls[4];
31081 :
31082 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
31083 0 : if (push == NULL) {
31084 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
31085 0 : return NULL;
31086 : }
31087 :
31088 0 : push->flags |= ndr_push_flags;
31089 :
31090 0 : err = call->ndr_push(push, ndr_inout_flags, object);
31091 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
31092 0 : TALLOC_FREE(push);
31093 0 : PyErr_SetNdrError(err);
31094 0 : return NULL;
31095 : }
31096 0 : blob = ndr_push_blob(push);
31097 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
31098 0 : TALLOC_FREE(push);
31099 0 : return ret;
31100 : }
31101 :
31102 0 : static PyObject *py_DnssrvUpdateRecord_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
31103 : {
31104 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
31105 0 : PyObject *bigendian_obj = NULL;
31106 0 : PyObject *ndr64_obj = NULL;
31107 0 : libndr_flags ndr_push_flags = 0;
31108 :
31109 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
31110 : discard_const_p(char *, kwnames),
31111 : &bigendian_obj,
31112 : &ndr64_obj)) {
31113 0 : return NULL;
31114 : }
31115 :
31116 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
31117 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
31118 : }
31119 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
31120 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
31121 : }
31122 :
31123 0 : return py_DnssrvUpdateRecord_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
31124 : }
31125 :
31126 0 : static PyObject *py_DnssrvUpdateRecord_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
31127 : {
31128 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
31129 0 : PyObject *bigendian_obj = NULL;
31130 0 : PyObject *ndr64_obj = NULL;
31131 0 : libndr_flags ndr_push_flags = 0;
31132 :
31133 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
31134 : discard_const_p(char *, kwnames),
31135 : &bigendian_obj,
31136 : &ndr64_obj)) {
31137 0 : return NULL;
31138 : }
31139 :
31140 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
31141 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
31142 : }
31143 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
31144 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
31145 : }
31146 :
31147 0 : return py_DnssrvUpdateRecord_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
31148 : }
31149 :
31150 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)
31151 : {
31152 0 : const struct ndr_interface_call *call = NULL;
31153 0 : struct DnssrvUpdateRecord *object = pytalloc_get_ptr(py_obj);
31154 0 : struct ndr_pull *pull = NULL;
31155 0 : enum ndr_err_code err;
31156 :
31157 0 : if (ndr_table_dnsserver.num_calls < 5) {
31158 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvUpdateRecord_ndr_unpack");
31159 0 : return NULL;
31160 : }
31161 0 : call = &ndr_table_dnsserver.calls[4];
31162 :
31163 0 : pull = ndr_pull_init_blob(blob, object);
31164 0 : if (pull == NULL) {
31165 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
31166 0 : return NULL;
31167 : }
31168 :
31169 0 : pull->flags |= ndr_pull_flags;
31170 :
31171 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
31172 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
31173 0 : TALLOC_FREE(pull);
31174 0 : PyErr_SetNdrError(err);
31175 0 : return NULL;
31176 : }
31177 0 : if (!allow_remaining) {
31178 0 : uint32_t highest_ofs;
31179 :
31180 0 : if (pull->offset > pull->relative_highest_offset) {
31181 0 : highest_ofs = pull->offset;
31182 : } else {
31183 0 : highest_ofs = pull->relative_highest_offset;
31184 : }
31185 0 : if (highest_ofs < pull->data_size) {
31186 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
31187 : "not all bytes consumed ofs[%u] size[%u]",
31188 : highest_ofs, pull->data_size);
31189 0 : TALLOC_FREE(pull);
31190 0 : PyErr_SetNdrError(err);
31191 0 : return NULL;
31192 : }
31193 : }
31194 :
31195 0 : TALLOC_FREE(pull);
31196 0 : Py_RETURN_NONE;
31197 : }
31198 :
31199 0 : static PyObject *py_DnssrvUpdateRecord_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
31200 : {
31201 0 : DATA_BLOB blob;
31202 0 : Py_ssize_t blob_length = 0;
31203 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
31204 0 : PyObject *bigendian_obj = NULL;
31205 0 : PyObject *ndr64_obj = NULL;
31206 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
31207 0 : PyObject *allow_remaining_obj = NULL;
31208 0 : bool allow_remaining = false;
31209 :
31210 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
31211 : discard_const_p(char *, kwnames),
31212 : &blob.data, &blob_length,
31213 : &bigendian_obj,
31214 : &ndr64_obj,
31215 : &allow_remaining_obj)) {
31216 0 : return NULL;
31217 : }
31218 0 : blob.length = blob_length;
31219 :
31220 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
31221 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
31222 : }
31223 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
31224 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
31225 : }
31226 :
31227 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
31228 0 : allow_remaining = true;
31229 : }
31230 :
31231 0 : return py_DnssrvUpdateRecord_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
31232 : }
31233 :
31234 0 : static PyObject *py_DnssrvUpdateRecord_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
31235 : {
31236 0 : DATA_BLOB blob;
31237 0 : Py_ssize_t blob_length = 0;
31238 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
31239 0 : PyObject *bigendian_obj = NULL;
31240 0 : PyObject *ndr64_obj = NULL;
31241 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
31242 0 : PyObject *allow_remaining_obj = NULL;
31243 0 : bool allow_remaining = false;
31244 :
31245 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
31246 : discard_const_p(char *, kwnames),
31247 : &blob.data, &blob_length,
31248 : &bigendian_obj,
31249 : &ndr64_obj,
31250 : &allow_remaining_obj)) {
31251 0 : return NULL;
31252 : }
31253 0 : blob.length = blob_length;
31254 :
31255 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
31256 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
31257 : }
31258 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
31259 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
31260 : }
31261 :
31262 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
31263 0 : allow_remaining = true;
31264 : }
31265 :
31266 0 : return py_DnssrvUpdateRecord_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
31267 : }
31268 :
31269 0 : static PyObject *py_DnssrvUpdateRecord_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
31270 : {
31271 0 : const struct ndr_interface_call *call = NULL;
31272 0 : struct DnssrvUpdateRecord *object = pytalloc_get_ptr(py_obj);
31273 0 : PyObject *ret;
31274 0 : char *retstr;
31275 :
31276 0 : if (ndr_table_dnsserver.num_calls < 5) {
31277 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvUpdateRecord_ndr_print");
31278 0 : return NULL;
31279 : }
31280 0 : call = &ndr_table_dnsserver.calls[4];
31281 :
31282 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
31283 0 : ret = PyUnicode_FromString(retstr);
31284 0 : TALLOC_FREE(retstr);
31285 :
31286 0 : return ret;
31287 : }
31288 :
31289 0 : static PyObject *py_DnssrvUpdateRecord_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
31290 : {
31291 0 : return py_DnssrvUpdateRecord_ndr_print(py_obj, "DnssrvUpdateRecord_in", NDR_IN);
31292 : }
31293 :
31294 0 : static PyObject *py_DnssrvUpdateRecord_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
31295 : {
31296 0 : return py_DnssrvUpdateRecord_ndr_print(py_obj, "DnssrvUpdateRecord_out", NDR_OUT);
31297 : }
31298 :
31299 : static PyMethodDef py_DnssrvUpdateRecord_methods[] = {
31300 : { "opnum", (PyCFunction)py_DnssrvUpdateRecord_ndr_opnum, METH_NOARGS|METH_CLASS,
31301 : "dnsserver.DnssrvUpdateRecord.opnum() -> 4 (0x04) " },
31302 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvUpdateRecord_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
31303 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
31304 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvUpdateRecord_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
31305 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
31306 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvUpdateRecord_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
31307 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
31308 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvUpdateRecord_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
31309 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
31310 : { "__ndr_print_in__", (PyCFunction)py_DnssrvUpdateRecord_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
31311 : { "__ndr_print_out__", (PyCFunction)py_DnssrvUpdateRecord_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
31312 : { NULL, NULL, 0, NULL }
31313 : };
31314 :
31315 :
31316 : static PyTypeObject DnssrvUpdateRecord_Type = {
31317 : PyVarObject_HEAD_INIT(NULL, 0)
31318 : .tp_name = "dnsserver.DnssrvUpdateRecord",
31319 : .tp_getset = py_DnssrvUpdateRecord_getsetters,
31320 : .tp_methods = py_DnssrvUpdateRecord_methods,
31321 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
31322 : .tp_new = py_DnssrvUpdateRecord_new,
31323 : };
31324 :
31325 0 : static bool pack_py_DnssrvUpdateRecord_args_in(PyObject *args, PyObject *kwargs, struct DnssrvUpdateRecord *r)
31326 : {
31327 0 : PyObject *py_pwszServerName;
31328 0 : PyObject *py_pszZone;
31329 0 : PyObject *py_pszNodeName;
31330 0 : PyObject *py_pAddRecord;
31331 0 : PyObject *py_pDeleteRecord;
31332 0 : const char *kwnames[] = {
31333 : "pwszServerName", "pszZone", "pszNodeName", "pAddRecord", "pDeleteRecord", NULL
31334 : };
31335 :
31336 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:DnssrvUpdateRecord", discard_const_p(char *, kwnames), &py_pwszServerName, &py_pszZone, &py_pszNodeName, &py_pAddRecord, &py_pDeleteRecord)) {
31337 0 : return false;
31338 : }
31339 :
31340 0 : if (py_pwszServerName == NULL) {
31341 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pwszServerName");
31342 0 : return false;
31343 : }
31344 0 : if (py_pwszServerName == Py_None) {
31345 0 : r->in.pwszServerName = NULL;
31346 : } else {
31347 0 : r->in.pwszServerName = NULL;
31348 : {
31349 0 : const char *test_str;
31350 0 : const char *talloc_str;
31351 0 : PyObject *unicode = NULL;
31352 0 : if (PyUnicode_Check(py_pwszServerName)) {
31353 0 : unicode = PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore");
31354 0 : if (unicode == NULL) {
31355 0 : return false;
31356 : }
31357 0 : test_str = PyBytes_AS_STRING(unicode);
31358 0 : } else if (PyBytes_Check(py_pwszServerName)) {
31359 0 : test_str = PyBytes_AS_STRING(py_pwszServerName);
31360 : } else {
31361 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
31362 0 : return false;
31363 : }
31364 0 : talloc_str = talloc_strdup(r, test_str);
31365 0 : if (unicode != NULL) {
31366 0 : Py_DECREF(unicode);
31367 : }
31368 0 : if (talloc_str == NULL) {
31369 0 : PyErr_NoMemory();
31370 0 : return false;
31371 : }
31372 0 : r->in.pwszServerName = talloc_str;
31373 : }
31374 : }
31375 0 : if (py_pszZone == NULL) {
31376 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszZone");
31377 0 : return false;
31378 : }
31379 0 : if (py_pszZone == Py_None) {
31380 0 : r->in.pszZone = NULL;
31381 : } else {
31382 0 : r->in.pszZone = NULL;
31383 : {
31384 0 : const char *test_str;
31385 0 : const char *talloc_str;
31386 0 : PyObject *unicode = NULL;
31387 0 : if (PyUnicode_Check(py_pszZone)) {
31388 0 : unicode = PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore");
31389 0 : if (unicode == NULL) {
31390 0 : return false;
31391 : }
31392 0 : test_str = PyBytes_AS_STRING(unicode);
31393 0 : } else if (PyBytes_Check(py_pszZone)) {
31394 0 : test_str = PyBytes_AS_STRING(py_pszZone);
31395 : } else {
31396 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
31397 0 : return false;
31398 : }
31399 0 : talloc_str = talloc_strdup(r, test_str);
31400 0 : if (unicode != NULL) {
31401 0 : Py_DECREF(unicode);
31402 : }
31403 0 : if (talloc_str == NULL) {
31404 0 : PyErr_NoMemory();
31405 0 : return false;
31406 : }
31407 0 : r->in.pszZone = talloc_str;
31408 : }
31409 : }
31410 0 : if (py_pszNodeName == NULL) {
31411 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszNodeName");
31412 0 : return false;
31413 : }
31414 0 : if (py_pszNodeName == Py_None) {
31415 0 : r->in.pszNodeName = NULL;
31416 : } else {
31417 0 : r->in.pszNodeName = NULL;
31418 : {
31419 0 : const char *test_str;
31420 0 : const char *talloc_str;
31421 0 : PyObject *unicode = NULL;
31422 0 : if (PyUnicode_Check(py_pszNodeName)) {
31423 0 : unicode = PyUnicode_AsEncodedString(py_pszNodeName, "utf-8", "ignore");
31424 0 : if (unicode == NULL) {
31425 0 : return false;
31426 : }
31427 0 : test_str = PyBytes_AS_STRING(unicode);
31428 0 : } else if (PyBytes_Check(py_pszNodeName)) {
31429 0 : test_str = PyBytes_AS_STRING(py_pszNodeName);
31430 : } else {
31431 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszNodeName)->tp_name);
31432 0 : return false;
31433 : }
31434 0 : talloc_str = talloc_strdup(r, test_str);
31435 0 : if (unicode != NULL) {
31436 0 : Py_DECREF(unicode);
31437 : }
31438 0 : if (talloc_str == NULL) {
31439 0 : PyErr_NoMemory();
31440 0 : return false;
31441 : }
31442 0 : r->in.pszNodeName = talloc_str;
31443 : }
31444 : }
31445 0 : if (py_pAddRecord == NULL) {
31446 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pAddRecord");
31447 0 : return false;
31448 : }
31449 0 : if (py_pAddRecord == Py_None) {
31450 0 : r->in.pAddRecord = NULL;
31451 : } else {
31452 0 : r->in.pAddRecord = NULL;
31453 0 : PY_CHECK_TYPE(&DNS_RPC_RECORD_BUF_Type, py_pAddRecord, return false;);
31454 0 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_pAddRecord)) == NULL) {
31455 0 : PyErr_NoMemory();
31456 0 : return false;
31457 : }
31458 0 : r->in.pAddRecord = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(py_pAddRecord);
31459 : }
31460 0 : if (py_pDeleteRecord == NULL) {
31461 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pDeleteRecord");
31462 0 : return false;
31463 : }
31464 0 : if (py_pDeleteRecord == Py_None) {
31465 0 : r->in.pDeleteRecord = NULL;
31466 : } else {
31467 0 : r->in.pDeleteRecord = NULL;
31468 0 : PY_CHECK_TYPE(&DNS_RPC_RECORD_BUF_Type, py_pDeleteRecord, return false;);
31469 0 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_pDeleteRecord)) == NULL) {
31470 0 : PyErr_NoMemory();
31471 0 : return false;
31472 : }
31473 0 : r->in.pDeleteRecord = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(py_pDeleteRecord);
31474 : }
31475 0 : return true;
31476 : }
31477 :
31478 0 : static PyObject *unpack_py_DnssrvUpdateRecord_args_out(struct DnssrvUpdateRecord *r)
31479 : {
31480 0 : PyObject *result;
31481 0 : result = Py_None;
31482 0 : Py_INCREF(result);
31483 0 : if (!W_ERROR_IS_OK(r->out.result)) {
31484 0 : PyErr_SetWERROR(r->out.result);
31485 0 : return NULL;
31486 : }
31487 :
31488 0 : return result;
31489 : }
31490 :
31491 :
31492 0 : static PyObject *py_DnssrvOperation2_in_get_dwClientVersion(PyObject *obj, void *closure)
31493 : {
31494 0 : struct DnssrvOperation2 *object = pytalloc_get_ptr(obj);
31495 0 : PyObject *py_dwClientVersion;
31496 0 : py_dwClientVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->in.dwClientVersion));
31497 0 : return py_dwClientVersion;
31498 : }
31499 :
31500 0 : static int py_DnssrvOperation2_in_set_dwClientVersion(PyObject *py_obj, PyObject *value, void *closure)
31501 : {
31502 0 : struct DnssrvOperation2 *object = pytalloc_get_ptr(py_obj);
31503 0 : if (value == NULL) {
31504 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dwClientVersion");
31505 0 : return -1;
31506 : }
31507 : {
31508 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwClientVersion));
31509 0 : if (PyLong_Check(value)) {
31510 0 : unsigned long long test_var;
31511 0 : test_var = PyLong_AsUnsignedLongLong(value);
31512 0 : if (PyErr_Occurred() != NULL) {
31513 0 : return -1;
31514 : }
31515 0 : if (test_var > uint_max) {
31516 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31517 : PyLong_Type.tp_name, uint_max, test_var);
31518 0 : return -1;
31519 : }
31520 0 : object->in.dwClientVersion = test_var;
31521 : } else {
31522 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
31523 : PyLong_Type.tp_name);
31524 0 : return -1;
31525 : }
31526 : }
31527 0 : return 0;
31528 : }
31529 :
31530 0 : static PyObject *py_DnssrvOperation2_in_get_dwSettingFlags(PyObject *obj, void *closure)
31531 : {
31532 0 : struct DnssrvOperation2 *object = pytalloc_get_ptr(obj);
31533 0 : PyObject *py_dwSettingFlags;
31534 0 : py_dwSettingFlags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.dwSettingFlags));
31535 0 : return py_dwSettingFlags;
31536 : }
31537 :
31538 0 : static int py_DnssrvOperation2_in_set_dwSettingFlags(PyObject *py_obj, PyObject *value, void *closure)
31539 : {
31540 0 : struct DnssrvOperation2 *object = pytalloc_get_ptr(py_obj);
31541 0 : if (value == NULL) {
31542 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dwSettingFlags");
31543 0 : return -1;
31544 : }
31545 : {
31546 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwSettingFlags));
31547 0 : if (PyLong_Check(value)) {
31548 0 : unsigned long long test_var;
31549 0 : test_var = PyLong_AsUnsignedLongLong(value);
31550 0 : if (PyErr_Occurred() != NULL) {
31551 0 : return -1;
31552 : }
31553 0 : if (test_var > uint_max) {
31554 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31555 : PyLong_Type.tp_name, uint_max, test_var);
31556 0 : return -1;
31557 : }
31558 0 : object->in.dwSettingFlags = test_var;
31559 : } else {
31560 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
31561 : PyLong_Type.tp_name);
31562 0 : return -1;
31563 : }
31564 : }
31565 0 : return 0;
31566 : }
31567 :
31568 0 : static PyObject *py_DnssrvOperation2_in_get_pwszServerName(PyObject *obj, void *closure)
31569 : {
31570 0 : struct DnssrvOperation2 *object = pytalloc_get_ptr(obj);
31571 0 : PyObject *py_pwszServerName;
31572 0 : if (object->in.pwszServerName == NULL) {
31573 0 : Py_RETURN_NONE;
31574 : }
31575 0 : if (object->in.pwszServerName == NULL) {
31576 0 : py_pwszServerName = Py_None;
31577 0 : Py_INCREF(py_pwszServerName);
31578 : } else {
31579 0 : if (object->in.pwszServerName == NULL) {
31580 0 : py_pwszServerName = Py_None;
31581 0 : Py_INCREF(py_pwszServerName);
31582 : } else {
31583 0 : py_pwszServerName = PyUnicode_Decode(object->in.pwszServerName, strlen(object->in.pwszServerName), "utf-8", "ignore");
31584 : }
31585 : }
31586 0 : return py_pwszServerName;
31587 : }
31588 :
31589 0 : static int py_DnssrvOperation2_in_set_pwszServerName(PyObject *py_obj, PyObject *value, void *closure)
31590 : {
31591 0 : struct DnssrvOperation2 *object = pytalloc_get_ptr(py_obj);
31592 0 : if (value == NULL) {
31593 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pwszServerName");
31594 0 : return -1;
31595 : }
31596 0 : if (value == Py_None) {
31597 0 : object->in.pwszServerName = NULL;
31598 : } else {
31599 0 : object->in.pwszServerName = NULL;
31600 : {
31601 0 : const char *test_str;
31602 0 : const char *talloc_str;
31603 0 : PyObject *unicode = NULL;
31604 0 : if (PyUnicode_Check(value)) {
31605 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
31606 0 : if (unicode == NULL) {
31607 0 : return -1;
31608 : }
31609 0 : test_str = PyBytes_AS_STRING(unicode);
31610 0 : } else if (PyBytes_Check(value)) {
31611 0 : test_str = PyBytes_AS_STRING(value);
31612 : } else {
31613 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
31614 0 : return -1;
31615 : }
31616 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
31617 0 : if (unicode != NULL) {
31618 0 : Py_DECREF(unicode);
31619 : }
31620 0 : if (talloc_str == NULL) {
31621 0 : PyErr_NoMemory();
31622 0 : return -1;
31623 : }
31624 0 : object->in.pwszServerName = talloc_str;
31625 : }
31626 : }
31627 0 : return 0;
31628 : }
31629 :
31630 0 : static PyObject *py_DnssrvOperation2_in_get_pszZone(PyObject *obj, void *closure)
31631 : {
31632 0 : struct DnssrvOperation2 *object = pytalloc_get_ptr(obj);
31633 0 : PyObject *py_pszZone;
31634 0 : if (object->in.pszZone == NULL) {
31635 0 : Py_RETURN_NONE;
31636 : }
31637 0 : if (object->in.pszZone == NULL) {
31638 0 : py_pszZone = Py_None;
31639 0 : Py_INCREF(py_pszZone);
31640 : } else {
31641 0 : if (object->in.pszZone == NULL) {
31642 0 : py_pszZone = Py_None;
31643 0 : Py_INCREF(py_pszZone);
31644 : } else {
31645 0 : py_pszZone = PyUnicode_Decode(object->in.pszZone, strlen(object->in.pszZone), "utf-8", "ignore");
31646 : }
31647 : }
31648 0 : return py_pszZone;
31649 : }
31650 :
31651 0 : static int py_DnssrvOperation2_in_set_pszZone(PyObject *py_obj, PyObject *value, void *closure)
31652 : {
31653 0 : struct DnssrvOperation2 *object = pytalloc_get_ptr(py_obj);
31654 0 : if (value == NULL) {
31655 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszZone");
31656 0 : return -1;
31657 : }
31658 0 : if (value == Py_None) {
31659 0 : object->in.pszZone = NULL;
31660 : } else {
31661 0 : object->in.pszZone = NULL;
31662 : {
31663 0 : const char *test_str;
31664 0 : const char *talloc_str;
31665 0 : PyObject *unicode = NULL;
31666 0 : if (PyUnicode_Check(value)) {
31667 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
31668 0 : if (unicode == NULL) {
31669 0 : return -1;
31670 : }
31671 0 : test_str = PyBytes_AS_STRING(unicode);
31672 0 : } else if (PyBytes_Check(value)) {
31673 0 : test_str = PyBytes_AS_STRING(value);
31674 : } else {
31675 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
31676 0 : return -1;
31677 : }
31678 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
31679 0 : if (unicode != NULL) {
31680 0 : Py_DECREF(unicode);
31681 : }
31682 0 : if (talloc_str == NULL) {
31683 0 : PyErr_NoMemory();
31684 0 : return -1;
31685 : }
31686 0 : object->in.pszZone = talloc_str;
31687 : }
31688 : }
31689 0 : return 0;
31690 : }
31691 :
31692 0 : static PyObject *py_DnssrvOperation2_in_get_dwContext(PyObject *obj, void *closure)
31693 : {
31694 0 : struct DnssrvOperation2 *object = pytalloc_get_ptr(obj);
31695 0 : PyObject *py_dwContext;
31696 0 : py_dwContext = PyLong_FromUnsignedLongLong((uint32_t)(object->in.dwContext));
31697 0 : return py_dwContext;
31698 : }
31699 :
31700 0 : static int py_DnssrvOperation2_in_set_dwContext(PyObject *py_obj, PyObject *value, void *closure)
31701 : {
31702 0 : struct DnssrvOperation2 *object = pytalloc_get_ptr(py_obj);
31703 0 : if (value == NULL) {
31704 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dwContext");
31705 0 : return -1;
31706 : }
31707 : {
31708 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwContext));
31709 0 : if (PyLong_Check(value)) {
31710 0 : unsigned long long test_var;
31711 0 : test_var = PyLong_AsUnsignedLongLong(value);
31712 0 : if (PyErr_Occurred() != NULL) {
31713 0 : return -1;
31714 : }
31715 0 : if (test_var > uint_max) {
31716 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31717 : PyLong_Type.tp_name, uint_max, test_var);
31718 0 : return -1;
31719 : }
31720 0 : object->in.dwContext = test_var;
31721 : } else {
31722 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
31723 : PyLong_Type.tp_name);
31724 0 : return -1;
31725 : }
31726 : }
31727 0 : return 0;
31728 : }
31729 :
31730 0 : static PyObject *py_DnssrvOperation2_in_get_pszOperation(PyObject *obj, void *closure)
31731 : {
31732 0 : struct DnssrvOperation2 *object = pytalloc_get_ptr(obj);
31733 0 : PyObject *py_pszOperation;
31734 0 : if (object->in.pszOperation == NULL) {
31735 0 : Py_RETURN_NONE;
31736 : }
31737 0 : if (object->in.pszOperation == NULL) {
31738 0 : py_pszOperation = Py_None;
31739 0 : Py_INCREF(py_pszOperation);
31740 : } else {
31741 0 : if (object->in.pszOperation == NULL) {
31742 0 : py_pszOperation = Py_None;
31743 0 : Py_INCREF(py_pszOperation);
31744 : } else {
31745 0 : py_pszOperation = PyUnicode_Decode(object->in.pszOperation, strlen(object->in.pszOperation), "utf-8", "ignore");
31746 : }
31747 : }
31748 0 : return py_pszOperation;
31749 : }
31750 :
31751 0 : static int py_DnssrvOperation2_in_set_pszOperation(PyObject *py_obj, PyObject *value, void *closure)
31752 : {
31753 0 : struct DnssrvOperation2 *object = pytalloc_get_ptr(py_obj);
31754 0 : if (value == NULL) {
31755 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszOperation");
31756 0 : return -1;
31757 : }
31758 0 : if (value == Py_None) {
31759 0 : object->in.pszOperation = NULL;
31760 : } else {
31761 0 : object->in.pszOperation = NULL;
31762 : {
31763 0 : const char *test_str;
31764 0 : const char *talloc_str;
31765 0 : PyObject *unicode = NULL;
31766 0 : if (PyUnicode_Check(value)) {
31767 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
31768 0 : if (unicode == NULL) {
31769 0 : return -1;
31770 : }
31771 0 : test_str = PyBytes_AS_STRING(unicode);
31772 0 : } else if (PyBytes_Check(value)) {
31773 0 : test_str = PyBytes_AS_STRING(value);
31774 : } else {
31775 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
31776 0 : return -1;
31777 : }
31778 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
31779 0 : if (unicode != NULL) {
31780 0 : Py_DECREF(unicode);
31781 : }
31782 0 : if (talloc_str == NULL) {
31783 0 : PyErr_NoMemory();
31784 0 : return -1;
31785 : }
31786 0 : object->in.pszOperation = talloc_str;
31787 : }
31788 : }
31789 0 : return 0;
31790 : }
31791 :
31792 0 : static PyObject *py_DnssrvOperation2_in_get_dwTypeId(PyObject *obj, void *closure)
31793 : {
31794 0 : struct DnssrvOperation2 *object = pytalloc_get_ptr(obj);
31795 0 : PyObject *py_dwTypeId;
31796 0 : py_dwTypeId = PyLong_FromUnsignedLongLong((uint32_t)(object->in.dwTypeId));
31797 0 : return py_dwTypeId;
31798 : }
31799 :
31800 0 : static int py_DnssrvOperation2_in_set_dwTypeId(PyObject *py_obj, PyObject *value, void *closure)
31801 : {
31802 0 : struct DnssrvOperation2 *object = pytalloc_get_ptr(py_obj);
31803 0 : if (value == NULL) {
31804 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dwTypeId");
31805 0 : return -1;
31806 : }
31807 : {
31808 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwTypeId));
31809 0 : if (PyLong_Check(value)) {
31810 0 : unsigned long long test_var;
31811 0 : test_var = PyLong_AsUnsignedLongLong(value);
31812 0 : if (PyErr_Occurred() != NULL) {
31813 0 : return -1;
31814 : }
31815 0 : if (test_var > uint_max) {
31816 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31817 : PyLong_Type.tp_name, uint_max, test_var);
31818 0 : return -1;
31819 : }
31820 0 : object->in.dwTypeId = test_var;
31821 : } else {
31822 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
31823 : PyLong_Type.tp_name);
31824 0 : return -1;
31825 : }
31826 : }
31827 0 : return 0;
31828 : }
31829 :
31830 0 : static PyObject *py_DnssrvOperation2_in_get_pData(PyObject *obj, void *closure)
31831 : {
31832 0 : struct DnssrvOperation2 *object = pytalloc_get_ptr(obj);
31833 0 : PyObject *py_pData;
31834 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");
31835 0 : if (py_pData == NULL) {
31836 0 : return NULL;
31837 : }
31838 0 : return py_pData;
31839 : }
31840 :
31841 0 : static int py_DnssrvOperation2_in_set_pData(PyObject *py_obj, PyObject *value, void *closure)
31842 : {
31843 0 : struct DnssrvOperation2 *object = pytalloc_get_ptr(py_obj);
31844 0 : if (value == NULL) {
31845 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pData");
31846 0 : return -1;
31847 : }
31848 : {
31849 0 : union DNSSRV_RPC_UNION *pData_switch_0;
31850 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");
31851 0 : if (pData_switch_0 == NULL) {
31852 0 : return -1;
31853 : }
31854 0 : object->in.pData = *pData_switch_0;
31855 : }
31856 0 : return 0;
31857 : }
31858 :
31859 0 : static PyObject *py_DnssrvOperation2_get_result(PyObject *obj, void *closure)
31860 : {
31861 0 : struct DnssrvOperation2 *object = pytalloc_get_ptr(obj);
31862 0 : PyObject *py_result;
31863 0 : py_result = PyErr_FromWERROR(object->out.result);
31864 0 : return py_result;
31865 : }
31866 :
31867 0 : static int py_DnssrvOperation2_set_result(PyObject *py_obj, PyObject *value, void *closure)
31868 : {
31869 0 : struct DnssrvOperation2 *object = pytalloc_get_ptr(py_obj);
31870 0 : if (value == NULL) {
31871 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
31872 0 : return -1;
31873 : }
31874 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
31875 0 : return 0;
31876 : }
31877 :
31878 : static PyGetSetDef py_DnssrvOperation2_getsetters[] = {
31879 : {
31880 : .name = discard_const_p(char, "in_dwClientVersion"),
31881 : .get = py_DnssrvOperation2_in_get_dwClientVersion,
31882 : .set = py_DnssrvOperation2_in_set_dwClientVersion,
31883 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_CLIENT_VERSION")
31884 : },
31885 : {
31886 : .name = discard_const_p(char, "in_dwSettingFlags"),
31887 : .get = py_DnssrvOperation2_in_get_dwSettingFlags,
31888 : .set = py_DnssrvOperation2_in_set_dwSettingFlags,
31889 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
31890 : },
31891 : {
31892 : .name = discard_const_p(char, "in_pwszServerName"),
31893 : .get = py_DnssrvOperation2_in_get_pwszServerName,
31894 : .set = py_DnssrvOperation2_in_set_pwszServerName,
31895 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
31896 : },
31897 : {
31898 : .name = discard_const_p(char, "in_pszZone"),
31899 : .get = py_DnssrvOperation2_in_get_pszZone,
31900 : .set = py_DnssrvOperation2_in_set_pszZone,
31901 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
31902 : },
31903 : {
31904 : .name = discard_const_p(char, "in_dwContext"),
31905 : .get = py_DnssrvOperation2_in_get_dwContext,
31906 : .set = py_DnssrvOperation2_in_set_dwContext,
31907 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
31908 : },
31909 : {
31910 : .name = discard_const_p(char, "in_pszOperation"),
31911 : .get = py_DnssrvOperation2_in_get_pszOperation,
31912 : .set = py_DnssrvOperation2_in_set_pszOperation,
31913 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
31914 : },
31915 : {
31916 : .name = discard_const_p(char, "in_dwTypeId"),
31917 : .get = py_DnssrvOperation2_in_get_dwTypeId,
31918 : .set = py_DnssrvOperation2_in_set_dwTypeId,
31919 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_TYPEID")
31920 : },
31921 : {
31922 : .name = discard_const_p(char, "in_pData"),
31923 : .get = py_DnssrvOperation2_in_get_pData,
31924 : .set = py_DnssrvOperation2_in_set_pData,
31925 : .doc = discard_const_p(char, "PIDL-generated element of base type DNSSRV_RPC_UNION")
31926 : },
31927 : {
31928 : .name = discard_const_p(char, "result"),
31929 : .get = py_DnssrvOperation2_get_result,
31930 : .set = py_DnssrvOperation2_set_result,
31931 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
31932 : },
31933 : { .name = NULL }
31934 : };
31935 :
31936 0 : static PyObject *py_DnssrvOperation2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
31937 : {
31938 0 : PyObject *self = pytalloc_new(struct DnssrvOperation2, type);
31939 0 : return self;
31940 : }
31941 :
31942 0 : static PyObject *py_DnssrvOperation2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
31943 : {
31944 :
31945 :
31946 0 : return PyLong_FromLong(5);
31947 : }
31948 :
31949 0 : static PyObject *py_DnssrvOperation2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
31950 : {
31951 0 : const struct ndr_interface_call *call = NULL;
31952 0 : struct DnssrvOperation2 *object = pytalloc_get_ptr(py_obj);
31953 0 : PyObject *ret = NULL;
31954 0 : struct ndr_push *push = NULL;
31955 0 : DATA_BLOB blob;
31956 0 : enum ndr_err_code err;
31957 :
31958 0 : if (ndr_table_dnsserver.num_calls < 6) {
31959 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvOperation2_ndr_pack");
31960 0 : return NULL;
31961 : }
31962 0 : call = &ndr_table_dnsserver.calls[5];
31963 :
31964 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
31965 0 : if (push == NULL) {
31966 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
31967 0 : return NULL;
31968 : }
31969 :
31970 0 : push->flags |= ndr_push_flags;
31971 :
31972 0 : err = call->ndr_push(push, ndr_inout_flags, object);
31973 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
31974 0 : TALLOC_FREE(push);
31975 0 : PyErr_SetNdrError(err);
31976 0 : return NULL;
31977 : }
31978 0 : blob = ndr_push_blob(push);
31979 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
31980 0 : TALLOC_FREE(push);
31981 0 : return ret;
31982 : }
31983 :
31984 0 : static PyObject *py_DnssrvOperation2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
31985 : {
31986 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
31987 0 : PyObject *bigendian_obj = NULL;
31988 0 : PyObject *ndr64_obj = NULL;
31989 0 : libndr_flags ndr_push_flags = 0;
31990 :
31991 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
31992 : discard_const_p(char *, kwnames),
31993 : &bigendian_obj,
31994 : &ndr64_obj)) {
31995 0 : return NULL;
31996 : }
31997 :
31998 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
31999 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
32000 : }
32001 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
32002 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
32003 : }
32004 :
32005 0 : return py_DnssrvOperation2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
32006 : }
32007 :
32008 0 : static PyObject *py_DnssrvOperation2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
32009 : {
32010 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
32011 0 : PyObject *bigendian_obj = NULL;
32012 0 : PyObject *ndr64_obj = NULL;
32013 0 : libndr_flags ndr_push_flags = 0;
32014 :
32015 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
32016 : discard_const_p(char *, kwnames),
32017 : &bigendian_obj,
32018 : &ndr64_obj)) {
32019 0 : return NULL;
32020 : }
32021 :
32022 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
32023 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
32024 : }
32025 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
32026 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
32027 : }
32028 :
32029 0 : return py_DnssrvOperation2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
32030 : }
32031 :
32032 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)
32033 : {
32034 0 : const struct ndr_interface_call *call = NULL;
32035 0 : struct DnssrvOperation2 *object = pytalloc_get_ptr(py_obj);
32036 0 : struct ndr_pull *pull = NULL;
32037 0 : enum ndr_err_code err;
32038 :
32039 0 : if (ndr_table_dnsserver.num_calls < 6) {
32040 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvOperation2_ndr_unpack");
32041 0 : return NULL;
32042 : }
32043 0 : call = &ndr_table_dnsserver.calls[5];
32044 :
32045 0 : pull = ndr_pull_init_blob(blob, object);
32046 0 : if (pull == NULL) {
32047 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
32048 0 : return NULL;
32049 : }
32050 :
32051 0 : pull->flags |= ndr_pull_flags;
32052 :
32053 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
32054 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
32055 0 : TALLOC_FREE(pull);
32056 0 : PyErr_SetNdrError(err);
32057 0 : return NULL;
32058 : }
32059 0 : if (!allow_remaining) {
32060 0 : uint32_t highest_ofs;
32061 :
32062 0 : if (pull->offset > pull->relative_highest_offset) {
32063 0 : highest_ofs = pull->offset;
32064 : } else {
32065 0 : highest_ofs = pull->relative_highest_offset;
32066 : }
32067 0 : if (highest_ofs < pull->data_size) {
32068 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
32069 : "not all bytes consumed ofs[%u] size[%u]",
32070 : highest_ofs, pull->data_size);
32071 0 : TALLOC_FREE(pull);
32072 0 : PyErr_SetNdrError(err);
32073 0 : return NULL;
32074 : }
32075 : }
32076 :
32077 0 : TALLOC_FREE(pull);
32078 0 : Py_RETURN_NONE;
32079 : }
32080 :
32081 0 : static PyObject *py_DnssrvOperation2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
32082 : {
32083 0 : DATA_BLOB blob;
32084 0 : Py_ssize_t blob_length = 0;
32085 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
32086 0 : PyObject *bigendian_obj = NULL;
32087 0 : PyObject *ndr64_obj = NULL;
32088 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
32089 0 : PyObject *allow_remaining_obj = NULL;
32090 0 : bool allow_remaining = false;
32091 :
32092 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
32093 : discard_const_p(char *, kwnames),
32094 : &blob.data, &blob_length,
32095 : &bigendian_obj,
32096 : &ndr64_obj,
32097 : &allow_remaining_obj)) {
32098 0 : return NULL;
32099 : }
32100 0 : blob.length = blob_length;
32101 :
32102 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
32103 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
32104 : }
32105 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
32106 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
32107 : }
32108 :
32109 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
32110 0 : allow_remaining = true;
32111 : }
32112 :
32113 0 : return py_DnssrvOperation2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
32114 : }
32115 :
32116 0 : static PyObject *py_DnssrvOperation2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
32117 : {
32118 0 : DATA_BLOB blob;
32119 0 : Py_ssize_t blob_length = 0;
32120 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
32121 0 : PyObject *bigendian_obj = NULL;
32122 0 : PyObject *ndr64_obj = NULL;
32123 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
32124 0 : PyObject *allow_remaining_obj = NULL;
32125 0 : bool allow_remaining = false;
32126 :
32127 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
32128 : discard_const_p(char *, kwnames),
32129 : &blob.data, &blob_length,
32130 : &bigendian_obj,
32131 : &ndr64_obj,
32132 : &allow_remaining_obj)) {
32133 0 : return NULL;
32134 : }
32135 0 : blob.length = blob_length;
32136 :
32137 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
32138 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
32139 : }
32140 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
32141 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
32142 : }
32143 :
32144 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
32145 0 : allow_remaining = true;
32146 : }
32147 :
32148 0 : return py_DnssrvOperation2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
32149 : }
32150 :
32151 0 : static PyObject *py_DnssrvOperation2_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
32152 : {
32153 0 : const struct ndr_interface_call *call = NULL;
32154 0 : struct DnssrvOperation2 *object = pytalloc_get_ptr(py_obj);
32155 0 : PyObject *ret;
32156 0 : char *retstr;
32157 :
32158 0 : if (ndr_table_dnsserver.num_calls < 6) {
32159 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvOperation2_ndr_print");
32160 0 : return NULL;
32161 : }
32162 0 : call = &ndr_table_dnsserver.calls[5];
32163 :
32164 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
32165 0 : ret = PyUnicode_FromString(retstr);
32166 0 : TALLOC_FREE(retstr);
32167 :
32168 0 : return ret;
32169 : }
32170 :
32171 0 : static PyObject *py_DnssrvOperation2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
32172 : {
32173 0 : return py_DnssrvOperation2_ndr_print(py_obj, "DnssrvOperation2_in", NDR_IN);
32174 : }
32175 :
32176 0 : static PyObject *py_DnssrvOperation2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
32177 : {
32178 0 : return py_DnssrvOperation2_ndr_print(py_obj, "DnssrvOperation2_out", NDR_OUT);
32179 : }
32180 :
32181 : static PyMethodDef py_DnssrvOperation2_methods[] = {
32182 : { "opnum", (PyCFunction)py_DnssrvOperation2_ndr_opnum, METH_NOARGS|METH_CLASS,
32183 : "dnsserver.DnssrvOperation2.opnum() -> 5 (0x05) " },
32184 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvOperation2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
32185 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
32186 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvOperation2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
32187 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
32188 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvOperation2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
32189 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
32190 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvOperation2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
32191 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
32192 : { "__ndr_print_in__", (PyCFunction)py_DnssrvOperation2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
32193 : { "__ndr_print_out__", (PyCFunction)py_DnssrvOperation2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
32194 : { NULL, NULL, 0, NULL }
32195 : };
32196 :
32197 :
32198 : static PyTypeObject DnssrvOperation2_Type = {
32199 : PyVarObject_HEAD_INIT(NULL, 0)
32200 : .tp_name = "dnsserver.DnssrvOperation2",
32201 : .tp_getset = py_DnssrvOperation2_getsetters,
32202 : .tp_methods = py_DnssrvOperation2_methods,
32203 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
32204 : .tp_new = py_DnssrvOperation2_new,
32205 : };
32206 :
32207 1652 : static bool pack_py_DnssrvOperation2_args_in(PyObject *args, PyObject *kwargs, struct DnssrvOperation2 *r)
32208 : {
32209 0 : PyObject *py_dwClientVersion;
32210 0 : PyObject *py_dwSettingFlags;
32211 0 : PyObject *py_pwszServerName;
32212 0 : PyObject *py_pszZone;
32213 0 : PyObject *py_dwContext;
32214 0 : PyObject *py_pszOperation;
32215 0 : PyObject *py_dwTypeId;
32216 0 : PyObject *py_pData;
32217 1652 : const char *kwnames[] = {
32218 : "dwClientVersion", "dwSettingFlags", "pwszServerName", "pszZone", "dwContext", "pszOperation", "dwTypeId", "pData", NULL
32219 : };
32220 :
32221 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)) {
32222 0 : return false;
32223 : }
32224 :
32225 1652 : if (py_dwClientVersion == NULL) {
32226 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dwClientVersion");
32227 0 : return false;
32228 : }
32229 : {
32230 1652 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwClientVersion));
32231 1652 : if (PyLong_Check(py_dwClientVersion)) {
32232 0 : unsigned long long test_var;
32233 1652 : test_var = PyLong_AsUnsignedLongLong(py_dwClientVersion);
32234 1652 : if (PyErr_Occurred() != NULL) {
32235 0 : return false;
32236 : }
32237 1652 : if (test_var > uint_max) {
32238 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
32239 : PyLong_Type.tp_name, uint_max, test_var);
32240 0 : return false;
32241 : }
32242 1652 : r->in.dwClientVersion = test_var;
32243 : } else {
32244 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
32245 : PyLong_Type.tp_name);
32246 0 : return false;
32247 : }
32248 : }
32249 1652 : if (py_dwSettingFlags == NULL) {
32250 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dwSettingFlags");
32251 0 : return false;
32252 : }
32253 : {
32254 1652 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwSettingFlags));
32255 1652 : if (PyLong_Check(py_dwSettingFlags)) {
32256 0 : unsigned long long test_var;
32257 1652 : test_var = PyLong_AsUnsignedLongLong(py_dwSettingFlags);
32258 1652 : if (PyErr_Occurred() != NULL) {
32259 0 : return false;
32260 : }
32261 1652 : if (test_var > uint_max) {
32262 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
32263 : PyLong_Type.tp_name, uint_max, test_var);
32264 0 : return false;
32265 : }
32266 1652 : r->in.dwSettingFlags = test_var;
32267 : } else {
32268 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
32269 : PyLong_Type.tp_name);
32270 0 : return false;
32271 : }
32272 : }
32273 1652 : if (py_pwszServerName == NULL) {
32274 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pwszServerName");
32275 0 : return false;
32276 : }
32277 1652 : if (py_pwszServerName == Py_None) {
32278 0 : r->in.pwszServerName = NULL;
32279 : } else {
32280 1652 : r->in.pwszServerName = NULL;
32281 : {
32282 0 : const char *test_str;
32283 0 : const char *talloc_str;
32284 1652 : PyObject *unicode = NULL;
32285 1652 : if (PyUnicode_Check(py_pwszServerName)) {
32286 1652 : unicode = PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore");
32287 1652 : if (unicode == NULL) {
32288 0 : return false;
32289 : }
32290 1652 : test_str = PyBytes_AS_STRING(unicode);
32291 0 : } else if (PyBytes_Check(py_pwszServerName)) {
32292 0 : test_str = PyBytes_AS_STRING(py_pwszServerName);
32293 : } else {
32294 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
32295 0 : return false;
32296 : }
32297 1652 : talloc_str = talloc_strdup(r, test_str);
32298 1652 : if (unicode != NULL) {
32299 954 : Py_DECREF(unicode);
32300 : }
32301 1652 : if (talloc_str == NULL) {
32302 0 : PyErr_NoMemory();
32303 0 : return false;
32304 : }
32305 1652 : r->in.pwszServerName = talloc_str;
32306 : }
32307 : }
32308 1652 : if (py_pszZone == NULL) {
32309 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszZone");
32310 0 : return false;
32311 : }
32312 1652 : if (py_pszZone == Py_None) {
32313 429 : r->in.pszZone = NULL;
32314 : } else {
32315 1223 : r->in.pszZone = NULL;
32316 : {
32317 0 : const char *test_str;
32318 0 : const char *talloc_str;
32319 1223 : PyObject *unicode = NULL;
32320 1223 : if (PyUnicode_Check(py_pszZone)) {
32321 1223 : unicode = PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore");
32322 1223 : if (unicode == NULL) {
32323 0 : return false;
32324 : }
32325 1223 : test_str = PyBytes_AS_STRING(unicode);
32326 0 : } else if (PyBytes_Check(py_pszZone)) {
32327 0 : test_str = PyBytes_AS_STRING(py_pszZone);
32328 : } else {
32329 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
32330 0 : return false;
32331 : }
32332 1223 : talloc_str = talloc_strdup(r, test_str);
32333 1223 : if (unicode != NULL) {
32334 696 : Py_DECREF(unicode);
32335 : }
32336 1223 : if (talloc_str == NULL) {
32337 0 : PyErr_NoMemory();
32338 0 : return false;
32339 : }
32340 1223 : r->in.pszZone = talloc_str;
32341 : }
32342 : }
32343 1652 : if (py_dwContext == NULL) {
32344 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dwContext");
32345 0 : return false;
32346 : }
32347 : {
32348 1652 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwContext));
32349 1652 : if (PyLong_Check(py_dwContext)) {
32350 0 : unsigned long long test_var;
32351 1652 : test_var = PyLong_AsUnsignedLongLong(py_dwContext);
32352 1652 : if (PyErr_Occurred() != NULL) {
32353 0 : return false;
32354 : }
32355 1652 : if (test_var > uint_max) {
32356 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
32357 : PyLong_Type.tp_name, uint_max, test_var);
32358 0 : return false;
32359 : }
32360 1652 : r->in.dwContext = test_var;
32361 : } else {
32362 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
32363 : PyLong_Type.tp_name);
32364 0 : return false;
32365 : }
32366 : }
32367 1652 : if (py_pszOperation == NULL) {
32368 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszOperation");
32369 0 : return false;
32370 : }
32371 1652 : if (py_pszOperation == Py_None) {
32372 0 : r->in.pszOperation = NULL;
32373 : } else {
32374 1652 : r->in.pszOperation = NULL;
32375 : {
32376 0 : const char *test_str;
32377 0 : const char *talloc_str;
32378 1652 : PyObject *unicode = NULL;
32379 1652 : if (PyUnicode_Check(py_pszOperation)) {
32380 1652 : unicode = PyUnicode_AsEncodedString(py_pszOperation, "utf-8", "ignore");
32381 1652 : if (unicode == NULL) {
32382 0 : return false;
32383 : }
32384 1652 : test_str = PyBytes_AS_STRING(unicode);
32385 0 : } else if (PyBytes_Check(py_pszOperation)) {
32386 0 : test_str = PyBytes_AS_STRING(py_pszOperation);
32387 : } else {
32388 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszOperation)->tp_name);
32389 0 : return false;
32390 : }
32391 1652 : talloc_str = talloc_strdup(r, test_str);
32392 1652 : if (unicode != NULL) {
32393 954 : Py_DECREF(unicode);
32394 : }
32395 1652 : if (talloc_str == NULL) {
32396 0 : PyErr_NoMemory();
32397 0 : return false;
32398 : }
32399 1652 : r->in.pszOperation = talloc_str;
32400 : }
32401 : }
32402 1652 : if (py_dwTypeId == NULL) {
32403 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dwTypeId");
32404 0 : return false;
32405 : }
32406 : {
32407 1652 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwTypeId));
32408 1652 : if (PyLong_Check(py_dwTypeId)) {
32409 0 : unsigned long long test_var;
32410 1652 : test_var = PyLong_AsUnsignedLongLong(py_dwTypeId);
32411 1652 : if (PyErr_Occurred() != NULL) {
32412 0 : return false;
32413 : }
32414 1652 : if (test_var > uint_max) {
32415 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
32416 : PyLong_Type.tp_name, uint_max, test_var);
32417 0 : return false;
32418 : }
32419 1652 : r->in.dwTypeId = test_var;
32420 : } else {
32421 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
32422 : PyLong_Type.tp_name);
32423 0 : return false;
32424 : }
32425 : }
32426 1652 : if (py_pData == NULL) {
32427 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pData");
32428 0 : return false;
32429 : }
32430 : {
32431 0 : union DNSSRV_RPC_UNION *pData_switch_0;
32432 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");
32433 1652 : if (pData_switch_0 == NULL) {
32434 0 : return false;
32435 : }
32436 1652 : r->in.pData = *pData_switch_0;
32437 : }
32438 1652 : return true;
32439 : }
32440 :
32441 1652 : static PyObject *unpack_py_DnssrvOperation2_args_out(struct DnssrvOperation2 *r)
32442 : {
32443 0 : PyObject *result;
32444 1652 : result = Py_None;
32445 954 : Py_INCREF(result);
32446 1652 : if (!W_ERROR_IS_OK(r->out.result)) {
32447 53 : PyErr_SetWERROR(r->out.result);
32448 53 : return NULL;
32449 : }
32450 :
32451 1599 : return result;
32452 : }
32453 :
32454 :
32455 0 : static PyObject *py_DnssrvQuery2_in_get_dwClientVersion(PyObject *obj, void *closure)
32456 : {
32457 0 : struct DnssrvQuery2 *object = pytalloc_get_ptr(obj);
32458 0 : PyObject *py_dwClientVersion;
32459 0 : py_dwClientVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->in.dwClientVersion));
32460 0 : return py_dwClientVersion;
32461 : }
32462 :
32463 0 : static int py_DnssrvQuery2_in_set_dwClientVersion(PyObject *py_obj, PyObject *value, void *closure)
32464 : {
32465 0 : struct DnssrvQuery2 *object = pytalloc_get_ptr(py_obj);
32466 0 : if (value == NULL) {
32467 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dwClientVersion");
32468 0 : return -1;
32469 : }
32470 : {
32471 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwClientVersion));
32472 0 : if (PyLong_Check(value)) {
32473 0 : unsigned long long test_var;
32474 0 : test_var = PyLong_AsUnsignedLongLong(value);
32475 0 : if (PyErr_Occurred() != NULL) {
32476 0 : return -1;
32477 : }
32478 0 : if (test_var > uint_max) {
32479 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
32480 : PyLong_Type.tp_name, uint_max, test_var);
32481 0 : return -1;
32482 : }
32483 0 : object->in.dwClientVersion = test_var;
32484 : } else {
32485 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
32486 : PyLong_Type.tp_name);
32487 0 : return -1;
32488 : }
32489 : }
32490 0 : return 0;
32491 : }
32492 :
32493 0 : static PyObject *py_DnssrvQuery2_in_get_dwSettingFlags(PyObject *obj, void *closure)
32494 : {
32495 0 : struct DnssrvQuery2 *object = pytalloc_get_ptr(obj);
32496 0 : PyObject *py_dwSettingFlags;
32497 0 : py_dwSettingFlags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.dwSettingFlags));
32498 0 : return py_dwSettingFlags;
32499 : }
32500 :
32501 0 : static int py_DnssrvQuery2_in_set_dwSettingFlags(PyObject *py_obj, PyObject *value, void *closure)
32502 : {
32503 0 : struct DnssrvQuery2 *object = pytalloc_get_ptr(py_obj);
32504 0 : if (value == NULL) {
32505 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dwSettingFlags");
32506 0 : return -1;
32507 : }
32508 : {
32509 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwSettingFlags));
32510 0 : if (PyLong_Check(value)) {
32511 0 : unsigned long long test_var;
32512 0 : test_var = PyLong_AsUnsignedLongLong(value);
32513 0 : if (PyErr_Occurred() != NULL) {
32514 0 : return -1;
32515 : }
32516 0 : if (test_var > uint_max) {
32517 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
32518 : PyLong_Type.tp_name, uint_max, test_var);
32519 0 : return -1;
32520 : }
32521 0 : object->in.dwSettingFlags = test_var;
32522 : } else {
32523 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
32524 : PyLong_Type.tp_name);
32525 0 : return -1;
32526 : }
32527 : }
32528 0 : return 0;
32529 : }
32530 :
32531 0 : static PyObject *py_DnssrvQuery2_in_get_pwszServerName(PyObject *obj, void *closure)
32532 : {
32533 0 : struct DnssrvQuery2 *object = pytalloc_get_ptr(obj);
32534 0 : PyObject *py_pwszServerName;
32535 0 : if (object->in.pwszServerName == NULL) {
32536 0 : Py_RETURN_NONE;
32537 : }
32538 0 : if (object->in.pwszServerName == NULL) {
32539 0 : py_pwszServerName = Py_None;
32540 0 : Py_INCREF(py_pwszServerName);
32541 : } else {
32542 0 : if (object->in.pwszServerName == NULL) {
32543 0 : py_pwszServerName = Py_None;
32544 0 : Py_INCREF(py_pwszServerName);
32545 : } else {
32546 0 : py_pwszServerName = PyUnicode_Decode(object->in.pwszServerName, strlen(object->in.pwszServerName), "utf-8", "ignore");
32547 : }
32548 : }
32549 0 : return py_pwszServerName;
32550 : }
32551 :
32552 0 : static int py_DnssrvQuery2_in_set_pwszServerName(PyObject *py_obj, PyObject *value, void *closure)
32553 : {
32554 0 : struct DnssrvQuery2 *object = pytalloc_get_ptr(py_obj);
32555 0 : if (value == NULL) {
32556 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pwszServerName");
32557 0 : return -1;
32558 : }
32559 0 : if (value == Py_None) {
32560 0 : object->in.pwszServerName = NULL;
32561 : } else {
32562 0 : object->in.pwszServerName = NULL;
32563 : {
32564 0 : const char *test_str;
32565 0 : const char *talloc_str;
32566 0 : PyObject *unicode = NULL;
32567 0 : if (PyUnicode_Check(value)) {
32568 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
32569 0 : if (unicode == NULL) {
32570 0 : return -1;
32571 : }
32572 0 : test_str = PyBytes_AS_STRING(unicode);
32573 0 : } else if (PyBytes_Check(value)) {
32574 0 : test_str = PyBytes_AS_STRING(value);
32575 : } else {
32576 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
32577 0 : return -1;
32578 : }
32579 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
32580 0 : if (unicode != NULL) {
32581 0 : Py_DECREF(unicode);
32582 : }
32583 0 : if (talloc_str == NULL) {
32584 0 : PyErr_NoMemory();
32585 0 : return -1;
32586 : }
32587 0 : object->in.pwszServerName = talloc_str;
32588 : }
32589 : }
32590 0 : return 0;
32591 : }
32592 :
32593 0 : static PyObject *py_DnssrvQuery2_in_get_pszZone(PyObject *obj, void *closure)
32594 : {
32595 0 : struct DnssrvQuery2 *object = pytalloc_get_ptr(obj);
32596 0 : PyObject *py_pszZone;
32597 0 : if (object->in.pszZone == NULL) {
32598 0 : Py_RETURN_NONE;
32599 : }
32600 0 : if (object->in.pszZone == NULL) {
32601 0 : py_pszZone = Py_None;
32602 0 : Py_INCREF(py_pszZone);
32603 : } else {
32604 0 : if (object->in.pszZone == NULL) {
32605 0 : py_pszZone = Py_None;
32606 0 : Py_INCREF(py_pszZone);
32607 : } else {
32608 0 : py_pszZone = PyUnicode_Decode(object->in.pszZone, strlen(object->in.pszZone), "utf-8", "ignore");
32609 : }
32610 : }
32611 0 : return py_pszZone;
32612 : }
32613 :
32614 0 : static int py_DnssrvQuery2_in_set_pszZone(PyObject *py_obj, PyObject *value, void *closure)
32615 : {
32616 0 : struct DnssrvQuery2 *object = pytalloc_get_ptr(py_obj);
32617 0 : if (value == NULL) {
32618 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszZone");
32619 0 : return -1;
32620 : }
32621 0 : if (value == Py_None) {
32622 0 : object->in.pszZone = NULL;
32623 : } else {
32624 0 : object->in.pszZone = NULL;
32625 : {
32626 0 : const char *test_str;
32627 0 : const char *talloc_str;
32628 0 : PyObject *unicode = NULL;
32629 0 : if (PyUnicode_Check(value)) {
32630 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
32631 0 : if (unicode == NULL) {
32632 0 : return -1;
32633 : }
32634 0 : test_str = PyBytes_AS_STRING(unicode);
32635 0 : } else if (PyBytes_Check(value)) {
32636 0 : test_str = PyBytes_AS_STRING(value);
32637 : } else {
32638 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
32639 0 : return -1;
32640 : }
32641 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
32642 0 : if (unicode != NULL) {
32643 0 : Py_DECREF(unicode);
32644 : }
32645 0 : if (talloc_str == NULL) {
32646 0 : PyErr_NoMemory();
32647 0 : return -1;
32648 : }
32649 0 : object->in.pszZone = talloc_str;
32650 : }
32651 : }
32652 0 : return 0;
32653 : }
32654 :
32655 0 : static PyObject *py_DnssrvQuery2_in_get_pszOperation(PyObject *obj, void *closure)
32656 : {
32657 0 : struct DnssrvQuery2 *object = pytalloc_get_ptr(obj);
32658 0 : PyObject *py_pszOperation;
32659 0 : if (object->in.pszOperation == NULL) {
32660 0 : Py_RETURN_NONE;
32661 : }
32662 0 : if (object->in.pszOperation == NULL) {
32663 0 : py_pszOperation = Py_None;
32664 0 : Py_INCREF(py_pszOperation);
32665 : } else {
32666 0 : if (object->in.pszOperation == NULL) {
32667 0 : py_pszOperation = Py_None;
32668 0 : Py_INCREF(py_pszOperation);
32669 : } else {
32670 0 : py_pszOperation = PyUnicode_Decode(object->in.pszOperation, strlen(object->in.pszOperation), "utf-8", "ignore");
32671 : }
32672 : }
32673 0 : return py_pszOperation;
32674 : }
32675 :
32676 0 : static int py_DnssrvQuery2_in_set_pszOperation(PyObject *py_obj, PyObject *value, void *closure)
32677 : {
32678 0 : struct DnssrvQuery2 *object = pytalloc_get_ptr(py_obj);
32679 0 : if (value == NULL) {
32680 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszOperation");
32681 0 : return -1;
32682 : }
32683 0 : if (value == Py_None) {
32684 0 : object->in.pszOperation = NULL;
32685 : } else {
32686 0 : object->in.pszOperation = NULL;
32687 : {
32688 0 : const char *test_str;
32689 0 : const char *talloc_str;
32690 0 : PyObject *unicode = NULL;
32691 0 : if (PyUnicode_Check(value)) {
32692 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
32693 0 : if (unicode == NULL) {
32694 0 : return -1;
32695 : }
32696 0 : test_str = PyBytes_AS_STRING(unicode);
32697 0 : } else if (PyBytes_Check(value)) {
32698 0 : test_str = PyBytes_AS_STRING(value);
32699 : } else {
32700 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
32701 0 : return -1;
32702 : }
32703 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
32704 0 : if (unicode != NULL) {
32705 0 : Py_DECREF(unicode);
32706 : }
32707 0 : if (talloc_str == NULL) {
32708 0 : PyErr_NoMemory();
32709 0 : return -1;
32710 : }
32711 0 : object->in.pszOperation = talloc_str;
32712 : }
32713 : }
32714 0 : return 0;
32715 : }
32716 :
32717 0 : static PyObject *py_DnssrvQuery2_out_get_pdwTypeId(PyObject *obj, void *closure)
32718 : {
32719 0 : struct DnssrvQuery2 *object = pytalloc_get_ptr(obj);
32720 0 : PyObject *py_pdwTypeId;
32721 0 : if (object->out.pdwTypeId == NULL) {
32722 0 : Py_RETURN_NONE;
32723 : }
32724 0 : py_pdwTypeId = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.pdwTypeId));
32725 0 : return py_pdwTypeId;
32726 : }
32727 :
32728 0 : static int py_DnssrvQuery2_out_set_pdwTypeId(PyObject *py_obj, PyObject *value, void *closure)
32729 : {
32730 0 : struct DnssrvQuery2 *object = pytalloc_get_ptr(py_obj);
32731 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.pdwTypeId));
32732 0 : if (value == NULL) {
32733 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.pdwTypeId");
32734 0 : return -1;
32735 : }
32736 0 : object->out.pdwTypeId = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.pdwTypeId);
32737 0 : if (object->out.pdwTypeId == NULL) {
32738 0 : PyErr_NoMemory();
32739 0 : return -1;
32740 : }
32741 : {
32742 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.pdwTypeId));
32743 0 : if (PyLong_Check(value)) {
32744 0 : unsigned long long test_var;
32745 0 : test_var = PyLong_AsUnsignedLongLong(value);
32746 0 : if (PyErr_Occurred() != NULL) {
32747 0 : return -1;
32748 : }
32749 0 : if (test_var > uint_max) {
32750 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
32751 : PyLong_Type.tp_name, uint_max, test_var);
32752 0 : return -1;
32753 : }
32754 0 : *object->out.pdwTypeId = test_var;
32755 : } else {
32756 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
32757 : PyLong_Type.tp_name);
32758 0 : return -1;
32759 : }
32760 : }
32761 0 : return 0;
32762 : }
32763 :
32764 0 : static PyObject *py_DnssrvQuery2_out_get_ppData(PyObject *obj, void *closure)
32765 : {
32766 0 : struct DnssrvQuery2 *object = pytalloc_get_ptr(obj);
32767 0 : PyObject *py_ppData;
32768 0 : if (object->out.ppData == NULL) {
32769 0 : Py_RETURN_NONE;
32770 : }
32771 0 : py_ppData = pyrpc_import_union(&DNSSRV_RPC_UNION_Type, object->out.ppData, *object->out.pdwTypeId, object->out.ppData, "union DNSSRV_RPC_UNION");
32772 0 : if (py_ppData == NULL) {
32773 0 : return NULL;
32774 : }
32775 0 : return py_ppData;
32776 : }
32777 :
32778 0 : static int py_DnssrvQuery2_out_set_ppData(PyObject *py_obj, PyObject *value, void *closure)
32779 : {
32780 0 : struct DnssrvQuery2 *object = pytalloc_get_ptr(py_obj);
32781 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ppData));
32782 0 : if (value == NULL) {
32783 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.ppData");
32784 0 : return -1;
32785 : }
32786 0 : object->out.ppData = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ppData);
32787 0 : if (object->out.ppData == NULL) {
32788 0 : PyErr_NoMemory();
32789 0 : return -1;
32790 : }
32791 : {
32792 0 : union DNSSRV_RPC_UNION *ppData_switch_1;
32793 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");
32794 0 : if (ppData_switch_1 == NULL) {
32795 0 : return -1;
32796 : }
32797 0 : object->out.ppData = ppData_switch_1;
32798 : }
32799 0 : return 0;
32800 : }
32801 :
32802 0 : static PyObject *py_DnssrvQuery2_get_result(PyObject *obj, void *closure)
32803 : {
32804 0 : struct DnssrvQuery2 *object = pytalloc_get_ptr(obj);
32805 0 : PyObject *py_result;
32806 0 : py_result = PyErr_FromWERROR(object->out.result);
32807 0 : return py_result;
32808 : }
32809 :
32810 0 : static int py_DnssrvQuery2_set_result(PyObject *py_obj, PyObject *value, void *closure)
32811 : {
32812 0 : struct DnssrvQuery2 *object = pytalloc_get_ptr(py_obj);
32813 0 : if (value == NULL) {
32814 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
32815 0 : return -1;
32816 : }
32817 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
32818 0 : return 0;
32819 : }
32820 :
32821 : static PyGetSetDef py_DnssrvQuery2_getsetters[] = {
32822 : {
32823 : .name = discard_const_p(char, "in_dwClientVersion"),
32824 : .get = py_DnssrvQuery2_in_get_dwClientVersion,
32825 : .set = py_DnssrvQuery2_in_set_dwClientVersion,
32826 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_CLIENT_VERSION")
32827 : },
32828 : {
32829 : .name = discard_const_p(char, "in_dwSettingFlags"),
32830 : .get = py_DnssrvQuery2_in_get_dwSettingFlags,
32831 : .set = py_DnssrvQuery2_in_set_dwSettingFlags,
32832 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
32833 : },
32834 : {
32835 : .name = discard_const_p(char, "in_pwszServerName"),
32836 : .get = py_DnssrvQuery2_in_get_pwszServerName,
32837 : .set = py_DnssrvQuery2_in_set_pwszServerName,
32838 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
32839 : },
32840 : {
32841 : .name = discard_const_p(char, "in_pszZone"),
32842 : .get = py_DnssrvQuery2_in_get_pszZone,
32843 : .set = py_DnssrvQuery2_in_set_pszZone,
32844 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
32845 : },
32846 : {
32847 : .name = discard_const_p(char, "in_pszOperation"),
32848 : .get = py_DnssrvQuery2_in_get_pszOperation,
32849 : .set = py_DnssrvQuery2_in_set_pszOperation,
32850 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
32851 : },
32852 : {
32853 : .name = discard_const_p(char, "out_pdwTypeId"),
32854 : .get = py_DnssrvQuery2_out_get_pdwTypeId,
32855 : .set = py_DnssrvQuery2_out_set_pdwTypeId,
32856 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_TYPEID")
32857 : },
32858 : {
32859 : .name = discard_const_p(char, "out_ppData"),
32860 : .get = py_DnssrvQuery2_out_get_ppData,
32861 : .set = py_DnssrvQuery2_out_set_ppData,
32862 : .doc = discard_const_p(char, "PIDL-generated element of base type DNSSRV_RPC_UNION")
32863 : },
32864 : {
32865 : .name = discard_const_p(char, "result"),
32866 : .get = py_DnssrvQuery2_get_result,
32867 : .set = py_DnssrvQuery2_set_result,
32868 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
32869 : },
32870 : { .name = NULL }
32871 : };
32872 :
32873 0 : static PyObject *py_DnssrvQuery2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
32874 : {
32875 0 : PyObject *self = pytalloc_new(struct DnssrvQuery2, type);
32876 0 : struct DnssrvQuery2 *_self = (struct DnssrvQuery2 *)pytalloc_get_ptr(self);
32877 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
32878 0 : _self->out.pdwTypeId = talloc_zero(mem_ctx, enum DNS_RPC_TYPEID);
32879 0 : _self->out.ppData = talloc_zero(mem_ctx, union DNSSRV_RPC_UNION);
32880 0 : return self;
32881 : }
32882 :
32883 0 : static PyObject *py_DnssrvQuery2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
32884 : {
32885 :
32886 :
32887 0 : return PyLong_FromLong(6);
32888 : }
32889 :
32890 0 : static PyObject *py_DnssrvQuery2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
32891 : {
32892 0 : const struct ndr_interface_call *call = NULL;
32893 0 : struct DnssrvQuery2 *object = pytalloc_get_ptr(py_obj);
32894 0 : PyObject *ret = NULL;
32895 0 : struct ndr_push *push = NULL;
32896 0 : DATA_BLOB blob;
32897 0 : enum ndr_err_code err;
32898 :
32899 0 : if (ndr_table_dnsserver.num_calls < 7) {
32900 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvQuery2_ndr_pack");
32901 0 : return NULL;
32902 : }
32903 0 : call = &ndr_table_dnsserver.calls[6];
32904 :
32905 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
32906 0 : if (push == NULL) {
32907 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
32908 0 : return NULL;
32909 : }
32910 :
32911 0 : push->flags |= ndr_push_flags;
32912 :
32913 0 : err = call->ndr_push(push, ndr_inout_flags, object);
32914 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
32915 0 : TALLOC_FREE(push);
32916 0 : PyErr_SetNdrError(err);
32917 0 : return NULL;
32918 : }
32919 0 : blob = ndr_push_blob(push);
32920 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
32921 0 : TALLOC_FREE(push);
32922 0 : return ret;
32923 : }
32924 :
32925 0 : static PyObject *py_DnssrvQuery2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
32926 : {
32927 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
32928 0 : PyObject *bigendian_obj = NULL;
32929 0 : PyObject *ndr64_obj = NULL;
32930 0 : libndr_flags ndr_push_flags = 0;
32931 :
32932 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
32933 : discard_const_p(char *, kwnames),
32934 : &bigendian_obj,
32935 : &ndr64_obj)) {
32936 0 : return NULL;
32937 : }
32938 :
32939 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
32940 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
32941 : }
32942 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
32943 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
32944 : }
32945 :
32946 0 : return py_DnssrvQuery2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
32947 : }
32948 :
32949 0 : static PyObject *py_DnssrvQuery2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
32950 : {
32951 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
32952 0 : PyObject *bigendian_obj = NULL;
32953 0 : PyObject *ndr64_obj = NULL;
32954 0 : libndr_flags ndr_push_flags = 0;
32955 :
32956 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
32957 : discard_const_p(char *, kwnames),
32958 : &bigendian_obj,
32959 : &ndr64_obj)) {
32960 0 : return NULL;
32961 : }
32962 :
32963 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
32964 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
32965 : }
32966 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
32967 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
32968 : }
32969 :
32970 0 : return py_DnssrvQuery2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
32971 : }
32972 :
32973 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)
32974 : {
32975 0 : const struct ndr_interface_call *call = NULL;
32976 0 : struct DnssrvQuery2 *object = pytalloc_get_ptr(py_obj);
32977 0 : struct ndr_pull *pull = NULL;
32978 0 : enum ndr_err_code err;
32979 :
32980 0 : if (ndr_table_dnsserver.num_calls < 7) {
32981 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvQuery2_ndr_unpack");
32982 0 : return NULL;
32983 : }
32984 0 : call = &ndr_table_dnsserver.calls[6];
32985 :
32986 0 : pull = ndr_pull_init_blob(blob, object);
32987 0 : if (pull == NULL) {
32988 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
32989 0 : return NULL;
32990 : }
32991 :
32992 0 : pull->flags |= ndr_pull_flags;
32993 :
32994 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
32995 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
32996 0 : TALLOC_FREE(pull);
32997 0 : PyErr_SetNdrError(err);
32998 0 : return NULL;
32999 : }
33000 0 : if (!allow_remaining) {
33001 0 : uint32_t highest_ofs;
33002 :
33003 0 : if (pull->offset > pull->relative_highest_offset) {
33004 0 : highest_ofs = pull->offset;
33005 : } else {
33006 0 : highest_ofs = pull->relative_highest_offset;
33007 : }
33008 0 : if (highest_ofs < pull->data_size) {
33009 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
33010 : "not all bytes consumed ofs[%u] size[%u]",
33011 : highest_ofs, pull->data_size);
33012 0 : TALLOC_FREE(pull);
33013 0 : PyErr_SetNdrError(err);
33014 0 : return NULL;
33015 : }
33016 : }
33017 :
33018 0 : TALLOC_FREE(pull);
33019 0 : Py_RETURN_NONE;
33020 : }
33021 :
33022 0 : static PyObject *py_DnssrvQuery2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
33023 : {
33024 0 : DATA_BLOB blob;
33025 0 : Py_ssize_t blob_length = 0;
33026 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
33027 0 : PyObject *bigendian_obj = NULL;
33028 0 : PyObject *ndr64_obj = NULL;
33029 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
33030 0 : PyObject *allow_remaining_obj = NULL;
33031 0 : bool allow_remaining = false;
33032 :
33033 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
33034 : discard_const_p(char *, kwnames),
33035 : &blob.data, &blob_length,
33036 : &bigendian_obj,
33037 : &ndr64_obj,
33038 : &allow_remaining_obj)) {
33039 0 : return NULL;
33040 : }
33041 0 : blob.length = blob_length;
33042 :
33043 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
33044 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
33045 : }
33046 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
33047 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
33048 : }
33049 :
33050 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
33051 0 : allow_remaining = true;
33052 : }
33053 :
33054 0 : return py_DnssrvQuery2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
33055 : }
33056 :
33057 0 : static PyObject *py_DnssrvQuery2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
33058 : {
33059 0 : DATA_BLOB blob;
33060 0 : Py_ssize_t blob_length = 0;
33061 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
33062 0 : PyObject *bigendian_obj = NULL;
33063 0 : PyObject *ndr64_obj = NULL;
33064 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
33065 0 : PyObject *allow_remaining_obj = NULL;
33066 0 : bool allow_remaining = false;
33067 :
33068 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
33069 : discard_const_p(char *, kwnames),
33070 : &blob.data, &blob_length,
33071 : &bigendian_obj,
33072 : &ndr64_obj,
33073 : &allow_remaining_obj)) {
33074 0 : return NULL;
33075 : }
33076 0 : blob.length = blob_length;
33077 :
33078 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
33079 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
33080 : }
33081 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
33082 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
33083 : }
33084 :
33085 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
33086 0 : allow_remaining = true;
33087 : }
33088 :
33089 0 : return py_DnssrvQuery2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
33090 : }
33091 :
33092 0 : static PyObject *py_DnssrvQuery2_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
33093 : {
33094 0 : const struct ndr_interface_call *call = NULL;
33095 0 : struct DnssrvQuery2 *object = pytalloc_get_ptr(py_obj);
33096 0 : PyObject *ret;
33097 0 : char *retstr;
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_print");
33101 0 : return NULL;
33102 : }
33103 0 : call = &ndr_table_dnsserver.calls[6];
33104 :
33105 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
33106 0 : ret = PyUnicode_FromString(retstr);
33107 0 : TALLOC_FREE(retstr);
33108 :
33109 0 : return ret;
33110 : }
33111 :
33112 0 : static PyObject *py_DnssrvQuery2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
33113 : {
33114 0 : return py_DnssrvQuery2_ndr_print(py_obj, "DnssrvQuery2_in", NDR_IN);
33115 : }
33116 :
33117 0 : static PyObject *py_DnssrvQuery2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
33118 : {
33119 0 : return py_DnssrvQuery2_ndr_print(py_obj, "DnssrvQuery2_out", NDR_OUT);
33120 : }
33121 :
33122 : static PyMethodDef py_DnssrvQuery2_methods[] = {
33123 : { "opnum", (PyCFunction)py_DnssrvQuery2_ndr_opnum, METH_NOARGS|METH_CLASS,
33124 : "dnsserver.DnssrvQuery2.opnum() -> 6 (0x06) " },
33125 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvQuery2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
33126 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
33127 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvQuery2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
33128 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
33129 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvQuery2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
33130 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
33131 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvQuery2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
33132 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
33133 : { "__ndr_print_in__", (PyCFunction)py_DnssrvQuery2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
33134 : { "__ndr_print_out__", (PyCFunction)py_DnssrvQuery2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
33135 : { NULL, NULL, 0, NULL }
33136 : };
33137 :
33138 :
33139 : static PyTypeObject DnssrvQuery2_Type = {
33140 : PyVarObject_HEAD_INIT(NULL, 0)
33141 : .tp_name = "dnsserver.DnssrvQuery2",
33142 : .tp_getset = py_DnssrvQuery2_getsetters,
33143 : .tp_methods = py_DnssrvQuery2_methods,
33144 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
33145 : .tp_new = py_DnssrvQuery2_new,
33146 : };
33147 :
33148 29 : static bool pack_py_DnssrvQuery2_args_in(PyObject *args, PyObject *kwargs, struct DnssrvQuery2 *r)
33149 : {
33150 0 : PyObject *py_dwClientVersion;
33151 0 : PyObject *py_dwSettingFlags;
33152 0 : PyObject *py_pwszServerName;
33153 0 : PyObject *py_pszZone;
33154 0 : PyObject *py_pszOperation;
33155 29 : const char *kwnames[] = {
33156 : "dwClientVersion", "dwSettingFlags", "pwszServerName", "pszZone", "pszOperation", NULL
33157 : };
33158 :
33159 29 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:DnssrvQuery2", discard_const_p(char *, kwnames), &py_dwClientVersion, &py_dwSettingFlags, &py_pwszServerName, &py_pszZone, &py_pszOperation)) {
33160 0 : return false;
33161 : }
33162 :
33163 29 : if (py_dwClientVersion == NULL) {
33164 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dwClientVersion");
33165 0 : return false;
33166 : }
33167 : {
33168 29 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwClientVersion));
33169 29 : if (PyLong_Check(py_dwClientVersion)) {
33170 0 : unsigned long long test_var;
33171 29 : test_var = PyLong_AsUnsignedLongLong(py_dwClientVersion);
33172 29 : if (PyErr_Occurred() != NULL) {
33173 0 : return false;
33174 : }
33175 29 : if (test_var > uint_max) {
33176 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
33177 : PyLong_Type.tp_name, uint_max, test_var);
33178 0 : return false;
33179 : }
33180 29 : r->in.dwClientVersion = test_var;
33181 : } else {
33182 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
33183 : PyLong_Type.tp_name);
33184 0 : return false;
33185 : }
33186 : }
33187 29 : if (py_dwSettingFlags == NULL) {
33188 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dwSettingFlags");
33189 0 : return false;
33190 : }
33191 : {
33192 29 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwSettingFlags));
33193 29 : if (PyLong_Check(py_dwSettingFlags)) {
33194 0 : unsigned long long test_var;
33195 29 : test_var = PyLong_AsUnsignedLongLong(py_dwSettingFlags);
33196 29 : if (PyErr_Occurred() != NULL) {
33197 0 : return false;
33198 : }
33199 29 : if (test_var > uint_max) {
33200 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
33201 : PyLong_Type.tp_name, uint_max, test_var);
33202 0 : return false;
33203 : }
33204 29 : r->in.dwSettingFlags = test_var;
33205 : } else {
33206 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
33207 : PyLong_Type.tp_name);
33208 0 : return false;
33209 : }
33210 : }
33211 29 : if (py_pwszServerName == NULL) {
33212 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pwszServerName");
33213 0 : return false;
33214 : }
33215 29 : if (py_pwszServerName == Py_None) {
33216 0 : r->in.pwszServerName = NULL;
33217 : } else {
33218 29 : r->in.pwszServerName = NULL;
33219 : {
33220 0 : const char *test_str;
33221 0 : const char *talloc_str;
33222 29 : PyObject *unicode = NULL;
33223 29 : if (PyUnicode_Check(py_pwszServerName)) {
33224 29 : unicode = PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore");
33225 29 : if (unicode == NULL) {
33226 0 : return false;
33227 : }
33228 29 : test_str = PyBytes_AS_STRING(unicode);
33229 0 : } else if (PyBytes_Check(py_pwszServerName)) {
33230 0 : test_str = PyBytes_AS_STRING(py_pwszServerName);
33231 : } else {
33232 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
33233 0 : return false;
33234 : }
33235 29 : talloc_str = talloc_strdup(r, test_str);
33236 29 : if (unicode != NULL) {
33237 26 : Py_DECREF(unicode);
33238 : }
33239 29 : if (talloc_str == NULL) {
33240 0 : PyErr_NoMemory();
33241 0 : return false;
33242 : }
33243 29 : r->in.pwszServerName = talloc_str;
33244 : }
33245 : }
33246 29 : if (py_pszZone == NULL) {
33247 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszZone");
33248 0 : return false;
33249 : }
33250 29 : if (py_pszZone == Py_None) {
33251 12 : r->in.pszZone = NULL;
33252 : } else {
33253 17 : r->in.pszZone = NULL;
33254 : {
33255 0 : const char *test_str;
33256 0 : const char *talloc_str;
33257 17 : PyObject *unicode = NULL;
33258 17 : if (PyUnicode_Check(py_pszZone)) {
33259 17 : unicode = PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore");
33260 17 : if (unicode == NULL) {
33261 0 : return false;
33262 : }
33263 17 : test_str = PyBytes_AS_STRING(unicode);
33264 0 : } else if (PyBytes_Check(py_pszZone)) {
33265 0 : test_str = PyBytes_AS_STRING(py_pszZone);
33266 : } else {
33267 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
33268 0 : return false;
33269 : }
33270 17 : talloc_str = talloc_strdup(r, test_str);
33271 17 : if (unicode != NULL) {
33272 17 : Py_DECREF(unicode);
33273 : }
33274 17 : if (talloc_str == NULL) {
33275 0 : PyErr_NoMemory();
33276 0 : return false;
33277 : }
33278 17 : r->in.pszZone = talloc_str;
33279 : }
33280 : }
33281 29 : if (py_pszOperation == NULL) {
33282 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszOperation");
33283 0 : return false;
33284 : }
33285 29 : if (py_pszOperation == Py_None) {
33286 0 : r->in.pszOperation = NULL;
33287 : } else {
33288 29 : r->in.pszOperation = NULL;
33289 : {
33290 0 : const char *test_str;
33291 0 : const char *talloc_str;
33292 29 : PyObject *unicode = NULL;
33293 29 : if (PyUnicode_Check(py_pszOperation)) {
33294 29 : unicode = PyUnicode_AsEncodedString(py_pszOperation, "utf-8", "ignore");
33295 29 : if (unicode == NULL) {
33296 0 : return false;
33297 : }
33298 29 : test_str = PyBytes_AS_STRING(unicode);
33299 0 : } else if (PyBytes_Check(py_pszOperation)) {
33300 0 : test_str = PyBytes_AS_STRING(py_pszOperation);
33301 : } else {
33302 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszOperation)->tp_name);
33303 0 : return false;
33304 : }
33305 29 : talloc_str = talloc_strdup(r, test_str);
33306 29 : if (unicode != NULL) {
33307 26 : Py_DECREF(unicode);
33308 : }
33309 29 : if (talloc_str == NULL) {
33310 0 : PyErr_NoMemory();
33311 0 : return false;
33312 : }
33313 29 : r->in.pszOperation = talloc_str;
33314 : }
33315 : }
33316 29 : return true;
33317 : }
33318 :
33319 29 : static PyObject *unpack_py_DnssrvQuery2_args_out(struct DnssrvQuery2 *r)
33320 : {
33321 0 : PyObject *result;
33322 0 : PyObject *py_pdwTypeId;
33323 0 : PyObject *py_ppData;
33324 29 : result = PyTuple_New(2);
33325 29 : py_pdwTypeId = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.pdwTypeId));
33326 29 : PyTuple_SetItem(result, 0, py_pdwTypeId);
33327 29 : py_ppData = pyrpc_import_union(&DNSSRV_RPC_UNION_Type, r->out.ppData, *r->out.pdwTypeId, r->out.ppData, "union DNSSRV_RPC_UNION");
33328 29 : if (py_ppData == NULL) {
33329 0 : return NULL;
33330 : }
33331 29 : PyTuple_SetItem(result, 1, py_ppData);
33332 29 : if (!W_ERROR_IS_OK(r->out.result)) {
33333 0 : PyErr_SetWERROR(r->out.result);
33334 0 : return NULL;
33335 : }
33336 :
33337 29 : return result;
33338 : }
33339 :
33340 :
33341 0 : static PyObject *py_DnssrvComplexOperation2_in_get_dwClientVersion(PyObject *obj, void *closure)
33342 : {
33343 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(obj);
33344 0 : PyObject *py_dwClientVersion;
33345 0 : py_dwClientVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->in.dwClientVersion));
33346 0 : return py_dwClientVersion;
33347 : }
33348 :
33349 0 : static int py_DnssrvComplexOperation2_in_set_dwClientVersion(PyObject *py_obj, PyObject *value, void *closure)
33350 : {
33351 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(py_obj);
33352 0 : if (value == NULL) {
33353 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dwClientVersion");
33354 0 : return -1;
33355 : }
33356 : {
33357 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwClientVersion));
33358 0 : if (PyLong_Check(value)) {
33359 0 : unsigned long long test_var;
33360 0 : test_var = PyLong_AsUnsignedLongLong(value);
33361 0 : if (PyErr_Occurred() != NULL) {
33362 0 : return -1;
33363 : }
33364 0 : if (test_var > uint_max) {
33365 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
33366 : PyLong_Type.tp_name, uint_max, test_var);
33367 0 : return -1;
33368 : }
33369 0 : object->in.dwClientVersion = test_var;
33370 : } else {
33371 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
33372 : PyLong_Type.tp_name);
33373 0 : return -1;
33374 : }
33375 : }
33376 0 : return 0;
33377 : }
33378 :
33379 0 : static PyObject *py_DnssrvComplexOperation2_in_get_dwSettingFlags(PyObject *obj, void *closure)
33380 : {
33381 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(obj);
33382 0 : PyObject *py_dwSettingFlags;
33383 0 : py_dwSettingFlags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.dwSettingFlags));
33384 0 : return py_dwSettingFlags;
33385 : }
33386 :
33387 0 : static int py_DnssrvComplexOperation2_in_set_dwSettingFlags(PyObject *py_obj, PyObject *value, void *closure)
33388 : {
33389 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(py_obj);
33390 0 : if (value == NULL) {
33391 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dwSettingFlags");
33392 0 : return -1;
33393 : }
33394 : {
33395 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwSettingFlags));
33396 0 : if (PyLong_Check(value)) {
33397 0 : unsigned long long test_var;
33398 0 : test_var = PyLong_AsUnsignedLongLong(value);
33399 0 : if (PyErr_Occurred() != NULL) {
33400 0 : return -1;
33401 : }
33402 0 : if (test_var > uint_max) {
33403 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
33404 : PyLong_Type.tp_name, uint_max, test_var);
33405 0 : return -1;
33406 : }
33407 0 : object->in.dwSettingFlags = test_var;
33408 : } else {
33409 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
33410 : PyLong_Type.tp_name);
33411 0 : return -1;
33412 : }
33413 : }
33414 0 : return 0;
33415 : }
33416 :
33417 0 : static PyObject *py_DnssrvComplexOperation2_in_get_pwszServerName(PyObject *obj, void *closure)
33418 : {
33419 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(obj);
33420 0 : PyObject *py_pwszServerName;
33421 0 : if (object->in.pwszServerName == NULL) {
33422 0 : Py_RETURN_NONE;
33423 : }
33424 0 : if (object->in.pwszServerName == NULL) {
33425 0 : py_pwszServerName = Py_None;
33426 0 : Py_INCREF(py_pwszServerName);
33427 : } else {
33428 0 : if (object->in.pwszServerName == NULL) {
33429 0 : py_pwszServerName = Py_None;
33430 0 : Py_INCREF(py_pwszServerName);
33431 : } else {
33432 0 : py_pwszServerName = PyUnicode_Decode(object->in.pwszServerName, strlen(object->in.pwszServerName), "utf-8", "ignore");
33433 : }
33434 : }
33435 0 : return py_pwszServerName;
33436 : }
33437 :
33438 0 : static int py_DnssrvComplexOperation2_in_set_pwszServerName(PyObject *py_obj, PyObject *value, void *closure)
33439 : {
33440 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(py_obj);
33441 0 : if (value == NULL) {
33442 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pwszServerName");
33443 0 : return -1;
33444 : }
33445 0 : if (value == Py_None) {
33446 0 : object->in.pwszServerName = NULL;
33447 : } else {
33448 0 : object->in.pwszServerName = NULL;
33449 : {
33450 0 : const char *test_str;
33451 0 : const char *talloc_str;
33452 0 : PyObject *unicode = NULL;
33453 0 : if (PyUnicode_Check(value)) {
33454 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
33455 0 : if (unicode == NULL) {
33456 0 : return -1;
33457 : }
33458 0 : test_str = PyBytes_AS_STRING(unicode);
33459 0 : } else if (PyBytes_Check(value)) {
33460 0 : test_str = PyBytes_AS_STRING(value);
33461 : } else {
33462 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
33463 0 : return -1;
33464 : }
33465 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
33466 0 : if (unicode != NULL) {
33467 0 : Py_DECREF(unicode);
33468 : }
33469 0 : if (talloc_str == NULL) {
33470 0 : PyErr_NoMemory();
33471 0 : return -1;
33472 : }
33473 0 : object->in.pwszServerName = talloc_str;
33474 : }
33475 : }
33476 0 : return 0;
33477 : }
33478 :
33479 0 : static PyObject *py_DnssrvComplexOperation2_in_get_pszZone(PyObject *obj, void *closure)
33480 : {
33481 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(obj);
33482 0 : PyObject *py_pszZone;
33483 0 : if (object->in.pszZone == NULL) {
33484 0 : Py_RETURN_NONE;
33485 : }
33486 0 : if (object->in.pszZone == NULL) {
33487 0 : py_pszZone = Py_None;
33488 0 : Py_INCREF(py_pszZone);
33489 : } else {
33490 0 : if (object->in.pszZone == NULL) {
33491 0 : py_pszZone = Py_None;
33492 0 : Py_INCREF(py_pszZone);
33493 : } else {
33494 0 : py_pszZone = PyUnicode_Decode(object->in.pszZone, strlen(object->in.pszZone), "utf-8", "ignore");
33495 : }
33496 : }
33497 0 : return py_pszZone;
33498 : }
33499 :
33500 0 : static int py_DnssrvComplexOperation2_in_set_pszZone(PyObject *py_obj, PyObject *value, void *closure)
33501 : {
33502 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(py_obj);
33503 0 : if (value == NULL) {
33504 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszZone");
33505 0 : return -1;
33506 : }
33507 0 : if (value == Py_None) {
33508 0 : object->in.pszZone = NULL;
33509 : } else {
33510 0 : object->in.pszZone = NULL;
33511 : {
33512 0 : const char *test_str;
33513 0 : const char *talloc_str;
33514 0 : PyObject *unicode = NULL;
33515 0 : if (PyUnicode_Check(value)) {
33516 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
33517 0 : if (unicode == NULL) {
33518 0 : return -1;
33519 : }
33520 0 : test_str = PyBytes_AS_STRING(unicode);
33521 0 : } else if (PyBytes_Check(value)) {
33522 0 : test_str = PyBytes_AS_STRING(value);
33523 : } else {
33524 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
33525 0 : return -1;
33526 : }
33527 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
33528 0 : if (unicode != NULL) {
33529 0 : Py_DECREF(unicode);
33530 : }
33531 0 : if (talloc_str == NULL) {
33532 0 : PyErr_NoMemory();
33533 0 : return -1;
33534 : }
33535 0 : object->in.pszZone = talloc_str;
33536 : }
33537 : }
33538 0 : return 0;
33539 : }
33540 :
33541 0 : static PyObject *py_DnssrvComplexOperation2_in_get_pszOperation(PyObject *obj, void *closure)
33542 : {
33543 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(obj);
33544 0 : PyObject *py_pszOperation;
33545 0 : if (object->in.pszOperation == NULL) {
33546 0 : Py_RETURN_NONE;
33547 : }
33548 0 : if (object->in.pszOperation == NULL) {
33549 0 : py_pszOperation = Py_None;
33550 0 : Py_INCREF(py_pszOperation);
33551 : } else {
33552 0 : if (object->in.pszOperation == NULL) {
33553 0 : py_pszOperation = Py_None;
33554 0 : Py_INCREF(py_pszOperation);
33555 : } else {
33556 0 : py_pszOperation = PyUnicode_Decode(object->in.pszOperation, strlen(object->in.pszOperation), "utf-8", "ignore");
33557 : }
33558 : }
33559 0 : return py_pszOperation;
33560 : }
33561 :
33562 0 : static int py_DnssrvComplexOperation2_in_set_pszOperation(PyObject *py_obj, PyObject *value, void *closure)
33563 : {
33564 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(py_obj);
33565 0 : if (value == NULL) {
33566 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszOperation");
33567 0 : return -1;
33568 : }
33569 0 : if (value == Py_None) {
33570 0 : object->in.pszOperation = NULL;
33571 : } else {
33572 0 : object->in.pszOperation = NULL;
33573 : {
33574 0 : const char *test_str;
33575 0 : const char *talloc_str;
33576 0 : PyObject *unicode = NULL;
33577 0 : if (PyUnicode_Check(value)) {
33578 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
33579 0 : if (unicode == NULL) {
33580 0 : return -1;
33581 : }
33582 0 : test_str = PyBytes_AS_STRING(unicode);
33583 0 : } else if (PyBytes_Check(value)) {
33584 0 : test_str = PyBytes_AS_STRING(value);
33585 : } else {
33586 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
33587 0 : return -1;
33588 : }
33589 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
33590 0 : if (unicode != NULL) {
33591 0 : Py_DECREF(unicode);
33592 : }
33593 0 : if (talloc_str == NULL) {
33594 0 : PyErr_NoMemory();
33595 0 : return -1;
33596 : }
33597 0 : object->in.pszOperation = talloc_str;
33598 : }
33599 : }
33600 0 : return 0;
33601 : }
33602 :
33603 0 : static PyObject *py_DnssrvComplexOperation2_in_get_dwTypeIn(PyObject *obj, void *closure)
33604 : {
33605 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(obj);
33606 0 : PyObject *py_dwTypeIn;
33607 0 : py_dwTypeIn = PyLong_FromUnsignedLongLong((uint32_t)(object->in.dwTypeIn));
33608 0 : return py_dwTypeIn;
33609 : }
33610 :
33611 0 : static int py_DnssrvComplexOperation2_in_set_dwTypeIn(PyObject *py_obj, PyObject *value, void *closure)
33612 : {
33613 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(py_obj);
33614 0 : if (value == NULL) {
33615 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dwTypeIn");
33616 0 : return -1;
33617 : }
33618 : {
33619 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwTypeIn));
33620 0 : if (PyLong_Check(value)) {
33621 0 : unsigned long long test_var;
33622 0 : test_var = PyLong_AsUnsignedLongLong(value);
33623 0 : if (PyErr_Occurred() != NULL) {
33624 0 : return -1;
33625 : }
33626 0 : if (test_var > uint_max) {
33627 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
33628 : PyLong_Type.tp_name, uint_max, test_var);
33629 0 : return -1;
33630 : }
33631 0 : object->in.dwTypeIn = test_var;
33632 : } else {
33633 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
33634 : PyLong_Type.tp_name);
33635 0 : return -1;
33636 : }
33637 : }
33638 0 : return 0;
33639 : }
33640 :
33641 0 : static PyObject *py_DnssrvComplexOperation2_in_get_pDataIn(PyObject *obj, void *closure)
33642 : {
33643 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(obj);
33644 0 : PyObject *py_pDataIn;
33645 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");
33646 0 : if (py_pDataIn == NULL) {
33647 0 : return NULL;
33648 : }
33649 0 : return py_pDataIn;
33650 : }
33651 :
33652 0 : static int py_DnssrvComplexOperation2_in_set_pDataIn(PyObject *py_obj, PyObject *value, void *closure)
33653 : {
33654 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(py_obj);
33655 0 : if (value == NULL) {
33656 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pDataIn");
33657 0 : return -1;
33658 : }
33659 : {
33660 0 : union DNSSRV_RPC_UNION *pDataIn_switch_0;
33661 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");
33662 0 : if (pDataIn_switch_0 == NULL) {
33663 0 : return -1;
33664 : }
33665 0 : object->in.pDataIn = *pDataIn_switch_0;
33666 : }
33667 0 : return 0;
33668 : }
33669 :
33670 0 : static PyObject *py_DnssrvComplexOperation2_out_get_pdwTypeOut(PyObject *obj, void *closure)
33671 : {
33672 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(obj);
33673 0 : PyObject *py_pdwTypeOut;
33674 0 : if (object->out.pdwTypeOut == NULL) {
33675 0 : Py_RETURN_NONE;
33676 : }
33677 0 : py_pdwTypeOut = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.pdwTypeOut));
33678 0 : return py_pdwTypeOut;
33679 : }
33680 :
33681 0 : static int py_DnssrvComplexOperation2_out_set_pdwTypeOut(PyObject *py_obj, PyObject *value, void *closure)
33682 : {
33683 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(py_obj);
33684 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.pdwTypeOut));
33685 0 : if (value == NULL) {
33686 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.pdwTypeOut");
33687 0 : return -1;
33688 : }
33689 0 : object->out.pdwTypeOut = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.pdwTypeOut);
33690 0 : if (object->out.pdwTypeOut == NULL) {
33691 0 : PyErr_NoMemory();
33692 0 : return -1;
33693 : }
33694 : {
33695 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.pdwTypeOut));
33696 0 : if (PyLong_Check(value)) {
33697 0 : unsigned long long test_var;
33698 0 : test_var = PyLong_AsUnsignedLongLong(value);
33699 0 : if (PyErr_Occurred() != NULL) {
33700 0 : return -1;
33701 : }
33702 0 : if (test_var > uint_max) {
33703 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
33704 : PyLong_Type.tp_name, uint_max, test_var);
33705 0 : return -1;
33706 : }
33707 0 : *object->out.pdwTypeOut = test_var;
33708 : } else {
33709 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
33710 : PyLong_Type.tp_name);
33711 0 : return -1;
33712 : }
33713 : }
33714 0 : return 0;
33715 : }
33716 :
33717 0 : static PyObject *py_DnssrvComplexOperation2_out_get_ppDataOut(PyObject *obj, void *closure)
33718 : {
33719 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(obj);
33720 0 : PyObject *py_ppDataOut;
33721 0 : if (object->out.ppDataOut == NULL) {
33722 0 : Py_RETURN_NONE;
33723 : }
33724 0 : py_ppDataOut = pyrpc_import_union(&DNSSRV_RPC_UNION_Type, object->out.ppDataOut, *object->out.pdwTypeOut, object->out.ppDataOut, "union DNSSRV_RPC_UNION");
33725 0 : if (py_ppDataOut == NULL) {
33726 0 : return NULL;
33727 : }
33728 0 : return py_ppDataOut;
33729 : }
33730 :
33731 0 : static int py_DnssrvComplexOperation2_out_set_ppDataOut(PyObject *py_obj, PyObject *value, void *closure)
33732 : {
33733 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(py_obj);
33734 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ppDataOut));
33735 0 : if (value == NULL) {
33736 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.ppDataOut");
33737 0 : return -1;
33738 : }
33739 0 : object->out.ppDataOut = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ppDataOut);
33740 0 : if (object->out.ppDataOut == NULL) {
33741 0 : PyErr_NoMemory();
33742 0 : return -1;
33743 : }
33744 : {
33745 0 : union DNSSRV_RPC_UNION *ppDataOut_switch_1;
33746 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");
33747 0 : if (ppDataOut_switch_1 == NULL) {
33748 0 : return -1;
33749 : }
33750 0 : object->out.ppDataOut = ppDataOut_switch_1;
33751 : }
33752 0 : return 0;
33753 : }
33754 :
33755 0 : static PyObject *py_DnssrvComplexOperation2_get_result(PyObject *obj, void *closure)
33756 : {
33757 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(obj);
33758 0 : PyObject *py_result;
33759 0 : py_result = PyErr_FromWERROR(object->out.result);
33760 0 : return py_result;
33761 : }
33762 :
33763 0 : static int py_DnssrvComplexOperation2_set_result(PyObject *py_obj, PyObject *value, void *closure)
33764 : {
33765 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(py_obj);
33766 0 : if (value == NULL) {
33767 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
33768 0 : return -1;
33769 : }
33770 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
33771 0 : return 0;
33772 : }
33773 :
33774 : static PyGetSetDef py_DnssrvComplexOperation2_getsetters[] = {
33775 : {
33776 : .name = discard_const_p(char, "in_dwClientVersion"),
33777 : .get = py_DnssrvComplexOperation2_in_get_dwClientVersion,
33778 : .set = py_DnssrvComplexOperation2_in_set_dwClientVersion,
33779 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_CLIENT_VERSION")
33780 : },
33781 : {
33782 : .name = discard_const_p(char, "in_dwSettingFlags"),
33783 : .get = py_DnssrvComplexOperation2_in_get_dwSettingFlags,
33784 : .set = py_DnssrvComplexOperation2_in_set_dwSettingFlags,
33785 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
33786 : },
33787 : {
33788 : .name = discard_const_p(char, "in_pwszServerName"),
33789 : .get = py_DnssrvComplexOperation2_in_get_pwszServerName,
33790 : .set = py_DnssrvComplexOperation2_in_set_pwszServerName,
33791 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
33792 : },
33793 : {
33794 : .name = discard_const_p(char, "in_pszZone"),
33795 : .get = py_DnssrvComplexOperation2_in_get_pszZone,
33796 : .set = py_DnssrvComplexOperation2_in_set_pszZone,
33797 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
33798 : },
33799 : {
33800 : .name = discard_const_p(char, "in_pszOperation"),
33801 : .get = py_DnssrvComplexOperation2_in_get_pszOperation,
33802 : .set = py_DnssrvComplexOperation2_in_set_pszOperation,
33803 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
33804 : },
33805 : {
33806 : .name = discard_const_p(char, "in_dwTypeIn"),
33807 : .get = py_DnssrvComplexOperation2_in_get_dwTypeIn,
33808 : .set = py_DnssrvComplexOperation2_in_set_dwTypeIn,
33809 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_TYPEID")
33810 : },
33811 : {
33812 : .name = discard_const_p(char, "in_pDataIn"),
33813 : .get = py_DnssrvComplexOperation2_in_get_pDataIn,
33814 : .set = py_DnssrvComplexOperation2_in_set_pDataIn,
33815 : .doc = discard_const_p(char, "PIDL-generated element of base type DNSSRV_RPC_UNION")
33816 : },
33817 : {
33818 : .name = discard_const_p(char, "out_pdwTypeOut"),
33819 : .get = py_DnssrvComplexOperation2_out_get_pdwTypeOut,
33820 : .set = py_DnssrvComplexOperation2_out_set_pdwTypeOut,
33821 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_TYPEID")
33822 : },
33823 : {
33824 : .name = discard_const_p(char, "out_ppDataOut"),
33825 : .get = py_DnssrvComplexOperation2_out_get_ppDataOut,
33826 : .set = py_DnssrvComplexOperation2_out_set_ppDataOut,
33827 : .doc = discard_const_p(char, "PIDL-generated element of base type DNSSRV_RPC_UNION")
33828 : },
33829 : {
33830 : .name = discard_const_p(char, "result"),
33831 : .get = py_DnssrvComplexOperation2_get_result,
33832 : .set = py_DnssrvComplexOperation2_set_result,
33833 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
33834 : },
33835 : { .name = NULL }
33836 : };
33837 :
33838 0 : static PyObject *py_DnssrvComplexOperation2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
33839 : {
33840 0 : PyObject *self = pytalloc_new(struct DnssrvComplexOperation2, type);
33841 0 : struct DnssrvComplexOperation2 *_self = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(self);
33842 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
33843 0 : _self->out.pdwTypeOut = talloc_zero(mem_ctx, enum DNS_RPC_TYPEID);
33844 0 : _self->out.ppDataOut = talloc_zero(mem_ctx, union DNSSRV_RPC_UNION);
33845 0 : return self;
33846 : }
33847 :
33848 0 : static PyObject *py_DnssrvComplexOperation2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
33849 : {
33850 :
33851 :
33852 0 : return PyLong_FromLong(7);
33853 : }
33854 :
33855 0 : static PyObject *py_DnssrvComplexOperation2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
33856 : {
33857 0 : const struct ndr_interface_call *call = NULL;
33858 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(py_obj);
33859 0 : PyObject *ret = NULL;
33860 0 : struct ndr_push *push = NULL;
33861 0 : DATA_BLOB blob;
33862 0 : enum ndr_err_code err;
33863 :
33864 0 : if (ndr_table_dnsserver.num_calls < 8) {
33865 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvComplexOperation2_ndr_pack");
33866 0 : return NULL;
33867 : }
33868 0 : call = &ndr_table_dnsserver.calls[7];
33869 :
33870 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
33871 0 : if (push == NULL) {
33872 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
33873 0 : return NULL;
33874 : }
33875 :
33876 0 : push->flags |= ndr_push_flags;
33877 :
33878 0 : err = call->ndr_push(push, ndr_inout_flags, object);
33879 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
33880 0 : TALLOC_FREE(push);
33881 0 : PyErr_SetNdrError(err);
33882 0 : return NULL;
33883 : }
33884 0 : blob = ndr_push_blob(push);
33885 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
33886 0 : TALLOC_FREE(push);
33887 0 : return ret;
33888 : }
33889 :
33890 0 : static PyObject *py_DnssrvComplexOperation2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
33891 : {
33892 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
33893 0 : PyObject *bigendian_obj = NULL;
33894 0 : PyObject *ndr64_obj = NULL;
33895 0 : libndr_flags ndr_push_flags = 0;
33896 :
33897 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
33898 : discard_const_p(char *, kwnames),
33899 : &bigendian_obj,
33900 : &ndr64_obj)) {
33901 0 : return NULL;
33902 : }
33903 :
33904 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
33905 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
33906 : }
33907 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
33908 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
33909 : }
33910 :
33911 0 : return py_DnssrvComplexOperation2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
33912 : }
33913 :
33914 0 : static PyObject *py_DnssrvComplexOperation2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
33915 : {
33916 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
33917 0 : PyObject *bigendian_obj = NULL;
33918 0 : PyObject *ndr64_obj = NULL;
33919 0 : libndr_flags ndr_push_flags = 0;
33920 :
33921 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
33922 : discard_const_p(char *, kwnames),
33923 : &bigendian_obj,
33924 : &ndr64_obj)) {
33925 0 : return NULL;
33926 : }
33927 :
33928 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
33929 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
33930 : }
33931 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
33932 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
33933 : }
33934 :
33935 0 : return py_DnssrvComplexOperation2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
33936 : }
33937 :
33938 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)
33939 : {
33940 0 : const struct ndr_interface_call *call = NULL;
33941 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(py_obj);
33942 0 : struct ndr_pull *pull = NULL;
33943 0 : enum ndr_err_code err;
33944 :
33945 0 : if (ndr_table_dnsserver.num_calls < 8) {
33946 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvComplexOperation2_ndr_unpack");
33947 0 : return NULL;
33948 : }
33949 0 : call = &ndr_table_dnsserver.calls[7];
33950 :
33951 0 : pull = ndr_pull_init_blob(blob, object);
33952 0 : if (pull == NULL) {
33953 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
33954 0 : return NULL;
33955 : }
33956 :
33957 0 : pull->flags |= ndr_pull_flags;
33958 :
33959 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
33960 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
33961 0 : TALLOC_FREE(pull);
33962 0 : PyErr_SetNdrError(err);
33963 0 : return NULL;
33964 : }
33965 0 : if (!allow_remaining) {
33966 0 : uint32_t highest_ofs;
33967 :
33968 0 : if (pull->offset > pull->relative_highest_offset) {
33969 0 : highest_ofs = pull->offset;
33970 : } else {
33971 0 : highest_ofs = pull->relative_highest_offset;
33972 : }
33973 0 : if (highest_ofs < pull->data_size) {
33974 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
33975 : "not all bytes consumed ofs[%u] size[%u]",
33976 : highest_ofs, pull->data_size);
33977 0 : TALLOC_FREE(pull);
33978 0 : PyErr_SetNdrError(err);
33979 0 : return NULL;
33980 : }
33981 : }
33982 :
33983 0 : TALLOC_FREE(pull);
33984 0 : Py_RETURN_NONE;
33985 : }
33986 :
33987 0 : static PyObject *py_DnssrvComplexOperation2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
33988 : {
33989 0 : DATA_BLOB blob;
33990 0 : Py_ssize_t blob_length = 0;
33991 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
33992 0 : PyObject *bigendian_obj = NULL;
33993 0 : PyObject *ndr64_obj = NULL;
33994 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
33995 0 : PyObject *allow_remaining_obj = NULL;
33996 0 : bool allow_remaining = false;
33997 :
33998 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
33999 : discard_const_p(char *, kwnames),
34000 : &blob.data, &blob_length,
34001 : &bigendian_obj,
34002 : &ndr64_obj,
34003 : &allow_remaining_obj)) {
34004 0 : return NULL;
34005 : }
34006 0 : blob.length = blob_length;
34007 :
34008 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
34009 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
34010 : }
34011 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
34012 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
34013 : }
34014 :
34015 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
34016 0 : allow_remaining = true;
34017 : }
34018 :
34019 0 : return py_DnssrvComplexOperation2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
34020 : }
34021 :
34022 0 : static PyObject *py_DnssrvComplexOperation2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
34023 : {
34024 0 : DATA_BLOB blob;
34025 0 : Py_ssize_t blob_length = 0;
34026 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
34027 0 : PyObject *bigendian_obj = NULL;
34028 0 : PyObject *ndr64_obj = NULL;
34029 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
34030 0 : PyObject *allow_remaining_obj = NULL;
34031 0 : bool allow_remaining = false;
34032 :
34033 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
34034 : discard_const_p(char *, kwnames),
34035 : &blob.data, &blob_length,
34036 : &bigendian_obj,
34037 : &ndr64_obj,
34038 : &allow_remaining_obj)) {
34039 0 : return NULL;
34040 : }
34041 0 : blob.length = blob_length;
34042 :
34043 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
34044 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
34045 : }
34046 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
34047 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
34048 : }
34049 :
34050 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
34051 0 : allow_remaining = true;
34052 : }
34053 :
34054 0 : return py_DnssrvComplexOperation2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
34055 : }
34056 :
34057 0 : static PyObject *py_DnssrvComplexOperation2_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
34058 : {
34059 0 : const struct ndr_interface_call *call = NULL;
34060 0 : struct DnssrvComplexOperation2 *object = pytalloc_get_ptr(py_obj);
34061 0 : PyObject *ret;
34062 0 : char *retstr;
34063 :
34064 0 : if (ndr_table_dnsserver.num_calls < 8) {
34065 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvComplexOperation2_ndr_print");
34066 0 : return NULL;
34067 : }
34068 0 : call = &ndr_table_dnsserver.calls[7];
34069 :
34070 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
34071 0 : ret = PyUnicode_FromString(retstr);
34072 0 : TALLOC_FREE(retstr);
34073 :
34074 0 : return ret;
34075 : }
34076 :
34077 0 : static PyObject *py_DnssrvComplexOperation2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
34078 : {
34079 0 : return py_DnssrvComplexOperation2_ndr_print(py_obj, "DnssrvComplexOperation2_in", NDR_IN);
34080 : }
34081 :
34082 0 : static PyObject *py_DnssrvComplexOperation2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
34083 : {
34084 0 : return py_DnssrvComplexOperation2_ndr_print(py_obj, "DnssrvComplexOperation2_out", NDR_OUT);
34085 : }
34086 :
34087 : static PyMethodDef py_DnssrvComplexOperation2_methods[] = {
34088 : { "opnum", (PyCFunction)py_DnssrvComplexOperation2_ndr_opnum, METH_NOARGS|METH_CLASS,
34089 : "dnsserver.DnssrvComplexOperation2.opnum() -> 7 (0x07) " },
34090 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvComplexOperation2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
34091 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
34092 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvComplexOperation2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
34093 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
34094 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvComplexOperation2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
34095 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
34096 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvComplexOperation2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
34097 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
34098 : { "__ndr_print_in__", (PyCFunction)py_DnssrvComplexOperation2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
34099 : { "__ndr_print_out__", (PyCFunction)py_DnssrvComplexOperation2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
34100 : { NULL, NULL, 0, NULL }
34101 : };
34102 :
34103 :
34104 : static PyTypeObject DnssrvComplexOperation2_Type = {
34105 : PyVarObject_HEAD_INIT(NULL, 0)
34106 : .tp_name = "dnsserver.DnssrvComplexOperation2",
34107 : .tp_getset = py_DnssrvComplexOperation2_getsetters,
34108 : .tp_methods = py_DnssrvComplexOperation2_methods,
34109 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
34110 : .tp_new = py_DnssrvComplexOperation2_new,
34111 : };
34112 :
34113 20 : static bool pack_py_DnssrvComplexOperation2_args_in(PyObject *args, PyObject *kwargs, struct DnssrvComplexOperation2 *r)
34114 : {
34115 0 : PyObject *py_dwClientVersion;
34116 0 : PyObject *py_dwSettingFlags;
34117 0 : PyObject *py_pwszServerName;
34118 0 : PyObject *py_pszZone;
34119 0 : PyObject *py_pszOperation;
34120 0 : PyObject *py_dwTypeIn;
34121 0 : PyObject *py_pDataIn;
34122 20 : const char *kwnames[] = {
34123 : "dwClientVersion", "dwSettingFlags", "pwszServerName", "pszZone", "pszOperation", "dwTypeIn", "pDataIn", NULL
34124 : };
34125 :
34126 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)) {
34127 0 : return false;
34128 : }
34129 :
34130 20 : if (py_dwClientVersion == NULL) {
34131 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dwClientVersion");
34132 0 : return false;
34133 : }
34134 : {
34135 20 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwClientVersion));
34136 20 : if (PyLong_Check(py_dwClientVersion)) {
34137 0 : unsigned long long test_var;
34138 20 : test_var = PyLong_AsUnsignedLongLong(py_dwClientVersion);
34139 20 : if (PyErr_Occurred() != NULL) {
34140 0 : return false;
34141 : }
34142 20 : if (test_var > uint_max) {
34143 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
34144 : PyLong_Type.tp_name, uint_max, test_var);
34145 0 : return false;
34146 : }
34147 20 : r->in.dwClientVersion = test_var;
34148 : } else {
34149 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
34150 : PyLong_Type.tp_name);
34151 0 : return false;
34152 : }
34153 : }
34154 20 : if (py_dwSettingFlags == NULL) {
34155 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dwSettingFlags");
34156 0 : return false;
34157 : }
34158 : {
34159 20 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwSettingFlags));
34160 20 : if (PyLong_Check(py_dwSettingFlags)) {
34161 0 : unsigned long long test_var;
34162 20 : test_var = PyLong_AsUnsignedLongLong(py_dwSettingFlags);
34163 20 : if (PyErr_Occurred() != NULL) {
34164 0 : return false;
34165 : }
34166 20 : if (test_var > uint_max) {
34167 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
34168 : PyLong_Type.tp_name, uint_max, test_var);
34169 0 : return false;
34170 : }
34171 20 : r->in.dwSettingFlags = test_var;
34172 : } else {
34173 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
34174 : PyLong_Type.tp_name);
34175 0 : return false;
34176 : }
34177 : }
34178 20 : if (py_pwszServerName == NULL) {
34179 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pwszServerName");
34180 0 : return false;
34181 : }
34182 20 : if (py_pwszServerName == Py_None) {
34183 0 : r->in.pwszServerName = NULL;
34184 : } else {
34185 20 : r->in.pwszServerName = NULL;
34186 : {
34187 0 : const char *test_str;
34188 0 : const char *talloc_str;
34189 20 : PyObject *unicode = NULL;
34190 20 : if (PyUnicode_Check(py_pwszServerName)) {
34191 20 : unicode = PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore");
34192 20 : if (unicode == NULL) {
34193 0 : return false;
34194 : }
34195 20 : test_str = PyBytes_AS_STRING(unicode);
34196 0 : } else if (PyBytes_Check(py_pwszServerName)) {
34197 0 : test_str = PyBytes_AS_STRING(py_pwszServerName);
34198 : } else {
34199 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
34200 0 : return false;
34201 : }
34202 20 : talloc_str = talloc_strdup(r, test_str);
34203 20 : if (unicode != NULL) {
34204 14 : Py_DECREF(unicode);
34205 : }
34206 20 : if (talloc_str == NULL) {
34207 0 : PyErr_NoMemory();
34208 0 : return false;
34209 : }
34210 20 : r->in.pwszServerName = talloc_str;
34211 : }
34212 : }
34213 20 : if (py_pszZone == NULL) {
34214 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszZone");
34215 0 : return false;
34216 : }
34217 20 : if (py_pszZone == Py_None) {
34218 20 : r->in.pszZone = NULL;
34219 : } else {
34220 0 : r->in.pszZone = NULL;
34221 : {
34222 0 : const char *test_str;
34223 0 : const char *talloc_str;
34224 0 : PyObject *unicode = NULL;
34225 0 : if (PyUnicode_Check(py_pszZone)) {
34226 0 : unicode = PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore");
34227 0 : if (unicode == NULL) {
34228 0 : return false;
34229 : }
34230 0 : test_str = PyBytes_AS_STRING(unicode);
34231 0 : } else if (PyBytes_Check(py_pszZone)) {
34232 0 : test_str = PyBytes_AS_STRING(py_pszZone);
34233 : } else {
34234 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
34235 0 : return false;
34236 : }
34237 0 : talloc_str = talloc_strdup(r, test_str);
34238 0 : if (unicode != NULL) {
34239 0 : Py_DECREF(unicode);
34240 : }
34241 0 : if (talloc_str == NULL) {
34242 0 : PyErr_NoMemory();
34243 0 : return false;
34244 : }
34245 0 : r->in.pszZone = talloc_str;
34246 : }
34247 : }
34248 20 : if (py_pszOperation == NULL) {
34249 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszOperation");
34250 0 : return false;
34251 : }
34252 20 : if (py_pszOperation == Py_None) {
34253 0 : r->in.pszOperation = NULL;
34254 : } else {
34255 20 : r->in.pszOperation = NULL;
34256 : {
34257 0 : const char *test_str;
34258 0 : const char *talloc_str;
34259 20 : PyObject *unicode = NULL;
34260 20 : if (PyUnicode_Check(py_pszOperation)) {
34261 20 : unicode = PyUnicode_AsEncodedString(py_pszOperation, "utf-8", "ignore");
34262 20 : if (unicode == NULL) {
34263 0 : return false;
34264 : }
34265 20 : test_str = PyBytes_AS_STRING(unicode);
34266 0 : } else if (PyBytes_Check(py_pszOperation)) {
34267 0 : test_str = PyBytes_AS_STRING(py_pszOperation);
34268 : } else {
34269 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszOperation)->tp_name);
34270 0 : return false;
34271 : }
34272 20 : talloc_str = talloc_strdup(r, test_str);
34273 20 : if (unicode != NULL) {
34274 14 : Py_DECREF(unicode);
34275 : }
34276 20 : if (talloc_str == NULL) {
34277 0 : PyErr_NoMemory();
34278 0 : return false;
34279 : }
34280 20 : r->in.pszOperation = talloc_str;
34281 : }
34282 : }
34283 20 : if (py_dwTypeIn == NULL) {
34284 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dwTypeIn");
34285 0 : return false;
34286 : }
34287 : {
34288 20 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwTypeIn));
34289 20 : if (PyLong_Check(py_dwTypeIn)) {
34290 0 : unsigned long long test_var;
34291 20 : test_var = PyLong_AsUnsignedLongLong(py_dwTypeIn);
34292 20 : if (PyErr_Occurred() != NULL) {
34293 0 : return false;
34294 : }
34295 20 : if (test_var > uint_max) {
34296 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
34297 : PyLong_Type.tp_name, uint_max, test_var);
34298 0 : return false;
34299 : }
34300 20 : r->in.dwTypeIn = test_var;
34301 : } else {
34302 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
34303 : PyLong_Type.tp_name);
34304 0 : return false;
34305 : }
34306 : }
34307 20 : if (py_pDataIn == NULL) {
34308 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pDataIn");
34309 0 : return false;
34310 : }
34311 : {
34312 0 : union DNSSRV_RPC_UNION *pDataIn_switch_0;
34313 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");
34314 20 : if (pDataIn_switch_0 == NULL) {
34315 0 : return false;
34316 : }
34317 20 : r->in.pDataIn = *pDataIn_switch_0;
34318 : }
34319 20 : return true;
34320 : }
34321 :
34322 20 : static PyObject *unpack_py_DnssrvComplexOperation2_args_out(struct DnssrvComplexOperation2 *r)
34323 : {
34324 0 : PyObject *result;
34325 0 : PyObject *py_pdwTypeOut;
34326 0 : PyObject *py_ppDataOut;
34327 20 : result = PyTuple_New(2);
34328 20 : py_pdwTypeOut = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.pdwTypeOut));
34329 20 : PyTuple_SetItem(result, 0, py_pdwTypeOut);
34330 20 : py_ppDataOut = pyrpc_import_union(&DNSSRV_RPC_UNION_Type, r->out.ppDataOut, *r->out.pdwTypeOut, r->out.ppDataOut, "union DNSSRV_RPC_UNION");
34331 20 : if (py_ppDataOut == NULL) {
34332 0 : return NULL;
34333 : }
34334 20 : PyTuple_SetItem(result, 1, py_ppDataOut);
34335 20 : if (!W_ERROR_IS_OK(r->out.result)) {
34336 0 : PyErr_SetWERROR(r->out.result);
34337 0 : return NULL;
34338 : }
34339 :
34340 20 : return result;
34341 : }
34342 :
34343 :
34344 0 : static PyObject *py_DnssrvEnumRecords2_in_get_dwClientVersion(PyObject *obj, void *closure)
34345 : {
34346 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(obj);
34347 0 : PyObject *py_dwClientVersion;
34348 0 : py_dwClientVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->in.dwClientVersion));
34349 0 : return py_dwClientVersion;
34350 : }
34351 :
34352 0 : static int py_DnssrvEnumRecords2_in_set_dwClientVersion(PyObject *py_obj, PyObject *value, void *closure)
34353 : {
34354 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(py_obj);
34355 0 : if (value == NULL) {
34356 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dwClientVersion");
34357 0 : return -1;
34358 : }
34359 : {
34360 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwClientVersion));
34361 0 : if (PyLong_Check(value)) {
34362 0 : unsigned long long test_var;
34363 0 : test_var = PyLong_AsUnsignedLongLong(value);
34364 0 : if (PyErr_Occurred() != NULL) {
34365 0 : return -1;
34366 : }
34367 0 : if (test_var > uint_max) {
34368 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
34369 : PyLong_Type.tp_name, uint_max, test_var);
34370 0 : return -1;
34371 : }
34372 0 : object->in.dwClientVersion = test_var;
34373 : } else {
34374 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
34375 : PyLong_Type.tp_name);
34376 0 : return -1;
34377 : }
34378 : }
34379 0 : return 0;
34380 : }
34381 :
34382 0 : static PyObject *py_DnssrvEnumRecords2_in_get_dwSettingFlags(PyObject *obj, void *closure)
34383 : {
34384 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(obj);
34385 0 : PyObject *py_dwSettingFlags;
34386 0 : py_dwSettingFlags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.dwSettingFlags));
34387 0 : return py_dwSettingFlags;
34388 : }
34389 :
34390 0 : static int py_DnssrvEnumRecords2_in_set_dwSettingFlags(PyObject *py_obj, PyObject *value, void *closure)
34391 : {
34392 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(py_obj);
34393 0 : if (value == NULL) {
34394 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dwSettingFlags");
34395 0 : return -1;
34396 : }
34397 : {
34398 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwSettingFlags));
34399 0 : if (PyLong_Check(value)) {
34400 0 : unsigned long long test_var;
34401 0 : test_var = PyLong_AsUnsignedLongLong(value);
34402 0 : if (PyErr_Occurred() != NULL) {
34403 0 : return -1;
34404 : }
34405 0 : if (test_var > uint_max) {
34406 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
34407 : PyLong_Type.tp_name, uint_max, test_var);
34408 0 : return -1;
34409 : }
34410 0 : object->in.dwSettingFlags = test_var;
34411 : } else {
34412 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
34413 : PyLong_Type.tp_name);
34414 0 : return -1;
34415 : }
34416 : }
34417 0 : return 0;
34418 : }
34419 :
34420 0 : static PyObject *py_DnssrvEnumRecords2_in_get_pwszServerName(PyObject *obj, void *closure)
34421 : {
34422 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(obj);
34423 0 : PyObject *py_pwszServerName;
34424 0 : if (object->in.pwszServerName == NULL) {
34425 0 : Py_RETURN_NONE;
34426 : }
34427 0 : if (object->in.pwszServerName == NULL) {
34428 0 : py_pwszServerName = Py_None;
34429 0 : Py_INCREF(py_pwszServerName);
34430 : } else {
34431 0 : if (object->in.pwszServerName == NULL) {
34432 0 : py_pwszServerName = Py_None;
34433 0 : Py_INCREF(py_pwszServerName);
34434 : } else {
34435 0 : py_pwszServerName = PyUnicode_Decode(object->in.pwszServerName, strlen(object->in.pwszServerName), "utf-8", "ignore");
34436 : }
34437 : }
34438 0 : return py_pwszServerName;
34439 : }
34440 :
34441 0 : static int py_DnssrvEnumRecords2_in_set_pwszServerName(PyObject *py_obj, PyObject *value, void *closure)
34442 : {
34443 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(py_obj);
34444 0 : if (value == NULL) {
34445 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pwszServerName");
34446 0 : return -1;
34447 : }
34448 0 : if (value == Py_None) {
34449 0 : object->in.pwszServerName = NULL;
34450 : } else {
34451 0 : object->in.pwszServerName = NULL;
34452 : {
34453 0 : const char *test_str;
34454 0 : const char *talloc_str;
34455 0 : PyObject *unicode = NULL;
34456 0 : if (PyUnicode_Check(value)) {
34457 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
34458 0 : if (unicode == NULL) {
34459 0 : return -1;
34460 : }
34461 0 : test_str = PyBytes_AS_STRING(unicode);
34462 0 : } else if (PyBytes_Check(value)) {
34463 0 : test_str = PyBytes_AS_STRING(value);
34464 : } else {
34465 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
34466 0 : return -1;
34467 : }
34468 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
34469 0 : if (unicode != NULL) {
34470 0 : Py_DECREF(unicode);
34471 : }
34472 0 : if (talloc_str == NULL) {
34473 0 : PyErr_NoMemory();
34474 0 : return -1;
34475 : }
34476 0 : object->in.pwszServerName = talloc_str;
34477 : }
34478 : }
34479 0 : return 0;
34480 : }
34481 :
34482 0 : static PyObject *py_DnssrvEnumRecords2_in_get_pszZone(PyObject *obj, void *closure)
34483 : {
34484 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(obj);
34485 0 : PyObject *py_pszZone;
34486 0 : if (object->in.pszZone == NULL) {
34487 0 : Py_RETURN_NONE;
34488 : }
34489 0 : if (object->in.pszZone == NULL) {
34490 0 : py_pszZone = Py_None;
34491 0 : Py_INCREF(py_pszZone);
34492 : } else {
34493 0 : if (object->in.pszZone == NULL) {
34494 0 : py_pszZone = Py_None;
34495 0 : Py_INCREF(py_pszZone);
34496 : } else {
34497 0 : py_pszZone = PyUnicode_Decode(object->in.pszZone, strlen(object->in.pszZone), "utf-8", "ignore");
34498 : }
34499 : }
34500 0 : return py_pszZone;
34501 : }
34502 :
34503 0 : static int py_DnssrvEnumRecords2_in_set_pszZone(PyObject *py_obj, PyObject *value, void *closure)
34504 : {
34505 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(py_obj);
34506 0 : if (value == NULL) {
34507 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszZone");
34508 0 : return -1;
34509 : }
34510 0 : if (value == Py_None) {
34511 0 : object->in.pszZone = NULL;
34512 : } else {
34513 0 : object->in.pszZone = NULL;
34514 : {
34515 0 : const char *test_str;
34516 0 : const char *talloc_str;
34517 0 : PyObject *unicode = NULL;
34518 0 : if (PyUnicode_Check(value)) {
34519 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
34520 0 : if (unicode == NULL) {
34521 0 : return -1;
34522 : }
34523 0 : test_str = PyBytes_AS_STRING(unicode);
34524 0 : } else if (PyBytes_Check(value)) {
34525 0 : test_str = PyBytes_AS_STRING(value);
34526 : } else {
34527 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
34528 0 : return -1;
34529 : }
34530 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
34531 0 : if (unicode != NULL) {
34532 0 : Py_DECREF(unicode);
34533 : }
34534 0 : if (talloc_str == NULL) {
34535 0 : PyErr_NoMemory();
34536 0 : return -1;
34537 : }
34538 0 : object->in.pszZone = talloc_str;
34539 : }
34540 : }
34541 0 : return 0;
34542 : }
34543 :
34544 0 : static PyObject *py_DnssrvEnumRecords2_in_get_pszNodeName(PyObject *obj, void *closure)
34545 : {
34546 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(obj);
34547 0 : PyObject *py_pszNodeName;
34548 0 : if (object->in.pszNodeName == NULL) {
34549 0 : Py_RETURN_NONE;
34550 : }
34551 0 : if (object->in.pszNodeName == NULL) {
34552 0 : py_pszNodeName = Py_None;
34553 0 : Py_INCREF(py_pszNodeName);
34554 : } else {
34555 0 : if (object->in.pszNodeName == NULL) {
34556 0 : py_pszNodeName = Py_None;
34557 0 : Py_INCREF(py_pszNodeName);
34558 : } else {
34559 0 : py_pszNodeName = PyUnicode_Decode(object->in.pszNodeName, strlen(object->in.pszNodeName), "utf-8", "ignore");
34560 : }
34561 : }
34562 0 : return py_pszNodeName;
34563 : }
34564 :
34565 0 : static int py_DnssrvEnumRecords2_in_set_pszNodeName(PyObject *py_obj, PyObject *value, void *closure)
34566 : {
34567 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(py_obj);
34568 0 : if (value == NULL) {
34569 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszNodeName");
34570 0 : return -1;
34571 : }
34572 0 : if (value == Py_None) {
34573 0 : object->in.pszNodeName = NULL;
34574 : } else {
34575 0 : object->in.pszNodeName = NULL;
34576 : {
34577 0 : const char *test_str;
34578 0 : const char *talloc_str;
34579 0 : PyObject *unicode = NULL;
34580 0 : if (PyUnicode_Check(value)) {
34581 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
34582 0 : if (unicode == NULL) {
34583 0 : return -1;
34584 : }
34585 0 : test_str = PyBytes_AS_STRING(unicode);
34586 0 : } else if (PyBytes_Check(value)) {
34587 0 : test_str = PyBytes_AS_STRING(value);
34588 : } else {
34589 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
34590 0 : return -1;
34591 : }
34592 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
34593 0 : if (unicode != NULL) {
34594 0 : Py_DECREF(unicode);
34595 : }
34596 0 : if (talloc_str == NULL) {
34597 0 : PyErr_NoMemory();
34598 0 : return -1;
34599 : }
34600 0 : object->in.pszNodeName = talloc_str;
34601 : }
34602 : }
34603 0 : return 0;
34604 : }
34605 :
34606 0 : static PyObject *py_DnssrvEnumRecords2_in_get_pszStartChild(PyObject *obj, void *closure)
34607 : {
34608 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(obj);
34609 0 : PyObject *py_pszStartChild;
34610 0 : if (object->in.pszStartChild == NULL) {
34611 0 : Py_RETURN_NONE;
34612 : }
34613 0 : if (object->in.pszStartChild == NULL) {
34614 0 : py_pszStartChild = Py_None;
34615 0 : Py_INCREF(py_pszStartChild);
34616 : } else {
34617 0 : if (object->in.pszStartChild == NULL) {
34618 0 : py_pszStartChild = Py_None;
34619 0 : Py_INCREF(py_pszStartChild);
34620 : } else {
34621 0 : py_pszStartChild = PyUnicode_Decode(object->in.pszStartChild, strlen(object->in.pszStartChild), "utf-8", "ignore");
34622 : }
34623 : }
34624 0 : return py_pszStartChild;
34625 : }
34626 :
34627 0 : static int py_DnssrvEnumRecords2_in_set_pszStartChild(PyObject *py_obj, PyObject *value, void *closure)
34628 : {
34629 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(py_obj);
34630 0 : if (value == NULL) {
34631 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszStartChild");
34632 0 : return -1;
34633 : }
34634 0 : if (value == Py_None) {
34635 0 : object->in.pszStartChild = NULL;
34636 : } else {
34637 0 : object->in.pszStartChild = NULL;
34638 : {
34639 0 : const char *test_str;
34640 0 : const char *talloc_str;
34641 0 : PyObject *unicode = NULL;
34642 0 : if (PyUnicode_Check(value)) {
34643 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
34644 0 : if (unicode == NULL) {
34645 0 : return -1;
34646 : }
34647 0 : test_str = PyBytes_AS_STRING(unicode);
34648 0 : } else if (PyBytes_Check(value)) {
34649 0 : test_str = PyBytes_AS_STRING(value);
34650 : } else {
34651 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
34652 0 : return -1;
34653 : }
34654 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
34655 0 : if (unicode != NULL) {
34656 0 : Py_DECREF(unicode);
34657 : }
34658 0 : if (talloc_str == NULL) {
34659 0 : PyErr_NoMemory();
34660 0 : return -1;
34661 : }
34662 0 : object->in.pszStartChild = talloc_str;
34663 : }
34664 : }
34665 0 : return 0;
34666 : }
34667 :
34668 0 : static PyObject *py_DnssrvEnumRecords2_in_get_wRecordType(PyObject *obj, void *closure)
34669 : {
34670 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(obj);
34671 0 : PyObject *py_wRecordType;
34672 0 : py_wRecordType = PyLong_FromLong((uint16_t)(object->in.wRecordType));
34673 0 : return py_wRecordType;
34674 : }
34675 :
34676 0 : static int py_DnssrvEnumRecords2_in_set_wRecordType(PyObject *py_obj, PyObject *value, void *closure)
34677 : {
34678 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(py_obj);
34679 0 : if (value == NULL) {
34680 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.wRecordType");
34681 0 : return -1;
34682 : }
34683 : {
34684 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.wRecordType));
34685 0 : if (PyLong_Check(value)) {
34686 0 : unsigned long long test_var;
34687 0 : test_var = PyLong_AsUnsignedLongLong(value);
34688 0 : if (PyErr_Occurred() != NULL) {
34689 0 : return -1;
34690 : }
34691 0 : if (test_var > uint_max) {
34692 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
34693 : PyLong_Type.tp_name, uint_max, test_var);
34694 0 : return -1;
34695 : }
34696 0 : object->in.wRecordType = test_var;
34697 : } else {
34698 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
34699 : PyLong_Type.tp_name);
34700 0 : return -1;
34701 : }
34702 : }
34703 0 : return 0;
34704 : }
34705 :
34706 0 : static PyObject *py_DnssrvEnumRecords2_in_get_fSelectFlag(PyObject *obj, void *closure)
34707 : {
34708 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(obj);
34709 0 : PyObject *py_fSelectFlag;
34710 0 : py_fSelectFlag = PyLong_FromUnsignedLongLong((uint32_t)(object->in.fSelectFlag));
34711 0 : return py_fSelectFlag;
34712 : }
34713 :
34714 0 : static int py_DnssrvEnumRecords2_in_set_fSelectFlag(PyObject *py_obj, PyObject *value, void *closure)
34715 : {
34716 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(py_obj);
34717 0 : if (value == NULL) {
34718 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.fSelectFlag");
34719 0 : return -1;
34720 : }
34721 : {
34722 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.fSelectFlag));
34723 0 : if (PyLong_Check(value)) {
34724 0 : unsigned long long test_var;
34725 0 : test_var = PyLong_AsUnsignedLongLong(value);
34726 0 : if (PyErr_Occurred() != NULL) {
34727 0 : return -1;
34728 : }
34729 0 : if (test_var > uint_max) {
34730 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
34731 : PyLong_Type.tp_name, uint_max, test_var);
34732 0 : return -1;
34733 : }
34734 0 : object->in.fSelectFlag = test_var;
34735 : } else {
34736 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
34737 : PyLong_Type.tp_name);
34738 0 : return -1;
34739 : }
34740 : }
34741 0 : return 0;
34742 : }
34743 :
34744 0 : static PyObject *py_DnssrvEnumRecords2_in_get_pszFilterStart(PyObject *obj, void *closure)
34745 : {
34746 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(obj);
34747 0 : PyObject *py_pszFilterStart;
34748 0 : if (object->in.pszFilterStart == NULL) {
34749 0 : Py_RETURN_NONE;
34750 : }
34751 0 : if (object->in.pszFilterStart == NULL) {
34752 0 : py_pszFilterStart = Py_None;
34753 0 : Py_INCREF(py_pszFilterStart);
34754 : } else {
34755 0 : if (object->in.pszFilterStart == NULL) {
34756 0 : py_pszFilterStart = Py_None;
34757 0 : Py_INCREF(py_pszFilterStart);
34758 : } else {
34759 0 : py_pszFilterStart = PyUnicode_Decode(object->in.pszFilterStart, strlen(object->in.pszFilterStart), "utf-8", "ignore");
34760 : }
34761 : }
34762 0 : return py_pszFilterStart;
34763 : }
34764 :
34765 0 : static int py_DnssrvEnumRecords2_in_set_pszFilterStart(PyObject *py_obj, PyObject *value, void *closure)
34766 : {
34767 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(py_obj);
34768 0 : if (value == NULL) {
34769 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszFilterStart");
34770 0 : return -1;
34771 : }
34772 0 : if (value == Py_None) {
34773 0 : object->in.pszFilterStart = NULL;
34774 : } else {
34775 0 : object->in.pszFilterStart = NULL;
34776 : {
34777 0 : const char *test_str;
34778 0 : const char *talloc_str;
34779 0 : PyObject *unicode = NULL;
34780 0 : if (PyUnicode_Check(value)) {
34781 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
34782 0 : if (unicode == NULL) {
34783 0 : return -1;
34784 : }
34785 0 : test_str = PyBytes_AS_STRING(unicode);
34786 0 : } else if (PyBytes_Check(value)) {
34787 0 : test_str = PyBytes_AS_STRING(value);
34788 : } else {
34789 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
34790 0 : return -1;
34791 : }
34792 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
34793 0 : if (unicode != NULL) {
34794 0 : Py_DECREF(unicode);
34795 : }
34796 0 : if (talloc_str == NULL) {
34797 0 : PyErr_NoMemory();
34798 0 : return -1;
34799 : }
34800 0 : object->in.pszFilterStart = talloc_str;
34801 : }
34802 : }
34803 0 : return 0;
34804 : }
34805 :
34806 0 : static PyObject *py_DnssrvEnumRecords2_in_get_pszFilterStop(PyObject *obj, void *closure)
34807 : {
34808 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(obj);
34809 0 : PyObject *py_pszFilterStop;
34810 0 : if (object->in.pszFilterStop == NULL) {
34811 0 : Py_RETURN_NONE;
34812 : }
34813 0 : if (object->in.pszFilterStop == NULL) {
34814 0 : py_pszFilterStop = Py_None;
34815 0 : Py_INCREF(py_pszFilterStop);
34816 : } else {
34817 0 : if (object->in.pszFilterStop == NULL) {
34818 0 : py_pszFilterStop = Py_None;
34819 0 : Py_INCREF(py_pszFilterStop);
34820 : } else {
34821 0 : py_pszFilterStop = PyUnicode_Decode(object->in.pszFilterStop, strlen(object->in.pszFilterStop), "utf-8", "ignore");
34822 : }
34823 : }
34824 0 : return py_pszFilterStop;
34825 : }
34826 :
34827 0 : static int py_DnssrvEnumRecords2_in_set_pszFilterStop(PyObject *py_obj, PyObject *value, void *closure)
34828 : {
34829 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(py_obj);
34830 0 : if (value == NULL) {
34831 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszFilterStop");
34832 0 : return -1;
34833 : }
34834 0 : if (value == Py_None) {
34835 0 : object->in.pszFilterStop = NULL;
34836 : } else {
34837 0 : object->in.pszFilterStop = NULL;
34838 : {
34839 0 : const char *test_str;
34840 0 : const char *talloc_str;
34841 0 : PyObject *unicode = NULL;
34842 0 : if (PyUnicode_Check(value)) {
34843 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
34844 0 : if (unicode == NULL) {
34845 0 : return -1;
34846 : }
34847 0 : test_str = PyBytes_AS_STRING(unicode);
34848 0 : } else if (PyBytes_Check(value)) {
34849 0 : test_str = PyBytes_AS_STRING(value);
34850 : } else {
34851 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
34852 0 : return -1;
34853 : }
34854 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
34855 0 : if (unicode != NULL) {
34856 0 : Py_DECREF(unicode);
34857 : }
34858 0 : if (talloc_str == NULL) {
34859 0 : PyErr_NoMemory();
34860 0 : return -1;
34861 : }
34862 0 : object->in.pszFilterStop = talloc_str;
34863 : }
34864 : }
34865 0 : return 0;
34866 : }
34867 :
34868 0 : static PyObject *py_DnssrvEnumRecords2_out_get_pdwBufferLength(PyObject *obj, void *closure)
34869 : {
34870 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(obj);
34871 0 : PyObject *py_pdwBufferLength;
34872 0 : if (object->out.pdwBufferLength == NULL) {
34873 0 : Py_RETURN_NONE;
34874 : }
34875 0 : py_pdwBufferLength = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.pdwBufferLength));
34876 0 : return py_pdwBufferLength;
34877 : }
34878 :
34879 0 : static int py_DnssrvEnumRecords2_out_set_pdwBufferLength(PyObject *py_obj, PyObject *value, void *closure)
34880 : {
34881 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(py_obj);
34882 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.pdwBufferLength));
34883 0 : if (value == NULL) {
34884 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.pdwBufferLength");
34885 0 : return -1;
34886 : }
34887 0 : object->out.pdwBufferLength = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.pdwBufferLength);
34888 0 : if (object->out.pdwBufferLength == NULL) {
34889 0 : PyErr_NoMemory();
34890 0 : return -1;
34891 : }
34892 : {
34893 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.pdwBufferLength));
34894 0 : if (PyLong_Check(value)) {
34895 0 : unsigned long long test_var;
34896 0 : test_var = PyLong_AsUnsignedLongLong(value);
34897 0 : if (PyErr_Occurred() != NULL) {
34898 0 : return -1;
34899 : }
34900 0 : if (test_var > uint_max) {
34901 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
34902 : PyLong_Type.tp_name, uint_max, test_var);
34903 0 : return -1;
34904 : }
34905 0 : *object->out.pdwBufferLength = test_var;
34906 : } else {
34907 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
34908 : PyLong_Type.tp_name);
34909 0 : return -1;
34910 : }
34911 : }
34912 0 : return 0;
34913 : }
34914 :
34915 0 : static PyObject *py_DnssrvEnumRecords2_out_get_pBuffer(PyObject *obj, void *closure)
34916 : {
34917 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(obj);
34918 0 : PyObject *py_pBuffer;
34919 0 : if (object->out.pBuffer == NULL) {
34920 0 : Py_RETURN_NONE;
34921 : }
34922 0 : if (*object->out.pBuffer == NULL) {
34923 0 : py_pBuffer = Py_None;
34924 0 : Py_INCREF(py_pBuffer);
34925 : } else {
34926 0 : py_pBuffer = pytalloc_reference_ex(&DNS_RPC_RECORDS_ARRAY_Type, *object->out.pBuffer, *object->out.pBuffer);
34927 : }
34928 0 : return py_pBuffer;
34929 : }
34930 :
34931 0 : static int py_DnssrvEnumRecords2_out_set_pBuffer(PyObject *py_obj, PyObject *value, void *closure)
34932 : {
34933 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(py_obj);
34934 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.pBuffer));
34935 0 : if (value == NULL) {
34936 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.pBuffer");
34937 0 : return -1;
34938 : }
34939 0 : object->out.pBuffer = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.pBuffer);
34940 0 : if (object->out.pBuffer == NULL) {
34941 0 : PyErr_NoMemory();
34942 0 : return -1;
34943 : }
34944 0 : if (value == Py_None) {
34945 0 : *object->out.pBuffer = NULL;
34946 : } else {
34947 0 : *object->out.pBuffer = NULL;
34948 0 : PY_CHECK_TYPE(&DNS_RPC_RECORDS_ARRAY_Type, value, return -1;);
34949 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
34950 0 : PyErr_NoMemory();
34951 0 : return -1;
34952 : }
34953 0 : *object->out.pBuffer = (struct DNS_RPC_RECORDS_ARRAY *)pytalloc_get_ptr(value);
34954 : }
34955 0 : return 0;
34956 : }
34957 :
34958 0 : static PyObject *py_DnssrvEnumRecords2_get_result(PyObject *obj, void *closure)
34959 : {
34960 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(obj);
34961 0 : PyObject *py_result;
34962 0 : py_result = PyErr_FromWERROR(object->out.result);
34963 0 : return py_result;
34964 : }
34965 :
34966 0 : static int py_DnssrvEnumRecords2_set_result(PyObject *py_obj, PyObject *value, void *closure)
34967 : {
34968 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(py_obj);
34969 0 : if (value == NULL) {
34970 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
34971 0 : return -1;
34972 : }
34973 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
34974 0 : return 0;
34975 : }
34976 :
34977 : static PyGetSetDef py_DnssrvEnumRecords2_getsetters[] = {
34978 : {
34979 : .name = discard_const_p(char, "in_dwClientVersion"),
34980 : .get = py_DnssrvEnumRecords2_in_get_dwClientVersion,
34981 : .set = py_DnssrvEnumRecords2_in_set_dwClientVersion,
34982 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_CLIENT_VERSION")
34983 : },
34984 : {
34985 : .name = discard_const_p(char, "in_dwSettingFlags"),
34986 : .get = py_DnssrvEnumRecords2_in_get_dwSettingFlags,
34987 : .set = py_DnssrvEnumRecords2_in_set_dwSettingFlags,
34988 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
34989 : },
34990 : {
34991 : .name = discard_const_p(char, "in_pwszServerName"),
34992 : .get = py_DnssrvEnumRecords2_in_get_pwszServerName,
34993 : .set = py_DnssrvEnumRecords2_in_set_pwszServerName,
34994 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
34995 : },
34996 : {
34997 : .name = discard_const_p(char, "in_pszZone"),
34998 : .get = py_DnssrvEnumRecords2_in_get_pszZone,
34999 : .set = py_DnssrvEnumRecords2_in_set_pszZone,
35000 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
35001 : },
35002 : {
35003 : .name = discard_const_p(char, "in_pszNodeName"),
35004 : .get = py_DnssrvEnumRecords2_in_get_pszNodeName,
35005 : .set = py_DnssrvEnumRecords2_in_set_pszNodeName,
35006 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
35007 : },
35008 : {
35009 : .name = discard_const_p(char, "in_pszStartChild"),
35010 : .get = py_DnssrvEnumRecords2_in_get_pszStartChild,
35011 : .set = py_DnssrvEnumRecords2_in_set_pszStartChild,
35012 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
35013 : },
35014 : {
35015 : .name = discard_const_p(char, "in_wRecordType"),
35016 : .get = py_DnssrvEnumRecords2_in_get_wRecordType,
35017 : .set = py_DnssrvEnumRecords2_in_set_wRecordType,
35018 : .doc = discard_const_p(char, "PIDL-generated element of base type dns_record_type")
35019 : },
35020 : {
35021 : .name = discard_const_p(char, "in_fSelectFlag"),
35022 : .get = py_DnssrvEnumRecords2_in_get_fSelectFlag,
35023 : .set = py_DnssrvEnumRecords2_in_set_fSelectFlag,
35024 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_SELECT_FLAGS")
35025 : },
35026 : {
35027 : .name = discard_const_p(char, "in_pszFilterStart"),
35028 : .get = py_DnssrvEnumRecords2_in_get_pszFilterStart,
35029 : .set = py_DnssrvEnumRecords2_in_set_pszFilterStart,
35030 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
35031 : },
35032 : {
35033 : .name = discard_const_p(char, "in_pszFilterStop"),
35034 : .get = py_DnssrvEnumRecords2_in_get_pszFilterStop,
35035 : .set = py_DnssrvEnumRecords2_in_set_pszFilterStop,
35036 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
35037 : },
35038 : {
35039 : .name = discard_const_p(char, "out_pdwBufferLength"),
35040 : .get = py_DnssrvEnumRecords2_out_get_pdwBufferLength,
35041 : .set = py_DnssrvEnumRecords2_out_set_pdwBufferLength,
35042 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
35043 : },
35044 : {
35045 : .name = discard_const_p(char, "out_pBuffer"),
35046 : .get = py_DnssrvEnumRecords2_out_get_pBuffer,
35047 : .set = py_DnssrvEnumRecords2_out_set_pBuffer,
35048 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_RECORDS_ARRAY")
35049 : },
35050 : {
35051 : .name = discard_const_p(char, "result"),
35052 : .get = py_DnssrvEnumRecords2_get_result,
35053 : .set = py_DnssrvEnumRecords2_set_result,
35054 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
35055 : },
35056 : { .name = NULL }
35057 : };
35058 :
35059 0 : static PyObject *py_DnssrvEnumRecords2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
35060 : {
35061 0 : PyObject *self = pytalloc_new(struct DnssrvEnumRecords2, type);
35062 0 : struct DnssrvEnumRecords2 *_self = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(self);
35063 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
35064 0 : _self->out.pdwBufferLength = talloc_zero(mem_ctx, uint32_t);
35065 : /* a pointer to a NULL pointer */
35066 0 : _self->out.pBuffer = talloc_zero(mem_ctx, struct DNS_RPC_RECORDS_ARRAY *);
35067 0 : return self;
35068 : }
35069 :
35070 0 : static PyObject *py_DnssrvEnumRecords2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
35071 : {
35072 :
35073 :
35074 0 : return PyLong_FromLong(8);
35075 : }
35076 :
35077 0 : static PyObject *py_DnssrvEnumRecords2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
35078 : {
35079 0 : const struct ndr_interface_call *call = NULL;
35080 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(py_obj);
35081 0 : PyObject *ret = NULL;
35082 0 : struct ndr_push *push = NULL;
35083 0 : DATA_BLOB blob;
35084 0 : enum ndr_err_code err;
35085 :
35086 0 : if (ndr_table_dnsserver.num_calls < 9) {
35087 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvEnumRecords2_ndr_pack");
35088 0 : return NULL;
35089 : }
35090 0 : call = &ndr_table_dnsserver.calls[8];
35091 :
35092 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
35093 0 : if (push == NULL) {
35094 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
35095 0 : return NULL;
35096 : }
35097 :
35098 0 : push->flags |= ndr_push_flags;
35099 :
35100 0 : err = call->ndr_push(push, ndr_inout_flags, object);
35101 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
35102 0 : TALLOC_FREE(push);
35103 0 : PyErr_SetNdrError(err);
35104 0 : return NULL;
35105 : }
35106 0 : blob = ndr_push_blob(push);
35107 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
35108 0 : TALLOC_FREE(push);
35109 0 : return ret;
35110 : }
35111 :
35112 0 : static PyObject *py_DnssrvEnumRecords2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
35113 : {
35114 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
35115 0 : PyObject *bigendian_obj = NULL;
35116 0 : PyObject *ndr64_obj = NULL;
35117 0 : libndr_flags ndr_push_flags = 0;
35118 :
35119 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
35120 : discard_const_p(char *, kwnames),
35121 : &bigendian_obj,
35122 : &ndr64_obj)) {
35123 0 : return NULL;
35124 : }
35125 :
35126 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
35127 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
35128 : }
35129 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
35130 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
35131 : }
35132 :
35133 0 : return py_DnssrvEnumRecords2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
35134 : }
35135 :
35136 0 : static PyObject *py_DnssrvEnumRecords2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
35137 : {
35138 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
35139 0 : PyObject *bigendian_obj = NULL;
35140 0 : PyObject *ndr64_obj = NULL;
35141 0 : libndr_flags ndr_push_flags = 0;
35142 :
35143 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
35144 : discard_const_p(char *, kwnames),
35145 : &bigendian_obj,
35146 : &ndr64_obj)) {
35147 0 : return NULL;
35148 : }
35149 :
35150 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
35151 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
35152 : }
35153 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
35154 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
35155 : }
35156 :
35157 0 : return py_DnssrvEnumRecords2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
35158 : }
35159 :
35160 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)
35161 : {
35162 0 : const struct ndr_interface_call *call = NULL;
35163 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(py_obj);
35164 0 : struct ndr_pull *pull = NULL;
35165 0 : enum ndr_err_code err;
35166 :
35167 0 : if (ndr_table_dnsserver.num_calls < 9) {
35168 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvEnumRecords2_ndr_unpack");
35169 0 : return NULL;
35170 : }
35171 0 : call = &ndr_table_dnsserver.calls[8];
35172 :
35173 0 : pull = ndr_pull_init_blob(blob, object);
35174 0 : if (pull == NULL) {
35175 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
35176 0 : return NULL;
35177 : }
35178 :
35179 0 : pull->flags |= ndr_pull_flags;
35180 :
35181 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
35182 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
35183 0 : TALLOC_FREE(pull);
35184 0 : PyErr_SetNdrError(err);
35185 0 : return NULL;
35186 : }
35187 0 : if (!allow_remaining) {
35188 0 : uint32_t highest_ofs;
35189 :
35190 0 : if (pull->offset > pull->relative_highest_offset) {
35191 0 : highest_ofs = pull->offset;
35192 : } else {
35193 0 : highest_ofs = pull->relative_highest_offset;
35194 : }
35195 0 : if (highest_ofs < pull->data_size) {
35196 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
35197 : "not all bytes consumed ofs[%u] size[%u]",
35198 : highest_ofs, pull->data_size);
35199 0 : TALLOC_FREE(pull);
35200 0 : PyErr_SetNdrError(err);
35201 0 : return NULL;
35202 : }
35203 : }
35204 :
35205 0 : TALLOC_FREE(pull);
35206 0 : Py_RETURN_NONE;
35207 : }
35208 :
35209 0 : static PyObject *py_DnssrvEnumRecords2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
35210 : {
35211 0 : DATA_BLOB blob;
35212 0 : Py_ssize_t blob_length = 0;
35213 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
35214 0 : PyObject *bigendian_obj = NULL;
35215 0 : PyObject *ndr64_obj = NULL;
35216 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
35217 0 : PyObject *allow_remaining_obj = NULL;
35218 0 : bool allow_remaining = false;
35219 :
35220 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
35221 : discard_const_p(char *, kwnames),
35222 : &blob.data, &blob_length,
35223 : &bigendian_obj,
35224 : &ndr64_obj,
35225 : &allow_remaining_obj)) {
35226 0 : return NULL;
35227 : }
35228 0 : blob.length = blob_length;
35229 :
35230 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
35231 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
35232 : }
35233 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
35234 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
35235 : }
35236 :
35237 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
35238 0 : allow_remaining = true;
35239 : }
35240 :
35241 0 : return py_DnssrvEnumRecords2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
35242 : }
35243 :
35244 0 : static PyObject *py_DnssrvEnumRecords2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
35245 : {
35246 0 : DATA_BLOB blob;
35247 0 : Py_ssize_t blob_length = 0;
35248 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
35249 0 : PyObject *bigendian_obj = NULL;
35250 0 : PyObject *ndr64_obj = NULL;
35251 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
35252 0 : PyObject *allow_remaining_obj = NULL;
35253 0 : bool allow_remaining = false;
35254 :
35255 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
35256 : discard_const_p(char *, kwnames),
35257 : &blob.data, &blob_length,
35258 : &bigendian_obj,
35259 : &ndr64_obj,
35260 : &allow_remaining_obj)) {
35261 0 : return NULL;
35262 : }
35263 0 : blob.length = blob_length;
35264 :
35265 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
35266 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
35267 : }
35268 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
35269 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
35270 : }
35271 :
35272 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
35273 0 : allow_remaining = true;
35274 : }
35275 :
35276 0 : return py_DnssrvEnumRecords2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
35277 : }
35278 :
35279 0 : static PyObject *py_DnssrvEnumRecords2_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
35280 : {
35281 0 : const struct ndr_interface_call *call = NULL;
35282 0 : struct DnssrvEnumRecords2 *object = pytalloc_get_ptr(py_obj);
35283 0 : PyObject *ret;
35284 0 : char *retstr;
35285 :
35286 0 : if (ndr_table_dnsserver.num_calls < 9) {
35287 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvEnumRecords2_ndr_print");
35288 0 : return NULL;
35289 : }
35290 0 : call = &ndr_table_dnsserver.calls[8];
35291 :
35292 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
35293 0 : ret = PyUnicode_FromString(retstr);
35294 0 : TALLOC_FREE(retstr);
35295 :
35296 0 : return ret;
35297 : }
35298 :
35299 0 : static PyObject *py_DnssrvEnumRecords2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
35300 : {
35301 0 : return py_DnssrvEnumRecords2_ndr_print(py_obj, "DnssrvEnumRecords2_in", NDR_IN);
35302 : }
35303 :
35304 0 : static PyObject *py_DnssrvEnumRecords2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
35305 : {
35306 0 : return py_DnssrvEnumRecords2_ndr_print(py_obj, "DnssrvEnumRecords2_out", NDR_OUT);
35307 : }
35308 :
35309 : static PyMethodDef py_DnssrvEnumRecords2_methods[] = {
35310 : { "opnum", (PyCFunction)py_DnssrvEnumRecords2_ndr_opnum, METH_NOARGS|METH_CLASS,
35311 : "dnsserver.DnssrvEnumRecords2.opnum() -> 8 (0x08) " },
35312 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvEnumRecords2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
35313 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
35314 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvEnumRecords2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
35315 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
35316 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvEnumRecords2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
35317 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
35318 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvEnumRecords2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
35319 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
35320 : { "__ndr_print_in__", (PyCFunction)py_DnssrvEnumRecords2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
35321 : { "__ndr_print_out__", (PyCFunction)py_DnssrvEnumRecords2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
35322 : { NULL, NULL, 0, NULL }
35323 : };
35324 :
35325 :
35326 : static PyTypeObject DnssrvEnumRecords2_Type = {
35327 : PyVarObject_HEAD_INIT(NULL, 0)
35328 : .tp_name = "dnsserver.DnssrvEnumRecords2",
35329 : .tp_getset = py_DnssrvEnumRecords2_getsetters,
35330 : .tp_methods = py_DnssrvEnumRecords2_methods,
35331 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
35332 : .tp_new = py_DnssrvEnumRecords2_new,
35333 : };
35334 :
35335 1262 : static bool pack_py_DnssrvEnumRecords2_args_in(PyObject *args, PyObject *kwargs, struct DnssrvEnumRecords2 *r)
35336 : {
35337 0 : PyObject *py_dwClientVersion;
35338 0 : PyObject *py_dwSettingFlags;
35339 0 : PyObject *py_pwszServerName;
35340 0 : PyObject *py_pszZone;
35341 0 : PyObject *py_pszNodeName;
35342 0 : PyObject *py_pszStartChild;
35343 0 : PyObject *py_wRecordType;
35344 0 : PyObject *py_fSelectFlag;
35345 0 : PyObject *py_pszFilterStart;
35346 0 : PyObject *py_pszFilterStop;
35347 1262 : const char *kwnames[] = {
35348 : "dwClientVersion", "dwSettingFlags", "pwszServerName", "pszZone", "pszNodeName", "pszStartChild", "wRecordType", "fSelectFlag", "pszFilterStart", "pszFilterStop", NULL
35349 : };
35350 :
35351 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)) {
35352 0 : return false;
35353 : }
35354 :
35355 1262 : if (py_dwClientVersion == NULL) {
35356 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dwClientVersion");
35357 0 : return false;
35358 : }
35359 : {
35360 1262 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwClientVersion));
35361 1262 : if (PyLong_Check(py_dwClientVersion)) {
35362 0 : unsigned long long test_var;
35363 1262 : test_var = PyLong_AsUnsignedLongLong(py_dwClientVersion);
35364 1262 : if (PyErr_Occurred() != NULL) {
35365 0 : return false;
35366 : }
35367 1262 : if (test_var > uint_max) {
35368 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
35369 : PyLong_Type.tp_name, uint_max, test_var);
35370 0 : return false;
35371 : }
35372 1262 : r->in.dwClientVersion = test_var;
35373 : } else {
35374 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
35375 : PyLong_Type.tp_name);
35376 0 : return false;
35377 : }
35378 : }
35379 1262 : if (py_dwSettingFlags == NULL) {
35380 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dwSettingFlags");
35381 0 : return false;
35382 : }
35383 : {
35384 1262 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwSettingFlags));
35385 1262 : if (PyLong_Check(py_dwSettingFlags)) {
35386 0 : unsigned long long test_var;
35387 1262 : test_var = PyLong_AsUnsignedLongLong(py_dwSettingFlags);
35388 1262 : if (PyErr_Occurred() != NULL) {
35389 0 : return false;
35390 : }
35391 1262 : if (test_var > uint_max) {
35392 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
35393 : PyLong_Type.tp_name, uint_max, test_var);
35394 0 : return false;
35395 : }
35396 1262 : r->in.dwSettingFlags = test_var;
35397 : } else {
35398 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
35399 : PyLong_Type.tp_name);
35400 0 : return false;
35401 : }
35402 : }
35403 1262 : if (py_pwszServerName == NULL) {
35404 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pwszServerName");
35405 0 : return false;
35406 : }
35407 1262 : if (py_pwszServerName == Py_None) {
35408 0 : r->in.pwszServerName = NULL;
35409 : } else {
35410 1262 : r->in.pwszServerName = NULL;
35411 : {
35412 0 : const char *test_str;
35413 0 : const char *talloc_str;
35414 1262 : PyObject *unicode = NULL;
35415 1262 : if (PyUnicode_Check(py_pwszServerName)) {
35416 1262 : unicode = PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore");
35417 1262 : if (unicode == NULL) {
35418 0 : return false;
35419 : }
35420 1262 : test_str = PyBytes_AS_STRING(unicode);
35421 0 : } else if (PyBytes_Check(py_pwszServerName)) {
35422 0 : test_str = PyBytes_AS_STRING(py_pwszServerName);
35423 : } else {
35424 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
35425 0 : return false;
35426 : }
35427 1262 : talloc_str = talloc_strdup(r, test_str);
35428 1262 : if (unicode != NULL) {
35429 932 : Py_DECREF(unicode);
35430 : }
35431 1262 : if (talloc_str == NULL) {
35432 0 : PyErr_NoMemory();
35433 0 : return false;
35434 : }
35435 1262 : r->in.pwszServerName = talloc_str;
35436 : }
35437 : }
35438 1262 : if (py_pszZone == NULL) {
35439 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszZone");
35440 0 : return false;
35441 : }
35442 1262 : if (py_pszZone == Py_None) {
35443 0 : r->in.pszZone = NULL;
35444 : } else {
35445 1262 : r->in.pszZone = NULL;
35446 : {
35447 0 : const char *test_str;
35448 0 : const char *talloc_str;
35449 1262 : PyObject *unicode = NULL;
35450 1262 : if (PyUnicode_Check(py_pszZone)) {
35451 1262 : unicode = PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore");
35452 1262 : if (unicode == NULL) {
35453 0 : return false;
35454 : }
35455 1262 : test_str = PyBytes_AS_STRING(unicode);
35456 0 : } else if (PyBytes_Check(py_pszZone)) {
35457 0 : test_str = PyBytes_AS_STRING(py_pszZone);
35458 : } else {
35459 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
35460 0 : return false;
35461 : }
35462 1262 : talloc_str = talloc_strdup(r, test_str);
35463 1262 : if (unicode != NULL) {
35464 932 : Py_DECREF(unicode);
35465 : }
35466 1262 : if (talloc_str == NULL) {
35467 0 : PyErr_NoMemory();
35468 0 : return false;
35469 : }
35470 1262 : r->in.pszZone = talloc_str;
35471 : }
35472 : }
35473 1262 : if (py_pszNodeName == NULL) {
35474 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszNodeName");
35475 0 : return false;
35476 : }
35477 1262 : if (py_pszNodeName == Py_None) {
35478 0 : r->in.pszNodeName = NULL;
35479 : } else {
35480 1262 : r->in.pszNodeName = NULL;
35481 : {
35482 0 : const char *test_str;
35483 0 : const char *talloc_str;
35484 1262 : PyObject *unicode = NULL;
35485 1262 : if (PyUnicode_Check(py_pszNodeName)) {
35486 1262 : unicode = PyUnicode_AsEncodedString(py_pszNodeName, "utf-8", "ignore");
35487 1262 : if (unicode == NULL) {
35488 0 : return false;
35489 : }
35490 1262 : test_str = PyBytes_AS_STRING(unicode);
35491 0 : } else if (PyBytes_Check(py_pszNodeName)) {
35492 0 : test_str = PyBytes_AS_STRING(py_pszNodeName);
35493 : } else {
35494 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszNodeName)->tp_name);
35495 0 : return false;
35496 : }
35497 1262 : talloc_str = talloc_strdup(r, test_str);
35498 1262 : if (unicode != NULL) {
35499 932 : Py_DECREF(unicode);
35500 : }
35501 1262 : if (talloc_str == NULL) {
35502 0 : PyErr_NoMemory();
35503 0 : return false;
35504 : }
35505 1262 : r->in.pszNodeName = talloc_str;
35506 : }
35507 : }
35508 1262 : if (py_pszStartChild == NULL) {
35509 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszStartChild");
35510 0 : return false;
35511 : }
35512 1262 : if (py_pszStartChild == Py_None) {
35513 1262 : r->in.pszStartChild = NULL;
35514 : } else {
35515 0 : r->in.pszStartChild = NULL;
35516 : {
35517 0 : const char *test_str;
35518 0 : const char *talloc_str;
35519 0 : PyObject *unicode = NULL;
35520 0 : if (PyUnicode_Check(py_pszStartChild)) {
35521 0 : unicode = PyUnicode_AsEncodedString(py_pszStartChild, "utf-8", "ignore");
35522 0 : if (unicode == NULL) {
35523 0 : return false;
35524 : }
35525 0 : test_str = PyBytes_AS_STRING(unicode);
35526 0 : } else if (PyBytes_Check(py_pszStartChild)) {
35527 0 : test_str = PyBytes_AS_STRING(py_pszStartChild);
35528 : } else {
35529 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszStartChild)->tp_name);
35530 0 : return false;
35531 : }
35532 0 : talloc_str = talloc_strdup(r, test_str);
35533 0 : if (unicode != NULL) {
35534 0 : Py_DECREF(unicode);
35535 : }
35536 0 : if (talloc_str == NULL) {
35537 0 : PyErr_NoMemory();
35538 0 : return false;
35539 : }
35540 0 : r->in.pszStartChild = talloc_str;
35541 : }
35542 : }
35543 1262 : if (py_wRecordType == NULL) {
35544 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.wRecordType");
35545 0 : return false;
35546 : }
35547 : {
35548 1262 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.wRecordType));
35549 1262 : if (PyLong_Check(py_wRecordType)) {
35550 0 : unsigned long long test_var;
35551 1262 : test_var = PyLong_AsUnsignedLongLong(py_wRecordType);
35552 1262 : if (PyErr_Occurred() != NULL) {
35553 0 : return false;
35554 : }
35555 1262 : if (test_var > uint_max) {
35556 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
35557 : PyLong_Type.tp_name, uint_max, test_var);
35558 0 : return false;
35559 : }
35560 1262 : r->in.wRecordType = test_var;
35561 : } else {
35562 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
35563 : PyLong_Type.tp_name);
35564 0 : return false;
35565 : }
35566 : }
35567 1262 : if (py_fSelectFlag == NULL) {
35568 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.fSelectFlag");
35569 0 : return false;
35570 : }
35571 : {
35572 1262 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.fSelectFlag));
35573 1262 : if (PyLong_Check(py_fSelectFlag)) {
35574 0 : unsigned long long test_var;
35575 1262 : test_var = PyLong_AsUnsignedLongLong(py_fSelectFlag);
35576 1262 : if (PyErr_Occurred() != NULL) {
35577 0 : return false;
35578 : }
35579 1262 : if (test_var > uint_max) {
35580 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
35581 : PyLong_Type.tp_name, uint_max, test_var);
35582 0 : return false;
35583 : }
35584 1262 : r->in.fSelectFlag = test_var;
35585 : } else {
35586 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
35587 : PyLong_Type.tp_name);
35588 0 : return false;
35589 : }
35590 : }
35591 1262 : if (py_pszFilterStart == NULL) {
35592 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszFilterStart");
35593 0 : return false;
35594 : }
35595 1262 : if (py_pszFilterStart == Py_None) {
35596 1262 : r->in.pszFilterStart = NULL;
35597 : } else {
35598 0 : r->in.pszFilterStart = NULL;
35599 : {
35600 0 : const char *test_str;
35601 0 : const char *talloc_str;
35602 0 : PyObject *unicode = NULL;
35603 0 : if (PyUnicode_Check(py_pszFilterStart)) {
35604 0 : unicode = PyUnicode_AsEncodedString(py_pszFilterStart, "utf-8", "ignore");
35605 0 : if (unicode == NULL) {
35606 0 : return false;
35607 : }
35608 0 : test_str = PyBytes_AS_STRING(unicode);
35609 0 : } else if (PyBytes_Check(py_pszFilterStart)) {
35610 0 : test_str = PyBytes_AS_STRING(py_pszFilterStart);
35611 : } else {
35612 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszFilterStart)->tp_name);
35613 0 : return false;
35614 : }
35615 0 : talloc_str = talloc_strdup(r, test_str);
35616 0 : if (unicode != NULL) {
35617 0 : Py_DECREF(unicode);
35618 : }
35619 0 : if (talloc_str == NULL) {
35620 0 : PyErr_NoMemory();
35621 0 : return false;
35622 : }
35623 0 : r->in.pszFilterStart = talloc_str;
35624 : }
35625 : }
35626 1262 : if (py_pszFilterStop == NULL) {
35627 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszFilterStop");
35628 0 : return false;
35629 : }
35630 1262 : if (py_pszFilterStop == Py_None) {
35631 1262 : r->in.pszFilterStop = NULL;
35632 : } else {
35633 0 : r->in.pszFilterStop = NULL;
35634 : {
35635 0 : const char *test_str;
35636 0 : const char *talloc_str;
35637 0 : PyObject *unicode = NULL;
35638 0 : if (PyUnicode_Check(py_pszFilterStop)) {
35639 0 : unicode = PyUnicode_AsEncodedString(py_pszFilterStop, "utf-8", "ignore");
35640 0 : if (unicode == NULL) {
35641 0 : return false;
35642 : }
35643 0 : test_str = PyBytes_AS_STRING(unicode);
35644 0 : } else if (PyBytes_Check(py_pszFilterStop)) {
35645 0 : test_str = PyBytes_AS_STRING(py_pszFilterStop);
35646 : } else {
35647 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszFilterStop)->tp_name);
35648 0 : return false;
35649 : }
35650 0 : talloc_str = talloc_strdup(r, test_str);
35651 0 : if (unicode != NULL) {
35652 0 : Py_DECREF(unicode);
35653 : }
35654 0 : if (talloc_str == NULL) {
35655 0 : PyErr_NoMemory();
35656 0 : return false;
35657 : }
35658 0 : r->in.pszFilterStop = talloc_str;
35659 : }
35660 : }
35661 1262 : return true;
35662 : }
35663 :
35664 1262 : static PyObject *unpack_py_DnssrvEnumRecords2_args_out(struct DnssrvEnumRecords2 *r)
35665 : {
35666 0 : PyObject *result;
35667 0 : PyObject *py_pdwBufferLength;
35668 0 : PyObject *py_pBuffer;
35669 1262 : result = PyTuple_New(2);
35670 1262 : py_pdwBufferLength = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.pdwBufferLength));
35671 1262 : PyTuple_SetItem(result, 0, py_pdwBufferLength);
35672 1262 : if (*r->out.pBuffer == NULL) {
35673 181 : py_pBuffer = Py_None;
35674 140 : Py_INCREF(py_pBuffer);
35675 : } else {
35676 1081 : py_pBuffer = pytalloc_reference_ex(&DNS_RPC_RECORDS_ARRAY_Type, *r->out.pBuffer, *r->out.pBuffer);
35677 : }
35678 1262 : PyTuple_SetItem(result, 1, py_pBuffer);
35679 1262 : if (!W_ERROR_IS_OK(r->out.result)) {
35680 181 : PyErr_SetWERROR(r->out.result);
35681 181 : return NULL;
35682 : }
35683 :
35684 1081 : return result;
35685 : }
35686 :
35687 :
35688 0 : static PyObject *py_DnssrvUpdateRecord2_in_get_dwClientVersion(PyObject *obj, void *closure)
35689 : {
35690 0 : struct DnssrvUpdateRecord2 *object = pytalloc_get_ptr(obj);
35691 0 : PyObject *py_dwClientVersion;
35692 0 : py_dwClientVersion = PyLong_FromUnsignedLongLong((uint32_t)(object->in.dwClientVersion));
35693 0 : return py_dwClientVersion;
35694 : }
35695 :
35696 0 : static int py_DnssrvUpdateRecord2_in_set_dwClientVersion(PyObject *py_obj, PyObject *value, void *closure)
35697 : {
35698 0 : struct DnssrvUpdateRecord2 *object = pytalloc_get_ptr(py_obj);
35699 0 : if (value == NULL) {
35700 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dwClientVersion");
35701 0 : return -1;
35702 : }
35703 : {
35704 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwClientVersion));
35705 0 : if (PyLong_Check(value)) {
35706 0 : unsigned long long test_var;
35707 0 : test_var = PyLong_AsUnsignedLongLong(value);
35708 0 : if (PyErr_Occurred() != NULL) {
35709 0 : return -1;
35710 : }
35711 0 : if (test_var > uint_max) {
35712 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
35713 : PyLong_Type.tp_name, uint_max, test_var);
35714 0 : return -1;
35715 : }
35716 0 : object->in.dwClientVersion = test_var;
35717 : } else {
35718 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
35719 : PyLong_Type.tp_name);
35720 0 : return -1;
35721 : }
35722 : }
35723 0 : return 0;
35724 : }
35725 :
35726 0 : static PyObject *py_DnssrvUpdateRecord2_in_get_dwSettingFlags(PyObject *obj, void *closure)
35727 : {
35728 0 : struct DnssrvUpdateRecord2 *object = pytalloc_get_ptr(obj);
35729 0 : PyObject *py_dwSettingFlags;
35730 0 : py_dwSettingFlags = PyLong_FromUnsignedLongLong((uint32_t)(object->in.dwSettingFlags));
35731 0 : return py_dwSettingFlags;
35732 : }
35733 :
35734 0 : static int py_DnssrvUpdateRecord2_in_set_dwSettingFlags(PyObject *py_obj, PyObject *value, void *closure)
35735 : {
35736 0 : struct DnssrvUpdateRecord2 *object = pytalloc_get_ptr(py_obj);
35737 0 : if (value == NULL) {
35738 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.dwSettingFlags");
35739 0 : return -1;
35740 : }
35741 : {
35742 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwSettingFlags));
35743 0 : if (PyLong_Check(value)) {
35744 0 : unsigned long long test_var;
35745 0 : test_var = PyLong_AsUnsignedLongLong(value);
35746 0 : if (PyErr_Occurred() != NULL) {
35747 0 : return -1;
35748 : }
35749 0 : if (test_var > uint_max) {
35750 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
35751 : PyLong_Type.tp_name, uint_max, test_var);
35752 0 : return -1;
35753 : }
35754 0 : object->in.dwSettingFlags = test_var;
35755 : } else {
35756 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
35757 : PyLong_Type.tp_name);
35758 0 : return -1;
35759 : }
35760 : }
35761 0 : return 0;
35762 : }
35763 :
35764 0 : static PyObject *py_DnssrvUpdateRecord2_in_get_pwszServerName(PyObject *obj, void *closure)
35765 : {
35766 0 : struct DnssrvUpdateRecord2 *object = pytalloc_get_ptr(obj);
35767 0 : PyObject *py_pwszServerName;
35768 0 : if (object->in.pwszServerName == NULL) {
35769 0 : Py_RETURN_NONE;
35770 : }
35771 0 : if (object->in.pwszServerName == NULL) {
35772 0 : py_pwszServerName = Py_None;
35773 0 : Py_INCREF(py_pwszServerName);
35774 : } else {
35775 0 : if (object->in.pwszServerName == NULL) {
35776 0 : py_pwszServerName = Py_None;
35777 0 : Py_INCREF(py_pwszServerName);
35778 : } else {
35779 0 : py_pwszServerName = PyUnicode_Decode(object->in.pwszServerName, strlen(object->in.pwszServerName), "utf-8", "ignore");
35780 : }
35781 : }
35782 0 : return py_pwszServerName;
35783 : }
35784 :
35785 0 : static int py_DnssrvUpdateRecord2_in_set_pwszServerName(PyObject *py_obj, PyObject *value, void *closure)
35786 : {
35787 0 : struct DnssrvUpdateRecord2 *object = pytalloc_get_ptr(py_obj);
35788 0 : if (value == NULL) {
35789 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pwszServerName");
35790 0 : return -1;
35791 : }
35792 0 : if (value == Py_None) {
35793 0 : object->in.pwszServerName = NULL;
35794 : } else {
35795 0 : object->in.pwszServerName = NULL;
35796 : {
35797 0 : const char *test_str;
35798 0 : const char *talloc_str;
35799 0 : PyObject *unicode = NULL;
35800 0 : if (PyUnicode_Check(value)) {
35801 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
35802 0 : if (unicode == NULL) {
35803 0 : return -1;
35804 : }
35805 0 : test_str = PyBytes_AS_STRING(unicode);
35806 0 : } else if (PyBytes_Check(value)) {
35807 0 : test_str = PyBytes_AS_STRING(value);
35808 : } else {
35809 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
35810 0 : return -1;
35811 : }
35812 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
35813 0 : if (unicode != NULL) {
35814 0 : Py_DECREF(unicode);
35815 : }
35816 0 : if (talloc_str == NULL) {
35817 0 : PyErr_NoMemory();
35818 0 : return -1;
35819 : }
35820 0 : object->in.pwszServerName = talloc_str;
35821 : }
35822 : }
35823 0 : return 0;
35824 : }
35825 :
35826 0 : static PyObject *py_DnssrvUpdateRecord2_in_get_pszZone(PyObject *obj, void *closure)
35827 : {
35828 0 : struct DnssrvUpdateRecord2 *object = pytalloc_get_ptr(obj);
35829 0 : PyObject *py_pszZone;
35830 0 : if (object->in.pszZone == NULL) {
35831 0 : Py_RETURN_NONE;
35832 : }
35833 0 : if (object->in.pszZone == NULL) {
35834 0 : py_pszZone = Py_None;
35835 0 : Py_INCREF(py_pszZone);
35836 : } else {
35837 0 : if (object->in.pszZone == NULL) {
35838 0 : py_pszZone = Py_None;
35839 0 : Py_INCREF(py_pszZone);
35840 : } else {
35841 0 : py_pszZone = PyUnicode_Decode(object->in.pszZone, strlen(object->in.pszZone), "utf-8", "ignore");
35842 : }
35843 : }
35844 0 : return py_pszZone;
35845 : }
35846 :
35847 0 : static int py_DnssrvUpdateRecord2_in_set_pszZone(PyObject *py_obj, PyObject *value, void *closure)
35848 : {
35849 0 : struct DnssrvUpdateRecord2 *object = pytalloc_get_ptr(py_obj);
35850 0 : if (value == NULL) {
35851 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszZone");
35852 0 : return -1;
35853 : }
35854 0 : if (value == Py_None) {
35855 0 : object->in.pszZone = NULL;
35856 : } else {
35857 0 : object->in.pszZone = NULL;
35858 : {
35859 0 : const char *test_str;
35860 0 : const char *talloc_str;
35861 0 : PyObject *unicode = NULL;
35862 0 : if (PyUnicode_Check(value)) {
35863 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
35864 0 : if (unicode == NULL) {
35865 0 : return -1;
35866 : }
35867 0 : test_str = PyBytes_AS_STRING(unicode);
35868 0 : } else if (PyBytes_Check(value)) {
35869 0 : test_str = PyBytes_AS_STRING(value);
35870 : } else {
35871 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
35872 0 : return -1;
35873 : }
35874 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
35875 0 : if (unicode != NULL) {
35876 0 : Py_DECREF(unicode);
35877 : }
35878 0 : if (talloc_str == NULL) {
35879 0 : PyErr_NoMemory();
35880 0 : return -1;
35881 : }
35882 0 : object->in.pszZone = talloc_str;
35883 : }
35884 : }
35885 0 : return 0;
35886 : }
35887 :
35888 0 : static PyObject *py_DnssrvUpdateRecord2_in_get_pszNodeName(PyObject *obj, void *closure)
35889 : {
35890 0 : struct DnssrvUpdateRecord2 *object = pytalloc_get_ptr(obj);
35891 0 : PyObject *py_pszNodeName;
35892 0 : if (object->in.pszNodeName == NULL) {
35893 0 : Py_RETURN_NONE;
35894 : }
35895 0 : if (object->in.pszNodeName == NULL) {
35896 0 : py_pszNodeName = Py_None;
35897 0 : Py_INCREF(py_pszNodeName);
35898 : } else {
35899 0 : py_pszNodeName = PyUnicode_Decode(object->in.pszNodeName, strlen(object->in.pszNodeName), "utf-8", "ignore");
35900 : }
35901 0 : return py_pszNodeName;
35902 : }
35903 :
35904 0 : static int py_DnssrvUpdateRecord2_in_set_pszNodeName(PyObject *py_obj, PyObject *value, void *closure)
35905 : {
35906 0 : struct DnssrvUpdateRecord2 *object = pytalloc_get_ptr(py_obj);
35907 0 : if (value == NULL) {
35908 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pszNodeName");
35909 0 : return -1;
35910 : }
35911 0 : object->in.pszNodeName = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.pszNodeName);
35912 0 : if (object->in.pszNodeName == NULL) {
35913 0 : PyErr_NoMemory();
35914 0 : return -1;
35915 : }
35916 : {
35917 0 : const char *test_str;
35918 0 : const char *talloc_str;
35919 0 : PyObject *unicode = NULL;
35920 0 : if (PyUnicode_Check(value)) {
35921 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
35922 0 : if (unicode == NULL) {
35923 0 : return -1;
35924 : }
35925 0 : test_str = PyBytes_AS_STRING(unicode);
35926 0 : } else if (PyBytes_Check(value)) {
35927 0 : test_str = PyBytes_AS_STRING(value);
35928 : } else {
35929 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
35930 0 : return -1;
35931 : }
35932 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
35933 0 : if (unicode != NULL) {
35934 0 : Py_DECREF(unicode);
35935 : }
35936 0 : if (talloc_str == NULL) {
35937 0 : PyErr_NoMemory();
35938 0 : return -1;
35939 : }
35940 0 : object->in.pszNodeName = talloc_str;
35941 : }
35942 0 : return 0;
35943 : }
35944 :
35945 0 : static PyObject *py_DnssrvUpdateRecord2_in_get_pAddRecord(PyObject *obj, void *closure)
35946 : {
35947 0 : struct DnssrvUpdateRecord2 *object = pytalloc_get_ptr(obj);
35948 0 : PyObject *py_pAddRecord;
35949 0 : if (object->in.pAddRecord == NULL) {
35950 0 : Py_RETURN_NONE;
35951 : }
35952 0 : if (object->in.pAddRecord == NULL) {
35953 0 : py_pAddRecord = Py_None;
35954 0 : Py_INCREF(py_pAddRecord);
35955 : } else {
35956 0 : py_pAddRecord = pytalloc_reference_ex(&DNS_RPC_RECORD_BUF_Type, object->in.pAddRecord, object->in.pAddRecord);
35957 : }
35958 0 : return py_pAddRecord;
35959 : }
35960 :
35961 0 : static int py_DnssrvUpdateRecord2_in_set_pAddRecord(PyObject *py_obj, PyObject *value, void *closure)
35962 : {
35963 0 : struct DnssrvUpdateRecord2 *object = pytalloc_get_ptr(py_obj);
35964 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.pAddRecord));
35965 0 : if (value == NULL) {
35966 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pAddRecord");
35967 0 : return -1;
35968 : }
35969 0 : if (value == Py_None) {
35970 0 : object->in.pAddRecord = NULL;
35971 : } else {
35972 0 : object->in.pAddRecord = NULL;
35973 0 : PY_CHECK_TYPE(&DNS_RPC_RECORD_BUF_Type, value, return -1;);
35974 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
35975 0 : PyErr_NoMemory();
35976 0 : return -1;
35977 : }
35978 0 : object->in.pAddRecord = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(value);
35979 : }
35980 0 : return 0;
35981 : }
35982 :
35983 0 : static PyObject *py_DnssrvUpdateRecord2_in_get_pDeleteRecord(PyObject *obj, void *closure)
35984 : {
35985 0 : struct DnssrvUpdateRecord2 *object = pytalloc_get_ptr(obj);
35986 0 : PyObject *py_pDeleteRecord;
35987 0 : if (object->in.pDeleteRecord == NULL) {
35988 0 : Py_RETURN_NONE;
35989 : }
35990 0 : if (object->in.pDeleteRecord == NULL) {
35991 0 : py_pDeleteRecord = Py_None;
35992 0 : Py_INCREF(py_pDeleteRecord);
35993 : } else {
35994 0 : py_pDeleteRecord = pytalloc_reference_ex(&DNS_RPC_RECORD_BUF_Type, object->in.pDeleteRecord, object->in.pDeleteRecord);
35995 : }
35996 0 : return py_pDeleteRecord;
35997 : }
35998 :
35999 0 : static int py_DnssrvUpdateRecord2_in_set_pDeleteRecord(PyObject *py_obj, PyObject *value, void *closure)
36000 : {
36001 0 : struct DnssrvUpdateRecord2 *object = pytalloc_get_ptr(py_obj);
36002 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.pDeleteRecord));
36003 0 : if (value == NULL) {
36004 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->in.pDeleteRecord");
36005 0 : return -1;
36006 : }
36007 0 : if (value == Py_None) {
36008 0 : object->in.pDeleteRecord = NULL;
36009 : } else {
36010 0 : object->in.pDeleteRecord = NULL;
36011 0 : PY_CHECK_TYPE(&DNS_RPC_RECORD_BUF_Type, value, return -1;);
36012 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
36013 0 : PyErr_NoMemory();
36014 0 : return -1;
36015 : }
36016 0 : object->in.pDeleteRecord = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(value);
36017 : }
36018 0 : return 0;
36019 : }
36020 :
36021 0 : static PyObject *py_DnssrvUpdateRecord2_get_result(PyObject *obj, void *closure)
36022 : {
36023 0 : struct DnssrvUpdateRecord2 *object = pytalloc_get_ptr(obj);
36024 0 : PyObject *py_result;
36025 0 : py_result = PyErr_FromWERROR(object->out.result);
36026 0 : return py_result;
36027 : }
36028 :
36029 0 : static int py_DnssrvUpdateRecord2_set_result(PyObject *py_obj, PyObject *value, void *closure)
36030 : {
36031 0 : struct DnssrvUpdateRecord2 *object = pytalloc_get_ptr(py_obj);
36032 0 : if (value == NULL) {
36033 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->out.result");
36034 0 : return -1;
36035 : }
36036 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
36037 0 : return 0;
36038 : }
36039 :
36040 : static PyGetSetDef py_DnssrvUpdateRecord2_getsetters[] = {
36041 : {
36042 : .name = discard_const_p(char, "in_dwClientVersion"),
36043 : .get = py_DnssrvUpdateRecord2_in_get_dwClientVersion,
36044 : .set = py_DnssrvUpdateRecord2_in_set_dwClientVersion,
36045 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_CLIENT_VERSION")
36046 : },
36047 : {
36048 : .name = discard_const_p(char, "in_dwSettingFlags"),
36049 : .get = py_DnssrvUpdateRecord2_in_get_dwSettingFlags,
36050 : .set = py_DnssrvUpdateRecord2_in_set_dwSettingFlags,
36051 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
36052 : },
36053 : {
36054 : .name = discard_const_p(char, "in_pwszServerName"),
36055 : .get = py_DnssrvUpdateRecord2_in_get_pwszServerName,
36056 : .set = py_DnssrvUpdateRecord2_in_set_pwszServerName,
36057 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
36058 : },
36059 : {
36060 : .name = discard_const_p(char, "in_pszZone"),
36061 : .get = py_DnssrvUpdateRecord2_in_get_pszZone,
36062 : .set = py_DnssrvUpdateRecord2_in_set_pszZone,
36063 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
36064 : },
36065 : {
36066 : .name = discard_const_p(char, "in_pszNodeName"),
36067 : .get = py_DnssrvUpdateRecord2_in_get_pszNodeName,
36068 : .set = py_DnssrvUpdateRecord2_in_set_pszNodeName,
36069 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
36070 : },
36071 : {
36072 : .name = discard_const_p(char, "in_pAddRecord"),
36073 : .get = py_DnssrvUpdateRecord2_in_get_pAddRecord,
36074 : .set = py_DnssrvUpdateRecord2_in_set_pAddRecord,
36075 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_RECORD_BUF")
36076 : },
36077 : {
36078 : .name = discard_const_p(char, "in_pDeleteRecord"),
36079 : .get = py_DnssrvUpdateRecord2_in_get_pDeleteRecord,
36080 : .set = py_DnssrvUpdateRecord2_in_set_pDeleteRecord,
36081 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_RECORD_BUF")
36082 : },
36083 : {
36084 : .name = discard_const_p(char, "result"),
36085 : .get = py_DnssrvUpdateRecord2_get_result,
36086 : .set = py_DnssrvUpdateRecord2_set_result,
36087 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
36088 : },
36089 : { .name = NULL }
36090 : };
36091 :
36092 0 : static PyObject *py_DnssrvUpdateRecord2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
36093 : {
36094 0 : PyObject *self = pytalloc_new(struct DnssrvUpdateRecord2, type);
36095 0 : return self;
36096 : }
36097 :
36098 0 : static PyObject *py_DnssrvUpdateRecord2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
36099 : {
36100 :
36101 :
36102 0 : return PyLong_FromLong(9);
36103 : }
36104 :
36105 0 : static PyObject *py_DnssrvUpdateRecord2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
36106 : {
36107 0 : const struct ndr_interface_call *call = NULL;
36108 0 : struct DnssrvUpdateRecord2 *object = pytalloc_get_ptr(py_obj);
36109 0 : PyObject *ret = NULL;
36110 0 : struct ndr_push *push = NULL;
36111 0 : DATA_BLOB blob;
36112 0 : enum ndr_err_code err;
36113 :
36114 0 : if (ndr_table_dnsserver.num_calls < 10) {
36115 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvUpdateRecord2_ndr_pack");
36116 0 : return NULL;
36117 : }
36118 0 : call = &ndr_table_dnsserver.calls[9];
36119 :
36120 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
36121 0 : if (push == NULL) {
36122 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
36123 0 : return NULL;
36124 : }
36125 :
36126 0 : push->flags |= ndr_push_flags;
36127 :
36128 0 : err = call->ndr_push(push, ndr_inout_flags, object);
36129 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
36130 0 : TALLOC_FREE(push);
36131 0 : PyErr_SetNdrError(err);
36132 0 : return NULL;
36133 : }
36134 0 : blob = ndr_push_blob(push);
36135 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
36136 0 : TALLOC_FREE(push);
36137 0 : return ret;
36138 : }
36139 :
36140 0 : static PyObject *py_DnssrvUpdateRecord2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
36141 : {
36142 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
36143 0 : PyObject *bigendian_obj = NULL;
36144 0 : PyObject *ndr64_obj = NULL;
36145 0 : libndr_flags ndr_push_flags = 0;
36146 :
36147 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
36148 : discard_const_p(char *, kwnames),
36149 : &bigendian_obj,
36150 : &ndr64_obj)) {
36151 0 : return NULL;
36152 : }
36153 :
36154 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
36155 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
36156 : }
36157 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
36158 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
36159 : }
36160 :
36161 0 : return py_DnssrvUpdateRecord2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
36162 : }
36163 :
36164 0 : static PyObject *py_DnssrvUpdateRecord2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
36165 : {
36166 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
36167 0 : PyObject *bigendian_obj = NULL;
36168 0 : PyObject *ndr64_obj = NULL;
36169 0 : libndr_flags ndr_push_flags = 0;
36170 :
36171 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
36172 : discard_const_p(char *, kwnames),
36173 : &bigendian_obj,
36174 : &ndr64_obj)) {
36175 0 : return NULL;
36176 : }
36177 :
36178 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
36179 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
36180 : }
36181 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
36182 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
36183 : }
36184 :
36185 0 : return py_DnssrvUpdateRecord2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
36186 : }
36187 :
36188 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)
36189 : {
36190 0 : const struct ndr_interface_call *call = NULL;
36191 0 : struct DnssrvUpdateRecord2 *object = pytalloc_get_ptr(py_obj);
36192 0 : struct ndr_pull *pull = NULL;
36193 0 : enum ndr_err_code err;
36194 :
36195 0 : if (ndr_table_dnsserver.num_calls < 10) {
36196 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvUpdateRecord2_ndr_unpack");
36197 0 : return NULL;
36198 : }
36199 0 : call = &ndr_table_dnsserver.calls[9];
36200 :
36201 0 : pull = ndr_pull_init_blob(blob, object);
36202 0 : if (pull == NULL) {
36203 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
36204 0 : return NULL;
36205 : }
36206 :
36207 0 : pull->flags |= ndr_pull_flags;
36208 :
36209 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
36210 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
36211 0 : TALLOC_FREE(pull);
36212 0 : PyErr_SetNdrError(err);
36213 0 : return NULL;
36214 : }
36215 0 : if (!allow_remaining) {
36216 0 : uint32_t highest_ofs;
36217 :
36218 0 : if (pull->offset > pull->relative_highest_offset) {
36219 0 : highest_ofs = pull->offset;
36220 : } else {
36221 0 : highest_ofs = pull->relative_highest_offset;
36222 : }
36223 0 : if (highest_ofs < pull->data_size) {
36224 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
36225 : "not all bytes consumed ofs[%u] size[%u]",
36226 : highest_ofs, pull->data_size);
36227 0 : TALLOC_FREE(pull);
36228 0 : PyErr_SetNdrError(err);
36229 0 : return NULL;
36230 : }
36231 : }
36232 :
36233 0 : TALLOC_FREE(pull);
36234 0 : Py_RETURN_NONE;
36235 : }
36236 :
36237 0 : static PyObject *py_DnssrvUpdateRecord2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
36238 : {
36239 0 : DATA_BLOB blob;
36240 0 : Py_ssize_t blob_length = 0;
36241 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
36242 0 : PyObject *bigendian_obj = NULL;
36243 0 : PyObject *ndr64_obj = NULL;
36244 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
36245 0 : PyObject *allow_remaining_obj = NULL;
36246 0 : bool allow_remaining = false;
36247 :
36248 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
36249 : discard_const_p(char *, kwnames),
36250 : &blob.data, &blob_length,
36251 : &bigendian_obj,
36252 : &ndr64_obj,
36253 : &allow_remaining_obj)) {
36254 0 : return NULL;
36255 : }
36256 0 : blob.length = blob_length;
36257 :
36258 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
36259 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
36260 : }
36261 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
36262 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
36263 : }
36264 :
36265 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
36266 0 : allow_remaining = true;
36267 : }
36268 :
36269 0 : return py_DnssrvUpdateRecord2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
36270 : }
36271 :
36272 0 : static PyObject *py_DnssrvUpdateRecord2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
36273 : {
36274 0 : DATA_BLOB blob;
36275 0 : Py_ssize_t blob_length = 0;
36276 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
36277 0 : PyObject *bigendian_obj = NULL;
36278 0 : PyObject *ndr64_obj = NULL;
36279 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
36280 0 : PyObject *allow_remaining_obj = NULL;
36281 0 : bool allow_remaining = false;
36282 :
36283 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
36284 : discard_const_p(char *, kwnames),
36285 : &blob.data, &blob_length,
36286 : &bigendian_obj,
36287 : &ndr64_obj,
36288 : &allow_remaining_obj)) {
36289 0 : return NULL;
36290 : }
36291 0 : blob.length = blob_length;
36292 :
36293 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
36294 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
36295 : }
36296 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
36297 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
36298 : }
36299 :
36300 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
36301 0 : allow_remaining = true;
36302 : }
36303 :
36304 0 : return py_DnssrvUpdateRecord2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
36305 : }
36306 :
36307 0 : static PyObject *py_DnssrvUpdateRecord2_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
36308 : {
36309 0 : const struct ndr_interface_call *call = NULL;
36310 0 : struct DnssrvUpdateRecord2 *object = pytalloc_get_ptr(py_obj);
36311 0 : PyObject *ret;
36312 0 : char *retstr;
36313 :
36314 0 : if (ndr_table_dnsserver.num_calls < 10) {
36315 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvUpdateRecord2_ndr_print");
36316 0 : return NULL;
36317 : }
36318 0 : call = &ndr_table_dnsserver.calls[9];
36319 :
36320 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
36321 0 : ret = PyUnicode_FromString(retstr);
36322 0 : TALLOC_FREE(retstr);
36323 :
36324 0 : return ret;
36325 : }
36326 :
36327 0 : static PyObject *py_DnssrvUpdateRecord2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
36328 : {
36329 0 : return py_DnssrvUpdateRecord2_ndr_print(py_obj, "DnssrvUpdateRecord2_in", NDR_IN);
36330 : }
36331 :
36332 0 : static PyObject *py_DnssrvUpdateRecord2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
36333 : {
36334 0 : return py_DnssrvUpdateRecord2_ndr_print(py_obj, "DnssrvUpdateRecord2_out", NDR_OUT);
36335 : }
36336 :
36337 : static PyMethodDef py_DnssrvUpdateRecord2_methods[] = {
36338 : { "opnum", (PyCFunction)py_DnssrvUpdateRecord2_ndr_opnum, METH_NOARGS|METH_CLASS,
36339 : "dnsserver.DnssrvUpdateRecord2.opnum() -> 9 (0x09) " },
36340 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvUpdateRecord2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
36341 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
36342 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvUpdateRecord2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
36343 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
36344 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvUpdateRecord2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
36345 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
36346 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvUpdateRecord2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
36347 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
36348 : { "__ndr_print_in__", (PyCFunction)py_DnssrvUpdateRecord2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
36349 : { "__ndr_print_out__", (PyCFunction)py_DnssrvUpdateRecord2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
36350 : { NULL, NULL, 0, NULL }
36351 : };
36352 :
36353 :
36354 : static PyTypeObject DnssrvUpdateRecord2_Type = {
36355 : PyVarObject_HEAD_INIT(NULL, 0)
36356 : .tp_name = "dnsserver.DnssrvUpdateRecord2",
36357 : .tp_getset = py_DnssrvUpdateRecord2_getsetters,
36358 : .tp_methods = py_DnssrvUpdateRecord2_methods,
36359 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
36360 : .tp_new = py_DnssrvUpdateRecord2_new,
36361 : };
36362 :
36363 4090 : static bool pack_py_DnssrvUpdateRecord2_args_in(PyObject *args, PyObject *kwargs, struct DnssrvUpdateRecord2 *r)
36364 : {
36365 0 : PyObject *py_dwClientVersion;
36366 0 : PyObject *py_dwSettingFlags;
36367 0 : PyObject *py_pwszServerName;
36368 0 : PyObject *py_pszZone;
36369 0 : PyObject *py_pszNodeName;
36370 0 : PyObject *py_pAddRecord;
36371 0 : PyObject *py_pDeleteRecord;
36372 4090 : const char *kwnames[] = {
36373 : "dwClientVersion", "dwSettingFlags", "pwszServerName", "pszZone", "pszNodeName", "pAddRecord", "pDeleteRecord", NULL
36374 : };
36375 :
36376 4090 : 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)) {
36377 0 : return false;
36378 : }
36379 :
36380 4090 : if (py_dwClientVersion == NULL) {
36381 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dwClientVersion");
36382 0 : return false;
36383 : }
36384 : {
36385 4090 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwClientVersion));
36386 4090 : if (PyLong_Check(py_dwClientVersion)) {
36387 0 : unsigned long long test_var;
36388 4090 : test_var = PyLong_AsUnsignedLongLong(py_dwClientVersion);
36389 4090 : if (PyErr_Occurred() != NULL) {
36390 0 : return false;
36391 : }
36392 4090 : if (test_var > uint_max) {
36393 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
36394 : PyLong_Type.tp_name, uint_max, test_var);
36395 0 : return false;
36396 : }
36397 4090 : r->in.dwClientVersion = test_var;
36398 : } else {
36399 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
36400 : PyLong_Type.tp_name);
36401 0 : return false;
36402 : }
36403 : }
36404 4090 : if (py_dwSettingFlags == NULL) {
36405 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.dwSettingFlags");
36406 0 : return false;
36407 : }
36408 : {
36409 4090 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwSettingFlags));
36410 4090 : if (PyLong_Check(py_dwSettingFlags)) {
36411 0 : unsigned long long test_var;
36412 4090 : test_var = PyLong_AsUnsignedLongLong(py_dwSettingFlags);
36413 4090 : if (PyErr_Occurred() != NULL) {
36414 0 : return false;
36415 : }
36416 4090 : if (test_var > uint_max) {
36417 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
36418 : PyLong_Type.tp_name, uint_max, test_var);
36419 0 : return false;
36420 : }
36421 4090 : r->in.dwSettingFlags = test_var;
36422 : } else {
36423 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
36424 : PyLong_Type.tp_name);
36425 0 : return false;
36426 : }
36427 : }
36428 4090 : if (py_pwszServerName == NULL) {
36429 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pwszServerName");
36430 0 : return false;
36431 : }
36432 4090 : if (py_pwszServerName == Py_None) {
36433 0 : r->in.pwszServerName = NULL;
36434 : } else {
36435 4090 : r->in.pwszServerName = NULL;
36436 : {
36437 0 : const char *test_str;
36438 0 : const char *talloc_str;
36439 4090 : PyObject *unicode = NULL;
36440 4090 : if (PyUnicode_Check(py_pwszServerName)) {
36441 4090 : unicode = PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore");
36442 4090 : if (unicode == NULL) {
36443 0 : return false;
36444 : }
36445 4090 : test_str = PyBytes_AS_STRING(unicode);
36446 0 : } else if (PyBytes_Check(py_pwszServerName)) {
36447 0 : test_str = PyBytes_AS_STRING(py_pwszServerName);
36448 : } else {
36449 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
36450 0 : return false;
36451 : }
36452 4090 : talloc_str = talloc_strdup(r, test_str);
36453 4090 : if (unicode != NULL) {
36454 3032 : Py_DECREF(unicode);
36455 : }
36456 4090 : if (talloc_str == NULL) {
36457 0 : PyErr_NoMemory();
36458 0 : return false;
36459 : }
36460 4090 : r->in.pwszServerName = talloc_str;
36461 : }
36462 : }
36463 4090 : if (py_pszZone == NULL) {
36464 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszZone");
36465 0 : return false;
36466 : }
36467 4090 : if (py_pszZone == Py_None) {
36468 0 : r->in.pszZone = NULL;
36469 : } else {
36470 4090 : r->in.pszZone = NULL;
36471 : {
36472 0 : const char *test_str;
36473 0 : const char *talloc_str;
36474 4090 : PyObject *unicode = NULL;
36475 4090 : if (PyUnicode_Check(py_pszZone)) {
36476 4090 : unicode = PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore");
36477 4090 : if (unicode == NULL) {
36478 0 : return false;
36479 : }
36480 4090 : test_str = PyBytes_AS_STRING(unicode);
36481 0 : } else if (PyBytes_Check(py_pszZone)) {
36482 0 : test_str = PyBytes_AS_STRING(py_pszZone);
36483 : } else {
36484 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
36485 0 : return false;
36486 : }
36487 4090 : talloc_str = talloc_strdup(r, test_str);
36488 4090 : if (unicode != NULL) {
36489 3032 : Py_DECREF(unicode);
36490 : }
36491 4090 : if (talloc_str == NULL) {
36492 0 : PyErr_NoMemory();
36493 0 : return false;
36494 : }
36495 4090 : r->in.pszZone = talloc_str;
36496 : }
36497 : }
36498 4090 : if (py_pszNodeName == NULL) {
36499 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pszNodeName");
36500 0 : return false;
36501 : }
36502 4090 : r->in.pszNodeName = talloc_ptrtype(r, r->in.pszNodeName);
36503 4090 : if (r->in.pszNodeName == NULL) {
36504 0 : PyErr_NoMemory();
36505 0 : return false;
36506 : }
36507 : {
36508 0 : const char *test_str;
36509 0 : const char *talloc_str;
36510 4090 : PyObject *unicode = NULL;
36511 4090 : if (PyUnicode_Check(py_pszNodeName)) {
36512 4090 : unicode = PyUnicode_AsEncodedString(py_pszNodeName, "utf-8", "ignore");
36513 4090 : if (unicode == NULL) {
36514 0 : return false;
36515 : }
36516 4090 : test_str = PyBytes_AS_STRING(unicode);
36517 0 : } else if (PyBytes_Check(py_pszNodeName)) {
36518 0 : test_str = PyBytes_AS_STRING(py_pszNodeName);
36519 : } else {
36520 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszNodeName)->tp_name);
36521 0 : return false;
36522 : }
36523 4090 : talloc_str = talloc_strdup(r, test_str);
36524 4090 : if (unicode != NULL) {
36525 3032 : Py_DECREF(unicode);
36526 : }
36527 4090 : if (talloc_str == NULL) {
36528 0 : PyErr_NoMemory();
36529 0 : return false;
36530 : }
36531 4090 : r->in.pszNodeName = talloc_str;
36532 : }
36533 4090 : if (py_pAddRecord == NULL) {
36534 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pAddRecord");
36535 0 : return false;
36536 : }
36537 4090 : if (py_pAddRecord == Py_None) {
36538 1660 : r->in.pAddRecord = NULL;
36539 : } else {
36540 2430 : r->in.pAddRecord = NULL;
36541 2430 : PY_CHECK_TYPE(&DNS_RPC_RECORD_BUF_Type, py_pAddRecord, return false;);
36542 2430 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_pAddRecord)) == NULL) {
36543 0 : PyErr_NoMemory();
36544 0 : return false;
36545 : }
36546 2430 : r->in.pAddRecord = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(py_pAddRecord);
36547 : }
36548 4090 : if (py_pDeleteRecord == NULL) {
36549 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: r->in.pDeleteRecord");
36550 0 : return false;
36551 : }
36552 4090 : if (py_pDeleteRecord == Py_None) {
36553 2289 : r->in.pDeleteRecord = NULL;
36554 : } else {
36555 1801 : r->in.pDeleteRecord = NULL;
36556 1801 : PY_CHECK_TYPE(&DNS_RPC_RECORD_BUF_Type, py_pDeleteRecord, return false;);
36557 1801 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_pDeleteRecord)) == NULL) {
36558 0 : PyErr_NoMemory();
36559 0 : return false;
36560 : }
36561 1801 : r->in.pDeleteRecord = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(py_pDeleteRecord);
36562 : }
36563 4090 : return true;
36564 : }
36565 :
36566 4002 : static PyObject *unpack_py_DnssrvUpdateRecord2_args_out(struct DnssrvUpdateRecord2 *r)
36567 : {
36568 0 : PyObject *result;
36569 4002 : result = Py_None;
36570 2968 : Py_INCREF(result);
36571 4002 : if (!W_ERROR_IS_OK(r->out.result)) {
36572 556 : PyErr_SetWERROR(r->out.result);
36573 556 : return NULL;
36574 : }
36575 :
36576 3446 : return result;
36577 : }
36578 :
36579 : const struct PyNdrRpcMethodDef py_ndr_dnsserver_methods[] = {
36580 : { "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 },
36581 : { "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 },
36582 : { "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 },
36583 : { "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 },
36584 : { "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 },
36585 : { "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 },
36586 : { "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 },
36587 : { "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 },
36588 : { "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 },
36589 : { "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 },
36590 : {0}
36591 : };
36592 :
36593 1609 : static PyObject *interface_dnsserver_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
36594 : {
36595 1609 : return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_dnsserver);
36596 : }
36597 :
36598 : #define PY_DOC_DNSSERVER "DNS Management Server"
36599 : static PyTypeObject dnsserver_InterfaceType = {
36600 : PyVarObject_HEAD_INIT(NULL, 0)
36601 : .tp_name = "dnsserver.dnsserver",
36602 : .tp_basicsize = sizeof(dcerpc_InterfaceObject),
36603 : .tp_doc = "dnsserver(binding, lp_ctx=None, credentials=None) -> connection\n"
36604 : "\n"
36605 : "binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
36606 : "lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
36607 : "credentials should be a credentials.Credentials object.\n\n"PY_DOC_DNSSERVER,
36608 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
36609 : .tp_new = interface_dnsserver_new,
36610 : };
36611 :
36612 0 : static PyObject *syntax_dnsserver_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
36613 : {
36614 0 : return py_dcerpc_syntax_init_helper(type, args, kwargs, &ndr_table_dnsserver.syntax_id);
36615 : }
36616 :
36617 : #define PY_DOC_DNSSERVER_SYNTAX "DNS Management Server"
36618 : static PyTypeObject dnsserver_SyntaxType = {
36619 : PyVarObject_HEAD_INIT(NULL, 0)
36620 : .tp_name = "dnsserver.dnsserver_abstract_syntax",
36621 : .tp_doc = "dnsserver_abstract_syntax()\n"PY_DOC_DNSSERVER_SYNTAX,
36622 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
36623 : .tp_new = syntax_dnsserver_new,
36624 : };
36625 :
36626 : static PyMethodDef dnsserver_methods[] = {
36627 : { NULL, NULL, 0, NULL }
36628 : };
36629 :
36630 : static struct PyModuleDef moduledef = {
36631 : PyModuleDef_HEAD_INIT,
36632 : .m_name = "dnsserver",
36633 : .m_doc = "dnsserver DCE/RPC",
36634 : .m_size = -1,
36635 : .m_methods = dnsserver_methods,
36636 : };
36637 1702 : MODULE_INIT_FUNC(dnsserver)
36638 : {
36639 1702 : PyObject *m = NULL;
36640 1702 : PyObject *dep_samba_dcerpc_misc = NULL;
36641 1702 : PyObject *dep_samba_dcerpc_dnsp = NULL;
36642 1702 : PyObject *dep_talloc = NULL;
36643 1702 : PyObject *dep_samba_dcerpc_base = NULL;
36644 :
36645 1702 : dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
36646 1702 : if (dep_samba_dcerpc_misc == NULL)
36647 0 : goto out;
36648 :
36649 1702 : dep_samba_dcerpc_dnsp = PyImport_ImportModule("samba.dcerpc.dnsp");
36650 1702 : if (dep_samba_dcerpc_dnsp == NULL)
36651 0 : goto out;
36652 :
36653 1702 : dep_talloc = PyImport_ImportModule("talloc");
36654 1702 : if (dep_talloc == NULL)
36655 0 : goto out;
36656 :
36657 1702 : dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
36658 1702 : if (dep_samba_dcerpc_base == NULL)
36659 0 : goto out;
36660 :
36661 1702 : BaseObject_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "BaseObject");
36662 1702 : if (BaseObject_Type == NULL)
36663 0 : goto out;
36664 :
36665 1702 : ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
36666 1702 : if (ClientConnection_Type == NULL)
36667 0 : goto out;
36668 :
36669 1702 : ndr_syntax_id_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "ndr_syntax_id");
36670 1702 : if (ndr_syntax_id_Type == NULL)
36671 0 : goto out;
36672 :
36673 1702 : DNS_RPC_BUFFER_Type.tp_base = BaseObject_Type;
36674 1702 : DNS_RPC_BUFFER_Type.tp_basicsize = pytalloc_BaseObject_size();
36675 :
36676 1702 : DNS_RPC_UTF8_STRING_LIST_Type.tp_base = BaseObject_Type;
36677 1702 : DNS_RPC_UTF8_STRING_LIST_Type.tp_basicsize = pytalloc_BaseObject_size();
36678 :
36679 1702 : DNS_RPC_NAME_AND_PARAM_Type.tp_base = BaseObject_Type;
36680 1702 : DNS_RPC_NAME_AND_PARAM_Type.tp_basicsize = pytalloc_BaseObject_size();
36681 :
36682 1702 : DNS_RPC_NAME_Type.tp_base = BaseObject_Type;
36683 1702 : DNS_RPC_NAME_Type.tp_basicsize = pytalloc_BaseObject_size();
36684 :
36685 1702 : DNS_RPC_NODE_Type.tp_base = BaseObject_Type;
36686 1702 : DNS_RPC_NODE_Type.tp_basicsize = pytalloc_BaseObject_size();
36687 :
36688 1702 : DNS_RPC_RECORD_SOA_Type.tp_base = BaseObject_Type;
36689 1702 : DNS_RPC_RECORD_SOA_Type.tp_basicsize = pytalloc_BaseObject_size();
36690 :
36691 1702 : DNS_RPC_RECORD_NAME_PREFERENCE_Type.tp_base = BaseObject_Type;
36692 1702 : DNS_RPC_RECORD_NAME_PREFERENCE_Type.tp_basicsize = pytalloc_BaseObject_size();
36693 :
36694 1702 : DNS_RPC_RECORD_STRING_Type.tp_base = BaseObject_Type;
36695 1702 : DNS_RPC_RECORD_STRING_Type.tp_basicsize = pytalloc_BaseObject_size();
36696 :
36697 1702 : DNS_RPC_RECORD_SRV_Type.tp_base = BaseObject_Type;
36698 1702 : DNS_RPC_RECORD_SRV_Type.tp_basicsize = pytalloc_BaseObject_size();
36699 :
36700 1702 : DNS_RPC_RECORD_DATA_Type.tp_base = BaseObject_Type;
36701 1702 : DNS_RPC_RECORD_DATA_Type.tp_basicsize = pytalloc_BaseObject_size();
36702 :
36703 1702 : DNS_RPC_RECORD_Type.tp_base = BaseObject_Type;
36704 1702 : DNS_RPC_RECORD_Type.tp_basicsize = pytalloc_BaseObject_size();
36705 :
36706 1702 : DNS_RPC_RECORD_BUF_Type.tp_base = BaseObject_Type;
36707 1702 : DNS_RPC_RECORD_BUF_Type.tp_basicsize = pytalloc_BaseObject_size();
36708 :
36709 1702 : IP4_ARRAY_Type.tp_base = BaseObject_Type;
36710 1702 : IP4_ARRAY_Type.tp_basicsize = pytalloc_BaseObject_size();
36711 :
36712 1702 : DNS_ADDR_Type.tp_base = BaseObject_Type;
36713 1702 : DNS_ADDR_Type.tp_basicsize = pytalloc_BaseObject_size();
36714 :
36715 1702 : DNS_ADDR_ARRAY_Type.tp_base = BaseObject_Type;
36716 1702 : DNS_ADDR_ARRAY_Type.tp_basicsize = pytalloc_BaseObject_size();
36717 :
36718 1702 : DNS_RPC_IP_VALIDATE_Type.tp_base = BaseObject_Type;
36719 1702 : DNS_RPC_IP_VALIDATE_Type.tp_basicsize = pytalloc_BaseObject_size();
36720 :
36721 1702 : DNS_RPC_SERVER_INFO_W2K_Type.tp_base = BaseObject_Type;
36722 1702 : DNS_RPC_SERVER_INFO_W2K_Type.tp_basicsize = pytalloc_BaseObject_size();
36723 :
36724 1702 : DNS_EXTENSION_Type.tp_base = BaseObject_Type;
36725 1702 : DNS_EXTENSION_Type.tp_basicsize = pytalloc_BaseObject_size();
36726 :
36727 1702 : DNS_RPC_SERVER_INFO_DOTNET_Type.tp_base = BaseObject_Type;
36728 1702 : DNS_RPC_SERVER_INFO_DOTNET_Type.tp_basicsize = pytalloc_BaseObject_size();
36729 :
36730 1702 : DNS_RPC_SERVER_INFO_LONGHORN_Type.tp_base = BaseObject_Type;
36731 1702 : DNS_RPC_SERVER_INFO_LONGHORN_Type.tp_basicsize = pytalloc_BaseObject_size();
36732 :
36733 1702 : DNS_RPC_DP_REPLICA_Type.tp_base = BaseObject_Type;
36734 1702 : DNS_RPC_DP_REPLICA_Type.tp_basicsize = pytalloc_BaseObject_size();
36735 :
36736 1702 : DNS_RPC_DP_INFO_Type.tp_base = BaseObject_Type;
36737 1702 : DNS_RPC_DP_INFO_Type.tp_basicsize = pytalloc_BaseObject_size();
36738 :
36739 1702 : DNS_RPC_DP_ENUM_Type.tp_base = BaseObject_Type;
36740 1702 : DNS_RPC_DP_ENUM_Type.tp_basicsize = pytalloc_BaseObject_size();
36741 :
36742 1702 : DNS_RPC_DP_LIST_Type.tp_base = BaseObject_Type;
36743 1702 : DNS_RPC_DP_LIST_Type.tp_basicsize = pytalloc_BaseObject_size();
36744 :
36745 1702 : DNS_RPC_ENLIST_DP_Type.tp_base = BaseObject_Type;
36746 1702 : DNS_RPC_ENLIST_DP_Type.tp_basicsize = pytalloc_BaseObject_size();
36747 :
36748 1702 : DNS_RPC_ZONE_CHANGE_DP_Type.tp_base = BaseObject_Type;
36749 1702 : DNS_RPC_ZONE_CHANGE_DP_Type.tp_basicsize = pytalloc_BaseObject_size();
36750 :
36751 1702 : DNS_RPC_ZONE_W2K_Type.tp_base = BaseObject_Type;
36752 1702 : DNS_RPC_ZONE_W2K_Type.tp_basicsize = pytalloc_BaseObject_size();
36753 :
36754 1702 : DNS_RPC_ZONE_DOTNET_Type.tp_base = BaseObject_Type;
36755 1702 : DNS_RPC_ZONE_DOTNET_Type.tp_basicsize = pytalloc_BaseObject_size();
36756 :
36757 1702 : DNS_RPC_ZONE_LIST_W2K_Type.tp_base = BaseObject_Type;
36758 1702 : DNS_RPC_ZONE_LIST_W2K_Type.tp_basicsize = pytalloc_BaseObject_size();
36759 :
36760 1702 : DNS_RPC_ZONE_LIST_DOTNET_Type.tp_base = BaseObject_Type;
36761 1702 : DNS_RPC_ZONE_LIST_DOTNET_Type.tp_basicsize = pytalloc_BaseObject_size();
36762 :
36763 1702 : DNS_RPC_ZONE_INFO_W2K_Type.tp_base = BaseObject_Type;
36764 1702 : DNS_RPC_ZONE_INFO_W2K_Type.tp_basicsize = pytalloc_BaseObject_size();
36765 :
36766 1702 : DNS_RPC_ZONE_INFO_DOTNET_Type.tp_base = BaseObject_Type;
36767 1702 : DNS_RPC_ZONE_INFO_DOTNET_Type.tp_basicsize = pytalloc_BaseObject_size();
36768 :
36769 1702 : DNS_RPC_ZONE_INFO_LONGHORN_Type.tp_base = BaseObject_Type;
36770 1702 : DNS_RPC_ZONE_INFO_LONGHORN_Type.tp_basicsize = pytalloc_BaseObject_size();
36771 :
36772 1702 : DNS_RPC_ZONE_SECONDARIES_W2K_Type.tp_base = BaseObject_Type;
36773 1702 : DNS_RPC_ZONE_SECONDARIES_W2K_Type.tp_basicsize = pytalloc_BaseObject_size();
36774 :
36775 1702 : DNS_RPC_ZONE_SECONDARIES_DOTNET_Type.tp_base = BaseObject_Type;
36776 1702 : DNS_RPC_ZONE_SECONDARIES_DOTNET_Type.tp_basicsize = pytalloc_BaseObject_size();
36777 :
36778 1702 : DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type.tp_base = BaseObject_Type;
36779 1702 : DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type.tp_basicsize = pytalloc_BaseObject_size();
36780 :
36781 1702 : DNS_RPC_ZONE_DATABASE_W2K_Type.tp_base = BaseObject_Type;
36782 1702 : DNS_RPC_ZONE_DATABASE_W2K_Type.tp_basicsize = pytalloc_BaseObject_size();
36783 :
36784 1702 : DNS_RPC_ZONE_DATABASE_DOTNET_Type.tp_base = BaseObject_Type;
36785 1702 : DNS_RPC_ZONE_DATABASE_DOTNET_Type.tp_basicsize = pytalloc_BaseObject_size();
36786 :
36787 1702 : DNS_RPC_ZONE_CREATE_INFO_W2K_Type.tp_base = BaseObject_Type;
36788 1702 : DNS_RPC_ZONE_CREATE_INFO_W2K_Type.tp_basicsize = pytalloc_BaseObject_size();
36789 :
36790 1702 : DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type.tp_base = BaseObject_Type;
36791 1702 : DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type.tp_basicsize = pytalloc_BaseObject_size();
36792 :
36793 1702 : DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type.tp_base = BaseObject_Type;
36794 1702 : DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type.tp_basicsize = pytalloc_BaseObject_size();
36795 :
36796 1702 : DNS_RPC_ZONE_EXPORT_INFO_Type.tp_base = BaseObject_Type;
36797 1702 : DNS_RPC_ZONE_EXPORT_INFO_Type.tp_basicsize = pytalloc_BaseObject_size();
36798 :
36799 1702 : DNS_RPC_ENUM_ZONES_FILTER_Type.tp_base = BaseObject_Type;
36800 1702 : DNS_RPC_ENUM_ZONES_FILTER_Type.tp_basicsize = pytalloc_BaseObject_size();
36801 :
36802 1702 : DNS_RPC_FORWARDERS_W2K_Type.tp_base = BaseObject_Type;
36803 1702 : DNS_RPC_FORWARDERS_W2K_Type.tp_basicsize = pytalloc_BaseObject_size();
36804 :
36805 1702 : DNS_RPC_FORWARDERS_DOTNET_Type.tp_base = BaseObject_Type;
36806 1702 : DNS_RPC_FORWARDERS_DOTNET_Type.tp_basicsize = pytalloc_BaseObject_size();
36807 :
36808 1702 : DNS_RPC_FORWARDERS_LONGHORN_Type.tp_base = BaseObject_Type;
36809 1702 : DNS_RPC_FORWARDERS_LONGHORN_Type.tp_basicsize = pytalloc_BaseObject_size();
36810 :
36811 1702 : DNS_RPC_AUTOCONFIGURE_Type.tp_base = BaseObject_Type;
36812 1702 : DNS_RPC_AUTOCONFIGURE_Type.tp_basicsize = pytalloc_BaseObject_size();
36813 :
36814 1702 : DNSSRV_STAT_HEADER_Type.tp_base = BaseObject_Type;
36815 1702 : DNSSRV_STAT_HEADER_Type.tp_basicsize = pytalloc_BaseObject_size();
36816 :
36817 1702 : DNSSRV_STAT_Type.tp_base = BaseObject_Type;
36818 1702 : DNSSRV_STAT_Type.tp_basicsize = pytalloc_BaseObject_size();
36819 :
36820 1702 : DNSSRV_RPC_UNION_Type.tp_base = BaseObject_Type;
36821 1702 : DNSSRV_RPC_UNION_Type.tp_basicsize = pytalloc_BaseObject_size();
36822 :
36823 1702 : DNS_RPC_RECORDS_Type.tp_base = BaseObject_Type;
36824 1702 : DNS_RPC_RECORDS_Type.tp_basicsize = pytalloc_BaseObject_size();
36825 :
36826 1702 : DNS_RPC_RECORDS_ARRAY_Type.tp_base = BaseObject_Type;
36827 1702 : DNS_RPC_RECORDS_ARRAY_Type.tp_basicsize = pytalloc_BaseObject_size();
36828 :
36829 1702 : DnssrvOperation_Type.tp_base = BaseObject_Type;
36830 1702 : DnssrvOperation_Type.tp_basicsize = pytalloc_BaseObject_size();
36831 :
36832 1702 : DnssrvQuery_Type.tp_base = BaseObject_Type;
36833 1702 : DnssrvQuery_Type.tp_basicsize = pytalloc_BaseObject_size();
36834 :
36835 1702 : DnssrvComplexOperation_Type.tp_base = BaseObject_Type;
36836 1702 : DnssrvComplexOperation_Type.tp_basicsize = pytalloc_BaseObject_size();
36837 :
36838 1702 : DnssrvEnumRecords_Type.tp_base = BaseObject_Type;
36839 1702 : DnssrvEnumRecords_Type.tp_basicsize = pytalloc_BaseObject_size();
36840 :
36841 1702 : DnssrvUpdateRecord_Type.tp_base = BaseObject_Type;
36842 1702 : DnssrvUpdateRecord_Type.tp_basicsize = pytalloc_BaseObject_size();
36843 :
36844 1702 : DnssrvOperation2_Type.tp_base = BaseObject_Type;
36845 1702 : DnssrvOperation2_Type.tp_basicsize = pytalloc_BaseObject_size();
36846 :
36847 1702 : DnssrvQuery2_Type.tp_base = BaseObject_Type;
36848 1702 : DnssrvQuery2_Type.tp_basicsize = pytalloc_BaseObject_size();
36849 :
36850 1702 : DnssrvComplexOperation2_Type.tp_base = BaseObject_Type;
36851 1702 : DnssrvComplexOperation2_Type.tp_basicsize = pytalloc_BaseObject_size();
36852 :
36853 1702 : DnssrvEnumRecords2_Type.tp_base = BaseObject_Type;
36854 1702 : DnssrvEnumRecords2_Type.tp_basicsize = pytalloc_BaseObject_size();
36855 :
36856 1702 : DnssrvUpdateRecord2_Type.tp_base = BaseObject_Type;
36857 1702 : DnssrvUpdateRecord2_Type.tp_basicsize = pytalloc_BaseObject_size();
36858 :
36859 1702 : dnsserver_InterfaceType.tp_base = ClientConnection_Type;
36860 :
36861 1702 : dnsserver_SyntaxType.tp_base = ndr_syntax_id_Type;
36862 1702 : dnsserver_SyntaxType.tp_basicsize = pytalloc_BaseObject_size();
36863 :
36864 1702 : if (PyType_Ready(&DNS_RPC_BUFFER_Type) < 0)
36865 0 : goto out;
36866 1702 : if (PyType_Ready(&DNS_RPC_UTF8_STRING_LIST_Type) < 0)
36867 0 : goto out;
36868 1702 : if (PyType_Ready(&DNS_RPC_NAME_AND_PARAM_Type) < 0)
36869 0 : goto out;
36870 1702 : if (PyType_Ready(&DNS_RPC_NAME_Type) < 0)
36871 0 : goto out;
36872 1702 : if (PyType_Ready(&DNS_RPC_NODE_Type) < 0)
36873 0 : goto out;
36874 1702 : if (PyType_Ready(&DNS_RPC_RECORD_SOA_Type) < 0)
36875 0 : goto out;
36876 1702 : if (PyType_Ready(&DNS_RPC_RECORD_NAME_PREFERENCE_Type) < 0)
36877 0 : goto out;
36878 1702 : if (PyType_Ready(&DNS_RPC_RECORD_STRING_Type) < 0)
36879 0 : goto out;
36880 1702 : if (PyType_Ready(&DNS_RPC_RECORD_SRV_Type) < 0)
36881 0 : goto out;
36882 1702 : if (PyType_Ready(&DNS_RPC_RECORD_DATA_Type) < 0)
36883 0 : goto out;
36884 1702 : if (PyType_Ready(&DNS_RPC_RECORD_Type) < 0)
36885 0 : goto out;
36886 1702 : if (PyType_Ready(&DNS_RPC_RECORD_BUF_Type) < 0)
36887 0 : goto out;
36888 1702 : if (PyType_Ready(&IP4_ARRAY_Type) < 0)
36889 0 : goto out;
36890 1702 : if (PyType_Ready(&DNS_ADDR_Type) < 0)
36891 0 : goto out;
36892 1702 : if (PyType_Ready(&DNS_ADDR_ARRAY_Type) < 0)
36893 0 : goto out;
36894 1702 : if (PyType_Ready(&DNS_RPC_IP_VALIDATE_Type) < 0)
36895 0 : goto out;
36896 1702 : if (PyType_Ready(&DNS_RPC_SERVER_INFO_W2K_Type) < 0)
36897 0 : goto out;
36898 1702 : if (PyType_Ready(&DNS_EXTENSION_Type) < 0)
36899 0 : goto out;
36900 1702 : if (PyType_Ready(&DNS_RPC_SERVER_INFO_DOTNET_Type) < 0)
36901 0 : goto out;
36902 1702 : if (PyType_Ready(&DNS_RPC_SERVER_INFO_LONGHORN_Type) < 0)
36903 0 : goto out;
36904 1702 : if (PyType_Ready(&DNS_RPC_DP_REPLICA_Type) < 0)
36905 0 : goto out;
36906 1702 : if (PyType_Ready(&DNS_RPC_DP_INFO_Type) < 0)
36907 0 : goto out;
36908 1702 : if (PyType_Ready(&DNS_RPC_DP_ENUM_Type) < 0)
36909 0 : goto out;
36910 1702 : if (PyType_Ready(&DNS_RPC_DP_LIST_Type) < 0)
36911 0 : goto out;
36912 1702 : if (PyType_Ready(&DNS_RPC_ENLIST_DP_Type) < 0)
36913 0 : goto out;
36914 1702 : if (PyType_Ready(&DNS_RPC_ZONE_CHANGE_DP_Type) < 0)
36915 0 : goto out;
36916 1702 : if (PyType_Ready(&DNS_RPC_ZONE_W2K_Type) < 0)
36917 0 : goto out;
36918 1702 : if (PyType_Ready(&DNS_RPC_ZONE_DOTNET_Type) < 0)
36919 0 : goto out;
36920 1702 : if (PyType_Ready(&DNS_RPC_ZONE_LIST_W2K_Type) < 0)
36921 0 : goto out;
36922 1702 : if (PyType_Ready(&DNS_RPC_ZONE_LIST_DOTNET_Type) < 0)
36923 0 : goto out;
36924 1702 : if (PyType_Ready(&DNS_RPC_ZONE_INFO_W2K_Type) < 0)
36925 0 : goto out;
36926 1702 : if (PyType_Ready(&DNS_RPC_ZONE_INFO_DOTNET_Type) < 0)
36927 0 : goto out;
36928 1702 : if (PyType_Ready(&DNS_RPC_ZONE_INFO_LONGHORN_Type) < 0)
36929 0 : goto out;
36930 1702 : if (PyType_Ready(&DNS_RPC_ZONE_SECONDARIES_W2K_Type) < 0)
36931 0 : goto out;
36932 1702 : if (PyType_Ready(&DNS_RPC_ZONE_SECONDARIES_DOTNET_Type) < 0)
36933 0 : goto out;
36934 1702 : if (PyType_Ready(&DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type) < 0)
36935 0 : goto out;
36936 1702 : if (PyType_Ready(&DNS_RPC_ZONE_DATABASE_W2K_Type) < 0)
36937 0 : goto out;
36938 1702 : if (PyType_Ready(&DNS_RPC_ZONE_DATABASE_DOTNET_Type) < 0)
36939 0 : goto out;
36940 1702 : if (PyType_Ready(&DNS_RPC_ZONE_CREATE_INFO_W2K_Type) < 0)
36941 0 : goto out;
36942 1702 : if (PyType_Ready(&DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type) < 0)
36943 0 : goto out;
36944 1702 : if (PyType_Ready(&DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type) < 0)
36945 0 : goto out;
36946 1702 : if (PyType_Ready(&DNS_RPC_ZONE_EXPORT_INFO_Type) < 0)
36947 0 : goto out;
36948 1702 : if (PyType_Ready(&DNS_RPC_ENUM_ZONES_FILTER_Type) < 0)
36949 0 : goto out;
36950 1702 : if (PyType_Ready(&DNS_RPC_FORWARDERS_W2K_Type) < 0)
36951 0 : goto out;
36952 1702 : if (PyType_Ready(&DNS_RPC_FORWARDERS_DOTNET_Type) < 0)
36953 0 : goto out;
36954 1702 : if (PyType_Ready(&DNS_RPC_FORWARDERS_LONGHORN_Type) < 0)
36955 0 : goto out;
36956 1702 : if (PyType_Ready(&DNS_RPC_AUTOCONFIGURE_Type) < 0)
36957 0 : goto out;
36958 1702 : if (PyType_Ready(&DNSSRV_STAT_HEADER_Type) < 0)
36959 0 : goto out;
36960 1702 : if (PyType_Ready(&DNSSRV_STAT_Type) < 0)
36961 0 : goto out;
36962 1702 : if (PyType_Ready(&DNSSRV_RPC_UNION_Type) < 0)
36963 0 : goto out;
36964 1702 : if (PyType_Ready(&DNS_RPC_RECORDS_Type) < 0)
36965 0 : goto out;
36966 1702 : if (PyType_Ready(&DNS_RPC_RECORDS_ARRAY_Type) < 0)
36967 0 : goto out;
36968 1702 : if (PyType_Ready(&DnssrvOperation_Type) < 0)
36969 0 : goto out;
36970 1702 : if (PyType_Ready(&DnssrvQuery_Type) < 0)
36971 0 : goto out;
36972 1702 : if (PyType_Ready(&DnssrvComplexOperation_Type) < 0)
36973 0 : goto out;
36974 1702 : if (PyType_Ready(&DnssrvEnumRecords_Type) < 0)
36975 0 : goto out;
36976 1702 : if (PyType_Ready(&DnssrvUpdateRecord_Type) < 0)
36977 0 : goto out;
36978 1702 : if (PyType_Ready(&DnssrvOperation2_Type) < 0)
36979 0 : goto out;
36980 1702 : if (PyType_Ready(&DnssrvQuery2_Type) < 0)
36981 0 : goto out;
36982 1702 : if (PyType_Ready(&DnssrvComplexOperation2_Type) < 0)
36983 0 : goto out;
36984 1702 : if (PyType_Ready(&DnssrvEnumRecords2_Type) < 0)
36985 0 : goto out;
36986 1702 : if (PyType_Ready(&DnssrvUpdateRecord2_Type) < 0)
36987 0 : goto out;
36988 1702 : if (PyType_Ready(&dnsserver_InterfaceType) < 0)
36989 0 : goto out;
36990 1702 : if (PyType_Ready(&dnsserver_SyntaxType) < 0)
36991 0 : goto out;
36992 1702 : if (!PyInterface_AddNdrRpcMethods(&dnsserver_InterfaceType, py_ndr_dnsserver_methods))
36993 0 : return NULL;
36994 :
36995 : #ifdef PY_DNS_RPC_BUFFER_PATCH
36996 : PY_DNS_RPC_BUFFER_PATCH(&DNS_RPC_BUFFER_Type);
36997 : #endif
36998 : #ifdef PY_DNS_RPC_UTF8_STRING_LIST_PATCH
36999 : PY_DNS_RPC_UTF8_STRING_LIST_PATCH(&DNS_RPC_UTF8_STRING_LIST_Type);
37000 : #endif
37001 : #ifdef PY_DNS_RPC_NAME_AND_PARAM_PATCH
37002 : PY_DNS_RPC_NAME_AND_PARAM_PATCH(&DNS_RPC_NAME_AND_PARAM_Type);
37003 : #endif
37004 : #ifdef PY_DNS_RPC_NAME_PATCH
37005 : PY_DNS_RPC_NAME_PATCH(&DNS_RPC_NAME_Type);
37006 : #endif
37007 : #ifdef PY_DNS_RPC_NODE_PATCH
37008 : PY_DNS_RPC_NODE_PATCH(&DNS_RPC_NODE_Type);
37009 : #endif
37010 : #ifdef PY_DNS_RPC_RECORD_SOA_PATCH
37011 : PY_DNS_RPC_RECORD_SOA_PATCH(&DNS_RPC_RECORD_SOA_Type);
37012 : #endif
37013 : #ifdef PY_DNS_RPC_RECORD_NAME_PREFERENCE_PATCH
37014 : PY_DNS_RPC_RECORD_NAME_PREFERENCE_PATCH(&DNS_RPC_RECORD_NAME_PREFERENCE_Type);
37015 : #endif
37016 : #ifdef PY_DNS_RPC_RECORD_STRING_PATCH
37017 : PY_DNS_RPC_RECORD_STRING_PATCH(&DNS_RPC_RECORD_STRING_Type);
37018 : #endif
37019 : #ifdef PY_DNS_RPC_RECORD_SRV_PATCH
37020 : PY_DNS_RPC_RECORD_SRV_PATCH(&DNS_RPC_RECORD_SRV_Type);
37021 : #endif
37022 : #ifdef PY_DNS_RPC_RECORD_DATA_PATCH
37023 : PY_DNS_RPC_RECORD_DATA_PATCH(&DNS_RPC_RECORD_DATA_Type);
37024 : #endif
37025 : #ifdef PY_DNS_RPC_RECORD_PATCH
37026 : PY_DNS_RPC_RECORD_PATCH(&DNS_RPC_RECORD_Type);
37027 : #endif
37028 : #ifdef PY_DNS_RPC_RECORD_BUF_PATCH
37029 : PY_DNS_RPC_RECORD_BUF_PATCH(&DNS_RPC_RECORD_BUF_Type);
37030 : #endif
37031 : #ifdef PY_IP4_ARRAY_PATCH
37032 : PY_IP4_ARRAY_PATCH(&IP4_ARRAY_Type);
37033 : #endif
37034 : #ifdef PY_DNS_ADDR_PATCH
37035 : PY_DNS_ADDR_PATCH(&DNS_ADDR_Type);
37036 : #endif
37037 : #ifdef PY_DNS_ADDR_ARRAY_PATCH
37038 : PY_DNS_ADDR_ARRAY_PATCH(&DNS_ADDR_ARRAY_Type);
37039 : #endif
37040 : #ifdef PY_DNS_RPC_IP_VALIDATE_PATCH
37041 : PY_DNS_RPC_IP_VALIDATE_PATCH(&DNS_RPC_IP_VALIDATE_Type);
37042 : #endif
37043 : #ifdef PY_DNS_RPC_SERVER_INFO_W2K_PATCH
37044 : PY_DNS_RPC_SERVER_INFO_W2K_PATCH(&DNS_RPC_SERVER_INFO_W2K_Type);
37045 : #endif
37046 : #ifdef PY_DNS_EXTENSION_PATCH
37047 : PY_DNS_EXTENSION_PATCH(&DNS_EXTENSION_Type);
37048 : #endif
37049 : #ifdef PY_DNS_RPC_SERVER_INFO_DOTNET_PATCH
37050 : PY_DNS_RPC_SERVER_INFO_DOTNET_PATCH(&DNS_RPC_SERVER_INFO_DOTNET_Type);
37051 : #endif
37052 : #ifdef PY_DNS_RPC_SERVER_INFO_LONGHORN_PATCH
37053 : PY_DNS_RPC_SERVER_INFO_LONGHORN_PATCH(&DNS_RPC_SERVER_INFO_LONGHORN_Type);
37054 : #endif
37055 : #ifdef PY_DNS_RPC_DP_REPLICA_PATCH
37056 : PY_DNS_RPC_DP_REPLICA_PATCH(&DNS_RPC_DP_REPLICA_Type);
37057 : #endif
37058 : #ifdef PY_DNS_RPC_DP_INFO_PATCH
37059 : PY_DNS_RPC_DP_INFO_PATCH(&DNS_RPC_DP_INFO_Type);
37060 : #endif
37061 : #ifdef PY_DNS_RPC_DP_ENUM_PATCH
37062 : PY_DNS_RPC_DP_ENUM_PATCH(&DNS_RPC_DP_ENUM_Type);
37063 : #endif
37064 : #ifdef PY_DNS_RPC_DP_LIST_PATCH
37065 : PY_DNS_RPC_DP_LIST_PATCH(&DNS_RPC_DP_LIST_Type);
37066 : #endif
37067 : #ifdef PY_DNS_RPC_ENLIST_DP_PATCH
37068 : PY_DNS_RPC_ENLIST_DP_PATCH(&DNS_RPC_ENLIST_DP_Type);
37069 : #endif
37070 : #ifdef PY_DNS_RPC_ZONE_CHANGE_DP_PATCH
37071 : PY_DNS_RPC_ZONE_CHANGE_DP_PATCH(&DNS_RPC_ZONE_CHANGE_DP_Type);
37072 : #endif
37073 : #ifdef PY_DNS_RPC_ZONE_W2K_PATCH
37074 : PY_DNS_RPC_ZONE_W2K_PATCH(&DNS_RPC_ZONE_W2K_Type);
37075 : #endif
37076 : #ifdef PY_DNS_RPC_ZONE_DOTNET_PATCH
37077 : PY_DNS_RPC_ZONE_DOTNET_PATCH(&DNS_RPC_ZONE_DOTNET_Type);
37078 : #endif
37079 : #ifdef PY_DNS_RPC_ZONE_LIST_W2K_PATCH
37080 : PY_DNS_RPC_ZONE_LIST_W2K_PATCH(&DNS_RPC_ZONE_LIST_W2K_Type);
37081 : #endif
37082 : #ifdef PY_DNS_RPC_ZONE_LIST_DOTNET_PATCH
37083 : PY_DNS_RPC_ZONE_LIST_DOTNET_PATCH(&DNS_RPC_ZONE_LIST_DOTNET_Type);
37084 : #endif
37085 : #ifdef PY_DNS_RPC_ZONE_INFO_W2K_PATCH
37086 : PY_DNS_RPC_ZONE_INFO_W2K_PATCH(&DNS_RPC_ZONE_INFO_W2K_Type);
37087 : #endif
37088 : #ifdef PY_DNS_RPC_ZONE_INFO_DOTNET_PATCH
37089 : PY_DNS_RPC_ZONE_INFO_DOTNET_PATCH(&DNS_RPC_ZONE_INFO_DOTNET_Type);
37090 : #endif
37091 : #ifdef PY_DNS_RPC_ZONE_INFO_LONGHORN_PATCH
37092 : PY_DNS_RPC_ZONE_INFO_LONGHORN_PATCH(&DNS_RPC_ZONE_INFO_LONGHORN_Type);
37093 : #endif
37094 : #ifdef PY_DNS_RPC_ZONE_SECONDARIES_W2K_PATCH
37095 : PY_DNS_RPC_ZONE_SECONDARIES_W2K_PATCH(&DNS_RPC_ZONE_SECONDARIES_W2K_Type);
37096 : #endif
37097 : #ifdef PY_DNS_RPC_ZONE_SECONDARIES_DOTNET_PATCH
37098 : PY_DNS_RPC_ZONE_SECONDARIES_DOTNET_PATCH(&DNS_RPC_ZONE_SECONDARIES_DOTNET_Type);
37099 : #endif
37100 : #ifdef PY_DNS_RPC_ZONE_SECONDARIES_LONGHORN_PATCH
37101 : PY_DNS_RPC_ZONE_SECONDARIES_LONGHORN_PATCH(&DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type);
37102 : #endif
37103 : #ifdef PY_DNS_RPC_ZONE_DATABASE_W2K_PATCH
37104 : PY_DNS_RPC_ZONE_DATABASE_W2K_PATCH(&DNS_RPC_ZONE_DATABASE_W2K_Type);
37105 : #endif
37106 : #ifdef PY_DNS_RPC_ZONE_DATABASE_DOTNET_PATCH
37107 : PY_DNS_RPC_ZONE_DATABASE_DOTNET_PATCH(&DNS_RPC_ZONE_DATABASE_DOTNET_Type);
37108 : #endif
37109 : #ifdef PY_DNS_RPC_ZONE_CREATE_INFO_W2K_PATCH
37110 : PY_DNS_RPC_ZONE_CREATE_INFO_W2K_PATCH(&DNS_RPC_ZONE_CREATE_INFO_W2K_Type);
37111 : #endif
37112 : #ifdef PY_DNS_RPC_ZONE_CREATE_INFO_DOTNET_PATCH
37113 : PY_DNS_RPC_ZONE_CREATE_INFO_DOTNET_PATCH(&DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type);
37114 : #endif
37115 : #ifdef PY_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_PATCH
37116 : PY_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_PATCH(&DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type);
37117 : #endif
37118 : #ifdef PY_DNS_RPC_ZONE_EXPORT_INFO_PATCH
37119 : PY_DNS_RPC_ZONE_EXPORT_INFO_PATCH(&DNS_RPC_ZONE_EXPORT_INFO_Type);
37120 : #endif
37121 : #ifdef PY_DNS_RPC_ENUM_ZONES_FILTER_PATCH
37122 : PY_DNS_RPC_ENUM_ZONES_FILTER_PATCH(&DNS_RPC_ENUM_ZONES_FILTER_Type);
37123 : #endif
37124 : #ifdef PY_DNS_RPC_FORWARDERS_W2K_PATCH
37125 : PY_DNS_RPC_FORWARDERS_W2K_PATCH(&DNS_RPC_FORWARDERS_W2K_Type);
37126 : #endif
37127 : #ifdef PY_DNS_RPC_FORWARDERS_DOTNET_PATCH
37128 : PY_DNS_RPC_FORWARDERS_DOTNET_PATCH(&DNS_RPC_FORWARDERS_DOTNET_Type);
37129 : #endif
37130 : #ifdef PY_DNS_RPC_FORWARDERS_LONGHORN_PATCH
37131 : PY_DNS_RPC_FORWARDERS_LONGHORN_PATCH(&DNS_RPC_FORWARDERS_LONGHORN_Type);
37132 : #endif
37133 : #ifdef PY_DNS_RPC_AUTOCONFIGURE_PATCH
37134 : PY_DNS_RPC_AUTOCONFIGURE_PATCH(&DNS_RPC_AUTOCONFIGURE_Type);
37135 : #endif
37136 : #ifdef PY_DNSSRV_STAT_HEADER_PATCH
37137 : PY_DNSSRV_STAT_HEADER_PATCH(&DNSSRV_STAT_HEADER_Type);
37138 : #endif
37139 : #ifdef PY_DNSSRV_STAT_PATCH
37140 : PY_DNSSRV_STAT_PATCH(&DNSSRV_STAT_Type);
37141 : #endif
37142 : #ifdef PY_DNSSRV_RPC_UNION_PATCH
37143 : PY_DNSSRV_RPC_UNION_PATCH(&DNSSRV_RPC_UNION_Type);
37144 : #endif
37145 : #ifdef PY_DNS_RPC_RECORDS_PATCH
37146 : PY_DNS_RPC_RECORDS_PATCH(&DNS_RPC_RECORDS_Type);
37147 : #endif
37148 : #ifdef PY_DNS_RPC_RECORDS_ARRAY_PATCH
37149 : PY_DNS_RPC_RECORDS_ARRAY_PATCH(&DNS_RPC_RECORDS_ARRAY_Type);
37150 : #endif
37151 : #ifdef PY_DNSSRVOPERATION_PATCH
37152 : PY_DNSSRVOPERATION_PATCH(&DnssrvOperation_Type);
37153 : #endif
37154 : #ifdef PY_DNSSRVQUERY_PATCH
37155 : PY_DNSSRVQUERY_PATCH(&DnssrvQuery_Type);
37156 : #endif
37157 : #ifdef PY_DNSSRVCOMPLEXOPERATION_PATCH
37158 : PY_DNSSRVCOMPLEXOPERATION_PATCH(&DnssrvComplexOperation_Type);
37159 : #endif
37160 : #ifdef PY_DNSSRVENUMRECORDS_PATCH
37161 : PY_DNSSRVENUMRECORDS_PATCH(&DnssrvEnumRecords_Type);
37162 : #endif
37163 : #ifdef PY_DNSSRVUPDATERECORD_PATCH
37164 : PY_DNSSRVUPDATERECORD_PATCH(&DnssrvUpdateRecord_Type);
37165 : #endif
37166 : #ifdef PY_DNSSRVOPERATION2_PATCH
37167 : PY_DNSSRVOPERATION2_PATCH(&DnssrvOperation2_Type);
37168 : #endif
37169 : #ifdef PY_DNSSRVQUERY2_PATCH
37170 : PY_DNSSRVQUERY2_PATCH(&DnssrvQuery2_Type);
37171 : #endif
37172 : #ifdef PY_DNSSRVCOMPLEXOPERATION2_PATCH
37173 : PY_DNSSRVCOMPLEXOPERATION2_PATCH(&DnssrvComplexOperation2_Type);
37174 : #endif
37175 : #ifdef PY_DNSSRVENUMRECORDS2_PATCH
37176 : PY_DNSSRVENUMRECORDS2_PATCH(&DnssrvEnumRecords2_Type);
37177 : #endif
37178 : #ifdef PY_DNSSRVUPDATERECORD2_PATCH
37179 : PY_DNSSRVUPDATERECORD2_PATCH(&DnssrvUpdateRecord2_Type);
37180 : #endif
37181 : #ifdef PY_DNSSERVER_PATCH
37182 : PY_DNSSERVER_PATCH(&dnsserver_InterfaceType);
37183 : #endif
37184 : #ifdef PY_DNSSERVER_ABSTRACT_SYNTAX_PATCH
37185 : PY_DNSSERVER_ABSTRACT_SYNTAX_PATCH(&dnsserver_SyntaxType);
37186 : #endif
37187 : #ifdef PY_ABSTRACT_SYNTAX_PATCH
37188 : PY_ABSTRACT_SYNTAX_PATCH(&dnsserver_SyntaxType);
37189 : #endif
37190 :
37191 1702 : m = PyModule_Create(&moduledef);
37192 1702 : if (m == NULL)
37193 0 : goto out;
37194 :
37195 1702 : PyModule_AddObject(m, "DNS_RPC_USE_TCPIP", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_USE_TCPIP)));
37196 1702 : PyModule_AddObject(m, "DNS_RPC_USE_NAMED_PIPE", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_USE_NAMED_PIPE)));
37197 1702 : PyModule_AddObject(m, "DNS_RPC_USE_LPC", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_USE_LPC)));
37198 1702 : PyModule_AddObject(m, "DNS_RPC_USE_ALL_PROTOCOLS", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_USE_ALL_PROTOCOLS)));
37199 1702 : PyModule_AddObject(m, "DNS_CLIENT_VERSION_W2K", PyLong_FromUnsignedLongLong((uint32_t)(DNS_CLIENT_VERSION_W2K)));
37200 1702 : PyModule_AddObject(m, "DNS_CLIENT_VERSION_DOTNET", PyLong_FromUnsignedLongLong((uint32_t)(DNS_CLIENT_VERSION_DOTNET)));
37201 1702 : PyModule_AddObject(m, "DNS_CLIENT_VERSION_LONGHORN", PyLong_FromUnsignedLongLong((uint32_t)(DNS_CLIENT_VERSION_LONGHORN)));
37202 1702 : PyModule_AddObject(m, "DNS_IPVAL_DNS_SERVERS", PyLong_FromUnsignedLongLong((uint32_t)(DNS_IPVAL_DNS_SERVERS)));
37203 1702 : PyModule_AddObject(m, "DNS_IPVAL_DNS_ROOTHINTS", PyLong_FromUnsignedLongLong((uint32_t)(DNS_IPVAL_DNS_ROOTHINTS)));
37204 1702 : PyModule_AddObject(m, "DNS_IPVAL_DNS_FORWARDERS", PyLong_FromUnsignedLongLong((uint32_t)(DNS_IPVAL_DNS_FORWARDERS)));
37205 1702 : PyModule_AddObject(m, "DNS_IPVAL_DNS_ZONE_MASTERS", PyLong_FromUnsignedLongLong((uint32_t)(DNS_IPVAL_DNS_ZONE_MASTERS)));
37206 1702 : PyModule_AddObject(m, "DNS_IPVAL_DNS_DELEGATIONS", PyLong_FromUnsignedLongLong((uint32_t)(DNS_IPVAL_DNS_DELEGATIONS)));
37207 1702 : PyModule_AddObject(m, "ERROR_SUCCESS", PyLong_FromUnsignedLongLong((uint32_t)(ERROR_SUCCESS)));
37208 1702 : PyModule_AddObject(m, "DNS_IPVAL_INVALID_ADDR", PyLong_FromUnsignedLongLong((uint32_t)(DNS_IPVAL_INVALID_ADDR)));
37209 1702 : PyModule_AddObject(m, "DNS_IPVAL_UNREACHABLE", PyLong_FromUnsignedLongLong((uint32_t)(DNS_IPVAL_UNREACHABLE)));
37210 1702 : PyModule_AddObject(m, "DNS_IPVAL_NO_RESPONSE", PyLong_FromUnsignedLongLong((uint32_t)(DNS_IPVAL_NO_RESPONSE)));
37211 1702 : PyModule_AddObject(m, "DNS_IPVAL_NOT_AUTH_FOR_ZONE", PyLong_FromUnsignedLongLong((uint32_t)(DNS_IPVAL_NOT_AUTH_FOR_ZONE)));
37212 1702 : PyModule_AddObject(m, "DNS_IPVAL_UNKNOWN_ERROR", PyLong_FromUnsignedLongLong((uint32_t)(DNS_IPVAL_UNKNOWN_ERROR)));
37213 1702 : PyModule_AddObject(m, "DNS_IPVAL_NO_TCP", PyLong_FromUnsignedLongLong((uint32_t)(DNS_IPVAL_NO_TCP)));
37214 1702 : PyModule_AddObject(m, "DNS_BOOT_METHOD_UNINITIALIZED", PyLong_FromLong((uint16_t)(DNS_BOOT_METHOD_UNINITIALIZED)));
37215 1702 : PyModule_AddObject(m, "DNS_BOOT_METHOD_FILE", PyLong_FromLong((uint16_t)(DNS_BOOT_METHOD_FILE)));
37216 1702 : PyModule_AddObject(m, "DNS_BOOT_METHOD_REGISTRY", PyLong_FromLong((uint16_t)(DNS_BOOT_METHOD_REGISTRY)));
37217 1702 : PyModule_AddObject(m, "DNS_BOOT_METHOD_DIRECTORY", PyLong_FromLong((uint16_t)(DNS_BOOT_METHOD_DIRECTORY)));
37218 1702 : PyModule_AddObject(m, "DNS_ALLOW_RFC_NAMES_ONLY", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ALLOW_RFC_NAMES_ONLY)));
37219 1702 : PyModule_AddObject(m, "DNS_ALLOW_NONRFC_NAMES", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ALLOW_NONRFC_NAMES)));
37220 1702 : PyModule_AddObject(m, "DNS_ALLOW_MULTIBYTE_NAMES", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ALLOW_MULTIBYTE_NAMES)));
37221 1702 : PyModule_AddObject(m, "DNS_ALLOW_ALL_NAMES", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ALLOW_ALL_NAMES)));
37222 1702 : PyModule_AddObject(m, "DNS_DP_AUTOCREATED", PyLong_FromUnsignedLongLong((uint32_t)(DNS_DP_AUTOCREATED)));
37223 1702 : PyModule_AddObject(m, "DNS_DP_LEGACY", PyLong_FromUnsignedLongLong((uint32_t)(DNS_DP_LEGACY)));
37224 1702 : PyModule_AddObject(m, "DNS_DP_DOMAIN_DEFAULT", PyLong_FromUnsignedLongLong((uint32_t)(DNS_DP_DOMAIN_DEFAULT)));
37225 1702 : PyModule_AddObject(m, "DNS_DP_FOREST_DEFAULT", PyLong_FromUnsignedLongLong((uint32_t)(DNS_DP_FOREST_DEFAULT)));
37226 1702 : PyModule_AddObject(m, "DNS_DP_ENLISTED", PyLong_FromUnsignedLongLong((uint32_t)(DNS_DP_ENLISTED)));
37227 1702 : PyModule_AddObject(m, "DNS_DP_DELETED", PyLong_FromUnsignedLongLong((uint32_t)(DNS_DP_DELETED)));
37228 1702 : PyModule_AddObject(m, "DNS_DP_OKAY", PyLong_FromUnsignedLongLong((uint32_t)(DNS_DP_OKAY)));
37229 1702 : PyModule_AddObject(m, "DNS_DP_STATE_REPL_INCOMING", PyLong_FromUnsignedLongLong((uint32_t)(DNS_DP_STATE_REPL_INCOMING)));
37230 1702 : PyModule_AddObject(m, "DNS_DP_STATE_REPL_OUTGOING", PyLong_FromUnsignedLongLong((uint32_t)(DNS_DP_STATE_REPL_OUTGOING)));
37231 1702 : PyModule_AddObject(m, "DNS_DP_STATE_UNKNOWN", PyLong_FromUnsignedLongLong((uint32_t)(DNS_DP_STATE_UNKNOWN)));
37232 1702 : PyModule_AddObject(m, "DNS_ZONE_SECSECURE_NO_SECURITY", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ZONE_SECSECURE_NO_SECURITY)));
37233 1702 : PyModule_AddObject(m, "DNS_ZONE_SECSECURE_NS_ONLY", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ZONE_SECSECURE_NS_ONLY)));
37234 1702 : PyModule_AddObject(m, "DNS_ZONE_SECSECURE_LIST_ONLY", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ZONE_SECSECURE_LIST_ONLY)));
37235 1702 : PyModule_AddObject(m, "DNS_ZONE_SECSECURE_NO_XFER", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ZONE_SECSECURE_NO_XFER)));
37236 1702 : PyModule_AddObject(m, "DNS_ZONE_NOTIFY_OFF", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ZONE_NOTIFY_OFF)));
37237 1702 : PyModule_AddObject(m, "DNS_ZONE_NOTIFY_ALL_SECONDARIES", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ZONE_NOTIFY_ALL_SECONDARIES)));
37238 1702 : PyModule_AddObject(m, "DNS_ZONE_NOTIFY_LIST_ONLY", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ZONE_NOTIFY_LIST_ONLY)));
37239 1702 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_PRIMARY", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ZONE_REQUEST_PRIMARY)));
37240 1702 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_SECONDARY", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ZONE_REQUEST_SECONDARY)));
37241 1702 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_CACHE", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ZONE_REQUEST_CACHE)));
37242 1702 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_AUTO", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ZONE_REQUEST_AUTO)));
37243 1702 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_FORWARD", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ZONE_REQUEST_FORWARD)));
37244 1702 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_REVERSE", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ZONE_REQUEST_REVERSE)));
37245 1702 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_FORWARDER", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ZONE_REQUEST_FORWARDER)));
37246 1702 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_STUB", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ZONE_REQUEST_STUB)));
37247 1702 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_DS", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ZONE_REQUEST_DS)));
37248 1702 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_NON_DS", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ZONE_REQUEST_NON_DS)));
37249 1702 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_DOMAIN_DP", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ZONE_REQUEST_DOMAIN_DP)));
37250 1702 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_FOREST_DP", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ZONE_REQUEST_FOREST_DP)));
37251 1702 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_CUSTOM_DP", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ZONE_REQUEST_CUSTOM_DP)));
37252 1702 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_LEGACY_DP", PyLong_FromUnsignedLongLong((uint32_t)(DNS_ZONE_REQUEST_LEGACY_DP)));
37253 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_PAUSED", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_ZONE_PAUSED)));
37254 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_SHUTDOWN", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_ZONE_SHUTDOWN)));
37255 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_REVERSE", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_ZONE_REVERSE)));
37256 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_AUTOCREATED", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_ZONE_AUTOCREATED)));
37257 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_DSINTEGRATED", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_ZONE_DSINTEGRATED)));
37258 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_AGING", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_ZONE_AGING)));
37259 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_UPDATE_UNSECURE", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_ZONE_UPDATE_UNSECURE)));
37260 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_UPDATE_SECURE", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_ZONE_UPDATE_SECURE)));
37261 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_READONLY", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_ZONE_READONLY)));
37262 1702 : PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_INTERNAL_ROOTHINTS", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_AUTOCONFIG_INTERNAL_ROOTHINTS)));
37263 1702 : PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_INTERNAL_FORWARDERS", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_AUTOCONFIG_INTERNAL_FORWARDERS)));
37264 1702 : PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_INTERNAL_ZONES", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_AUTOCONFIG_INTERNAL_ZONES)));
37265 1702 : PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT)));
37266 1702 : PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_PREPEND", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_PREPEND)));
37267 1702 : PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_APPEND", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_APPEND)));
37268 1702 : PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_INTERNAL_RETURN_ERROR", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_AUTOCONFIG_INTERNAL_RETURN_ERROR)));
37269 1702 : PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_ALL", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_AUTOCONFIG_ALL)));
37270 1702 : PyModule_AddObject(m, "DNS_EVENT_LOG_SUCCESS", PyLong_FromUnsignedLongLong((uint32_t)(DNS_EVENT_LOG_SUCCESS)));
37271 1702 : PyModule_AddObject(m, "DNS_EVENT_LOG_ERROR_TYPE", PyLong_FromUnsignedLongLong((uint32_t)(DNS_EVENT_LOG_ERROR_TYPE)));
37272 1702 : PyModule_AddObject(m, "DNS_EVENT_LOG_WARNING_TYPE", PyLong_FromUnsignedLongLong((uint32_t)(DNS_EVENT_LOG_WARNING_TYPE)));
37273 1702 : PyModule_AddObject(m, "DNS_EVENT_LOG_INFORMATION_TYPE", PyLong_FromUnsignedLongLong((uint32_t)(DNS_EVENT_LOG_INFORMATION_TYPE)));
37274 1702 : PyModule_AddObject(m, "DNS_RPC_VIEW_AUTHORITY_DATA", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_VIEW_AUTHORITY_DATA)));
37275 1702 : PyModule_AddObject(m, "DNS_RPC_VIEW_CACHE_DATA", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_VIEW_CACHE_DATA)));
37276 1702 : PyModule_AddObject(m, "DNS_RPC_VIEW_GLUE_DATA", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_VIEW_GLUE_DATA)));
37277 1702 : PyModule_AddObject(m, "DNS_RPC_VIEW_ROOT_HINT_DATA", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_VIEW_ROOT_HINT_DATA)));
37278 1702 : PyModule_AddObject(m, "DNS_RPC_VIEW_ADDITIONAL_DATA", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_VIEW_ADDITIONAL_DATA)));
37279 1702 : PyModule_AddObject(m, "DNS_RPC_VIEW_NO_CHILDREN", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_VIEW_NO_CHILDREN)));
37280 1702 : PyModule_AddObject(m, "DNS_RPC_VIEW_ONLY_CHILDREN", PyLong_FromUnsignedLongLong((uint32_t)(DNS_RPC_VIEW_ONLY_CHILDREN)));
37281 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_NULL", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_NULL)));
37282 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_DWORD", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_DWORD)));
37283 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_LPSTR", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_LPSTR)));
37284 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_LPWSTR", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_LPWSTR)));
37285 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_IPARRAY", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_IPARRAY)));
37286 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_BUFFER", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_BUFFER)));
37287 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_SERVER_INFO_W2K", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_SERVER_INFO_W2K)));
37288 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_STATS", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_STATS)));
37289 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_FORWARDERS_W2K", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_FORWARDERS_W2K)));
37290 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_W2K", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ZONE_W2K)));
37291 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_INFO_W2K", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ZONE_INFO_W2K)));
37292 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_SECONDARIES_W2K", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ZONE_SECONDARIES_W2K)));
37293 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_DATABASE_W2K", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ZONE_DATABASE_W2K)));
37294 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_TYPE_RESET_W2K", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ZONE_TYPE_RESET_W2K)));
37295 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_CREATE_W2K", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ZONE_CREATE_W2K)));
37296 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_NAME_AND_PARAM", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_NAME_AND_PARAM)));
37297 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_LIST_W2K", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ZONE_LIST_W2K)));
37298 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_RENAME", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ZONE_RENAME)));
37299 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_EXPORT", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ZONE_EXPORT)));
37300 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_SERVER_INFO_DOTNET", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_SERVER_INFO_DOTNET)));
37301 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_FORWARDERS_DOTNET", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_FORWARDERS_DOTNET)));
37302 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ZONE)));
37303 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_INFO_DOTNET", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ZONE_INFO_DOTNET)));
37304 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET)));
37305 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_DATABASE", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ZONE_DATABASE)));
37306 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_TYPE_RESET_DOTNET", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ZONE_TYPE_RESET_DOTNET)));
37307 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_CREATE_DOTNET", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ZONE_CREATE_DOTNET)));
37308 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_LIST", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ZONE_LIST)));
37309 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_DP_ENUM", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_DP_ENUM)));
37310 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_DP_INFO", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_DP_INFO)));
37311 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_DP_LIST", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_DP_LIST)));
37312 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ENLIST_DP", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ENLIST_DP)));
37313 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_CHANGE_DP", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ZONE_CHANGE_DP)));
37314 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ENUM_ZONES_FILTER", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ENUM_ZONES_FILTER)));
37315 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ADDRARRAY", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ADDRARRAY)));
37316 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_SERVER_INFO", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_SERVER_INFO)));
37317 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_INFO", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ZONE_INFO)));
37318 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_FORWARDERS", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_FORWARDERS)));
37319 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_SECONDARIES", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ZONE_SECONDARIES)));
37320 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_TYPE_RESET", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ZONE_TYPE_RESET)));
37321 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_CREATE", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_ZONE_CREATE)));
37322 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_IP_VALIDATE", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_IP_VALIDATE)));
37323 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_AUTOCONFIGURE", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_AUTOCONFIGURE)));
37324 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_UTF8_STRING_LIST", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_UTF8_STRING_LIST)));
37325 1702 : PyModule_AddObject(m, "DNSSRV_TYPEID_UNICODE_STRING_LIST", PyLong_FromUnsignedLongLong((uint32_t)(DNSSRV_TYPEID_UNICODE_STRING_LIST)));
37326 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_BUFFER_Type);
37327 1702 : PyModule_AddObject(m, "DNS_RPC_BUFFER", (PyObject *)(void *)&DNS_RPC_BUFFER_Type);
37328 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_UTF8_STRING_LIST_Type);
37329 1702 : PyModule_AddObject(m, "DNS_RPC_UTF8_STRING_LIST", (PyObject *)(void *)&DNS_RPC_UTF8_STRING_LIST_Type);
37330 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_NAME_AND_PARAM_Type);
37331 1702 : PyModule_AddObject(m, "DNS_RPC_NAME_AND_PARAM", (PyObject *)(void *)&DNS_RPC_NAME_AND_PARAM_Type);
37332 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_NAME_Type);
37333 1702 : PyModule_AddObject(m, "DNS_RPC_NAME", (PyObject *)(void *)&DNS_RPC_NAME_Type);
37334 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_NODE_Type);
37335 1702 : PyModule_AddObject(m, "DNS_RPC_NODE", (PyObject *)(void *)&DNS_RPC_NODE_Type);
37336 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORD_SOA_Type);
37337 1702 : PyModule_AddObject(m, "DNS_RPC_RECORD_SOA", (PyObject *)(void *)&DNS_RPC_RECORD_SOA_Type);
37338 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORD_NAME_PREFERENCE_Type);
37339 1702 : PyModule_AddObject(m, "DNS_RPC_RECORD_NAME_PREFERENCE", (PyObject *)(void *)&DNS_RPC_RECORD_NAME_PREFERENCE_Type);
37340 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORD_STRING_Type);
37341 1702 : PyModule_AddObject(m, "DNS_RPC_RECORD_STRING", (PyObject *)(void *)&DNS_RPC_RECORD_STRING_Type);
37342 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORD_SRV_Type);
37343 1702 : PyModule_AddObject(m, "DNS_RPC_RECORD_SRV", (PyObject *)(void *)&DNS_RPC_RECORD_SRV_Type);
37344 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORD_DATA_Type);
37345 1702 : PyModule_AddObject(m, "DNS_RPC_RECORD_DATA", (PyObject *)(void *)&DNS_RPC_RECORD_DATA_Type);
37346 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORD_Type);
37347 1702 : PyModule_AddObject(m, "DNS_RPC_RECORD", (PyObject *)(void *)&DNS_RPC_RECORD_Type);
37348 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORD_BUF_Type);
37349 1702 : PyModule_AddObject(m, "DNS_RPC_RECORD_BUF", (PyObject *)(void *)&DNS_RPC_RECORD_BUF_Type);
37350 1374 : Py_INCREF((PyObject *)(void *)&IP4_ARRAY_Type);
37351 1702 : PyModule_AddObject(m, "IP4_ARRAY", (PyObject *)(void *)&IP4_ARRAY_Type);
37352 1374 : Py_INCREF((PyObject *)(void *)&DNS_ADDR_Type);
37353 1702 : PyModule_AddObject(m, "DNS_ADDR", (PyObject *)(void *)&DNS_ADDR_Type);
37354 1374 : Py_INCREF((PyObject *)(void *)&DNS_ADDR_ARRAY_Type);
37355 1702 : PyModule_AddObject(m, "DNS_ADDR_ARRAY", (PyObject *)(void *)&DNS_ADDR_ARRAY_Type);
37356 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_IP_VALIDATE_Type);
37357 1702 : PyModule_AddObject(m, "DNS_RPC_IP_VALIDATE", (PyObject *)(void *)&DNS_RPC_IP_VALIDATE_Type);
37358 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_SERVER_INFO_W2K_Type);
37359 1702 : PyModule_AddObject(m, "DNS_RPC_SERVER_INFO_W2K", (PyObject *)(void *)&DNS_RPC_SERVER_INFO_W2K_Type);
37360 1374 : Py_INCREF((PyObject *)(void *)&DNS_EXTENSION_Type);
37361 1702 : PyModule_AddObject(m, "DNS_EXTENSION", (PyObject *)(void *)&DNS_EXTENSION_Type);
37362 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_SERVER_INFO_DOTNET_Type);
37363 1702 : PyModule_AddObject(m, "DNS_RPC_SERVER_INFO_DOTNET", (PyObject *)(void *)&DNS_RPC_SERVER_INFO_DOTNET_Type);
37364 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_SERVER_INFO_LONGHORN_Type);
37365 1702 : PyModule_AddObject(m, "DNS_RPC_SERVER_INFO_LONGHORN", (PyObject *)(void *)&DNS_RPC_SERVER_INFO_LONGHORN_Type);
37366 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_DP_REPLICA_Type);
37367 1702 : PyModule_AddObject(m, "DNS_RPC_DP_REPLICA", (PyObject *)(void *)&DNS_RPC_DP_REPLICA_Type);
37368 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_DP_INFO_Type);
37369 1702 : PyModule_AddObject(m, "DNS_RPC_DP_INFO", (PyObject *)(void *)&DNS_RPC_DP_INFO_Type);
37370 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_DP_ENUM_Type);
37371 1702 : PyModule_AddObject(m, "DNS_RPC_DP_ENUM", (PyObject *)(void *)&DNS_RPC_DP_ENUM_Type);
37372 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_DP_LIST_Type);
37373 1702 : PyModule_AddObject(m, "DNS_RPC_DP_LIST", (PyObject *)(void *)&DNS_RPC_DP_LIST_Type);
37374 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ENLIST_DP_Type);
37375 1702 : PyModule_AddObject(m, "DNS_RPC_ENLIST_DP", (PyObject *)(void *)&DNS_RPC_ENLIST_DP_Type);
37376 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_CHANGE_DP_Type);
37377 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_CHANGE_DP", (PyObject *)(void *)&DNS_RPC_ZONE_CHANGE_DP_Type);
37378 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_W2K_Type);
37379 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_W2K", (PyObject *)(void *)&DNS_RPC_ZONE_W2K_Type);
37380 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_DOTNET_Type);
37381 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_DOTNET", (PyObject *)(void *)&DNS_RPC_ZONE_DOTNET_Type);
37382 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_LIST_W2K_Type);
37383 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_LIST_W2K", (PyObject *)(void *)&DNS_RPC_ZONE_LIST_W2K_Type);
37384 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_LIST_DOTNET_Type);
37385 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_LIST_DOTNET", (PyObject *)(void *)&DNS_RPC_ZONE_LIST_DOTNET_Type);
37386 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_INFO_W2K_Type);
37387 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_INFO_W2K", (PyObject *)(void *)&DNS_RPC_ZONE_INFO_W2K_Type);
37388 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_INFO_DOTNET_Type);
37389 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_INFO_DOTNET", (PyObject *)(void *)&DNS_RPC_ZONE_INFO_DOTNET_Type);
37390 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_INFO_LONGHORN_Type);
37391 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_INFO_LONGHORN", (PyObject *)(void *)&DNS_RPC_ZONE_INFO_LONGHORN_Type);
37392 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_SECONDARIES_W2K_Type);
37393 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_SECONDARIES_W2K", (PyObject *)(void *)&DNS_RPC_ZONE_SECONDARIES_W2K_Type);
37394 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_SECONDARIES_DOTNET_Type);
37395 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_SECONDARIES_DOTNET", (PyObject *)(void *)&DNS_RPC_ZONE_SECONDARIES_DOTNET_Type);
37396 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type);
37397 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_SECONDARIES_LONGHORN", (PyObject *)(void *)&DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type);
37398 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_DATABASE_W2K_Type);
37399 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_DATABASE_W2K", (PyObject *)(void *)&DNS_RPC_ZONE_DATABASE_W2K_Type);
37400 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_DATABASE_DOTNET_Type);
37401 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_DATABASE_DOTNET", (PyObject *)(void *)&DNS_RPC_ZONE_DATABASE_DOTNET_Type);
37402 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_CREATE_INFO_W2K_Type);
37403 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_CREATE_INFO_W2K", (PyObject *)(void *)&DNS_RPC_ZONE_CREATE_INFO_W2K_Type);
37404 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type);
37405 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_CREATE_INFO_DOTNET", (PyObject *)(void *)&DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type);
37406 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type);
37407 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_CREATE_INFO_LONGHORN", (PyObject *)(void *)&DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type);
37408 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_EXPORT_INFO_Type);
37409 1702 : PyModule_AddObject(m, "DNS_RPC_ZONE_EXPORT_INFO", (PyObject *)(void *)&DNS_RPC_ZONE_EXPORT_INFO_Type);
37410 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ENUM_ZONES_FILTER_Type);
37411 1702 : PyModule_AddObject(m, "DNS_RPC_ENUM_ZONES_FILTER", (PyObject *)(void *)&DNS_RPC_ENUM_ZONES_FILTER_Type);
37412 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_FORWARDERS_W2K_Type);
37413 1702 : PyModule_AddObject(m, "DNS_RPC_FORWARDERS_W2K", (PyObject *)(void *)&DNS_RPC_FORWARDERS_W2K_Type);
37414 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_FORWARDERS_DOTNET_Type);
37415 1702 : PyModule_AddObject(m, "DNS_RPC_FORWARDERS_DOTNET", (PyObject *)(void *)&DNS_RPC_FORWARDERS_DOTNET_Type);
37416 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_FORWARDERS_LONGHORN_Type);
37417 1702 : PyModule_AddObject(m, "DNS_RPC_FORWARDERS_LONGHORN", (PyObject *)(void *)&DNS_RPC_FORWARDERS_LONGHORN_Type);
37418 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_AUTOCONFIGURE_Type);
37419 1702 : PyModule_AddObject(m, "DNS_RPC_AUTOCONFIGURE", (PyObject *)(void *)&DNS_RPC_AUTOCONFIGURE_Type);
37420 1374 : Py_INCREF((PyObject *)(void *)&DNSSRV_STAT_HEADER_Type);
37421 1702 : PyModule_AddObject(m, "DNSSRV_STAT_HEADER", (PyObject *)(void *)&DNSSRV_STAT_HEADER_Type);
37422 1374 : Py_INCREF((PyObject *)(void *)&DNSSRV_STAT_Type);
37423 1702 : PyModule_AddObject(m, "DNSSRV_STAT", (PyObject *)(void *)&DNSSRV_STAT_Type);
37424 1374 : Py_INCREF((PyObject *)(void *)&DNSSRV_RPC_UNION_Type);
37425 1702 : PyModule_AddObject(m, "DNSSRV_RPC_UNION", (PyObject *)(void *)&DNSSRV_RPC_UNION_Type);
37426 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORDS_Type);
37427 1702 : PyModule_AddObject(m, "DNS_RPC_RECORDS", (PyObject *)(void *)&DNS_RPC_RECORDS_Type);
37428 1374 : Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORDS_ARRAY_Type);
37429 1702 : PyModule_AddObject(m, "DNS_RPC_RECORDS_ARRAY", (PyObject *)(void *)&DNS_RPC_RECORDS_ARRAY_Type);
37430 1374 : Py_INCREF((PyObject *)(void *)&DnssrvOperation_Type);
37431 1702 : PyModule_AddObject(m, "DnssrvOperation", (PyObject *)(void *)&DnssrvOperation_Type);
37432 1374 : Py_INCREF((PyObject *)(void *)&DnssrvQuery_Type);
37433 1702 : PyModule_AddObject(m, "DnssrvQuery", (PyObject *)(void *)&DnssrvQuery_Type);
37434 1374 : Py_INCREF((PyObject *)(void *)&DnssrvComplexOperation_Type);
37435 1702 : PyModule_AddObject(m, "DnssrvComplexOperation", (PyObject *)(void *)&DnssrvComplexOperation_Type);
37436 1374 : Py_INCREF((PyObject *)(void *)&DnssrvEnumRecords_Type);
37437 1702 : PyModule_AddObject(m, "DnssrvEnumRecords", (PyObject *)(void *)&DnssrvEnumRecords_Type);
37438 1374 : Py_INCREF((PyObject *)(void *)&DnssrvUpdateRecord_Type);
37439 1702 : PyModule_AddObject(m, "DnssrvUpdateRecord", (PyObject *)(void *)&DnssrvUpdateRecord_Type);
37440 1374 : Py_INCREF((PyObject *)(void *)&DnssrvOperation2_Type);
37441 1702 : PyModule_AddObject(m, "DnssrvOperation2", (PyObject *)(void *)&DnssrvOperation2_Type);
37442 1374 : Py_INCREF((PyObject *)(void *)&DnssrvQuery2_Type);
37443 1702 : PyModule_AddObject(m, "DnssrvQuery2", (PyObject *)(void *)&DnssrvQuery2_Type);
37444 1374 : Py_INCREF((PyObject *)(void *)&DnssrvComplexOperation2_Type);
37445 1702 : PyModule_AddObject(m, "DnssrvComplexOperation2", (PyObject *)(void *)&DnssrvComplexOperation2_Type);
37446 1374 : Py_INCREF((PyObject *)(void *)&DnssrvEnumRecords2_Type);
37447 1702 : PyModule_AddObject(m, "DnssrvEnumRecords2", (PyObject *)(void *)&DnssrvEnumRecords2_Type);
37448 1374 : Py_INCREF((PyObject *)(void *)&DnssrvUpdateRecord2_Type);
37449 1702 : PyModule_AddObject(m, "DnssrvUpdateRecord2", (PyObject *)(void *)&DnssrvUpdateRecord2_Type);
37450 1374 : Py_INCREF((PyObject *)(void *)&dnsserver_InterfaceType);
37451 1702 : PyModule_AddObject(m, "dnsserver", (PyObject *)(void *)&dnsserver_InterfaceType);
37452 1374 : Py_INCREF((PyObject *)(void *)&dnsserver_SyntaxType);
37453 1702 : PyModule_AddObject(m, "dnsserver_abstract_syntax", (PyObject *)(void *)&dnsserver_SyntaxType);
37454 1374 : Py_INCREF((PyObject *)(void *)&dnsserver_SyntaxType);
37455 1702 : PyModule_AddObject(m, "abstract_syntax", (PyObject *)(void *)&dnsserver_SyntaxType);
37456 : #ifdef PY_MOD_DNSSERVER_PATCH
37457 : PY_MOD_DNSSERVER_PATCH(m);
37458 : #endif
37459 1702 : out:
37460 1702 : Py_XDECREF(dep_samba_dcerpc_misc);
37461 1702 : Py_XDECREF(dep_samba_dcerpc_dnsp);
37462 1702 : Py_XDECREF(dep_talloc);
37463 1702 : Py_XDECREF(dep_samba_dcerpc_base);
37464 1666 : return m;
37465 :
37466 : }
|