git add -f bin/default/librpc/gen_ndr/*.[ch] bin/default/source*/librpc/gen_ndr/...
[metze/samba/wip.git] / bin.gen_ndr / default / librpc / gen_ndr / py_dnsserver.c
1
2 /* Python wrapper functions auto-generated by pidl */
3 #include <Python.h>
4 #include "includes.h"
5 #include <pytalloc.h>
6 #include "librpc/rpc/pyrpc.h"
7 #include "librpc/rpc/pyrpc_util.h"
8 #include "bin/default/librpc/gen_ndr/ndr_dnsserver.h"
9 #include "bin/default/librpc/gen_ndr/ndr_dnsserver_c.h"
10
11 #include "librpc/gen_ndr/misc.h"
12 #include "librpc/gen_ndr/dnsp.h"
13 staticforward PyTypeObject DNS_RPC_BUFFER_Type;
14 staticforward PyTypeObject DNS_RPC_UTF8_STRING_LIST_Type;
15 staticforward PyTypeObject DNS_RPC_NAME_AND_PARAM_Type;
16 staticforward PyTypeObject DNS_RPC_NAME_Type;
17 staticforward PyTypeObject DNS_RPC_NODE_Type;
18 staticforward PyTypeObject DNS_RPC_RECORD_SOA_Type;
19 staticforward PyTypeObject DNS_RPC_RECORD_NAME_PREFERENCE_Type;
20 staticforward PyTypeObject DNS_RPC_RECORD_STRING_Type;
21 staticforward PyTypeObject DNS_RPC_RECORD_SRV_Type;
22 staticforward PyTypeObject DNS_RPC_RECORD_Type;
23 staticforward PyTypeObject DNS_RPC_RECORD_BUF_Type;
24 staticforward PyTypeObject IP4_ARRAY_Type;
25 staticforward PyTypeObject DNS_ADDR_Type;
26 staticforward PyTypeObject DNS_ADDR_ARRAY_Type;
27 staticforward PyTypeObject DNS_RPC_IP_VALIDATE_Type;
28 staticforward PyTypeObject DNS_RPC_SERVER_INFO_W2K_Type;
29 staticforward PyTypeObject DNS_EXTENSION_Type;
30 staticforward PyTypeObject DNS_RPC_SERVER_INFO_DOTNET_Type;
31 staticforward PyTypeObject DNS_RPC_SERVER_INFO_LONGHORN_Type;
32 staticforward PyTypeObject DNS_RPC_DP_REPLICA_Type;
33 staticforward PyTypeObject DNS_RPC_DP_INFO_Type;
34 staticforward PyTypeObject DNS_RPC_DP_ENUM_Type;
35 staticforward PyTypeObject DNS_RPC_DP_LIST_Type;
36 staticforward PyTypeObject DNS_RPC_ENLIST_DP_Type;
37 staticforward PyTypeObject DNS_RPC_ZONE_CHANGE_DP_Type;
38 staticforward PyTypeObject DNS_RPC_ZONE_W2K_Type;
39 staticforward PyTypeObject DNS_RPC_ZONE_DOTNET_Type;
40 staticforward PyTypeObject DNS_RPC_ZONE_LIST_W2K_Type;
41 staticforward PyTypeObject DNS_RPC_ZONE_LIST_DOTNET_Type;
42 staticforward PyTypeObject DNS_RPC_ZONE_INFO_W2K_Type;
43 staticforward PyTypeObject DNS_RPC_ZONE_INFO_DOTNET_Type;
44 staticforward PyTypeObject DNS_RPC_ZONE_INFO_LONGHORN_Type;
45 staticforward PyTypeObject DNS_RPC_ZONE_SECONDARIES_W2K_Type;
46 staticforward PyTypeObject DNS_RPC_ZONE_SECONDARIES_DOTNET_Type;
47 staticforward PyTypeObject DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type;
48 staticforward PyTypeObject DNS_RPC_ZONE_DATABASE_W2K_Type;
49 staticforward PyTypeObject DNS_RPC_ZONE_DATABASE_DOTNET_Type;
50 staticforward PyTypeObject DNS_RPC_ZONE_CREATE_INFO_W2K_Type;
51 staticforward PyTypeObject DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type;
52 staticforward PyTypeObject DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type;
53 staticforward PyTypeObject DNS_RPC_ZONE_EXPORT_INFO_Type;
54 staticforward PyTypeObject DNS_RPC_ENUM_ZONES_FILTER_Type;
55 staticforward PyTypeObject DNS_RPC_FORWARDERS_W2K_Type;
56 staticforward PyTypeObject DNS_RPC_FORWARDERS_DOTNET_Type;
57 staticforward PyTypeObject DNS_RPC_FORWARDERS_LONGHORN_Type;
58 staticforward PyTypeObject DNS_RPC_AUTOCONFIGURE_Type;
59 staticforward PyTypeObject DNSSRV_STAT_HEADER_Type;
60 staticforward PyTypeObject DNSSRV_STAT_Type;
61 staticforward PyTypeObject DNS_RPC_RECORDS_Type;
62 staticforward PyTypeObject DNS_RPC_RECORDS_ARRAY_Type;
63 staticforward PyTypeObject dnsserver_InterfaceType;
64
65 void initdnsserver(void);static PyTypeObject *Object_Type;
66 static PyTypeObject *ClientConnection_Type;
67
68 static PyObject *py_DNS_RPC_BUFFER_get_dwLength(PyObject *obj, void *closure)
69 {
70         struct DNS_RPC_BUFFER *object = (struct DNS_RPC_BUFFER *)pytalloc_get_ptr(obj);
71         PyObject *py_dwLength;
72         py_dwLength = PyInt_FromLong(object->dwLength);
73         return py_dwLength;
74 }
75
76 static int py_DNS_RPC_BUFFER_set_dwLength(PyObject *py_obj, PyObject *value, void *closure)
77 {
78         struct DNS_RPC_BUFFER *object = (struct DNS_RPC_BUFFER *)pytalloc_get_ptr(py_obj);
79         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
80         object->dwLength = PyInt_AsLong(value);
81         return 0;
82 }
83
84 static PyObject *py_DNS_RPC_BUFFER_get_Buffer(PyObject *obj, void *closure)
85 {
86         struct DNS_RPC_BUFFER *object = (struct DNS_RPC_BUFFER *)pytalloc_get_ptr(obj);
87         PyObject *py_Buffer;
88         py_Buffer = PyList_New(object->dwLength);
89         if (py_Buffer == NULL) {
90                 return NULL;
91         }
92         {
93                 int Buffer_cntr_0;
94                 for (Buffer_cntr_0 = 0; Buffer_cntr_0 < object->dwLength; Buffer_cntr_0++) {
95                         PyObject *py_Buffer_0;
96                         py_Buffer_0 = PyInt_FromLong(object->Buffer[Buffer_cntr_0]);
97                         PyList_SetItem(py_Buffer, Buffer_cntr_0, py_Buffer_0);
98                 }
99         }
100         return py_Buffer;
101 }
102
103 static int py_DNS_RPC_BUFFER_set_Buffer(PyObject *py_obj, PyObject *value, void *closure)
104 {
105         struct DNS_RPC_BUFFER *object = (struct DNS_RPC_BUFFER *)pytalloc_get_ptr(py_obj);
106         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
107         {
108                 int Buffer_cntr_0;
109                 object->Buffer = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->Buffer, PyList_GET_SIZE(value));
110                 if (!object->Buffer) { return -1;; }
111                 talloc_set_name_const(object->Buffer, "ARRAY: object->Buffer");
112                 for (Buffer_cntr_0 = 0; Buffer_cntr_0 < PyList_GET_SIZE(value); Buffer_cntr_0++) {
113                         PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, Buffer_cntr_0), return -1;);
114                         object->Buffer[Buffer_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, Buffer_cntr_0));
115                 }
116         }
117         return 0;
118 }
119
120 static PyGetSetDef py_DNS_RPC_BUFFER_getsetters[] = {
121         { discard_const_p(char, "dwLength"), py_DNS_RPC_BUFFER_get_dwLength, py_DNS_RPC_BUFFER_set_dwLength },
122         { discard_const_p(char, "Buffer"), py_DNS_RPC_BUFFER_get_Buffer, py_DNS_RPC_BUFFER_set_Buffer },
123         { NULL }
124 };
125
126 static PyObject *py_DNS_RPC_BUFFER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
127 {
128         return pytalloc_new(struct DNS_RPC_BUFFER, type);
129 }
130
131
132 static PyTypeObject DNS_RPC_BUFFER_Type = {
133         PyObject_HEAD_INIT(NULL) 0,
134         .tp_name = "dnsserver.DNS_RPC_BUFFER",
135         .tp_getset = py_DNS_RPC_BUFFER_getsetters,
136         .tp_methods = NULL,
137         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
138         .tp_basicsize = sizeof(pytalloc_Object),
139         .tp_new = py_DNS_RPC_BUFFER_new,
140 };
141
142
143 static PyObject *py_DNS_RPC_UTF8_STRING_LIST_get_dwCount(PyObject *obj, void *closure)
144 {
145         struct DNS_RPC_UTF8_STRING_LIST *object = (struct DNS_RPC_UTF8_STRING_LIST *)pytalloc_get_ptr(obj);
146         PyObject *py_dwCount;
147         py_dwCount = PyInt_FromLong(object->dwCount);
148         return py_dwCount;
149 }
150
151 static int py_DNS_RPC_UTF8_STRING_LIST_set_dwCount(PyObject *py_obj, PyObject *value, void *closure)
152 {
153         struct DNS_RPC_UTF8_STRING_LIST *object = (struct DNS_RPC_UTF8_STRING_LIST *)pytalloc_get_ptr(py_obj);
154         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
155         object->dwCount = PyInt_AsLong(value);
156         return 0;
157 }
158
159 static PyObject *py_DNS_RPC_UTF8_STRING_LIST_get_pszStrings(PyObject *obj, void *closure)
160 {
161         struct DNS_RPC_UTF8_STRING_LIST *object = (struct DNS_RPC_UTF8_STRING_LIST *)pytalloc_get_ptr(obj);
162         PyObject *py_pszStrings;
163         py_pszStrings = PyList_New(object->dwCount);
164         if (py_pszStrings == NULL) {
165                 return NULL;
166         }
167         {
168                 int pszStrings_cntr_0;
169                 for (pszStrings_cntr_0 = 0; pszStrings_cntr_0 < object->dwCount; pszStrings_cntr_0++) {
170                         PyObject *py_pszStrings_0;
171                         if (object->pszStrings[pszStrings_cntr_0] == NULL) {
172                                 py_pszStrings_0 = Py_None;
173                                 Py_INCREF(py_pszStrings_0);
174                         } else {
175                                 if (object->pszStrings[pszStrings_cntr_0] == NULL) {
176                                         py_pszStrings_0 = Py_None;
177                                         Py_INCREF(py_pszStrings_0);
178                                 } else {
179                                         py_pszStrings_0 = PyUnicode_Decode(object->pszStrings[pszStrings_cntr_0], strlen(object->pszStrings[pszStrings_cntr_0]), "utf-8", "ignore");
180                                 }
181                         }
182                         PyList_SetItem(py_pszStrings, pszStrings_cntr_0, py_pszStrings_0);
183                 }
184         }
185         return py_pszStrings;
186 }
187
188 static int py_DNS_RPC_UTF8_STRING_LIST_set_pszStrings(PyObject *py_obj, PyObject *value, void *closure)
189 {
190         struct DNS_RPC_UTF8_STRING_LIST *object = (struct DNS_RPC_UTF8_STRING_LIST *)pytalloc_get_ptr(py_obj);
191         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
192         {
193                 int pszStrings_cntr_0;
194                 object->pszStrings = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pszStrings, PyList_GET_SIZE(value));
195                 if (!object->pszStrings) { return -1;; }
196                 talloc_set_name_const(object->pszStrings, "ARRAY: object->pszStrings");
197                 for (pszStrings_cntr_0 = 0; pszStrings_cntr_0 < PyList_GET_SIZE(value); pszStrings_cntr_0++) {
198                         if (PyList_GET_ITEM(value, pszStrings_cntr_0) == Py_None) {
199                                 object->pszStrings[pszStrings_cntr_0] = NULL;
200                         } else {
201                                 object->pszStrings[pszStrings_cntr_0] = NULL;
202                                 if (PyUnicode_Check(PyList_GET_ITEM(value, pszStrings_cntr_0))) {
203                                         object->pszStrings[pszStrings_cntr_0] = PyString_AS_STRING(PyUnicode_AsEncodedString(PyList_GET_ITEM(value, pszStrings_cntr_0), "utf-8", "ignore"));
204                                 } else if (PyString_Check(PyList_GET_ITEM(value, pszStrings_cntr_0))) {
205                                         object->pszStrings[pszStrings_cntr_0] = PyString_AS_STRING(PyList_GET_ITEM(value, pszStrings_cntr_0));
206                                 } else {
207                                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(PyList_GET_ITEM(value, pszStrings_cntr_0))->tp_name);
208                                         return -1;
209                                 }
210                         }
211                 }
212         }
213         return 0;
214 }
215
216 static PyGetSetDef py_DNS_RPC_UTF8_STRING_LIST_getsetters[] = {
217         { discard_const_p(char, "dwCount"), py_DNS_RPC_UTF8_STRING_LIST_get_dwCount, py_DNS_RPC_UTF8_STRING_LIST_set_dwCount },
218         { discard_const_p(char, "pszStrings"), py_DNS_RPC_UTF8_STRING_LIST_get_pszStrings, py_DNS_RPC_UTF8_STRING_LIST_set_pszStrings },
219         { NULL }
220 };
221
222 static PyObject *py_DNS_RPC_UTF8_STRING_LIST_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
223 {
224         return pytalloc_new(struct DNS_RPC_UTF8_STRING_LIST, type);
225 }
226
227
228 static PyTypeObject DNS_RPC_UTF8_STRING_LIST_Type = {
229         PyObject_HEAD_INIT(NULL) 0,
230         .tp_name = "dnsserver.DNS_RPC_UTF8_STRING_LIST",
231         .tp_getset = py_DNS_RPC_UTF8_STRING_LIST_getsetters,
232         .tp_methods = NULL,
233         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
234         .tp_basicsize = sizeof(pytalloc_Object),
235         .tp_new = py_DNS_RPC_UTF8_STRING_LIST_new,
236 };
237
238
239 static PyObject *py_DNS_RPC_NAME_AND_PARAM_get_dwParam(PyObject *obj, void *closure)
240 {
241         struct DNS_RPC_NAME_AND_PARAM *object = (struct DNS_RPC_NAME_AND_PARAM *)pytalloc_get_ptr(obj);
242         PyObject *py_dwParam;
243         py_dwParam = PyInt_FromLong(object->dwParam);
244         return py_dwParam;
245 }
246
247 static int py_DNS_RPC_NAME_AND_PARAM_set_dwParam(PyObject *py_obj, PyObject *value, void *closure)
248 {
249         struct DNS_RPC_NAME_AND_PARAM *object = (struct DNS_RPC_NAME_AND_PARAM *)pytalloc_get_ptr(py_obj);
250         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
251         object->dwParam = PyInt_AsLong(value);
252         return 0;
253 }
254
255 static PyObject *py_DNS_RPC_NAME_AND_PARAM_get_pszNodeName(PyObject *obj, void *closure)
256 {
257         struct DNS_RPC_NAME_AND_PARAM *object = (struct DNS_RPC_NAME_AND_PARAM *)pytalloc_get_ptr(obj);
258         PyObject *py_pszNodeName;
259         if (object->pszNodeName == NULL) {
260                 py_pszNodeName = Py_None;
261                 Py_INCREF(py_pszNodeName);
262         } else {
263                 if (object->pszNodeName == NULL) {
264                         py_pszNodeName = Py_None;
265                         Py_INCREF(py_pszNodeName);
266                 } else {
267                         py_pszNodeName = PyUnicode_Decode(object->pszNodeName, strlen(object->pszNodeName), "utf-8", "ignore");
268                 }
269         }
270         return py_pszNodeName;
271 }
272
273 static int py_DNS_RPC_NAME_AND_PARAM_set_pszNodeName(PyObject *py_obj, PyObject *value, void *closure)
274 {
275         struct DNS_RPC_NAME_AND_PARAM *object = (struct DNS_RPC_NAME_AND_PARAM *)pytalloc_get_ptr(py_obj);
276         if (value == Py_None) {
277                 object->pszNodeName = NULL;
278         } else {
279                 object->pszNodeName = NULL;
280                 if (PyUnicode_Check(value)) {
281                         object->pszNodeName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
282                 } else if (PyString_Check(value)) {
283                         object->pszNodeName = PyString_AS_STRING(value);
284                 } else {
285                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
286                         return -1;
287                 }
288         }
289         return 0;
290 }
291
292 static PyGetSetDef py_DNS_RPC_NAME_AND_PARAM_getsetters[] = {
293         { discard_const_p(char, "dwParam"), py_DNS_RPC_NAME_AND_PARAM_get_dwParam, py_DNS_RPC_NAME_AND_PARAM_set_dwParam },
294         { discard_const_p(char, "pszNodeName"), py_DNS_RPC_NAME_AND_PARAM_get_pszNodeName, py_DNS_RPC_NAME_AND_PARAM_set_pszNodeName },
295         { NULL }
296 };
297
298 static PyObject *py_DNS_RPC_NAME_AND_PARAM_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
299 {
300         return pytalloc_new(struct DNS_RPC_NAME_AND_PARAM, type);
301 }
302
303
304 static PyTypeObject DNS_RPC_NAME_AND_PARAM_Type = {
305         PyObject_HEAD_INIT(NULL) 0,
306         .tp_name = "dnsserver.DNS_RPC_NAME_AND_PARAM",
307         .tp_getset = py_DNS_RPC_NAME_AND_PARAM_getsetters,
308         .tp_methods = NULL,
309         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
310         .tp_basicsize = sizeof(pytalloc_Object),
311         .tp_new = py_DNS_RPC_NAME_AND_PARAM_new,
312 };
313
314
315 static PyObject *py_DNS_RPC_NAME_get_len(PyObject *obj, void *closure)
316 {
317         struct DNS_RPC_NAME *object = (struct DNS_RPC_NAME *)pytalloc_get_ptr(obj);
318         PyObject *py_len;
319         py_len = PyInt_FromLong(object->len);
320         return py_len;
321 }
322
323 static int py_DNS_RPC_NAME_set_len(PyObject *py_obj, PyObject *value, void *closure)
324 {
325         struct DNS_RPC_NAME *object = (struct DNS_RPC_NAME *)pytalloc_get_ptr(py_obj);
326         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
327         object->len = PyInt_AsLong(value);
328         return 0;
329 }
330
331 static PyObject *py_DNS_RPC_NAME_get_str(PyObject *obj, void *closure)
332 {
333         struct DNS_RPC_NAME *object = (struct DNS_RPC_NAME *)pytalloc_get_ptr(obj);
334         PyObject *py_str;
335         if (object->str == NULL) {
336                 py_str = Py_None;
337                 Py_INCREF(py_str);
338         } else {
339                 py_str = PyUnicode_Decode(object->str, strlen(object->str), "utf-8", "ignore");
340         }
341         return py_str;
342 }
343
344 static int py_DNS_RPC_NAME_set_str(PyObject *py_obj, PyObject *value, void *closure)
345 {
346         struct DNS_RPC_NAME *object = (struct DNS_RPC_NAME *)pytalloc_get_ptr(py_obj);
347         if (PyUnicode_Check(value)) {
348                 object->str = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
349         } else if (PyString_Check(value)) {
350                 object->str = PyString_AS_STRING(value);
351         } else {
352                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
353                 return -1;
354         }
355         return 0;
356 }
357
358 static PyGetSetDef py_DNS_RPC_NAME_getsetters[] = {
359         { discard_const_p(char, "len"), py_DNS_RPC_NAME_get_len, py_DNS_RPC_NAME_set_len },
360         { discard_const_p(char, "str"), py_DNS_RPC_NAME_get_str, py_DNS_RPC_NAME_set_str },
361         { NULL }
362 };
363
364 static PyObject *py_DNS_RPC_NAME_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
365 {
366         return pytalloc_new(struct DNS_RPC_NAME, type);
367 }
368
369 static PyObject *py_DNS_RPC_NAME_ndr_pack(PyObject *py_obj)
370 {
371         struct DNS_RPC_NAME *object = (struct DNS_RPC_NAME *)pytalloc_get_ptr(py_obj);
372         DATA_BLOB blob;
373         enum ndr_err_code err;
374         err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_NAME);
375         if (err != NDR_ERR_SUCCESS) {
376                 PyErr_SetNdrError(err);
377                 return NULL;
378         }
379
380         return PyString_FromStringAndSize((char *)blob.data, blob.length);
381 }
382
383 static PyObject *py_DNS_RPC_NAME_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
384 {
385         struct DNS_RPC_NAME *object = (struct DNS_RPC_NAME *)pytalloc_get_ptr(py_obj);
386         DATA_BLOB blob;
387         int blob_length = 0;
388         enum ndr_err_code err;
389         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
390         PyObject *allow_remaining_obj = NULL;
391         bool allow_remaining = false;
392
393         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
394                 discard_const_p(char *, kwnames),
395                 &blob.data, &blob_length,
396                 &allow_remaining_obj)) {
397                 return NULL;
398         }
399         blob.length = blob_length;
400
401         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
402                 allow_remaining = true;
403         }
404
405         if (allow_remaining) {
406                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_NAME);
407         } else {
408                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_NAME);
409         }
410         if (err != NDR_ERR_SUCCESS) {
411                 PyErr_SetNdrError(err);
412                 return NULL;
413         }
414
415         Py_RETURN_NONE;
416 }
417
418 static PyObject *py_DNS_RPC_NAME_ndr_print(PyObject *py_obj)
419 {
420         struct DNS_RPC_NAME *object = (struct DNS_RPC_NAME *)pytalloc_get_ptr(py_obj);
421         PyObject *ret;
422         char *retstr;
423
424         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_DNS_RPC_NAME, "DNS_RPC_NAME", object);
425         ret = PyString_FromString(retstr);
426         talloc_free(retstr);
427
428         return ret;
429 }
430
431 static PyMethodDef py_DNS_RPC_NAME_methods[] = {
432         { "__ndr_pack__", (PyCFunction)py_DNS_RPC_NAME_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
433         { "__ndr_unpack__", (PyCFunction)py_DNS_RPC_NAME_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
434         { "__ndr_print__", (PyCFunction)py_DNS_RPC_NAME_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
435         { NULL, NULL, 0, NULL }
436 };
437
438
439 static PyTypeObject DNS_RPC_NAME_Type = {
440         PyObject_HEAD_INIT(NULL) 0,
441         .tp_name = "dnsserver.DNS_RPC_NAME",
442         .tp_getset = py_DNS_RPC_NAME_getsetters,
443         .tp_methods = py_DNS_RPC_NAME_methods,
444         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
445         .tp_basicsize = sizeof(pytalloc_Object),
446         .tp_new = py_DNS_RPC_NAME_new,
447 };
448
449
450 static PyObject *py_DNS_RPC_NODE_get_wLength(PyObject *obj, void *closure)
451 {
452         struct DNS_RPC_NODE *object = (struct DNS_RPC_NODE *)pytalloc_get_ptr(obj);
453         PyObject *py_wLength;
454         py_wLength = PyInt_FromLong(object->wLength);
455         return py_wLength;
456 }
457
458 static int py_DNS_RPC_NODE_set_wLength(PyObject *py_obj, PyObject *value, void *closure)
459 {
460         struct DNS_RPC_NODE *object = (struct DNS_RPC_NODE *)pytalloc_get_ptr(py_obj);
461         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
462         object->wLength = PyInt_AsLong(value);
463         return 0;
464 }
465
466 static PyObject *py_DNS_RPC_NODE_get_wRecordCount(PyObject *obj, void *closure)
467 {
468         struct DNS_RPC_NODE *object = (struct DNS_RPC_NODE *)pytalloc_get_ptr(obj);
469         PyObject *py_wRecordCount;
470         py_wRecordCount = PyInt_FromLong(object->wRecordCount);
471         return py_wRecordCount;
472 }
473
474 static int py_DNS_RPC_NODE_set_wRecordCount(PyObject *py_obj, PyObject *value, void *closure)
475 {
476         struct DNS_RPC_NODE *object = (struct DNS_RPC_NODE *)pytalloc_get_ptr(py_obj);
477         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
478         object->wRecordCount = PyInt_AsLong(value);
479         return 0;
480 }
481
482 static PyObject *py_DNS_RPC_NODE_get_dwFlags(PyObject *obj, void *closure)
483 {
484         struct DNS_RPC_NODE *object = (struct DNS_RPC_NODE *)pytalloc_get_ptr(obj);
485         PyObject *py_dwFlags;
486         py_dwFlags = PyInt_FromLong(object->dwFlags);
487         return py_dwFlags;
488 }
489
490 static int py_DNS_RPC_NODE_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
491 {
492         struct DNS_RPC_NODE *object = (struct DNS_RPC_NODE *)pytalloc_get_ptr(py_obj);
493         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
494         object->dwFlags = PyInt_AsLong(value);
495         return 0;
496 }
497
498 static PyObject *py_DNS_RPC_NODE_get_dwChildCount(PyObject *obj, void *closure)
499 {
500         struct DNS_RPC_NODE *object = (struct DNS_RPC_NODE *)pytalloc_get_ptr(obj);
501         PyObject *py_dwChildCount;
502         py_dwChildCount = PyInt_FromLong(object->dwChildCount);
503         return py_dwChildCount;
504 }
505
506 static int py_DNS_RPC_NODE_set_dwChildCount(PyObject *py_obj, PyObject *value, void *closure)
507 {
508         struct DNS_RPC_NODE *object = (struct DNS_RPC_NODE *)pytalloc_get_ptr(py_obj);
509         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
510         object->dwChildCount = PyInt_AsLong(value);
511         return 0;
512 }
513
514 static PyObject *py_DNS_RPC_NODE_get_dnsNodeName(PyObject *obj, void *closure)
515 {
516         struct DNS_RPC_NODE *object = (struct DNS_RPC_NODE *)pytalloc_get_ptr(obj);
517         PyObject *py_dnsNodeName;
518         py_dnsNodeName = pytalloc_reference_ex(&DNS_RPC_NAME_Type, pytalloc_get_mem_ctx(obj), &object->dnsNodeName);
519         return py_dnsNodeName;
520 }
521
522 static int py_DNS_RPC_NODE_set_dnsNodeName(PyObject *py_obj, PyObject *value, void *closure)
523 {
524         struct DNS_RPC_NODE *object = (struct DNS_RPC_NODE *)pytalloc_get_ptr(py_obj);
525         PY_CHECK_TYPE(&DNS_RPC_NAME_Type, value, return -1;);
526         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
527                 PyErr_NoMemory();
528                 return -1;
529         }
530         object->dnsNodeName = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(value);
531         return 0;
532 }
533
534 static PyGetSetDef py_DNS_RPC_NODE_getsetters[] = {
535         { discard_const_p(char, "wLength"), py_DNS_RPC_NODE_get_wLength, py_DNS_RPC_NODE_set_wLength },
536         { discard_const_p(char, "wRecordCount"), py_DNS_RPC_NODE_get_wRecordCount, py_DNS_RPC_NODE_set_wRecordCount },
537         { discard_const_p(char, "dwFlags"), py_DNS_RPC_NODE_get_dwFlags, py_DNS_RPC_NODE_set_dwFlags },
538         { discard_const_p(char, "dwChildCount"), py_DNS_RPC_NODE_get_dwChildCount, py_DNS_RPC_NODE_set_dwChildCount },
539         { discard_const_p(char, "dnsNodeName"), py_DNS_RPC_NODE_get_dnsNodeName, py_DNS_RPC_NODE_set_dnsNodeName },
540         { NULL }
541 };
542
543 static PyObject *py_DNS_RPC_NODE_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
544 {
545         return pytalloc_new(struct DNS_RPC_NODE, type);
546 }
547
548
549 static PyTypeObject DNS_RPC_NODE_Type = {
550         PyObject_HEAD_INIT(NULL) 0,
551         .tp_name = "dnsserver.DNS_RPC_NODE",
552         .tp_getset = py_DNS_RPC_NODE_getsetters,
553         .tp_methods = NULL,
554         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
555         .tp_basicsize = sizeof(pytalloc_Object),
556         .tp_new = py_DNS_RPC_NODE_new,
557 };
558
559
560 static PyObject *py_DNS_RPC_RECORD_SOA_get_dwSerialNo(PyObject *obj, void *closure)
561 {
562         struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(obj);
563         PyObject *py_dwSerialNo;
564         py_dwSerialNo = PyInt_FromLong(object->dwSerialNo);
565         return py_dwSerialNo;
566 }
567
568 static int py_DNS_RPC_RECORD_SOA_set_dwSerialNo(PyObject *py_obj, PyObject *value, void *closure)
569 {
570         struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(py_obj);
571         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
572         object->dwSerialNo = PyInt_AsLong(value);
573         return 0;
574 }
575
576 static PyObject *py_DNS_RPC_RECORD_SOA_get_dwRefresh(PyObject *obj, void *closure)
577 {
578         struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(obj);
579         PyObject *py_dwRefresh;
580         py_dwRefresh = PyInt_FromLong(object->dwRefresh);
581         return py_dwRefresh;
582 }
583
584 static int py_DNS_RPC_RECORD_SOA_set_dwRefresh(PyObject *py_obj, PyObject *value, void *closure)
585 {
586         struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(py_obj);
587         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
588         object->dwRefresh = PyInt_AsLong(value);
589         return 0;
590 }
591
592 static PyObject *py_DNS_RPC_RECORD_SOA_get_dwRetry(PyObject *obj, void *closure)
593 {
594         struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(obj);
595         PyObject *py_dwRetry;
596         py_dwRetry = PyInt_FromLong(object->dwRetry);
597         return py_dwRetry;
598 }
599
600 static int py_DNS_RPC_RECORD_SOA_set_dwRetry(PyObject *py_obj, PyObject *value, void *closure)
601 {
602         struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(py_obj);
603         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
604         object->dwRetry = PyInt_AsLong(value);
605         return 0;
606 }
607
608 static PyObject *py_DNS_RPC_RECORD_SOA_get_dwExpire(PyObject *obj, void *closure)
609 {
610         struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(obj);
611         PyObject *py_dwExpire;
612         py_dwExpire = PyInt_FromLong(object->dwExpire);
613         return py_dwExpire;
614 }
615
616 static int py_DNS_RPC_RECORD_SOA_set_dwExpire(PyObject *py_obj, PyObject *value, void *closure)
617 {
618         struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(py_obj);
619         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
620         object->dwExpire = PyInt_AsLong(value);
621         return 0;
622 }
623
624 static PyObject *py_DNS_RPC_RECORD_SOA_get_dwMinimumTtl(PyObject *obj, void *closure)
625 {
626         struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(obj);
627         PyObject *py_dwMinimumTtl;
628         py_dwMinimumTtl = PyInt_FromLong(object->dwMinimumTtl);
629         return py_dwMinimumTtl;
630 }
631
632 static int py_DNS_RPC_RECORD_SOA_set_dwMinimumTtl(PyObject *py_obj, PyObject *value, void *closure)
633 {
634         struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(py_obj);
635         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
636         object->dwMinimumTtl = PyInt_AsLong(value);
637         return 0;
638 }
639
640 static PyObject *py_DNS_RPC_RECORD_SOA_get_NamePrimaryServer(PyObject *obj, void *closure)
641 {
642         struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(obj);
643         PyObject *py_NamePrimaryServer;
644         py_NamePrimaryServer = pytalloc_reference_ex(&DNS_RPC_NAME_Type, pytalloc_get_mem_ctx(obj), &object->NamePrimaryServer);
645         return py_NamePrimaryServer;
646 }
647
648 static int py_DNS_RPC_RECORD_SOA_set_NamePrimaryServer(PyObject *py_obj, PyObject *value, void *closure)
649 {
650         struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(py_obj);
651         PY_CHECK_TYPE(&DNS_RPC_NAME_Type, value, return -1;);
652         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
653                 PyErr_NoMemory();
654                 return -1;
655         }
656         object->NamePrimaryServer = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(value);
657         return 0;
658 }
659
660 static PyObject *py_DNS_RPC_RECORD_SOA_get_ZoneAdministratorEmail(PyObject *obj, void *closure)
661 {
662         struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(obj);
663         PyObject *py_ZoneAdministratorEmail;
664         py_ZoneAdministratorEmail = pytalloc_reference_ex(&DNS_RPC_NAME_Type, pytalloc_get_mem_ctx(obj), &object->ZoneAdministratorEmail);
665         return py_ZoneAdministratorEmail;
666 }
667
668 static int py_DNS_RPC_RECORD_SOA_set_ZoneAdministratorEmail(PyObject *py_obj, PyObject *value, void *closure)
669 {
670         struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(py_obj);
671         PY_CHECK_TYPE(&DNS_RPC_NAME_Type, value, return -1;);
672         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
673                 PyErr_NoMemory();
674                 return -1;
675         }
676         object->ZoneAdministratorEmail = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(value);
677         return 0;
678 }
679
680 static PyGetSetDef py_DNS_RPC_RECORD_SOA_getsetters[] = {
681         { discard_const_p(char, "dwSerialNo"), py_DNS_RPC_RECORD_SOA_get_dwSerialNo, py_DNS_RPC_RECORD_SOA_set_dwSerialNo },
682         { discard_const_p(char, "dwRefresh"), py_DNS_RPC_RECORD_SOA_get_dwRefresh, py_DNS_RPC_RECORD_SOA_set_dwRefresh },
683         { discard_const_p(char, "dwRetry"), py_DNS_RPC_RECORD_SOA_get_dwRetry, py_DNS_RPC_RECORD_SOA_set_dwRetry },
684         { discard_const_p(char, "dwExpire"), py_DNS_RPC_RECORD_SOA_get_dwExpire, py_DNS_RPC_RECORD_SOA_set_dwExpire },
685         { discard_const_p(char, "dwMinimumTtl"), py_DNS_RPC_RECORD_SOA_get_dwMinimumTtl, py_DNS_RPC_RECORD_SOA_set_dwMinimumTtl },
686         { discard_const_p(char, "NamePrimaryServer"), py_DNS_RPC_RECORD_SOA_get_NamePrimaryServer, py_DNS_RPC_RECORD_SOA_set_NamePrimaryServer },
687         { discard_const_p(char, "ZoneAdministratorEmail"), py_DNS_RPC_RECORD_SOA_get_ZoneAdministratorEmail, py_DNS_RPC_RECORD_SOA_set_ZoneAdministratorEmail },
688         { NULL }
689 };
690
691 static PyObject *py_DNS_RPC_RECORD_SOA_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
692 {
693         return pytalloc_new(struct DNS_RPC_RECORD_SOA, type);
694 }
695
696
697 static PyTypeObject DNS_RPC_RECORD_SOA_Type = {
698         PyObject_HEAD_INIT(NULL) 0,
699         .tp_name = "dnsserver.DNS_RPC_RECORD_SOA",
700         .tp_getset = py_DNS_RPC_RECORD_SOA_getsetters,
701         .tp_methods = NULL,
702         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
703         .tp_basicsize = sizeof(pytalloc_Object),
704         .tp_new = py_DNS_RPC_RECORD_SOA_new,
705 };
706
707
708 static PyObject *py_DNS_RPC_RECORD_NAME_PREFERENCE_get_wPreference(PyObject *obj, void *closure)
709 {
710         struct DNS_RPC_RECORD_NAME_PREFERENCE *object = (struct DNS_RPC_RECORD_NAME_PREFERENCE *)pytalloc_get_ptr(obj);
711         PyObject *py_wPreference;
712         py_wPreference = PyInt_FromLong(object->wPreference);
713         return py_wPreference;
714 }
715
716 static int py_DNS_RPC_RECORD_NAME_PREFERENCE_set_wPreference(PyObject *py_obj, PyObject *value, void *closure)
717 {
718         struct DNS_RPC_RECORD_NAME_PREFERENCE *object = (struct DNS_RPC_RECORD_NAME_PREFERENCE *)pytalloc_get_ptr(py_obj);
719         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
720         object->wPreference = PyInt_AsLong(value);
721         return 0;
722 }
723
724 static PyObject *py_DNS_RPC_RECORD_NAME_PREFERENCE_get_nameExchange(PyObject *obj, void *closure)
725 {
726         struct DNS_RPC_RECORD_NAME_PREFERENCE *object = (struct DNS_RPC_RECORD_NAME_PREFERENCE *)pytalloc_get_ptr(obj);
727         PyObject *py_nameExchange;
728         py_nameExchange = pytalloc_reference_ex(&DNS_RPC_NAME_Type, pytalloc_get_mem_ctx(obj), &object->nameExchange);
729         return py_nameExchange;
730 }
731
732 static int py_DNS_RPC_RECORD_NAME_PREFERENCE_set_nameExchange(PyObject *py_obj, PyObject *value, void *closure)
733 {
734         struct DNS_RPC_RECORD_NAME_PREFERENCE *object = (struct DNS_RPC_RECORD_NAME_PREFERENCE *)pytalloc_get_ptr(py_obj);
735         PY_CHECK_TYPE(&DNS_RPC_NAME_Type, value, return -1;);
736         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
737                 PyErr_NoMemory();
738                 return -1;
739         }
740         object->nameExchange = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(value);
741         return 0;
742 }
743
744 static PyGetSetDef py_DNS_RPC_RECORD_NAME_PREFERENCE_getsetters[] = {
745         { discard_const_p(char, "wPreference"), py_DNS_RPC_RECORD_NAME_PREFERENCE_get_wPreference, py_DNS_RPC_RECORD_NAME_PREFERENCE_set_wPreference },
746         { discard_const_p(char, "nameExchange"), py_DNS_RPC_RECORD_NAME_PREFERENCE_get_nameExchange, py_DNS_RPC_RECORD_NAME_PREFERENCE_set_nameExchange },
747         { NULL }
748 };
749
750 static PyObject *py_DNS_RPC_RECORD_NAME_PREFERENCE_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
751 {
752         return pytalloc_new(struct DNS_RPC_RECORD_NAME_PREFERENCE, type);
753 }
754
755
756 static PyTypeObject DNS_RPC_RECORD_NAME_PREFERENCE_Type = {
757         PyObject_HEAD_INIT(NULL) 0,
758         .tp_name = "dnsserver.DNS_RPC_RECORD_NAME_PREFERENCE",
759         .tp_getset = py_DNS_RPC_RECORD_NAME_PREFERENCE_getsetters,
760         .tp_methods = NULL,
761         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
762         .tp_basicsize = sizeof(pytalloc_Object),
763         .tp_new = py_DNS_RPC_RECORD_NAME_PREFERENCE_new,
764 };
765
766
767 static PyObject *py_DNS_RPC_RECORD_STRING_get_count(PyObject *obj, void *closure)
768 {
769         struct DNS_RPC_RECORD_STRING *object = (struct DNS_RPC_RECORD_STRING *)pytalloc_get_ptr(obj);
770         PyObject *py_count;
771         py_count = PyInt_FromLong(object->count);
772         return py_count;
773 }
774
775 static int py_DNS_RPC_RECORD_STRING_set_count(PyObject *py_obj, PyObject *value, void *closure)
776 {
777         struct DNS_RPC_RECORD_STRING *object = (struct DNS_RPC_RECORD_STRING *)pytalloc_get_ptr(py_obj);
778         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
779         object->count = PyInt_AsLong(value);
780         return 0;
781 }
782
783 static PyObject *py_DNS_RPC_RECORD_STRING_get_str(PyObject *obj, void *closure)
784 {
785         struct DNS_RPC_RECORD_STRING *object = (struct DNS_RPC_RECORD_STRING *)pytalloc_get_ptr(obj);
786         PyObject *py_str;
787         py_str = PyList_New(object->count);
788         if (py_str == NULL) {
789                 return NULL;
790         }
791         {
792                 int str_cntr_0;
793                 for (str_cntr_0 = 0; str_cntr_0 < object->count; str_cntr_0++) {
794                         PyObject *py_str_0;
795                         py_str_0 = pytalloc_reference_ex(&DNS_RPC_NAME_Type, object->str, &object->str[str_cntr_0]);
796                         PyList_SetItem(py_str, str_cntr_0, py_str_0);
797                 }
798         }
799         return py_str;
800 }
801
802 static int py_DNS_RPC_RECORD_STRING_set_str(PyObject *py_obj, PyObject *value, void *closure)
803 {
804         struct DNS_RPC_RECORD_STRING *object = (struct DNS_RPC_RECORD_STRING *)pytalloc_get_ptr(py_obj);
805         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
806         {
807                 int str_cntr_0;
808                 object->str = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->str, PyList_GET_SIZE(value));
809                 if (!object->str) { return -1;; }
810                 talloc_set_name_const(object->str, "ARRAY: object->str");
811                 for (str_cntr_0 = 0; str_cntr_0 < PyList_GET_SIZE(value); str_cntr_0++) {
812                         PY_CHECK_TYPE(&DNS_RPC_NAME_Type, PyList_GET_ITEM(value, str_cntr_0), return -1;);
813                         if (talloc_reference(object->str, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, str_cntr_0))) == NULL) {
814                                 PyErr_NoMemory();
815                                 return -1;
816                         }
817                         object->str[str_cntr_0] = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(PyList_GET_ITEM(value, str_cntr_0));
818                 }
819         }
820         return 0;
821 }
822
823 static PyGetSetDef py_DNS_RPC_RECORD_STRING_getsetters[] = {
824         { discard_const_p(char, "count"), py_DNS_RPC_RECORD_STRING_get_count, py_DNS_RPC_RECORD_STRING_set_count },
825         { discard_const_p(char, "str"), py_DNS_RPC_RECORD_STRING_get_str, py_DNS_RPC_RECORD_STRING_set_str },
826         { NULL }
827 };
828
829 static PyObject *py_DNS_RPC_RECORD_STRING_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
830 {
831         return pytalloc_new(struct DNS_RPC_RECORD_STRING, type);
832 }
833
834
835 static PyTypeObject DNS_RPC_RECORD_STRING_Type = {
836         PyObject_HEAD_INIT(NULL) 0,
837         .tp_name = "dnsserver.DNS_RPC_RECORD_STRING",
838         .tp_getset = py_DNS_RPC_RECORD_STRING_getsetters,
839         .tp_methods = NULL,
840         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
841         .tp_basicsize = sizeof(pytalloc_Object),
842         .tp_new = py_DNS_RPC_RECORD_STRING_new,
843 };
844
845
846 static PyObject *py_DNS_RPC_RECORD_SRV_get_wPriority(PyObject *obj, void *closure)
847 {
848         struct DNS_RPC_RECORD_SRV *object = (struct DNS_RPC_RECORD_SRV *)pytalloc_get_ptr(obj);
849         PyObject *py_wPriority;
850         py_wPriority = PyInt_FromLong(object->wPriority);
851         return py_wPriority;
852 }
853
854 static int py_DNS_RPC_RECORD_SRV_set_wPriority(PyObject *py_obj, PyObject *value, void *closure)
855 {
856         struct DNS_RPC_RECORD_SRV *object = (struct DNS_RPC_RECORD_SRV *)pytalloc_get_ptr(py_obj);
857         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
858         object->wPriority = PyInt_AsLong(value);
859         return 0;
860 }
861
862 static PyObject *py_DNS_RPC_RECORD_SRV_get_wWeight(PyObject *obj, void *closure)
863 {
864         struct DNS_RPC_RECORD_SRV *object = (struct DNS_RPC_RECORD_SRV *)pytalloc_get_ptr(obj);
865         PyObject *py_wWeight;
866         py_wWeight = PyInt_FromLong(object->wWeight);
867         return py_wWeight;
868 }
869
870 static int py_DNS_RPC_RECORD_SRV_set_wWeight(PyObject *py_obj, PyObject *value, void *closure)
871 {
872         struct DNS_RPC_RECORD_SRV *object = (struct DNS_RPC_RECORD_SRV *)pytalloc_get_ptr(py_obj);
873         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
874         object->wWeight = PyInt_AsLong(value);
875         return 0;
876 }
877
878 static PyObject *py_DNS_RPC_RECORD_SRV_get_wPort(PyObject *obj, void *closure)
879 {
880         struct DNS_RPC_RECORD_SRV *object = (struct DNS_RPC_RECORD_SRV *)pytalloc_get_ptr(obj);
881         PyObject *py_wPort;
882         py_wPort = PyInt_FromLong(object->wPort);
883         return py_wPort;
884 }
885
886 static int py_DNS_RPC_RECORD_SRV_set_wPort(PyObject *py_obj, PyObject *value, void *closure)
887 {
888         struct DNS_RPC_RECORD_SRV *object = (struct DNS_RPC_RECORD_SRV *)pytalloc_get_ptr(py_obj);
889         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
890         object->wPort = PyInt_AsLong(value);
891         return 0;
892 }
893
894 static PyObject *py_DNS_RPC_RECORD_SRV_get_nameTarget(PyObject *obj, void *closure)
895 {
896         struct DNS_RPC_RECORD_SRV *object = (struct DNS_RPC_RECORD_SRV *)pytalloc_get_ptr(obj);
897         PyObject *py_nameTarget;
898         py_nameTarget = pytalloc_reference_ex(&DNS_RPC_NAME_Type, pytalloc_get_mem_ctx(obj), &object->nameTarget);
899         return py_nameTarget;
900 }
901
902 static int py_DNS_RPC_RECORD_SRV_set_nameTarget(PyObject *py_obj, PyObject *value, void *closure)
903 {
904         struct DNS_RPC_RECORD_SRV *object = (struct DNS_RPC_RECORD_SRV *)pytalloc_get_ptr(py_obj);
905         PY_CHECK_TYPE(&DNS_RPC_NAME_Type, value, return -1;);
906         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
907                 PyErr_NoMemory();
908                 return -1;
909         }
910         object->nameTarget = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(value);
911         return 0;
912 }
913
914 static PyGetSetDef py_DNS_RPC_RECORD_SRV_getsetters[] = {
915         { discard_const_p(char, "wPriority"), py_DNS_RPC_RECORD_SRV_get_wPriority, py_DNS_RPC_RECORD_SRV_set_wPriority },
916         { discard_const_p(char, "wWeight"), py_DNS_RPC_RECORD_SRV_get_wWeight, py_DNS_RPC_RECORD_SRV_set_wWeight },
917         { discard_const_p(char, "wPort"), py_DNS_RPC_RECORD_SRV_get_wPort, py_DNS_RPC_RECORD_SRV_set_wPort },
918         { discard_const_p(char, "nameTarget"), py_DNS_RPC_RECORD_SRV_get_nameTarget, py_DNS_RPC_RECORD_SRV_set_nameTarget },
919         { NULL }
920 };
921
922 static PyObject *py_DNS_RPC_RECORD_SRV_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
923 {
924         return pytalloc_new(struct DNS_RPC_RECORD_SRV, type);
925 }
926
927
928 static PyTypeObject DNS_RPC_RECORD_SRV_Type = {
929         PyObject_HEAD_INIT(NULL) 0,
930         .tp_name = "dnsserver.DNS_RPC_RECORD_SRV",
931         .tp_getset = py_DNS_RPC_RECORD_SRV_getsetters,
932         .tp_methods = NULL,
933         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
934         .tp_basicsize = sizeof(pytalloc_Object),
935         .tp_new = py_DNS_RPC_RECORD_SRV_new,
936 };
937
938 PyObject *py_import_DNS_RPC_DATA(TALLOC_CTX *mem_ctx, int level, union DNS_RPC_DATA *in)
939 {
940         PyObject *ret;
941
942         switch (level) {
943                 case DNS_TYPE_TOMBSTONE:
944                         ret = PyLong_FromLongLong(in->timestamp);
945                         return ret;
946
947                 case DNS_TYPE_A:
948                         ret = PyString_FromStringOrNULL(in->ipv4);
949                         return ret;
950
951                 case DNS_TYPE_NS:
952                         ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
953                         return ret;
954
955                 case DNS_TYPE_MD:
956                         ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
957                         return ret;
958
959                 case DNS_TYPE_MF:
960                         ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
961                         return ret;
962
963                 case DNS_TYPE_CNAME:
964                         ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
965                         return ret;
966
967                 case DNS_TYPE_SOA:
968                         ret = pytalloc_reference_ex(&DNS_RPC_RECORD_SOA_Type, mem_ctx, &in->soa);
969                         return ret;
970
971                 case DNS_TYPE_MB:
972                         ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
973                         return ret;
974
975                 case DNS_TYPE_MG:
976                         ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
977                         return ret;
978
979                 case DNS_TYPE_MR:
980                         ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
981                         return ret;
982
983                 case DNS_TYPE_PTR:
984                         ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->ptr);
985                         return ret;
986
987                 case DNS_TYPE_HINFO:
988                         ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->hinfo);
989                         return ret;
990
991                 case DNS_TYPE_MX:
992                         ret = pytalloc_reference_ex(&DNS_RPC_RECORD_NAME_PREFERENCE_Type, mem_ctx, &in->mx);
993                         return ret;
994
995                 case DNS_TYPE_TXT:
996                         ret = pytalloc_reference_ex(&DNS_RPC_RECORD_STRING_Type, mem_ctx, &in->txt);
997                         return ret;
998
999                 case DNS_TYPE_AAAA:
1000                         ret = PyString_FromStringOrNULL(in->ipv6);
1001                         return ret;
1002
1003                 case DNS_TYPE_SRV:
1004                         ret = pytalloc_reference_ex(&DNS_RPC_RECORD_SRV_Type, mem_ctx, &in->srv);
1005                         return ret;
1006
1007                 case DNS_TYPE_DNAME:
1008                         ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
1009                         return ret;
1010
1011         }
1012         PyErr_SetString(PyExc_TypeError, "unknown union level");
1013         return NULL;
1014 }
1015
1016 union DNS_RPC_DATA *py_export_DNS_RPC_DATA(TALLOC_CTX *mem_ctx, int level, PyObject *in)
1017 {
1018         union DNS_RPC_DATA *ret = talloc_zero(mem_ctx, union DNS_RPC_DATA);
1019         switch (level) {
1020                 case DNS_TYPE_TOMBSTONE:
1021                         if (PyLong_Check(in)) {
1022                                 ret->timestamp = PyLong_AsLongLong(in);
1023                         } else if (PyInt_Check(in)) {
1024                                 ret->timestamp = PyInt_AsLong(in);
1025                         } else {
1026                                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
1027                                   PyInt_Type.tp_name, PyLong_Type.tp_name);
1028                                 talloc_free(ret); return NULL;
1029                         }
1030                         break;
1031
1032                 case DNS_TYPE_A:
1033                         ret->ipv4 = PyString_AS_STRING(in);
1034                         break;
1035
1036                 case DNS_TYPE_NS:
1037                         PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1038                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1039                                 PyErr_NoMemory();
1040                                 talloc_free(ret); return NULL;
1041                         }
1042                         ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1043                         break;
1044
1045                 case DNS_TYPE_MD:
1046                         PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1047                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1048                                 PyErr_NoMemory();
1049                                 talloc_free(ret); return NULL;
1050                         }
1051                         ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1052                         break;
1053
1054                 case DNS_TYPE_MF:
1055                         PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1056                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1057                                 PyErr_NoMemory();
1058                                 talloc_free(ret); return NULL;
1059                         }
1060                         ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1061                         break;
1062
1063                 case DNS_TYPE_CNAME:
1064                         PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1065                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1066                                 PyErr_NoMemory();
1067                                 talloc_free(ret); return NULL;
1068                         }
1069                         ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1070                         break;
1071
1072                 case DNS_TYPE_SOA:
1073                         PY_CHECK_TYPE(&DNS_RPC_RECORD_SOA_Type, in, talloc_free(ret); return NULL;);
1074                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1075                                 PyErr_NoMemory();
1076                                 talloc_free(ret); return NULL;
1077                         }
1078                         ret->soa = *(struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(in);
1079                         break;
1080
1081                 case DNS_TYPE_MB:
1082                         PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1083                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1084                                 PyErr_NoMemory();
1085                                 talloc_free(ret); return NULL;
1086                         }
1087                         ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1088                         break;
1089
1090                 case DNS_TYPE_MG:
1091                         PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1092                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1093                                 PyErr_NoMemory();
1094                                 talloc_free(ret); return NULL;
1095                         }
1096                         ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1097                         break;
1098
1099                 case DNS_TYPE_MR:
1100                         PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1101                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1102                                 PyErr_NoMemory();
1103                                 talloc_free(ret); return NULL;
1104                         }
1105                         ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1106                         break;
1107
1108                 case DNS_TYPE_PTR:
1109                         PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1110                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1111                                 PyErr_NoMemory();
1112                                 talloc_free(ret); return NULL;
1113                         }
1114                         ret->ptr = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1115                         break;
1116
1117                 case DNS_TYPE_HINFO:
1118                         PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1119                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1120                                 PyErr_NoMemory();
1121                                 talloc_free(ret); return NULL;
1122                         }
1123                         ret->hinfo = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1124                         break;
1125
1126                 case DNS_TYPE_MX:
1127                         PY_CHECK_TYPE(&DNS_RPC_RECORD_NAME_PREFERENCE_Type, in, talloc_free(ret); return NULL;);
1128                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1129                                 PyErr_NoMemory();
1130                                 talloc_free(ret); return NULL;
1131                         }
1132                         ret->mx = *(struct DNS_RPC_RECORD_NAME_PREFERENCE *)pytalloc_get_ptr(in);
1133                         break;
1134
1135                 case DNS_TYPE_TXT:
1136                         PY_CHECK_TYPE(&DNS_RPC_RECORD_STRING_Type, in, talloc_free(ret); return NULL;);
1137                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1138                                 PyErr_NoMemory();
1139                                 talloc_free(ret); return NULL;
1140                         }
1141                         ret->txt = *(struct DNS_RPC_RECORD_STRING *)pytalloc_get_ptr(in);
1142                         break;
1143
1144                 case DNS_TYPE_AAAA:
1145                         ret->ipv6 = PyString_AsString(in);
1146                         break;
1147
1148                 case DNS_TYPE_SRV:
1149                         PY_CHECK_TYPE(&DNS_RPC_RECORD_SRV_Type, in, talloc_free(ret); return NULL;);
1150                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1151                                 PyErr_NoMemory();
1152                                 talloc_free(ret); return NULL;
1153                         }
1154                         ret->srv = *(struct DNS_RPC_RECORD_SRV *)pytalloc_get_ptr(in);
1155                         break;
1156
1157                 case DNS_TYPE_DNAME:
1158                         PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1159                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1160                                 PyErr_NoMemory();
1161                                 talloc_free(ret); return NULL;
1162                         }
1163                         ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1164                         break;
1165
1166                 default:
1167                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
1168                         talloc_free(ret);
1169                         ret = NULL;
1170         }
1171
1172         return ret;
1173 }
1174
1175
1176 static PyObject *py_DNS_RPC_RECORD_get_wDataLength(PyObject *obj, void *closure)
1177 {
1178         struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(obj);
1179         PyObject *py_wDataLength;
1180         py_wDataLength = PyInt_FromLong(object->wDataLength);
1181         return py_wDataLength;
1182 }
1183
1184 static int py_DNS_RPC_RECORD_set_wDataLength(PyObject *py_obj, PyObject *value, void *closure)
1185 {
1186         struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
1187         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1188         object->wDataLength = PyInt_AsLong(value);
1189         return 0;
1190 }
1191
1192 static PyObject *py_DNS_RPC_RECORD_get_wType(PyObject *obj, void *closure)
1193 {
1194         struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(obj);
1195         PyObject *py_wType;
1196         py_wType = PyInt_FromLong(object->wType);
1197         return py_wType;
1198 }
1199
1200 static int py_DNS_RPC_RECORD_set_wType(PyObject *py_obj, PyObject *value, void *closure)
1201 {
1202         struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
1203         if (PyLong_Check(value)) {
1204                 object->wType = PyLong_AsLongLong(value);
1205         } else if (PyInt_Check(value)) {
1206                 object->wType = PyInt_AsLong(value);
1207         } else {
1208                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
1209                   PyInt_Type.tp_name, PyLong_Type.tp_name);
1210                 return -1;
1211         }
1212         return 0;
1213 }
1214
1215 static PyObject *py_DNS_RPC_RECORD_get_dwFlags(PyObject *obj, void *closure)
1216 {
1217         struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(obj);
1218         PyObject *py_dwFlags;
1219         py_dwFlags = PyInt_FromLong(object->dwFlags);
1220         return py_dwFlags;
1221 }
1222
1223 static int py_DNS_RPC_RECORD_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
1224 {
1225         struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
1226         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1227         object->dwFlags = PyInt_AsLong(value);
1228         return 0;
1229 }
1230
1231 static PyObject *py_DNS_RPC_RECORD_get_dwSerial(PyObject *obj, void *closure)
1232 {
1233         struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(obj);
1234         PyObject *py_dwSerial;
1235         py_dwSerial = PyInt_FromLong(object->dwSerial);
1236         return py_dwSerial;
1237 }
1238
1239 static int py_DNS_RPC_RECORD_set_dwSerial(PyObject *py_obj, PyObject *value, void *closure)
1240 {
1241         struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
1242         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1243         object->dwSerial = PyInt_AsLong(value);
1244         return 0;
1245 }
1246
1247 static PyObject *py_DNS_RPC_RECORD_get_dwTtlSeconds(PyObject *obj, void *closure)
1248 {
1249         struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(obj);
1250         PyObject *py_dwTtlSeconds;
1251         py_dwTtlSeconds = PyInt_FromLong(object->dwTtlSeconds);
1252         return py_dwTtlSeconds;
1253 }
1254
1255 static int py_DNS_RPC_RECORD_set_dwTtlSeconds(PyObject *py_obj, PyObject *value, void *closure)
1256 {
1257         struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
1258         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1259         object->dwTtlSeconds = PyInt_AsLong(value);
1260         return 0;
1261 }
1262
1263 static PyObject *py_DNS_RPC_RECORD_get_dwTimeStamp(PyObject *obj, void *closure)
1264 {
1265         struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(obj);
1266         PyObject *py_dwTimeStamp;
1267         py_dwTimeStamp = PyInt_FromLong(object->dwTimeStamp);
1268         return py_dwTimeStamp;
1269 }
1270
1271 static int py_DNS_RPC_RECORD_set_dwTimeStamp(PyObject *py_obj, PyObject *value, void *closure)
1272 {
1273         struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
1274         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1275         object->dwTimeStamp = PyInt_AsLong(value);
1276         return 0;
1277 }
1278
1279 static PyObject *py_DNS_RPC_RECORD_get_dwReserved(PyObject *obj, void *closure)
1280 {
1281         struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(obj);
1282         PyObject *py_dwReserved;
1283         py_dwReserved = PyInt_FromLong(object->dwReserved);
1284         return py_dwReserved;
1285 }
1286
1287 static int py_DNS_RPC_RECORD_set_dwReserved(PyObject *py_obj, PyObject *value, void *closure)
1288 {
1289         struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
1290         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1291         object->dwReserved = PyInt_AsLong(value);
1292         return 0;
1293 }
1294
1295 static PyObject *py_DNS_RPC_RECORD_get_data(PyObject *obj, void *closure)
1296 {
1297         struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(obj);
1298         PyObject *py_data;
1299         py_data = py_import_DNS_RPC_DATA(pytalloc_get_mem_ctx(obj), object->wType, &object->data);
1300         if (py_data == NULL) {
1301                 return NULL;
1302         }
1303         return py_data;
1304 }
1305
1306 static int py_DNS_RPC_RECORD_set_data(PyObject *py_obj, PyObject *value, void *closure)
1307 {
1308         struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
1309         {
1310                 union DNS_RPC_DATA *data_switch_1;
1311                 data_switch_1 = py_export_DNS_RPC_DATA(pytalloc_get_mem_ctx(py_obj), object->wType, value);
1312                 if (data_switch_1 == NULL) {
1313                         return -1;
1314                 }
1315                 object->data = *data_switch_1;
1316         }
1317         return 0;
1318 }
1319
1320 static PyGetSetDef py_DNS_RPC_RECORD_getsetters[] = {
1321         { discard_const_p(char, "wDataLength"), py_DNS_RPC_RECORD_get_wDataLength, py_DNS_RPC_RECORD_set_wDataLength },
1322         { discard_const_p(char, "wType"), py_DNS_RPC_RECORD_get_wType, py_DNS_RPC_RECORD_set_wType },
1323         { discard_const_p(char, "dwFlags"), py_DNS_RPC_RECORD_get_dwFlags, py_DNS_RPC_RECORD_set_dwFlags },
1324         { discard_const_p(char, "dwSerial"), py_DNS_RPC_RECORD_get_dwSerial, py_DNS_RPC_RECORD_set_dwSerial },
1325         { discard_const_p(char, "dwTtlSeconds"), py_DNS_RPC_RECORD_get_dwTtlSeconds, py_DNS_RPC_RECORD_set_dwTtlSeconds },
1326         { discard_const_p(char, "dwTimeStamp"), py_DNS_RPC_RECORD_get_dwTimeStamp, py_DNS_RPC_RECORD_set_dwTimeStamp },
1327         { discard_const_p(char, "dwReserved"), py_DNS_RPC_RECORD_get_dwReserved, py_DNS_RPC_RECORD_set_dwReserved },
1328         { discard_const_p(char, "data"), py_DNS_RPC_RECORD_get_data, py_DNS_RPC_RECORD_set_data },
1329         { NULL }
1330 };
1331
1332 static PyObject *py_DNS_RPC_RECORD_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1333 {
1334         return pytalloc_new(struct DNS_RPC_RECORD, type);
1335 }
1336
1337 static PyObject *py_DNS_RPC_RECORD_ndr_pack(PyObject *py_obj)
1338 {
1339         struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
1340         DATA_BLOB blob;
1341         enum ndr_err_code err;
1342         err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_RECORD);
1343         if (err != NDR_ERR_SUCCESS) {
1344                 PyErr_SetNdrError(err);
1345                 return NULL;
1346         }
1347
1348         return PyString_FromStringAndSize((char *)blob.data, blob.length);
1349 }
1350
1351 static PyObject *py_DNS_RPC_RECORD_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
1352 {
1353         struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
1354         DATA_BLOB blob;
1355         int blob_length = 0;
1356         enum ndr_err_code err;
1357         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
1358         PyObject *allow_remaining_obj = NULL;
1359         bool allow_remaining = false;
1360
1361         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
1362                 discard_const_p(char *, kwnames),
1363                 &blob.data, &blob_length,
1364                 &allow_remaining_obj)) {
1365                 return NULL;
1366         }
1367         blob.length = blob_length;
1368
1369         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
1370                 allow_remaining = true;
1371         }
1372
1373         if (allow_remaining) {
1374                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_RECORD);
1375         } else {
1376                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_RECORD);
1377         }
1378         if (err != NDR_ERR_SUCCESS) {
1379                 PyErr_SetNdrError(err);
1380                 return NULL;
1381         }
1382
1383         Py_RETURN_NONE;
1384 }
1385
1386 static PyObject *py_DNS_RPC_RECORD_ndr_print(PyObject *py_obj)
1387 {
1388         struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
1389         PyObject *ret;
1390         char *retstr;
1391
1392         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_DNS_RPC_RECORD, "DNS_RPC_RECORD", object);
1393         ret = PyString_FromString(retstr);
1394         talloc_free(retstr);
1395
1396         return ret;
1397 }
1398
1399 static PyMethodDef py_DNS_RPC_RECORD_methods[] = {
1400         { "__ndr_pack__", (PyCFunction)py_DNS_RPC_RECORD_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
1401         { "__ndr_unpack__", (PyCFunction)py_DNS_RPC_RECORD_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
1402         { "__ndr_print__", (PyCFunction)py_DNS_RPC_RECORD_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
1403         { NULL, NULL, 0, NULL }
1404 };
1405
1406
1407 static PyTypeObject DNS_RPC_RECORD_Type = {
1408         PyObject_HEAD_INIT(NULL) 0,
1409         .tp_name = "dnsserver.DNS_RPC_RECORD",
1410         .tp_getset = py_DNS_RPC_RECORD_getsetters,
1411         .tp_methods = py_DNS_RPC_RECORD_methods,
1412         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1413         .tp_basicsize = sizeof(pytalloc_Object),
1414         .tp_new = py_DNS_RPC_RECORD_new,
1415 };
1416
1417
1418 static PyObject *py_DNS_RPC_RECORD_BUF_get_wContextLength(PyObject *obj, void *closure)
1419 {
1420         struct DNS_RPC_RECORD_BUF *object = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(obj);
1421         PyObject *py_wContextLength;
1422         py_wContextLength = PyInt_FromLong(object->wContextLength);
1423         return py_wContextLength;
1424 }
1425
1426 static int py_DNS_RPC_RECORD_BUF_set_wContextLength(PyObject *py_obj, PyObject *value, void *closure)
1427 {
1428         struct DNS_RPC_RECORD_BUF *object = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(py_obj);
1429         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1430         object->wContextLength = PyInt_AsLong(value);
1431         return 0;
1432 }
1433
1434 static PyObject *py_DNS_RPC_RECORD_BUF_get_rec(PyObject *obj, void *closure)
1435 {
1436         struct DNS_RPC_RECORD_BUF *object = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(obj);
1437         PyObject *py_rec;
1438         py_rec = pytalloc_reference_ex(&DNS_RPC_RECORD_Type, pytalloc_get_mem_ctx(obj), &object->rec);
1439         return py_rec;
1440 }
1441
1442 static int py_DNS_RPC_RECORD_BUF_set_rec(PyObject *py_obj, PyObject *value, void *closure)
1443 {
1444         struct DNS_RPC_RECORD_BUF *object = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(py_obj);
1445         PY_CHECK_TYPE(&DNS_RPC_RECORD_Type, value, return -1;);
1446         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
1447                 PyErr_NoMemory();
1448                 return -1;
1449         }
1450         object->rec = *(struct DNS_RPC_RECORD *)pytalloc_get_ptr(value);
1451         return 0;
1452 }
1453
1454 static PyGetSetDef py_DNS_RPC_RECORD_BUF_getsetters[] = {
1455         { discard_const_p(char, "wContextLength"), py_DNS_RPC_RECORD_BUF_get_wContextLength, py_DNS_RPC_RECORD_BUF_set_wContextLength },
1456         { discard_const_p(char, "rec"), py_DNS_RPC_RECORD_BUF_get_rec, py_DNS_RPC_RECORD_BUF_set_rec },
1457         { NULL }
1458 };
1459
1460 static PyObject *py_DNS_RPC_RECORD_BUF_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1461 {
1462         return pytalloc_new(struct DNS_RPC_RECORD_BUF, type);
1463 }
1464
1465
1466 static PyTypeObject DNS_RPC_RECORD_BUF_Type = {
1467         PyObject_HEAD_INIT(NULL) 0,
1468         .tp_name = "dnsserver.DNS_RPC_RECORD_BUF",
1469         .tp_getset = py_DNS_RPC_RECORD_BUF_getsetters,
1470         .tp_methods = NULL,
1471         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1472         .tp_basicsize = sizeof(pytalloc_Object),
1473         .tp_new = py_DNS_RPC_RECORD_BUF_new,
1474 };
1475
1476
1477 static PyObject *py_IP4_ARRAY_get_AddrCount(PyObject *obj, void *closure)
1478 {
1479         struct IP4_ARRAY *object = (struct IP4_ARRAY *)pytalloc_get_ptr(obj);
1480         PyObject *py_AddrCount;
1481         py_AddrCount = PyInt_FromLong(object->AddrCount);
1482         return py_AddrCount;
1483 }
1484
1485 static int py_IP4_ARRAY_set_AddrCount(PyObject *py_obj, PyObject *value, void *closure)
1486 {
1487         struct IP4_ARRAY *object = (struct IP4_ARRAY *)pytalloc_get_ptr(py_obj);
1488         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1489         object->AddrCount = PyInt_AsLong(value);
1490         return 0;
1491 }
1492
1493 static PyObject *py_IP4_ARRAY_get_AddrArray(PyObject *obj, void *closure)
1494 {
1495         struct IP4_ARRAY *object = (struct IP4_ARRAY *)pytalloc_get_ptr(obj);
1496         PyObject *py_AddrArray;
1497         py_AddrArray = PyList_New(object->AddrCount);
1498         if (py_AddrArray == NULL) {
1499                 return NULL;
1500         }
1501         {
1502                 int AddrArray_cntr_0;
1503                 for (AddrArray_cntr_0 = 0; AddrArray_cntr_0 < object->AddrCount; AddrArray_cntr_0++) {
1504                         PyObject *py_AddrArray_0;
1505                         py_AddrArray_0 = PyInt_FromLong(object->AddrArray[AddrArray_cntr_0]);
1506                         PyList_SetItem(py_AddrArray, AddrArray_cntr_0, py_AddrArray_0);
1507                 }
1508         }
1509         return py_AddrArray;
1510 }
1511
1512 static int py_IP4_ARRAY_set_AddrArray(PyObject *py_obj, PyObject *value, void *closure)
1513 {
1514         struct IP4_ARRAY *object = (struct IP4_ARRAY *)pytalloc_get_ptr(py_obj);
1515         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
1516         {
1517                 int AddrArray_cntr_0;
1518                 object->AddrArray = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->AddrArray, PyList_GET_SIZE(value));
1519                 if (!object->AddrArray) { return -1;; }
1520                 talloc_set_name_const(object->AddrArray, "ARRAY: object->AddrArray");
1521                 for (AddrArray_cntr_0 = 0; AddrArray_cntr_0 < PyList_GET_SIZE(value); AddrArray_cntr_0++) {
1522                         PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, AddrArray_cntr_0), return -1;);
1523                         object->AddrArray[AddrArray_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, AddrArray_cntr_0));
1524                 }
1525         }
1526         return 0;
1527 }
1528
1529 static PyGetSetDef py_IP4_ARRAY_getsetters[] = {
1530         { discard_const_p(char, "AddrCount"), py_IP4_ARRAY_get_AddrCount, py_IP4_ARRAY_set_AddrCount },
1531         { discard_const_p(char, "AddrArray"), py_IP4_ARRAY_get_AddrArray, py_IP4_ARRAY_set_AddrArray },
1532         { NULL }
1533 };
1534
1535 static PyObject *py_IP4_ARRAY_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1536 {
1537         return pytalloc_new(struct IP4_ARRAY, type);
1538 }
1539
1540
1541 static PyTypeObject IP4_ARRAY_Type = {
1542         PyObject_HEAD_INIT(NULL) 0,
1543         .tp_name = "dnsserver.IP4_ARRAY",
1544         .tp_getset = py_IP4_ARRAY_getsetters,
1545         .tp_methods = NULL,
1546         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1547         .tp_basicsize = sizeof(pytalloc_Object),
1548         .tp_new = py_IP4_ARRAY_new,
1549 };
1550
1551
1552 static PyObject *py_DNS_ADDR_get_MaxSa(PyObject *obj, void *closure)
1553 {
1554         struct DNS_ADDR *object = (struct DNS_ADDR *)pytalloc_get_ptr(obj);
1555         PyObject *py_MaxSa;
1556         py_MaxSa = PyList_New(32);
1557         if (py_MaxSa == NULL) {
1558                 return NULL;
1559         }
1560         {
1561                 int MaxSa_cntr_0;
1562                 for (MaxSa_cntr_0 = 0; MaxSa_cntr_0 < 32; MaxSa_cntr_0++) {
1563                         PyObject *py_MaxSa_0;
1564                         py_MaxSa_0 = PyInt_FromLong(object->MaxSa[MaxSa_cntr_0]);
1565                         PyList_SetItem(py_MaxSa, MaxSa_cntr_0, py_MaxSa_0);
1566                 }
1567         }
1568         return py_MaxSa;
1569 }
1570
1571 static int py_DNS_ADDR_set_MaxSa(PyObject *py_obj, PyObject *value, void *closure)
1572 {
1573         struct DNS_ADDR *object = (struct DNS_ADDR *)pytalloc_get_ptr(py_obj);
1574         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
1575         {
1576                 int MaxSa_cntr_0;
1577                 for (MaxSa_cntr_0 = 0; MaxSa_cntr_0 < PyList_GET_SIZE(value); MaxSa_cntr_0++) {
1578                         PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, MaxSa_cntr_0), return -1;);
1579                         object->MaxSa[MaxSa_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, MaxSa_cntr_0));
1580                 }
1581         }
1582         return 0;
1583 }
1584
1585 static PyObject *py_DNS_ADDR_get_DnsAddrUserDword(PyObject *obj, void *closure)
1586 {
1587         struct DNS_ADDR *object = (struct DNS_ADDR *)pytalloc_get_ptr(obj);
1588         PyObject *py_DnsAddrUserDword;
1589         py_DnsAddrUserDword = PyList_New(8);
1590         if (py_DnsAddrUserDword == NULL) {
1591                 return NULL;
1592         }
1593         {
1594                 int DnsAddrUserDword_cntr_0;
1595                 for (DnsAddrUserDword_cntr_0 = 0; DnsAddrUserDword_cntr_0 < 8; DnsAddrUserDword_cntr_0++) {
1596                         PyObject *py_DnsAddrUserDword_0;
1597                         py_DnsAddrUserDword_0 = PyInt_FromLong(object->DnsAddrUserDword[DnsAddrUserDword_cntr_0]);
1598                         PyList_SetItem(py_DnsAddrUserDword, DnsAddrUserDword_cntr_0, py_DnsAddrUserDword_0);
1599                 }
1600         }
1601         return py_DnsAddrUserDword;
1602 }
1603
1604 static int py_DNS_ADDR_set_DnsAddrUserDword(PyObject *py_obj, PyObject *value, void *closure)
1605 {
1606         struct DNS_ADDR *object = (struct DNS_ADDR *)pytalloc_get_ptr(py_obj);
1607         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
1608         {
1609                 int DnsAddrUserDword_cntr_0;
1610                 for (DnsAddrUserDword_cntr_0 = 0; DnsAddrUserDword_cntr_0 < PyList_GET_SIZE(value); DnsAddrUserDword_cntr_0++) {
1611                         PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, DnsAddrUserDword_cntr_0), return -1;);
1612                         object->DnsAddrUserDword[DnsAddrUserDword_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, DnsAddrUserDword_cntr_0));
1613                 }
1614         }
1615         return 0;
1616 }
1617
1618 static PyGetSetDef py_DNS_ADDR_getsetters[] = {
1619         { discard_const_p(char, "MaxSa"), py_DNS_ADDR_get_MaxSa, py_DNS_ADDR_set_MaxSa },
1620         { discard_const_p(char, "DnsAddrUserDword"), py_DNS_ADDR_get_DnsAddrUserDword, py_DNS_ADDR_set_DnsAddrUserDword },
1621         { NULL }
1622 };
1623
1624 static PyObject *py_DNS_ADDR_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1625 {
1626         return pytalloc_new(struct DNS_ADDR, type);
1627 }
1628
1629
1630 static PyTypeObject DNS_ADDR_Type = {
1631         PyObject_HEAD_INIT(NULL) 0,
1632         .tp_name = "dnsserver.DNS_ADDR",
1633         .tp_getset = py_DNS_ADDR_getsetters,
1634         .tp_methods = NULL,
1635         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1636         .tp_basicsize = sizeof(pytalloc_Object),
1637         .tp_new = py_DNS_ADDR_new,
1638 };
1639
1640
1641 static PyObject *py_DNS_ADDR_ARRAY_get_MaxCount(PyObject *obj, void *closure)
1642 {
1643         struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(obj);
1644         PyObject *py_MaxCount;
1645         py_MaxCount = PyInt_FromLong(object->MaxCount);
1646         return py_MaxCount;
1647 }
1648
1649 static int py_DNS_ADDR_ARRAY_set_MaxCount(PyObject *py_obj, PyObject *value, void *closure)
1650 {
1651         struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(py_obj);
1652         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1653         object->MaxCount = PyInt_AsLong(value);
1654         return 0;
1655 }
1656
1657 static PyObject *py_DNS_ADDR_ARRAY_get_AddrCount(PyObject *obj, void *closure)
1658 {
1659         struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(obj);
1660         PyObject *py_AddrCount;
1661         py_AddrCount = PyInt_FromLong(object->AddrCount);
1662         return py_AddrCount;
1663 }
1664
1665 static int py_DNS_ADDR_ARRAY_set_AddrCount(PyObject *py_obj, PyObject *value, void *closure)
1666 {
1667         struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(py_obj);
1668         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1669         object->AddrCount = PyInt_AsLong(value);
1670         return 0;
1671 }
1672
1673 static PyObject *py_DNS_ADDR_ARRAY_get_Tag(PyObject *obj, void *closure)
1674 {
1675         struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(obj);
1676         PyObject *py_Tag;
1677         py_Tag = PyInt_FromLong(object->Tag);
1678         return py_Tag;
1679 }
1680
1681 static int py_DNS_ADDR_ARRAY_set_Tag(PyObject *py_obj, PyObject *value, void *closure)
1682 {
1683         struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(py_obj);
1684         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1685         object->Tag = PyInt_AsLong(value);
1686         return 0;
1687 }
1688
1689 static PyObject *py_DNS_ADDR_ARRAY_get_Family(PyObject *obj, void *closure)
1690 {
1691         struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(obj);
1692         PyObject *py_Family;
1693         py_Family = PyInt_FromLong(object->Family);
1694         return py_Family;
1695 }
1696
1697 static int py_DNS_ADDR_ARRAY_set_Family(PyObject *py_obj, PyObject *value, void *closure)
1698 {
1699         struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(py_obj);
1700         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1701         object->Family = PyInt_AsLong(value);
1702         return 0;
1703 }
1704
1705 static PyObject *py_DNS_ADDR_ARRAY_get_WordReserved(PyObject *obj, void *closure)
1706 {
1707         struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(obj);
1708         PyObject *py_WordReserved;
1709         py_WordReserved = PyInt_FromLong(object->WordReserved);
1710         return py_WordReserved;
1711 }
1712
1713 static int py_DNS_ADDR_ARRAY_set_WordReserved(PyObject *py_obj, PyObject *value, void *closure)
1714 {
1715         struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(py_obj);
1716         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1717         object->WordReserved = PyInt_AsLong(value);
1718         return 0;
1719 }
1720
1721 static PyObject *py_DNS_ADDR_ARRAY_get_Flags(PyObject *obj, void *closure)
1722 {
1723         struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(obj);
1724         PyObject *py_Flags;
1725         py_Flags = PyInt_FromLong(object->Flags);
1726         return py_Flags;
1727 }
1728
1729 static int py_DNS_ADDR_ARRAY_set_Flags(PyObject *py_obj, PyObject *value, void *closure)
1730 {
1731         struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(py_obj);
1732         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1733         object->Flags = PyInt_AsLong(value);
1734         return 0;
1735 }
1736
1737 static PyObject *py_DNS_ADDR_ARRAY_get_MatchFlag(PyObject *obj, void *closure)
1738 {
1739         struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(obj);
1740         PyObject *py_MatchFlag;
1741         py_MatchFlag = PyInt_FromLong(object->MatchFlag);
1742         return py_MatchFlag;
1743 }
1744
1745 static int py_DNS_ADDR_ARRAY_set_MatchFlag(PyObject *py_obj, PyObject *value, void *closure)
1746 {
1747         struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(py_obj);
1748         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1749         object->MatchFlag = PyInt_AsLong(value);
1750         return 0;
1751 }
1752
1753 static PyObject *py_DNS_ADDR_ARRAY_get_Reserved1(PyObject *obj, void *closure)
1754 {
1755         struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(obj);
1756         PyObject *py_Reserved1;
1757         py_Reserved1 = PyInt_FromLong(object->Reserved1);
1758         return py_Reserved1;
1759 }
1760
1761 static int py_DNS_ADDR_ARRAY_set_Reserved1(PyObject *py_obj, PyObject *value, void *closure)
1762 {
1763         struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(py_obj);
1764         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1765         object->Reserved1 = PyInt_AsLong(value);
1766         return 0;
1767 }
1768
1769 static PyObject *py_DNS_ADDR_ARRAY_get_Reserved2(PyObject *obj, void *closure)
1770 {
1771         struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(obj);
1772         PyObject *py_Reserved2;
1773         py_Reserved2 = PyInt_FromLong(object->Reserved2);
1774         return py_Reserved2;
1775 }
1776
1777 static int py_DNS_ADDR_ARRAY_set_Reserved2(PyObject *py_obj, PyObject *value, void *closure)
1778 {
1779         struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(py_obj);
1780         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1781         object->Reserved2 = PyInt_AsLong(value);
1782         return 0;
1783 }
1784
1785 static PyObject *py_DNS_ADDR_ARRAY_get_AddrArray(PyObject *obj, void *closure)
1786 {
1787         struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(obj);
1788         PyObject *py_AddrArray;
1789         py_AddrArray = PyList_New(object->AddrCount);
1790         if (py_AddrArray == NULL) {
1791                 return NULL;
1792         }
1793         {
1794                 int AddrArray_cntr_0;
1795                 for (AddrArray_cntr_0 = 0; AddrArray_cntr_0 < object->AddrCount; AddrArray_cntr_0++) {
1796                         PyObject *py_AddrArray_0;
1797                         py_AddrArray_0 = pytalloc_reference_ex(&DNS_ADDR_Type, object->AddrArray, &object->AddrArray[AddrArray_cntr_0]);
1798                         PyList_SetItem(py_AddrArray, AddrArray_cntr_0, py_AddrArray_0);
1799                 }
1800         }
1801         return py_AddrArray;
1802 }
1803
1804 static int py_DNS_ADDR_ARRAY_set_AddrArray(PyObject *py_obj, PyObject *value, void *closure)
1805 {
1806         struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(py_obj);
1807         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
1808         {
1809                 int AddrArray_cntr_0;
1810                 object->AddrArray = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->AddrArray, PyList_GET_SIZE(value));
1811                 if (!object->AddrArray) { return -1;; }
1812                 talloc_set_name_const(object->AddrArray, "ARRAY: object->AddrArray");
1813                 for (AddrArray_cntr_0 = 0; AddrArray_cntr_0 < PyList_GET_SIZE(value); AddrArray_cntr_0++) {
1814                         PY_CHECK_TYPE(&DNS_ADDR_Type, PyList_GET_ITEM(value, AddrArray_cntr_0), return -1;);
1815                         if (talloc_reference(object->AddrArray, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, AddrArray_cntr_0))) == NULL) {
1816                                 PyErr_NoMemory();
1817                                 return -1;
1818                         }
1819                         object->AddrArray[AddrArray_cntr_0] = *(struct DNS_ADDR *)pytalloc_get_ptr(PyList_GET_ITEM(value, AddrArray_cntr_0));
1820                 }
1821         }
1822         return 0;
1823 }
1824
1825 static PyGetSetDef py_DNS_ADDR_ARRAY_getsetters[] = {
1826         { discard_const_p(char, "MaxCount"), py_DNS_ADDR_ARRAY_get_MaxCount, py_DNS_ADDR_ARRAY_set_MaxCount },
1827         { discard_const_p(char, "AddrCount"), py_DNS_ADDR_ARRAY_get_AddrCount, py_DNS_ADDR_ARRAY_set_AddrCount },
1828         { discard_const_p(char, "Tag"), py_DNS_ADDR_ARRAY_get_Tag, py_DNS_ADDR_ARRAY_set_Tag },
1829         { discard_const_p(char, "Family"), py_DNS_ADDR_ARRAY_get_Family, py_DNS_ADDR_ARRAY_set_Family },
1830         { discard_const_p(char, "WordReserved"), py_DNS_ADDR_ARRAY_get_WordReserved, py_DNS_ADDR_ARRAY_set_WordReserved },
1831         { discard_const_p(char, "Flags"), py_DNS_ADDR_ARRAY_get_Flags, py_DNS_ADDR_ARRAY_set_Flags },
1832         { discard_const_p(char, "MatchFlag"), py_DNS_ADDR_ARRAY_get_MatchFlag, py_DNS_ADDR_ARRAY_set_MatchFlag },
1833         { discard_const_p(char, "Reserved1"), py_DNS_ADDR_ARRAY_get_Reserved1, py_DNS_ADDR_ARRAY_set_Reserved1 },
1834         { discard_const_p(char, "Reserved2"), py_DNS_ADDR_ARRAY_get_Reserved2, py_DNS_ADDR_ARRAY_set_Reserved2 },
1835         { discard_const_p(char, "AddrArray"), py_DNS_ADDR_ARRAY_get_AddrArray, py_DNS_ADDR_ARRAY_set_AddrArray },
1836         { NULL }
1837 };
1838
1839 static PyObject *py_DNS_ADDR_ARRAY_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1840 {
1841         return pytalloc_new(struct DNS_ADDR_ARRAY, type);
1842 }
1843
1844
1845 static PyTypeObject DNS_ADDR_ARRAY_Type = {
1846         PyObject_HEAD_INIT(NULL) 0,
1847         .tp_name = "dnsserver.DNS_ADDR_ARRAY",
1848         .tp_getset = py_DNS_ADDR_ARRAY_getsetters,
1849         .tp_methods = NULL,
1850         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1851         .tp_basicsize = sizeof(pytalloc_Object),
1852         .tp_new = py_DNS_ADDR_ARRAY_new,
1853 };
1854
1855
1856 static PyObject *py_DNS_RPC_IP_VALIDATE_get_dwRpcStructureVersion(PyObject *obj, void *closure)
1857 {
1858         struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(obj);
1859         PyObject *py_dwRpcStructureVersion;
1860         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
1861         return py_dwRpcStructureVersion;
1862 }
1863
1864 static int py_DNS_RPC_IP_VALIDATE_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
1865 {
1866         struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(py_obj);
1867         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1868         object->dwRpcStructureVersion = PyInt_AsLong(value);
1869         return 0;
1870 }
1871
1872 static PyObject *py_DNS_RPC_IP_VALIDATE_get_dwReserved0(PyObject *obj, void *closure)
1873 {
1874         struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(obj);
1875         PyObject *py_dwReserved0;
1876         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
1877         return py_dwReserved0;
1878 }
1879
1880 static int py_DNS_RPC_IP_VALIDATE_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
1881 {
1882         struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(py_obj);
1883         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1884         object->dwReserved0 = PyInt_AsLong(value);
1885         return 0;
1886 }
1887
1888 static PyObject *py_DNS_RPC_IP_VALIDATE_get_dwContext(PyObject *obj, void *closure)
1889 {
1890         struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(obj);
1891         PyObject *py_dwContext;
1892         py_dwContext = PyInt_FromLong(object->dwContext);
1893         return py_dwContext;
1894 }
1895
1896 static int py_DNS_RPC_IP_VALIDATE_set_dwContext(PyObject *py_obj, PyObject *value, void *closure)
1897 {
1898         struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(py_obj);
1899         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1900         object->dwContext = PyInt_AsLong(value);
1901         return 0;
1902 }
1903
1904 static PyObject *py_DNS_RPC_IP_VALIDATE_get_dwReserved1(PyObject *obj, void *closure)
1905 {
1906         struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(obj);
1907         PyObject *py_dwReserved1;
1908         py_dwReserved1 = PyInt_FromLong(object->dwReserved1);
1909         return py_dwReserved1;
1910 }
1911
1912 static int py_DNS_RPC_IP_VALIDATE_set_dwReserved1(PyObject *py_obj, PyObject *value, void *closure)
1913 {
1914         struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(py_obj);
1915         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
1916         object->dwReserved1 = PyInt_AsLong(value);
1917         return 0;
1918 }
1919
1920 static PyObject *py_DNS_RPC_IP_VALIDATE_get_pszContextName(PyObject *obj, void *closure)
1921 {
1922         struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(obj);
1923         PyObject *py_pszContextName;
1924         if (object->pszContextName == NULL) {
1925                 py_pszContextName = Py_None;
1926                 Py_INCREF(py_pszContextName);
1927         } else {
1928                 if (object->pszContextName == NULL) {
1929                         py_pszContextName = Py_None;
1930                         Py_INCREF(py_pszContextName);
1931                 } else {
1932                         py_pszContextName = PyUnicode_Decode(object->pszContextName, strlen(object->pszContextName), "utf-8", "ignore");
1933                 }
1934         }
1935         return py_pszContextName;
1936 }
1937
1938 static int py_DNS_RPC_IP_VALIDATE_set_pszContextName(PyObject *py_obj, PyObject *value, void *closure)
1939 {
1940         struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(py_obj);
1941         if (value == Py_None) {
1942                 object->pszContextName = NULL;
1943         } else {
1944                 object->pszContextName = NULL;
1945                 if (PyUnicode_Check(value)) {
1946                         object->pszContextName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
1947                 } else if (PyString_Check(value)) {
1948                         object->pszContextName = PyString_AS_STRING(value);
1949                 } else {
1950                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
1951                         return -1;
1952                 }
1953         }
1954         return 0;
1955 }
1956
1957 static PyObject *py_DNS_RPC_IP_VALIDATE_get_aipValidateAddrs(PyObject *obj, void *closure)
1958 {
1959         struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(obj);
1960         PyObject *py_aipValidateAddrs;
1961         if (object->aipValidateAddrs == NULL) {
1962                 py_aipValidateAddrs = Py_None;
1963                 Py_INCREF(py_aipValidateAddrs);
1964         } else {
1965                 py_aipValidateAddrs = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipValidateAddrs, object->aipValidateAddrs);
1966         }
1967         return py_aipValidateAddrs;
1968 }
1969
1970 static int py_DNS_RPC_IP_VALIDATE_set_aipValidateAddrs(PyObject *py_obj, PyObject *value, void *closure)
1971 {
1972         struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(py_obj);
1973         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipValidateAddrs);
1974         if (value == Py_None) {
1975                 object->aipValidateAddrs = NULL;
1976         } else {
1977                 object->aipValidateAddrs = NULL;
1978                 PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
1979                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
1980                         PyErr_NoMemory();
1981                         return -1;
1982                 }
1983                 object->aipValidateAddrs = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
1984         }
1985         return 0;
1986 }
1987
1988 static PyGetSetDef py_DNS_RPC_IP_VALIDATE_getsetters[] = {
1989         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_IP_VALIDATE_get_dwRpcStructureVersion, py_DNS_RPC_IP_VALIDATE_set_dwRpcStructureVersion },
1990         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_IP_VALIDATE_get_dwReserved0, py_DNS_RPC_IP_VALIDATE_set_dwReserved0 },
1991         { discard_const_p(char, "dwContext"), py_DNS_RPC_IP_VALIDATE_get_dwContext, py_DNS_RPC_IP_VALIDATE_set_dwContext },
1992         { discard_const_p(char, "dwReserved1"), py_DNS_RPC_IP_VALIDATE_get_dwReserved1, py_DNS_RPC_IP_VALIDATE_set_dwReserved1 },
1993         { discard_const_p(char, "pszContextName"), py_DNS_RPC_IP_VALIDATE_get_pszContextName, py_DNS_RPC_IP_VALIDATE_set_pszContextName },
1994         { discard_const_p(char, "aipValidateAddrs"), py_DNS_RPC_IP_VALIDATE_get_aipValidateAddrs, py_DNS_RPC_IP_VALIDATE_set_aipValidateAddrs },
1995         { NULL }
1996 };
1997
1998 static PyObject *py_DNS_RPC_IP_VALIDATE_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1999 {
2000         return pytalloc_new(struct DNS_RPC_IP_VALIDATE, type);
2001 }
2002
2003
2004 static PyTypeObject DNS_RPC_IP_VALIDATE_Type = {
2005         PyObject_HEAD_INIT(NULL) 0,
2006         .tp_name = "dnsserver.DNS_RPC_IP_VALIDATE",
2007         .tp_getset = py_DNS_RPC_IP_VALIDATE_getsetters,
2008         .tp_methods = NULL,
2009         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2010         .tp_basicsize = sizeof(pytalloc_Object),
2011         .tp_new = py_DNS_RPC_IP_VALIDATE_new,
2012 };
2013
2014
2015 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwVersion(PyObject *obj, void *closure)
2016 {
2017         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2018         PyObject *py_dwVersion;
2019         py_dwVersion = PyInt_FromLong(object->dwVersion);
2020         return py_dwVersion;
2021 }
2022
2023 static int py_DNS_RPC_SERVER_INFO_W2K_set_dwVersion(PyObject *py_obj, PyObject *value, void *closure)
2024 {
2025         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2026         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2027         object->dwVersion = PyInt_AsLong(value);
2028         return 0;
2029 }
2030
2031 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fBootMethod(PyObject *obj, void *closure)
2032 {
2033         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2034         PyObject *py_fBootMethod;
2035         py_fBootMethod = PyInt_FromLong(object->fBootMethod);
2036         return py_fBootMethod;
2037 }
2038
2039 static int py_DNS_RPC_SERVER_INFO_W2K_set_fBootMethod(PyObject *py_obj, PyObject *value, void *closure)
2040 {
2041         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2042         if (PyLong_Check(value)) {
2043                 object->fBootMethod = PyLong_AsLongLong(value);
2044         } else if (PyInt_Check(value)) {
2045                 object->fBootMethod = PyInt_AsLong(value);
2046         } else {
2047                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
2048                   PyInt_Type.tp_name, PyLong_Type.tp_name);
2049                 return -1;
2050         }
2051         return 0;
2052 }
2053
2054 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fAdminConfigured(PyObject *obj, void *closure)
2055 {
2056         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2057         PyObject *py_fAdminConfigured;
2058         py_fAdminConfigured = PyInt_FromLong(object->fAdminConfigured);
2059         return py_fAdminConfigured;
2060 }
2061
2062 static int py_DNS_RPC_SERVER_INFO_W2K_set_fAdminConfigured(PyObject *py_obj, PyObject *value, void *closure)
2063 {
2064         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2065         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2066         object->fAdminConfigured = PyInt_AsLong(value);
2067         return 0;
2068 }
2069
2070 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fAllowUpdate(PyObject *obj, void *closure)
2071 {
2072         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2073         PyObject *py_fAllowUpdate;
2074         py_fAllowUpdate = PyInt_FromLong(object->fAllowUpdate);
2075         return py_fAllowUpdate;
2076 }
2077
2078 static int py_DNS_RPC_SERVER_INFO_W2K_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
2079 {
2080         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2081         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2082         object->fAllowUpdate = PyInt_AsLong(value);
2083         return 0;
2084 }
2085
2086 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fDsAvailable(PyObject *obj, void *closure)
2087 {
2088         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2089         PyObject *py_fDsAvailable;
2090         py_fDsAvailable = PyInt_FromLong(object->fDsAvailable);
2091         return py_fDsAvailable;
2092 }
2093
2094 static int py_DNS_RPC_SERVER_INFO_W2K_set_fDsAvailable(PyObject *py_obj, PyObject *value, void *closure)
2095 {
2096         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2097         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2098         object->fDsAvailable = PyInt_AsLong(value);
2099         return 0;
2100 }
2101
2102 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_pszServerName(PyObject *obj, void *closure)
2103 {
2104         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2105         PyObject *py_pszServerName;
2106         if (object->pszServerName == NULL) {
2107                 py_pszServerName = Py_None;
2108                 Py_INCREF(py_pszServerName);
2109         } else {
2110                 if (object->pszServerName == NULL) {
2111                         py_pszServerName = Py_None;
2112                         Py_INCREF(py_pszServerName);
2113                 } else {
2114                         py_pszServerName = PyUnicode_Decode(object->pszServerName, strlen(object->pszServerName), "utf-8", "ignore");
2115                 }
2116         }
2117         return py_pszServerName;
2118 }
2119
2120 static int py_DNS_RPC_SERVER_INFO_W2K_set_pszServerName(PyObject *py_obj, PyObject *value, void *closure)
2121 {
2122         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2123         if (value == Py_None) {
2124                 object->pszServerName = NULL;
2125         } else {
2126                 object->pszServerName = NULL;
2127                 if (PyUnicode_Check(value)) {
2128                         object->pszServerName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
2129                 } else if (PyString_Check(value)) {
2130                         object->pszServerName = PyString_AS_STRING(value);
2131                 } else {
2132                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
2133                         return -1;
2134                 }
2135         }
2136         return 0;
2137 }
2138
2139 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_pszDsContainer(PyObject *obj, void *closure)
2140 {
2141         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2142         PyObject *py_pszDsContainer;
2143         if (object->pszDsContainer == NULL) {
2144                 py_pszDsContainer = Py_None;
2145                 Py_INCREF(py_pszDsContainer);
2146         } else {
2147                 if (object->pszDsContainer == NULL) {
2148                         py_pszDsContainer = Py_None;
2149                         Py_INCREF(py_pszDsContainer);
2150                 } else {
2151                         py_pszDsContainer = PyUnicode_Decode(object->pszDsContainer, strlen(object->pszDsContainer), "utf-8", "ignore");
2152                 }
2153         }
2154         return py_pszDsContainer;
2155 }
2156
2157 static int py_DNS_RPC_SERVER_INFO_W2K_set_pszDsContainer(PyObject *py_obj, PyObject *value, void *closure)
2158 {
2159         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2160         if (value == Py_None) {
2161                 object->pszDsContainer = NULL;
2162         } else {
2163                 object->pszDsContainer = NULL;
2164                 if (PyUnicode_Check(value)) {
2165                         object->pszDsContainer = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
2166                 } else if (PyString_Check(value)) {
2167                         object->pszDsContainer = PyString_AS_STRING(value);
2168                 } else {
2169                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
2170                         return -1;
2171                 }
2172         }
2173         return 0;
2174 }
2175
2176 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_aipServerAddrs(PyObject *obj, void *closure)
2177 {
2178         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2179         PyObject *py_aipServerAddrs;
2180         if (object->aipServerAddrs == NULL) {
2181                 py_aipServerAddrs = Py_None;
2182                 Py_INCREF(py_aipServerAddrs);
2183         } else {
2184                 py_aipServerAddrs = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipServerAddrs, object->aipServerAddrs);
2185         }
2186         return py_aipServerAddrs;
2187 }
2188
2189 static int py_DNS_RPC_SERVER_INFO_W2K_set_aipServerAddrs(PyObject *py_obj, PyObject *value, void *closure)
2190 {
2191         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2192         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipServerAddrs);
2193         if (value == Py_None) {
2194                 object->aipServerAddrs = NULL;
2195         } else {
2196                 object->aipServerAddrs = NULL;
2197                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
2198                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
2199                         PyErr_NoMemory();
2200                         return -1;
2201                 }
2202                 object->aipServerAddrs = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
2203         }
2204         return 0;
2205 }
2206
2207 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_aipListenAddrs(PyObject *obj, void *closure)
2208 {
2209         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2210         PyObject *py_aipListenAddrs;
2211         if (object->aipListenAddrs == NULL) {
2212                 py_aipListenAddrs = Py_None;
2213                 Py_INCREF(py_aipListenAddrs);
2214         } else {
2215                 py_aipListenAddrs = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipListenAddrs, object->aipListenAddrs);
2216         }
2217         return py_aipListenAddrs;
2218 }
2219
2220 static int py_DNS_RPC_SERVER_INFO_W2K_set_aipListenAddrs(PyObject *py_obj, PyObject *value, void *closure)
2221 {
2222         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2223         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipListenAddrs);
2224         if (value == Py_None) {
2225                 object->aipListenAddrs = NULL;
2226         } else {
2227                 object->aipListenAddrs = NULL;
2228                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
2229                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
2230                         PyErr_NoMemory();
2231                         return -1;
2232                 }
2233                 object->aipListenAddrs = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
2234         }
2235         return 0;
2236 }
2237
2238 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_aipForwarders(PyObject *obj, void *closure)
2239 {
2240         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2241         PyObject *py_aipForwarders;
2242         if (object->aipForwarders == NULL) {
2243                 py_aipForwarders = Py_None;
2244                 Py_INCREF(py_aipForwarders);
2245         } else {
2246                 py_aipForwarders = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipForwarders, object->aipForwarders);
2247         }
2248         return py_aipForwarders;
2249 }
2250
2251 static int py_DNS_RPC_SERVER_INFO_W2K_set_aipForwarders(PyObject *py_obj, PyObject *value, void *closure)
2252 {
2253         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2254         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipForwarders);
2255         if (value == Py_None) {
2256                 object->aipForwarders = NULL;
2257         } else {
2258                 object->aipForwarders = NULL;
2259                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
2260                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
2261                         PyErr_NoMemory();
2262                         return -1;
2263                 }
2264                 object->aipForwarders = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
2265         }
2266         return 0;
2267 }
2268
2269 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_pExtension1(PyObject *obj, void *closure)
2270 {
2271         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2272         PyObject *py_pExtension1;
2273         if (object->pExtension1 == NULL) {
2274                 py_pExtension1 = Py_None;
2275                 Py_INCREF(py_pExtension1);
2276         } else {
2277                 py_pExtension1 = PyInt_FromLong(*object->pExtension1);
2278         }
2279         return py_pExtension1;
2280 }
2281
2282 static int py_DNS_RPC_SERVER_INFO_W2K_set_pExtension1(PyObject *py_obj, PyObject *value, void *closure)
2283 {
2284         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2285         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->pExtension1);
2286         if (value == Py_None) {
2287                 object->pExtension1 = NULL;
2288         } else {
2289                 object->pExtension1 = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pExtension1);
2290                 PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2291                 *object->pExtension1 = PyInt_AsLong(value);
2292         }
2293         return 0;
2294 }
2295
2296 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_pExtension2(PyObject *obj, void *closure)
2297 {
2298         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2299         PyObject *py_pExtension2;
2300         if (object->pExtension2 == NULL) {
2301                 py_pExtension2 = Py_None;
2302                 Py_INCREF(py_pExtension2);
2303         } else {
2304                 py_pExtension2 = PyInt_FromLong(*object->pExtension2);
2305         }
2306         return py_pExtension2;
2307 }
2308
2309 static int py_DNS_RPC_SERVER_INFO_W2K_set_pExtension2(PyObject *py_obj, PyObject *value, void *closure)
2310 {
2311         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2312         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->pExtension2);
2313         if (value == Py_None) {
2314                 object->pExtension2 = NULL;
2315         } else {
2316                 object->pExtension2 = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pExtension2);
2317                 PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2318                 *object->pExtension2 = PyInt_AsLong(value);
2319         }
2320         return 0;
2321 }
2322
2323 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_pExtension3(PyObject *obj, void *closure)
2324 {
2325         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2326         PyObject *py_pExtension3;
2327         if (object->pExtension3 == NULL) {
2328                 py_pExtension3 = Py_None;
2329                 Py_INCREF(py_pExtension3);
2330         } else {
2331                 py_pExtension3 = PyInt_FromLong(*object->pExtension3);
2332         }
2333         return py_pExtension3;
2334 }
2335
2336 static int py_DNS_RPC_SERVER_INFO_W2K_set_pExtension3(PyObject *py_obj, PyObject *value, void *closure)
2337 {
2338         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2339         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->pExtension3);
2340         if (value == Py_None) {
2341                 object->pExtension3 = NULL;
2342         } else {
2343                 object->pExtension3 = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pExtension3);
2344                 PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2345                 *object->pExtension3 = PyInt_AsLong(value);
2346         }
2347         return 0;
2348 }
2349
2350 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_pExtension4(PyObject *obj, void *closure)
2351 {
2352         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2353         PyObject *py_pExtension4;
2354         if (object->pExtension4 == NULL) {
2355                 py_pExtension4 = Py_None;
2356                 Py_INCREF(py_pExtension4);
2357         } else {
2358                 py_pExtension4 = PyInt_FromLong(*object->pExtension4);
2359         }
2360         return py_pExtension4;
2361 }
2362
2363 static int py_DNS_RPC_SERVER_INFO_W2K_set_pExtension4(PyObject *py_obj, PyObject *value, void *closure)
2364 {
2365         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2366         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->pExtension4);
2367         if (value == Py_None) {
2368                 object->pExtension4 = NULL;
2369         } else {
2370                 object->pExtension4 = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pExtension4);
2371                 PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2372                 *object->pExtension4 = PyInt_AsLong(value);
2373         }
2374         return 0;
2375 }
2376
2377 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_pExtension5(PyObject *obj, void *closure)
2378 {
2379         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2380         PyObject *py_pExtension5;
2381         if (object->pExtension5 == NULL) {
2382                 py_pExtension5 = Py_None;
2383                 Py_INCREF(py_pExtension5);
2384         } else {
2385                 py_pExtension5 = PyInt_FromLong(*object->pExtension5);
2386         }
2387         return py_pExtension5;
2388 }
2389
2390 static int py_DNS_RPC_SERVER_INFO_W2K_set_pExtension5(PyObject *py_obj, PyObject *value, void *closure)
2391 {
2392         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2393         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->pExtension5);
2394         if (value == Py_None) {
2395                 object->pExtension5 = NULL;
2396         } else {
2397                 object->pExtension5 = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pExtension5);
2398                 PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2399                 *object->pExtension5 = PyInt_AsLong(value);
2400         }
2401         return 0;
2402 }
2403
2404 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwLogLevel(PyObject *obj, void *closure)
2405 {
2406         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2407         PyObject *py_dwLogLevel;
2408         py_dwLogLevel = PyInt_FromLong(object->dwLogLevel);
2409         return py_dwLogLevel;
2410 }
2411
2412 static int py_DNS_RPC_SERVER_INFO_W2K_set_dwLogLevel(PyObject *py_obj, PyObject *value, void *closure)
2413 {
2414         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2415         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2416         object->dwLogLevel = PyInt_AsLong(value);
2417         return 0;
2418 }
2419
2420 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwDebugLevel(PyObject *obj, void *closure)
2421 {
2422         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2423         PyObject *py_dwDebugLevel;
2424         py_dwDebugLevel = PyInt_FromLong(object->dwDebugLevel);
2425         return py_dwDebugLevel;
2426 }
2427
2428 static int py_DNS_RPC_SERVER_INFO_W2K_set_dwDebugLevel(PyObject *py_obj, PyObject *value, void *closure)
2429 {
2430         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2431         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2432         object->dwDebugLevel = PyInt_AsLong(value);
2433         return 0;
2434 }
2435
2436 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwForwardTimeout(PyObject *obj, void *closure)
2437 {
2438         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2439         PyObject *py_dwForwardTimeout;
2440         py_dwForwardTimeout = PyInt_FromLong(object->dwForwardTimeout);
2441         return py_dwForwardTimeout;
2442 }
2443
2444 static int py_DNS_RPC_SERVER_INFO_W2K_set_dwForwardTimeout(PyObject *py_obj, PyObject *value, void *closure)
2445 {
2446         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2447         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2448         object->dwForwardTimeout = PyInt_AsLong(value);
2449         return 0;
2450 }
2451
2452 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwRpcProtocol(PyObject *obj, void *closure)
2453 {
2454         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2455         PyObject *py_dwRpcProtocol;
2456         py_dwRpcProtocol = PyInt_FromLong(object->dwRpcProtocol);
2457         return py_dwRpcProtocol;
2458 }
2459
2460 static int py_DNS_RPC_SERVER_INFO_W2K_set_dwRpcProtocol(PyObject *py_obj, PyObject *value, void *closure)
2461 {
2462         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2463         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2464         object->dwRpcProtocol = PyInt_AsLong(value);
2465         return 0;
2466 }
2467
2468 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwNameCheckFlag(PyObject *obj, void *closure)
2469 {
2470         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2471         PyObject *py_dwNameCheckFlag;
2472         py_dwNameCheckFlag = PyInt_FromLong(object->dwNameCheckFlag);
2473         return py_dwNameCheckFlag;
2474 }
2475
2476 static int py_DNS_RPC_SERVER_INFO_W2K_set_dwNameCheckFlag(PyObject *py_obj, PyObject *value, void *closure)
2477 {
2478         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2479         if (PyLong_Check(value)) {
2480                 object->dwNameCheckFlag = PyLong_AsLongLong(value);
2481         } else if (PyInt_Check(value)) {
2482                 object->dwNameCheckFlag = PyInt_AsLong(value);
2483         } else {
2484                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
2485                   PyInt_Type.tp_name, PyLong_Type.tp_name);
2486                 return -1;
2487         }
2488         return 0;
2489 }
2490
2491 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_cAddressAnswerLimit(PyObject *obj, void *closure)
2492 {
2493         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2494         PyObject *py_cAddressAnswerLimit;
2495         py_cAddressAnswerLimit = PyInt_FromLong(object->cAddressAnswerLimit);
2496         return py_cAddressAnswerLimit;
2497 }
2498
2499 static int py_DNS_RPC_SERVER_INFO_W2K_set_cAddressAnswerLimit(PyObject *py_obj, PyObject *value, void *closure)
2500 {
2501         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2502         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2503         object->cAddressAnswerLimit = PyInt_AsLong(value);
2504         return 0;
2505 }
2506
2507 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwRecursionRetry(PyObject *obj, void *closure)
2508 {
2509         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2510         PyObject *py_dwRecursionRetry;
2511         py_dwRecursionRetry = PyInt_FromLong(object->dwRecursionRetry);
2512         return py_dwRecursionRetry;
2513 }
2514
2515 static int py_DNS_RPC_SERVER_INFO_W2K_set_dwRecursionRetry(PyObject *py_obj, PyObject *value, void *closure)
2516 {
2517         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2518         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2519         object->dwRecursionRetry = PyInt_AsLong(value);
2520         return 0;
2521 }
2522
2523 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwRecursionTimeout(PyObject *obj, void *closure)
2524 {
2525         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2526         PyObject *py_dwRecursionTimeout;
2527         py_dwRecursionTimeout = PyInt_FromLong(object->dwRecursionTimeout);
2528         return py_dwRecursionTimeout;
2529 }
2530
2531 static int py_DNS_RPC_SERVER_INFO_W2K_set_dwRecursionTimeout(PyObject *py_obj, PyObject *value, void *closure)
2532 {
2533         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2534         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2535         object->dwRecursionTimeout = PyInt_AsLong(value);
2536         return 0;
2537 }
2538
2539 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwMaxCacheTtl(PyObject *obj, void *closure)
2540 {
2541         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2542         PyObject *py_dwMaxCacheTtl;
2543         py_dwMaxCacheTtl = PyInt_FromLong(object->dwMaxCacheTtl);
2544         return py_dwMaxCacheTtl;
2545 }
2546
2547 static int py_DNS_RPC_SERVER_INFO_W2K_set_dwMaxCacheTtl(PyObject *py_obj, PyObject *value, void *closure)
2548 {
2549         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2550         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2551         object->dwMaxCacheTtl = PyInt_AsLong(value);
2552         return 0;
2553 }
2554
2555 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwDsPollingInterval(PyObject *obj, void *closure)
2556 {
2557         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2558         PyObject *py_dwDsPollingInterval;
2559         py_dwDsPollingInterval = PyInt_FromLong(object->dwDsPollingInterval);
2560         return py_dwDsPollingInterval;
2561 }
2562
2563 static int py_DNS_RPC_SERVER_INFO_W2K_set_dwDsPollingInterval(PyObject *py_obj, PyObject *value, void *closure)
2564 {
2565         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2566         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2567         object->dwDsPollingInterval = PyInt_AsLong(value);
2568         return 0;
2569 }
2570
2571 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwScavengingInterval(PyObject *obj, void *closure)
2572 {
2573         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2574         PyObject *py_dwScavengingInterval;
2575         py_dwScavengingInterval = PyInt_FromLong(object->dwScavengingInterval);
2576         return py_dwScavengingInterval;
2577 }
2578
2579 static int py_DNS_RPC_SERVER_INFO_W2K_set_dwScavengingInterval(PyObject *py_obj, PyObject *value, void *closure)
2580 {
2581         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2582         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2583         object->dwScavengingInterval = PyInt_AsLong(value);
2584         return 0;
2585 }
2586
2587 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwDefaultRefreshInterval(PyObject *obj, void *closure)
2588 {
2589         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2590         PyObject *py_dwDefaultRefreshInterval;
2591         py_dwDefaultRefreshInterval = PyInt_FromLong(object->dwDefaultRefreshInterval);
2592         return py_dwDefaultRefreshInterval;
2593 }
2594
2595 static int py_DNS_RPC_SERVER_INFO_W2K_set_dwDefaultRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
2596 {
2597         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2598         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2599         object->dwDefaultRefreshInterval = PyInt_AsLong(value);
2600         return 0;
2601 }
2602
2603 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwDefaultNoRefreshInterval(PyObject *obj, void *closure)
2604 {
2605         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2606         PyObject *py_dwDefaultNoRefreshInterval;
2607         py_dwDefaultNoRefreshInterval = PyInt_FromLong(object->dwDefaultNoRefreshInterval);
2608         return py_dwDefaultNoRefreshInterval;
2609 }
2610
2611 static int py_DNS_RPC_SERVER_INFO_W2K_set_dwDefaultNoRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
2612 {
2613         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2614         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2615         object->dwDefaultNoRefreshInterval = PyInt_AsLong(value);
2616         return 0;
2617 }
2618
2619 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwReserveArray(PyObject *obj, void *closure)
2620 {
2621         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2622         PyObject *py_dwReserveArray;
2623         py_dwReserveArray = PyList_New(10);
2624         if (py_dwReserveArray == NULL) {
2625                 return NULL;
2626         }
2627         {
2628                 int dwReserveArray_cntr_0;
2629                 for (dwReserveArray_cntr_0 = 0; dwReserveArray_cntr_0 < 10; dwReserveArray_cntr_0++) {
2630                         PyObject *py_dwReserveArray_0;
2631                         py_dwReserveArray_0 = PyInt_FromLong(object->dwReserveArray[dwReserveArray_cntr_0]);
2632                         PyList_SetItem(py_dwReserveArray, dwReserveArray_cntr_0, py_dwReserveArray_0);
2633                 }
2634         }
2635         return py_dwReserveArray;
2636 }
2637
2638 static int py_DNS_RPC_SERVER_INFO_W2K_set_dwReserveArray(PyObject *py_obj, PyObject *value, void *closure)
2639 {
2640         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2641         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
2642         {
2643                 int dwReserveArray_cntr_0;
2644                 for (dwReserveArray_cntr_0 = 0; dwReserveArray_cntr_0 < PyList_GET_SIZE(value); dwReserveArray_cntr_0++) {
2645                         PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, dwReserveArray_cntr_0), return -1;);
2646                         object->dwReserveArray[dwReserveArray_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, dwReserveArray_cntr_0));
2647                 }
2648         }
2649         return 0;
2650 }
2651
2652 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fAutoReverseZones(PyObject *obj, void *closure)
2653 {
2654         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2655         PyObject *py_fAutoReverseZones;
2656         py_fAutoReverseZones = PyInt_FromLong(object->fAutoReverseZones);
2657         return py_fAutoReverseZones;
2658 }
2659
2660 static int py_DNS_RPC_SERVER_INFO_W2K_set_fAutoReverseZones(PyObject *py_obj, PyObject *value, void *closure)
2661 {
2662         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2663         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2664         object->fAutoReverseZones = PyInt_AsLong(value);
2665         return 0;
2666 }
2667
2668 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fAutoCacheUpdate(PyObject *obj, void *closure)
2669 {
2670         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2671         PyObject *py_fAutoCacheUpdate;
2672         py_fAutoCacheUpdate = PyInt_FromLong(object->fAutoCacheUpdate);
2673         return py_fAutoCacheUpdate;
2674 }
2675
2676 static int py_DNS_RPC_SERVER_INFO_W2K_set_fAutoCacheUpdate(PyObject *py_obj, PyObject *value, void *closure)
2677 {
2678         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2679         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2680         object->fAutoCacheUpdate = PyInt_AsLong(value);
2681         return 0;
2682 }
2683
2684 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
2685 {
2686         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2687         PyObject *py_fRecurseAfterForwarding;
2688         py_fRecurseAfterForwarding = PyInt_FromLong(object->fRecurseAfterForwarding);
2689         return py_fRecurseAfterForwarding;
2690 }
2691
2692 static int py_DNS_RPC_SERVER_INFO_W2K_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
2693 {
2694         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2695         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2696         object->fRecurseAfterForwarding = PyInt_AsLong(value);
2697         return 0;
2698 }
2699
2700 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fForwardDelegations(PyObject *obj, void *closure)
2701 {
2702         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2703         PyObject *py_fForwardDelegations;
2704         py_fForwardDelegations = PyInt_FromLong(object->fForwardDelegations);
2705         return py_fForwardDelegations;
2706 }
2707
2708 static int py_DNS_RPC_SERVER_INFO_W2K_set_fForwardDelegations(PyObject *py_obj, PyObject *value, void *closure)
2709 {
2710         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2711         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2712         object->fForwardDelegations = PyInt_AsLong(value);
2713         return 0;
2714 }
2715
2716 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fNoRecursion(PyObject *obj, void *closure)
2717 {
2718         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2719         PyObject *py_fNoRecursion;
2720         py_fNoRecursion = PyInt_FromLong(object->fNoRecursion);
2721         return py_fNoRecursion;
2722 }
2723
2724 static int py_DNS_RPC_SERVER_INFO_W2K_set_fNoRecursion(PyObject *py_obj, PyObject *value, void *closure)
2725 {
2726         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2727         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2728         object->fNoRecursion = PyInt_AsLong(value);
2729         return 0;
2730 }
2731
2732 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fSecureResponses(PyObject *obj, void *closure)
2733 {
2734         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2735         PyObject *py_fSecureResponses;
2736         py_fSecureResponses = PyInt_FromLong(object->fSecureResponses);
2737         return py_fSecureResponses;
2738 }
2739
2740 static int py_DNS_RPC_SERVER_INFO_W2K_set_fSecureResponses(PyObject *py_obj, PyObject *value, void *closure)
2741 {
2742         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2743         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2744         object->fSecureResponses = PyInt_AsLong(value);
2745         return 0;
2746 }
2747
2748 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fRoundRobin(PyObject *obj, void *closure)
2749 {
2750         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2751         PyObject *py_fRoundRobin;
2752         py_fRoundRobin = PyInt_FromLong(object->fRoundRobin);
2753         return py_fRoundRobin;
2754 }
2755
2756 static int py_DNS_RPC_SERVER_INFO_W2K_set_fRoundRobin(PyObject *py_obj, PyObject *value, void *closure)
2757 {
2758         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2759         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2760         object->fRoundRobin = PyInt_AsLong(value);
2761         return 0;
2762 }
2763
2764 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fLocalNetPriority(PyObject *obj, void *closure)
2765 {
2766         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2767         PyObject *py_fLocalNetPriority;
2768         py_fLocalNetPriority = PyInt_FromLong(object->fLocalNetPriority);
2769         return py_fLocalNetPriority;
2770 }
2771
2772 static int py_DNS_RPC_SERVER_INFO_W2K_set_fLocalNetPriority(PyObject *py_obj, PyObject *value, void *closure)
2773 {
2774         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2775         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2776         object->fLocalNetPriority = PyInt_AsLong(value);
2777         return 0;
2778 }
2779
2780 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fBindSecondaries(PyObject *obj, void *closure)
2781 {
2782         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2783         PyObject *py_fBindSecondaries;
2784         py_fBindSecondaries = PyInt_FromLong(object->fBindSecondaries);
2785         return py_fBindSecondaries;
2786 }
2787
2788 static int py_DNS_RPC_SERVER_INFO_W2K_set_fBindSecondaries(PyObject *py_obj, PyObject *value, void *closure)
2789 {
2790         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2791         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2792         object->fBindSecondaries = PyInt_AsLong(value);
2793         return 0;
2794 }
2795
2796 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fWriteAuthorityNs(PyObject *obj, void *closure)
2797 {
2798         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2799         PyObject *py_fWriteAuthorityNs;
2800         py_fWriteAuthorityNs = PyInt_FromLong(object->fWriteAuthorityNs);
2801         return py_fWriteAuthorityNs;
2802 }
2803
2804 static int py_DNS_RPC_SERVER_INFO_W2K_set_fWriteAuthorityNs(PyObject *py_obj, PyObject *value, void *closure)
2805 {
2806         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2807         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2808         object->fWriteAuthorityNs = PyInt_AsLong(value);
2809         return 0;
2810 }
2811
2812 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fStrictFileParsing(PyObject *obj, void *closure)
2813 {
2814         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2815         PyObject *py_fStrictFileParsing;
2816         py_fStrictFileParsing = PyInt_FromLong(object->fStrictFileParsing);
2817         return py_fStrictFileParsing;
2818 }
2819
2820 static int py_DNS_RPC_SERVER_INFO_W2K_set_fStrictFileParsing(PyObject *py_obj, PyObject *value, void *closure)
2821 {
2822         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2823         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2824         object->fStrictFileParsing = PyInt_AsLong(value);
2825         return 0;
2826 }
2827
2828 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fLooseWildcarding(PyObject *obj, void *closure)
2829 {
2830         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2831         PyObject *py_fLooseWildcarding;
2832         py_fLooseWildcarding = PyInt_FromLong(object->fLooseWildcarding);
2833         return py_fLooseWildcarding;
2834 }
2835
2836 static int py_DNS_RPC_SERVER_INFO_W2K_set_fLooseWildcarding(PyObject *py_obj, PyObject *value, void *closure)
2837 {
2838         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2839         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2840         object->fLooseWildcarding = PyInt_AsLong(value);
2841         return 0;
2842 }
2843
2844 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fDefaultAgingState(PyObject *obj, void *closure)
2845 {
2846         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2847         PyObject *py_fDefaultAgingState;
2848         py_fDefaultAgingState = PyInt_FromLong(object->fDefaultAgingState);
2849         return py_fDefaultAgingState;
2850 }
2851
2852 static int py_DNS_RPC_SERVER_INFO_W2K_set_fDefaultAgingState(PyObject *py_obj, PyObject *value, void *closure)
2853 {
2854         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2855         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
2856         object->fDefaultAgingState = PyInt_AsLong(value);
2857         return 0;
2858 }
2859
2860 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fReserveArray(PyObject *obj, void *closure)
2861 {
2862         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
2863         PyObject *py_fReserveArray;
2864         py_fReserveArray = PyList_New(15);
2865         if (py_fReserveArray == NULL) {
2866                 return NULL;
2867         }
2868         {
2869                 int fReserveArray_cntr_0;
2870                 for (fReserveArray_cntr_0 = 0; fReserveArray_cntr_0 < 15; fReserveArray_cntr_0++) {
2871                         PyObject *py_fReserveArray_0;
2872                         py_fReserveArray_0 = PyInt_FromLong(object->fReserveArray[fReserveArray_cntr_0]);
2873                         PyList_SetItem(py_fReserveArray, fReserveArray_cntr_0, py_fReserveArray_0);
2874                 }
2875         }
2876         return py_fReserveArray;
2877 }
2878
2879 static int py_DNS_RPC_SERVER_INFO_W2K_set_fReserveArray(PyObject *py_obj, PyObject *value, void *closure)
2880 {
2881         struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
2882         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
2883         {
2884                 int fReserveArray_cntr_0;
2885                 for (fReserveArray_cntr_0 = 0; fReserveArray_cntr_0 < PyList_GET_SIZE(value); fReserveArray_cntr_0++) {
2886                         PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, fReserveArray_cntr_0), return -1;);
2887                         object->fReserveArray[fReserveArray_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, fReserveArray_cntr_0));
2888                 }
2889         }
2890         return 0;
2891 }
2892
2893 static PyGetSetDef py_DNS_RPC_SERVER_INFO_W2K_getsetters[] = {
2894         { discard_const_p(char, "dwVersion"), py_DNS_RPC_SERVER_INFO_W2K_get_dwVersion, py_DNS_RPC_SERVER_INFO_W2K_set_dwVersion },
2895         { discard_const_p(char, "fBootMethod"), py_DNS_RPC_SERVER_INFO_W2K_get_fBootMethod, py_DNS_RPC_SERVER_INFO_W2K_set_fBootMethod },
2896         { discard_const_p(char, "fAdminConfigured"), py_DNS_RPC_SERVER_INFO_W2K_get_fAdminConfigured, py_DNS_RPC_SERVER_INFO_W2K_set_fAdminConfigured },
2897         { discard_const_p(char, "fAllowUpdate"), py_DNS_RPC_SERVER_INFO_W2K_get_fAllowUpdate, py_DNS_RPC_SERVER_INFO_W2K_set_fAllowUpdate },
2898         { discard_const_p(char, "fDsAvailable"), py_DNS_RPC_SERVER_INFO_W2K_get_fDsAvailable, py_DNS_RPC_SERVER_INFO_W2K_set_fDsAvailable },
2899         { discard_const_p(char, "pszServerName"), py_DNS_RPC_SERVER_INFO_W2K_get_pszServerName, py_DNS_RPC_SERVER_INFO_W2K_set_pszServerName },
2900         { discard_const_p(char, "pszDsContainer"), py_DNS_RPC_SERVER_INFO_W2K_get_pszDsContainer, py_DNS_RPC_SERVER_INFO_W2K_set_pszDsContainer },
2901         { discard_const_p(char, "aipServerAddrs"), py_DNS_RPC_SERVER_INFO_W2K_get_aipServerAddrs, py_DNS_RPC_SERVER_INFO_W2K_set_aipServerAddrs },
2902         { discard_const_p(char, "aipListenAddrs"), py_DNS_RPC_SERVER_INFO_W2K_get_aipListenAddrs, py_DNS_RPC_SERVER_INFO_W2K_set_aipListenAddrs },
2903         { discard_const_p(char, "aipForwarders"), py_DNS_RPC_SERVER_INFO_W2K_get_aipForwarders, py_DNS_RPC_SERVER_INFO_W2K_set_aipForwarders },
2904         { discard_const_p(char, "pExtension1"), py_DNS_RPC_SERVER_INFO_W2K_get_pExtension1, py_DNS_RPC_SERVER_INFO_W2K_set_pExtension1 },
2905         { discard_const_p(char, "pExtension2"), py_DNS_RPC_SERVER_INFO_W2K_get_pExtension2, py_DNS_RPC_SERVER_INFO_W2K_set_pExtension2 },
2906         { discard_const_p(char, "pExtension3"), py_DNS_RPC_SERVER_INFO_W2K_get_pExtension3, py_DNS_RPC_SERVER_INFO_W2K_set_pExtension3 },
2907         { discard_const_p(char, "pExtension4"), py_DNS_RPC_SERVER_INFO_W2K_get_pExtension4, py_DNS_RPC_SERVER_INFO_W2K_set_pExtension4 },
2908         { discard_const_p(char, "pExtension5"), py_DNS_RPC_SERVER_INFO_W2K_get_pExtension5, py_DNS_RPC_SERVER_INFO_W2K_set_pExtension5 },
2909         { discard_const_p(char, "dwLogLevel"), py_DNS_RPC_SERVER_INFO_W2K_get_dwLogLevel, py_DNS_RPC_SERVER_INFO_W2K_set_dwLogLevel },
2910         { discard_const_p(char, "dwDebugLevel"), py_DNS_RPC_SERVER_INFO_W2K_get_dwDebugLevel, py_DNS_RPC_SERVER_INFO_W2K_set_dwDebugLevel },
2911         { discard_const_p(char, "dwForwardTimeout"), py_DNS_RPC_SERVER_INFO_W2K_get_dwForwardTimeout, py_DNS_RPC_SERVER_INFO_W2K_set_dwForwardTimeout },
2912         { discard_const_p(char, "dwRpcProtocol"), py_DNS_RPC_SERVER_INFO_W2K_get_dwRpcProtocol, py_DNS_RPC_SERVER_INFO_W2K_set_dwRpcProtocol },
2913         { discard_const_p(char, "dwNameCheckFlag"), py_DNS_RPC_SERVER_INFO_W2K_get_dwNameCheckFlag, py_DNS_RPC_SERVER_INFO_W2K_set_dwNameCheckFlag },
2914         { discard_const_p(char, "cAddressAnswerLimit"), py_DNS_RPC_SERVER_INFO_W2K_get_cAddressAnswerLimit, py_DNS_RPC_SERVER_INFO_W2K_set_cAddressAnswerLimit },
2915         { discard_const_p(char, "dwRecursionRetry"), py_DNS_RPC_SERVER_INFO_W2K_get_dwRecursionRetry, py_DNS_RPC_SERVER_INFO_W2K_set_dwRecursionRetry },
2916         { discard_const_p(char, "dwRecursionTimeout"), py_DNS_RPC_SERVER_INFO_W2K_get_dwRecursionTimeout, py_DNS_RPC_SERVER_INFO_W2K_set_dwRecursionTimeout },
2917         { discard_const_p(char, "dwMaxCacheTtl"), py_DNS_RPC_SERVER_INFO_W2K_get_dwMaxCacheTtl, py_DNS_RPC_SERVER_INFO_W2K_set_dwMaxCacheTtl },
2918         { discard_const_p(char, "dwDsPollingInterval"), py_DNS_RPC_SERVER_INFO_W2K_get_dwDsPollingInterval, py_DNS_RPC_SERVER_INFO_W2K_set_dwDsPollingInterval },
2919         { discard_const_p(char, "dwScavengingInterval"), py_DNS_RPC_SERVER_INFO_W2K_get_dwScavengingInterval, py_DNS_RPC_SERVER_INFO_W2K_set_dwScavengingInterval },
2920         { discard_const_p(char, "dwDefaultRefreshInterval"), py_DNS_RPC_SERVER_INFO_W2K_get_dwDefaultRefreshInterval, py_DNS_RPC_SERVER_INFO_W2K_set_dwDefaultRefreshInterval },
2921         { discard_const_p(char, "dwDefaultNoRefreshInterval"), py_DNS_RPC_SERVER_INFO_W2K_get_dwDefaultNoRefreshInterval, py_DNS_RPC_SERVER_INFO_W2K_set_dwDefaultNoRefreshInterval },
2922         { discard_const_p(char, "dwReserveArray"), py_DNS_RPC_SERVER_INFO_W2K_get_dwReserveArray, py_DNS_RPC_SERVER_INFO_W2K_set_dwReserveArray },
2923         { discard_const_p(char, "fAutoReverseZones"), py_DNS_RPC_SERVER_INFO_W2K_get_fAutoReverseZones, py_DNS_RPC_SERVER_INFO_W2K_set_fAutoReverseZones },
2924         { discard_const_p(char, "fAutoCacheUpdate"), py_DNS_RPC_SERVER_INFO_W2K_get_fAutoCacheUpdate, py_DNS_RPC_SERVER_INFO_W2K_set_fAutoCacheUpdate },
2925         { discard_const_p(char, "fRecurseAfterForwarding"), py_DNS_RPC_SERVER_INFO_W2K_get_fRecurseAfterForwarding, py_DNS_RPC_SERVER_INFO_W2K_set_fRecurseAfterForwarding },
2926         { discard_const_p(char, "fForwardDelegations"), py_DNS_RPC_SERVER_INFO_W2K_get_fForwardDelegations, py_DNS_RPC_SERVER_INFO_W2K_set_fForwardDelegations },
2927         { discard_const_p(char, "fNoRecursion"), py_DNS_RPC_SERVER_INFO_W2K_get_fNoRecursion, py_DNS_RPC_SERVER_INFO_W2K_set_fNoRecursion },
2928         { discard_const_p(char, "fSecureResponses"), py_DNS_RPC_SERVER_INFO_W2K_get_fSecureResponses, py_DNS_RPC_SERVER_INFO_W2K_set_fSecureResponses },
2929         { discard_const_p(char, "fRoundRobin"), py_DNS_RPC_SERVER_INFO_W2K_get_fRoundRobin, py_DNS_RPC_SERVER_INFO_W2K_set_fRoundRobin },
2930         { discard_const_p(char, "fLocalNetPriority"), py_DNS_RPC_SERVER_INFO_W2K_get_fLocalNetPriority, py_DNS_RPC_SERVER_INFO_W2K_set_fLocalNetPriority },
2931         { discard_const_p(char, "fBindSecondaries"), py_DNS_RPC_SERVER_INFO_W2K_get_fBindSecondaries, py_DNS_RPC_SERVER_INFO_W2K_set_fBindSecondaries },
2932         { discard_const_p(char, "fWriteAuthorityNs"), py_DNS_RPC_SERVER_INFO_W2K_get_fWriteAuthorityNs, py_DNS_RPC_SERVER_INFO_W2K_set_fWriteAuthorityNs },
2933         { discard_const_p(char, "fStrictFileParsing"), py_DNS_RPC_SERVER_INFO_W2K_get_fStrictFileParsing, py_DNS_RPC_SERVER_INFO_W2K_set_fStrictFileParsing },
2934         { discard_const_p(char, "fLooseWildcarding"), py_DNS_RPC_SERVER_INFO_W2K_get_fLooseWildcarding, py_DNS_RPC_SERVER_INFO_W2K_set_fLooseWildcarding },
2935         { discard_const_p(char, "fDefaultAgingState"), py_DNS_RPC_SERVER_INFO_W2K_get_fDefaultAgingState, py_DNS_RPC_SERVER_INFO_W2K_set_fDefaultAgingState },
2936         { discard_const_p(char, "fReserveArray"), py_DNS_RPC_SERVER_INFO_W2K_get_fReserveArray, py_DNS_RPC_SERVER_INFO_W2K_set_fReserveArray },
2937         { NULL }
2938 };
2939
2940 static PyObject *py_DNS_RPC_SERVER_INFO_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2941 {
2942         return pytalloc_new(struct DNS_RPC_SERVER_INFO_W2K, type);
2943 }
2944
2945
2946 static PyTypeObject DNS_RPC_SERVER_INFO_W2K_Type = {
2947         PyObject_HEAD_INIT(NULL) 0,
2948         .tp_name = "dnsserver.DNS_RPC_SERVER_INFO_W2K",
2949         .tp_getset = py_DNS_RPC_SERVER_INFO_W2K_getsetters,
2950         .tp_methods = NULL,
2951         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2952         .tp_basicsize = sizeof(pytalloc_Object),
2953         .tp_new = py_DNS_RPC_SERVER_INFO_W2K_new,
2954 };
2955
2956
2957 static PyObject *py_DNS_EXTENSION_get_extension(PyObject *obj, void *closure)
2958 {
2959         struct DNS_EXTENSION *object = (struct DNS_EXTENSION *)pytalloc_get_ptr(obj);
2960         PyObject *py_extension;
2961         if (object->extension == NULL) {
2962                 py_extension = Py_None;
2963                 Py_INCREF(py_extension);
2964         } else {
2965                 if (object->extension == NULL) {
2966                         py_extension = Py_None;
2967                         Py_INCREF(py_extension);
2968                 } else {
2969                         py_extension = PyUnicode_Decode(object->extension, strlen(object->extension), "utf-8", "ignore");
2970                 }
2971         }
2972         return py_extension;
2973 }
2974
2975 static int py_DNS_EXTENSION_set_extension(PyObject *py_obj, PyObject *value, void *closure)
2976 {
2977         struct DNS_EXTENSION *object = (struct DNS_EXTENSION *)pytalloc_get_ptr(py_obj);
2978         if (value == Py_None) {
2979                 object->extension = NULL;
2980         } else {
2981                 object->extension = NULL;
2982                 if (PyUnicode_Check(value)) {
2983                         object->extension = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
2984                 } else if (PyString_Check(value)) {
2985                         object->extension = PyString_AS_STRING(value);
2986                 } else {
2987                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
2988                         return -1;
2989                 }
2990         }
2991         return 0;
2992 }
2993
2994 static PyGetSetDef py_DNS_EXTENSION_getsetters[] = {
2995         { discard_const_p(char, "extension"), py_DNS_EXTENSION_get_extension, py_DNS_EXTENSION_set_extension },
2996         { NULL }
2997 };
2998
2999 static PyObject *py_DNS_EXTENSION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3000 {
3001         return pytalloc_new(struct DNS_EXTENSION, type);
3002 }
3003
3004
3005 static PyTypeObject DNS_EXTENSION_Type = {
3006         PyObject_HEAD_INIT(NULL) 0,
3007         .tp_name = "dnsserver.DNS_EXTENSION",
3008         .tp_getset = py_DNS_EXTENSION_getsetters,
3009         .tp_methods = NULL,
3010         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3011         .tp_basicsize = sizeof(pytalloc_Object),
3012         .tp_new = py_DNS_EXTENSION_new,
3013 };
3014
3015
3016 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
3017 {
3018         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3019         PyObject *py_dwRpcStructureVersion;
3020         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
3021         return py_dwRpcStructureVersion;
3022 }
3023
3024 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
3025 {
3026         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3027         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3028         object->dwRpcStructureVersion = PyInt_AsLong(value);
3029         return 0;
3030 }
3031
3032 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
3033 {
3034         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3035         PyObject *py_dwReserved0;
3036         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
3037         return py_dwReserved0;
3038 }
3039
3040 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
3041 {
3042         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3043         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3044         object->dwReserved0 = PyInt_AsLong(value);
3045         return 0;
3046 }
3047
3048 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwVersion(PyObject *obj, void *closure)
3049 {
3050         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3051         PyObject *py_dwVersion;
3052         py_dwVersion = PyInt_FromLong(object->dwVersion);
3053         return py_dwVersion;
3054 }
3055
3056 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwVersion(PyObject *py_obj, PyObject *value, void *closure)
3057 {
3058         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3059         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3060         object->dwVersion = PyInt_AsLong(value);
3061         return 0;
3062 }
3063
3064 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fBootMethod(PyObject *obj, void *closure)
3065 {
3066         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3067         PyObject *py_fBootMethod;
3068         py_fBootMethod = PyInt_FromLong(object->fBootMethod);
3069         return py_fBootMethod;
3070 }
3071
3072 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fBootMethod(PyObject *py_obj, PyObject *value, void *closure)
3073 {
3074         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3075         if (PyLong_Check(value)) {
3076                 object->fBootMethod = PyLong_AsLongLong(value);
3077         } else if (PyInt_Check(value)) {
3078                 object->fBootMethod = PyInt_AsLong(value);
3079         } else {
3080                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
3081                   PyInt_Type.tp_name, PyLong_Type.tp_name);
3082                 return -1;
3083         }
3084         return 0;
3085 }
3086
3087 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fAdminConfigured(PyObject *obj, void *closure)
3088 {
3089         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3090         PyObject *py_fAdminConfigured;
3091         py_fAdminConfigured = PyInt_FromLong(object->fAdminConfigured);
3092         return py_fAdminConfigured;
3093 }
3094
3095 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fAdminConfigured(PyObject *py_obj, PyObject *value, void *closure)
3096 {
3097         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3098         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3099         object->fAdminConfigured = PyInt_AsLong(value);
3100         return 0;
3101 }
3102
3103 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fAllowUpdate(PyObject *obj, void *closure)
3104 {
3105         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3106         PyObject *py_fAllowUpdate;
3107         py_fAllowUpdate = PyInt_FromLong(object->fAllowUpdate);
3108         return py_fAllowUpdate;
3109 }
3110
3111 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
3112 {
3113         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3114         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3115         object->fAllowUpdate = PyInt_AsLong(value);
3116         return 0;
3117 }
3118
3119 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fDsAvailable(PyObject *obj, void *closure)
3120 {
3121         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3122         PyObject *py_fDsAvailable;
3123         py_fDsAvailable = PyInt_FromLong(object->fDsAvailable);
3124         return py_fDsAvailable;
3125 }
3126
3127 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fDsAvailable(PyObject *py_obj, PyObject *value, void *closure)
3128 {
3129         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3130         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3131         object->fDsAvailable = PyInt_AsLong(value);
3132         return 0;
3133 }
3134
3135 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pszServerName(PyObject *obj, void *closure)
3136 {
3137         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3138         PyObject *py_pszServerName;
3139         if (object->pszServerName == NULL) {
3140                 py_pszServerName = Py_None;
3141                 Py_INCREF(py_pszServerName);
3142         } else {
3143                 if (object->pszServerName == NULL) {
3144                         py_pszServerName = Py_None;
3145                         Py_INCREF(py_pszServerName);
3146                 } else {
3147                         py_pszServerName = PyUnicode_Decode(object->pszServerName, strlen(object->pszServerName), "utf-8", "ignore");
3148                 }
3149         }
3150         return py_pszServerName;
3151 }
3152
3153 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pszServerName(PyObject *py_obj, PyObject *value, void *closure)
3154 {
3155         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3156         if (value == Py_None) {
3157                 object->pszServerName = NULL;
3158         } else {
3159                 object->pszServerName = NULL;
3160                 if (PyUnicode_Check(value)) {
3161                         object->pszServerName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
3162                 } else if (PyString_Check(value)) {
3163                         object->pszServerName = PyString_AS_STRING(value);
3164                 } else {
3165                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
3166                         return -1;
3167                 }
3168         }
3169         return 0;
3170 }
3171
3172 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pszDsContainer(PyObject *obj, void *closure)
3173 {
3174         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3175         PyObject *py_pszDsContainer;
3176         if (object->pszDsContainer == NULL) {
3177                 py_pszDsContainer = Py_None;
3178                 Py_INCREF(py_pszDsContainer);
3179         } else {
3180                 if (object->pszDsContainer == NULL) {
3181                         py_pszDsContainer = Py_None;
3182                         Py_INCREF(py_pszDsContainer);
3183                 } else {
3184                         py_pszDsContainer = PyUnicode_Decode(object->pszDsContainer, strlen(object->pszDsContainer), "utf-8", "ignore");
3185                 }
3186         }
3187         return py_pszDsContainer;
3188 }
3189
3190 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pszDsContainer(PyObject *py_obj, PyObject *value, void *closure)
3191 {
3192         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3193         if (value == Py_None) {
3194                 object->pszDsContainer = NULL;
3195         } else {
3196                 object->pszDsContainer = NULL;
3197                 if (PyUnicode_Check(value)) {
3198                         object->pszDsContainer = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
3199                 } else if (PyString_Check(value)) {
3200                         object->pszDsContainer = PyString_AS_STRING(value);
3201                 } else {
3202                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
3203                         return -1;
3204                 }
3205         }
3206         return 0;
3207 }
3208
3209 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_aipServerAddrs(PyObject *obj, void *closure)
3210 {
3211         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3212         PyObject *py_aipServerAddrs;
3213         if (object->aipServerAddrs == NULL) {
3214                 py_aipServerAddrs = Py_None;
3215                 Py_INCREF(py_aipServerAddrs);
3216         } else {
3217                 py_aipServerAddrs = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipServerAddrs, object->aipServerAddrs);
3218         }
3219         return py_aipServerAddrs;
3220 }
3221
3222 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_aipServerAddrs(PyObject *py_obj, PyObject *value, void *closure)
3223 {
3224         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3225         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipServerAddrs);
3226         if (value == Py_None) {
3227                 object->aipServerAddrs = NULL;
3228         } else {
3229                 object->aipServerAddrs = NULL;
3230                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
3231                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
3232                         PyErr_NoMemory();
3233                         return -1;
3234                 }
3235                 object->aipServerAddrs = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
3236         }
3237         return 0;
3238 }
3239
3240 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_aipListenAddrs(PyObject *obj, void *closure)
3241 {
3242         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3243         PyObject *py_aipListenAddrs;
3244         if (object->aipListenAddrs == NULL) {
3245                 py_aipListenAddrs = Py_None;
3246                 Py_INCREF(py_aipListenAddrs);
3247         } else {
3248                 py_aipListenAddrs = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipListenAddrs, object->aipListenAddrs);
3249         }
3250         return py_aipListenAddrs;
3251 }
3252
3253 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_aipListenAddrs(PyObject *py_obj, PyObject *value, void *closure)
3254 {
3255         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3256         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipListenAddrs);
3257         if (value == Py_None) {
3258                 object->aipListenAddrs = NULL;
3259         } else {
3260                 object->aipListenAddrs = NULL;
3261                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
3262                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
3263                         PyErr_NoMemory();
3264                         return -1;
3265                 }
3266                 object->aipListenAddrs = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
3267         }
3268         return 0;
3269 }
3270
3271 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_aipForwarders(PyObject *obj, void *closure)
3272 {
3273         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3274         PyObject *py_aipForwarders;
3275         if (object->aipForwarders == NULL) {
3276                 py_aipForwarders = Py_None;
3277                 Py_INCREF(py_aipForwarders);
3278         } else {
3279                 py_aipForwarders = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipForwarders, object->aipForwarders);
3280         }
3281         return py_aipForwarders;
3282 }
3283
3284 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_aipForwarders(PyObject *py_obj, PyObject *value, void *closure)
3285 {
3286         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3287         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipForwarders);
3288         if (value == Py_None) {
3289                 object->aipForwarders = NULL;
3290         } else {
3291                 object->aipForwarders = NULL;
3292                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
3293                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
3294                         PyErr_NoMemory();
3295                         return -1;
3296                 }
3297                 object->aipForwarders = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
3298         }
3299         return 0;
3300 }
3301
3302 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_aipLogFilter(PyObject *obj, void *closure)
3303 {
3304         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3305         PyObject *py_aipLogFilter;
3306         if (object->aipLogFilter == NULL) {
3307                 py_aipLogFilter = Py_None;
3308                 Py_INCREF(py_aipLogFilter);
3309         } else {
3310                 py_aipLogFilter = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipLogFilter, object->aipLogFilter);
3311         }
3312         return py_aipLogFilter;
3313 }
3314
3315 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_aipLogFilter(PyObject *py_obj, PyObject *value, void *closure)
3316 {
3317         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3318         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipLogFilter);
3319         if (value == Py_None) {
3320                 object->aipLogFilter = NULL;
3321         } else {
3322                 object->aipLogFilter = NULL;
3323                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
3324                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
3325                         PyErr_NoMemory();
3326                         return -1;
3327                 }
3328                 object->aipLogFilter = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
3329         }
3330         return 0;
3331 }
3332
3333 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pwszLogFilePath(PyObject *obj, void *closure)
3334 {
3335         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3336         PyObject *py_pwszLogFilePath;
3337         if (object->pwszLogFilePath == NULL) {
3338                 py_pwszLogFilePath = Py_None;
3339                 Py_INCREF(py_pwszLogFilePath);
3340         } else {
3341                 if (object->pwszLogFilePath == NULL) {
3342                         py_pwszLogFilePath = Py_None;
3343                         Py_INCREF(py_pwszLogFilePath);
3344                 } else {
3345                         py_pwszLogFilePath = PyUnicode_Decode(object->pwszLogFilePath, strlen(object->pwszLogFilePath), "utf-8", "ignore");
3346                 }
3347         }
3348         return py_pwszLogFilePath;
3349 }
3350
3351 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pwszLogFilePath(PyObject *py_obj, PyObject *value, void *closure)
3352 {
3353         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3354         if (value == Py_None) {
3355                 object->pwszLogFilePath = NULL;
3356         } else {
3357                 object->pwszLogFilePath = NULL;
3358                 if (PyUnicode_Check(value)) {
3359                         object->pwszLogFilePath = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
3360                 } else if (PyString_Check(value)) {
3361                         object->pwszLogFilePath = PyString_AS_STRING(value);
3362                 } else {
3363                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
3364                         return -1;
3365                 }
3366         }
3367         return 0;
3368 }
3369
3370 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pszDomainName(PyObject *obj, void *closure)
3371 {
3372         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3373         PyObject *py_pszDomainName;
3374         if (object->pszDomainName == NULL) {
3375                 py_pszDomainName = Py_None;
3376                 Py_INCREF(py_pszDomainName);
3377         } else {
3378                 if (object->pszDomainName == NULL) {
3379                         py_pszDomainName = Py_None;
3380                         Py_INCREF(py_pszDomainName);
3381                 } else {
3382                         py_pszDomainName = PyUnicode_Decode(object->pszDomainName, strlen(object->pszDomainName), "utf-8", "ignore");
3383                 }
3384         }
3385         return py_pszDomainName;
3386 }
3387
3388 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pszDomainName(PyObject *py_obj, PyObject *value, void *closure)
3389 {
3390         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3391         if (value == Py_None) {
3392                 object->pszDomainName = NULL;
3393         } else {
3394                 object->pszDomainName = NULL;
3395                 if (PyUnicode_Check(value)) {
3396                         object->pszDomainName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
3397                 } else if (PyString_Check(value)) {
3398                         object->pszDomainName = PyString_AS_STRING(value);
3399                 } else {
3400                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
3401                         return -1;
3402                 }
3403         }
3404         return 0;
3405 }
3406
3407 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pszForestName(PyObject *obj, void *closure)
3408 {
3409         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3410         PyObject *py_pszForestName;
3411         if (object->pszForestName == NULL) {
3412                 py_pszForestName = Py_None;
3413                 Py_INCREF(py_pszForestName);
3414         } else {
3415                 if (object->pszForestName == NULL) {
3416                         py_pszForestName = Py_None;
3417                         Py_INCREF(py_pszForestName);
3418                 } else {
3419                         py_pszForestName = PyUnicode_Decode(object->pszForestName, strlen(object->pszForestName), "utf-8", "ignore");
3420                 }
3421         }
3422         return py_pszForestName;
3423 }
3424
3425 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pszForestName(PyObject *py_obj, PyObject *value, void *closure)
3426 {
3427         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3428         if (value == Py_None) {
3429                 object->pszForestName = NULL;
3430         } else {
3431                 object->pszForestName = NULL;
3432                 if (PyUnicode_Check(value)) {
3433                         object->pszForestName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
3434                 } else if (PyString_Check(value)) {
3435                         object->pszForestName = PyString_AS_STRING(value);
3436                 } else {
3437                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
3438                         return -1;
3439                 }
3440         }
3441         return 0;
3442 }
3443
3444 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pszDomainDirectoryPartition(PyObject *obj, void *closure)
3445 {
3446         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3447         PyObject *py_pszDomainDirectoryPartition;
3448         if (object->pszDomainDirectoryPartition == NULL) {
3449                 py_pszDomainDirectoryPartition = Py_None;
3450                 Py_INCREF(py_pszDomainDirectoryPartition);
3451         } else {
3452                 if (object->pszDomainDirectoryPartition == NULL) {
3453                         py_pszDomainDirectoryPartition = Py_None;
3454                         Py_INCREF(py_pszDomainDirectoryPartition);
3455                 } else {
3456                         py_pszDomainDirectoryPartition = PyUnicode_Decode(object->pszDomainDirectoryPartition, strlen(object->pszDomainDirectoryPartition), "utf-8", "ignore");
3457                 }
3458         }
3459         return py_pszDomainDirectoryPartition;
3460 }
3461
3462 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pszDomainDirectoryPartition(PyObject *py_obj, PyObject *value, void *closure)
3463 {
3464         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3465         if (value == Py_None) {
3466                 object->pszDomainDirectoryPartition = NULL;
3467         } else {
3468                 object->pszDomainDirectoryPartition = NULL;
3469                 if (PyUnicode_Check(value)) {
3470                         object->pszDomainDirectoryPartition = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
3471                 } else if (PyString_Check(value)) {
3472                         object->pszDomainDirectoryPartition = PyString_AS_STRING(value);
3473                 } else {
3474                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
3475                         return -1;
3476                 }
3477         }
3478         return 0;
3479 }
3480
3481 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pszForestDirectoryPartition(PyObject *obj, void *closure)
3482 {
3483         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3484         PyObject *py_pszForestDirectoryPartition;
3485         if (object->pszForestDirectoryPartition == NULL) {
3486                 py_pszForestDirectoryPartition = Py_None;
3487                 Py_INCREF(py_pszForestDirectoryPartition);
3488         } else {
3489                 if (object->pszForestDirectoryPartition == NULL) {
3490                         py_pszForestDirectoryPartition = Py_None;
3491                         Py_INCREF(py_pszForestDirectoryPartition);
3492                 } else {
3493                         py_pszForestDirectoryPartition = PyUnicode_Decode(object->pszForestDirectoryPartition, strlen(object->pszForestDirectoryPartition), "utf-8", "ignore");
3494                 }
3495         }
3496         return py_pszForestDirectoryPartition;
3497 }
3498
3499 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pszForestDirectoryPartition(PyObject *py_obj, PyObject *value, void *closure)
3500 {
3501         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3502         if (value == Py_None) {
3503                 object->pszForestDirectoryPartition = NULL;
3504         } else {
3505                 object->pszForestDirectoryPartition = NULL;
3506                 if (PyUnicode_Check(value)) {
3507                         object->pszForestDirectoryPartition = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
3508                 } else if (PyString_Check(value)) {
3509                         object->pszForestDirectoryPartition = PyString_AS_STRING(value);
3510                 } else {
3511                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
3512                         return -1;
3513                 }
3514         }
3515         return 0;
3516 }
3517
3518 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pExtensions(PyObject *obj, void *closure)
3519 {
3520         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3521         PyObject *py_pExtensions;
3522         py_pExtensions = PyList_New(6);
3523         if (py_pExtensions == NULL) {
3524                 return NULL;
3525         }
3526         {
3527                 int pExtensions_cntr_0;
3528                 for (pExtensions_cntr_0 = 0; pExtensions_cntr_0 < 6; pExtensions_cntr_0++) {
3529                         PyObject *py_pExtensions_0;
3530                         py_pExtensions_0 = pytalloc_reference_ex(&DNS_EXTENSION_Type, object->pExtensions, &object->pExtensions[pExtensions_cntr_0]);
3531                         PyList_SetItem(py_pExtensions, pExtensions_cntr_0, py_pExtensions_0);
3532                 }
3533         }
3534         return py_pExtensions;
3535 }
3536
3537 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pExtensions(PyObject *py_obj, PyObject *value, void *closure)
3538 {
3539         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3540         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
3541         {
3542                 int pExtensions_cntr_0;
3543                 for (pExtensions_cntr_0 = 0; pExtensions_cntr_0 < PyList_GET_SIZE(value); pExtensions_cntr_0++) {
3544                         PY_CHECK_TYPE(&DNS_EXTENSION_Type, PyList_GET_ITEM(value, pExtensions_cntr_0), return -1;);
3545                         if (talloc_reference(object->pExtensions, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, pExtensions_cntr_0))) == NULL) {
3546                                 PyErr_NoMemory();
3547                                 return -1;
3548                         }
3549                         object->pExtensions[pExtensions_cntr_0] = *(struct DNS_EXTENSION *)pytalloc_get_ptr(PyList_GET_ITEM(value, pExtensions_cntr_0));
3550                 }
3551         }
3552         return 0;
3553 }
3554
3555 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLogLevel(PyObject *obj, void *closure)
3556 {
3557         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3558         PyObject *py_dwLogLevel;
3559         py_dwLogLevel = PyInt_FromLong(object->dwLogLevel);
3560         return py_dwLogLevel;
3561 }
3562
3563 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLogLevel(PyObject *py_obj, PyObject *value, void *closure)
3564 {
3565         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3566         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3567         object->dwLogLevel = PyInt_AsLong(value);
3568         return 0;
3569 }
3570
3571 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDebugLevel(PyObject *obj, void *closure)
3572 {
3573         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3574         PyObject *py_dwDebugLevel;
3575         py_dwDebugLevel = PyInt_FromLong(object->dwDebugLevel);
3576         return py_dwDebugLevel;
3577 }
3578
3579 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDebugLevel(PyObject *py_obj, PyObject *value, void *closure)
3580 {
3581         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3582         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3583         object->dwDebugLevel = PyInt_AsLong(value);
3584         return 0;
3585 }
3586
3587 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwForwardTimeout(PyObject *obj, void *closure)
3588 {
3589         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3590         PyObject *py_dwForwardTimeout;
3591         py_dwForwardTimeout = PyInt_FromLong(object->dwForwardTimeout);
3592         return py_dwForwardTimeout;
3593 }
3594
3595 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwForwardTimeout(PyObject *py_obj, PyObject *value, void *closure)
3596 {
3597         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3598         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3599         object->dwForwardTimeout = PyInt_AsLong(value);
3600         return 0;
3601 }
3602
3603 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRpcProtocol(PyObject *obj, void *closure)
3604 {
3605         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3606         PyObject *py_dwRpcProtocol;
3607         py_dwRpcProtocol = PyInt_FromLong(object->dwRpcProtocol);
3608         return py_dwRpcProtocol;
3609 }
3610
3611 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRpcProtocol(PyObject *py_obj, PyObject *value, void *closure)
3612 {
3613         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3614         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3615         object->dwRpcProtocol = PyInt_AsLong(value);
3616         return 0;
3617 }
3618
3619 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwNameCheckFlag(PyObject *obj, void *closure)
3620 {
3621         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3622         PyObject *py_dwNameCheckFlag;
3623         py_dwNameCheckFlag = PyInt_FromLong(object->dwNameCheckFlag);
3624         return py_dwNameCheckFlag;
3625 }
3626
3627 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwNameCheckFlag(PyObject *py_obj, PyObject *value, void *closure)
3628 {
3629         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3630         if (PyLong_Check(value)) {
3631                 object->dwNameCheckFlag = PyLong_AsLongLong(value);
3632         } else if (PyInt_Check(value)) {
3633                 object->dwNameCheckFlag = PyInt_AsLong(value);
3634         } else {
3635                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
3636                   PyInt_Type.tp_name, PyLong_Type.tp_name);
3637                 return -1;
3638         }
3639         return 0;
3640 }
3641
3642 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_cAddressAnswerLimit(PyObject *obj, void *closure)
3643 {
3644         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3645         PyObject *py_cAddressAnswerLimit;
3646         py_cAddressAnswerLimit = PyInt_FromLong(object->cAddressAnswerLimit);
3647         return py_cAddressAnswerLimit;
3648 }
3649
3650 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_cAddressAnswerLimit(PyObject *py_obj, PyObject *value, void *closure)
3651 {
3652         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3653         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3654         object->cAddressAnswerLimit = PyInt_AsLong(value);
3655         return 0;
3656 }
3657
3658 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRecursionRetry(PyObject *obj, void *closure)
3659 {
3660         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3661         PyObject *py_dwRecursionRetry;
3662         py_dwRecursionRetry = PyInt_FromLong(object->dwRecursionRetry);
3663         return py_dwRecursionRetry;
3664 }
3665
3666 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRecursionRetry(PyObject *py_obj, PyObject *value, void *closure)
3667 {
3668         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3669         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3670         object->dwRecursionRetry = PyInt_AsLong(value);
3671         return 0;
3672 }
3673
3674 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRecursionTimeout(PyObject *obj, void *closure)
3675 {
3676         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3677         PyObject *py_dwRecursionTimeout;
3678         py_dwRecursionTimeout = PyInt_FromLong(object->dwRecursionTimeout);
3679         return py_dwRecursionTimeout;
3680 }
3681
3682 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRecursionTimeout(PyObject *py_obj, PyObject *value, void *closure)
3683 {
3684         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3685         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3686         object->dwRecursionTimeout = PyInt_AsLong(value);
3687         return 0;
3688 }
3689
3690 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwMaxCacheTtl(PyObject *obj, void *closure)
3691 {
3692         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3693         PyObject *py_dwMaxCacheTtl;
3694         py_dwMaxCacheTtl = PyInt_FromLong(object->dwMaxCacheTtl);
3695         return py_dwMaxCacheTtl;
3696 }
3697
3698 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwMaxCacheTtl(PyObject *py_obj, PyObject *value, void *closure)
3699 {
3700         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3701         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3702         object->dwMaxCacheTtl = PyInt_AsLong(value);
3703         return 0;
3704 }
3705
3706 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsPollingInterval(PyObject *obj, void *closure)
3707 {
3708         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3709         PyObject *py_dwDsPollingInterval;
3710         py_dwDsPollingInterval = PyInt_FromLong(object->dwDsPollingInterval);
3711         return py_dwDsPollingInterval;
3712 }
3713
3714 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsPollingInterval(PyObject *py_obj, PyObject *value, void *closure)
3715 {
3716         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3717         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3718         object->dwDsPollingInterval = PyInt_AsLong(value);
3719         return 0;
3720 }
3721
3722 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLocalNetPriorityNetMask(PyObject *obj, void *closure)
3723 {
3724         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3725         PyObject *py_dwLocalNetPriorityNetMask;
3726         py_dwLocalNetPriorityNetMask = PyInt_FromLong(object->dwLocalNetPriorityNetMask);
3727         return py_dwLocalNetPriorityNetMask;
3728 }
3729
3730 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLocalNetPriorityNetMask(PyObject *py_obj, PyObject *value, void *closure)
3731 {
3732         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3733         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3734         object->dwLocalNetPriorityNetMask = PyInt_AsLong(value);
3735         return 0;
3736 }
3737
3738 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwScavengingInterval(PyObject *obj, void *closure)
3739 {
3740         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3741         PyObject *py_dwScavengingInterval;
3742         py_dwScavengingInterval = PyInt_FromLong(object->dwScavengingInterval);
3743         return py_dwScavengingInterval;
3744 }
3745
3746 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwScavengingInterval(PyObject *py_obj, PyObject *value, void *closure)
3747 {
3748         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3749         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3750         object->dwScavengingInterval = PyInt_AsLong(value);
3751         return 0;
3752 }
3753
3754 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDefaultRefreshInterval(PyObject *obj, void *closure)
3755 {
3756         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3757         PyObject *py_dwDefaultRefreshInterval;
3758         py_dwDefaultRefreshInterval = PyInt_FromLong(object->dwDefaultRefreshInterval);
3759         return py_dwDefaultRefreshInterval;
3760 }
3761
3762 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDefaultRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
3763 {
3764         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3765         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3766         object->dwDefaultRefreshInterval = PyInt_AsLong(value);
3767         return 0;
3768 }
3769
3770 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDefaultNoRefreshInterval(PyObject *obj, void *closure)
3771 {
3772         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3773         PyObject *py_dwDefaultNoRefreshInterval;
3774         py_dwDefaultNoRefreshInterval = PyInt_FromLong(object->dwDefaultNoRefreshInterval);
3775         return py_dwDefaultNoRefreshInterval;
3776 }
3777
3778 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDefaultNoRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
3779 {
3780         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3781         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3782         object->dwDefaultNoRefreshInterval = PyInt_AsLong(value);
3783         return 0;
3784 }
3785
3786 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLastScavengeTime(PyObject *obj, void *closure)
3787 {
3788         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3789         PyObject *py_dwLastScavengeTime;
3790         py_dwLastScavengeTime = PyInt_FromLong(object->dwLastScavengeTime);
3791         return py_dwLastScavengeTime;
3792 }
3793
3794 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLastScavengeTime(PyObject *py_obj, PyObject *value, void *closure)
3795 {
3796         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3797         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3798         object->dwLastScavengeTime = PyInt_AsLong(value);
3799         return 0;
3800 }
3801
3802 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwEventLogLevel(PyObject *obj, void *closure)
3803 {
3804         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3805         PyObject *py_dwEventLogLevel;
3806         py_dwEventLogLevel = PyInt_FromLong(object->dwEventLogLevel);
3807         return py_dwEventLogLevel;
3808 }
3809
3810 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwEventLogLevel(PyObject *py_obj, PyObject *value, void *closure)
3811 {
3812         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3813         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3814         object->dwEventLogLevel = PyInt_AsLong(value);
3815         return 0;
3816 }
3817
3818 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLogFileMaxSize(PyObject *obj, void *closure)
3819 {
3820         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3821         PyObject *py_dwLogFileMaxSize;
3822         py_dwLogFileMaxSize = PyInt_FromLong(object->dwLogFileMaxSize);
3823         return py_dwLogFileMaxSize;
3824 }
3825
3826 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLogFileMaxSize(PyObject *py_obj, PyObject *value, void *closure)
3827 {
3828         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3829         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3830         object->dwLogFileMaxSize = PyInt_AsLong(value);
3831         return 0;
3832 }
3833
3834 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsForestVersion(PyObject *obj, void *closure)
3835 {
3836         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3837         PyObject *py_dwDsForestVersion;
3838         py_dwDsForestVersion = PyInt_FromLong(object->dwDsForestVersion);
3839         return py_dwDsForestVersion;
3840 }
3841
3842 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsForestVersion(PyObject *py_obj, PyObject *value, void *closure)
3843 {
3844         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3845         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3846         object->dwDsForestVersion = PyInt_AsLong(value);
3847         return 0;
3848 }
3849
3850 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsDomainVersion(PyObject *obj, void *closure)
3851 {
3852         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3853         PyObject *py_dwDsDomainVersion;
3854         py_dwDsDomainVersion = PyInt_FromLong(object->dwDsDomainVersion);
3855         return py_dwDsDomainVersion;
3856 }
3857
3858 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsDomainVersion(PyObject *py_obj, PyObject *value, void *closure)
3859 {
3860         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3861         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3862         object->dwDsDomainVersion = PyInt_AsLong(value);
3863         return 0;
3864 }
3865
3866 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsDsaVersion(PyObject *obj, void *closure)
3867 {
3868         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3869         PyObject *py_dwDsDsaVersion;
3870         py_dwDsDsaVersion = PyInt_FromLong(object->dwDsDsaVersion);
3871         return py_dwDsDsaVersion;
3872 }
3873
3874 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsDsaVersion(PyObject *py_obj, PyObject *value, void *closure)
3875 {
3876         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3877         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3878         object->dwDsDsaVersion = PyInt_AsLong(value);
3879         return 0;
3880 }
3881
3882 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwReserveArray(PyObject *obj, void *closure)
3883 {
3884         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3885         PyObject *py_dwReserveArray;
3886         py_dwReserveArray = PyList_New(4);
3887         if (py_dwReserveArray == NULL) {
3888                 return NULL;
3889         }
3890         {
3891                 int dwReserveArray_cntr_0;
3892                 for (dwReserveArray_cntr_0 = 0; dwReserveArray_cntr_0 < 4; dwReserveArray_cntr_0++) {
3893                         PyObject *py_dwReserveArray_0;
3894                         py_dwReserveArray_0 = PyInt_FromLong(object->dwReserveArray[dwReserveArray_cntr_0]);
3895                         PyList_SetItem(py_dwReserveArray, dwReserveArray_cntr_0, py_dwReserveArray_0);
3896                 }
3897         }
3898         return py_dwReserveArray;
3899 }
3900
3901 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwReserveArray(PyObject *py_obj, PyObject *value, void *closure)
3902 {
3903         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3904         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
3905         {
3906                 int dwReserveArray_cntr_0;
3907                 for (dwReserveArray_cntr_0 = 0; dwReserveArray_cntr_0 < PyList_GET_SIZE(value); dwReserveArray_cntr_0++) {
3908                         PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, dwReserveArray_cntr_0), return -1;);
3909                         object->dwReserveArray[dwReserveArray_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, dwReserveArray_cntr_0));
3910                 }
3911         }
3912         return 0;
3913 }
3914
3915 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fAutoReverseZones(PyObject *obj, void *closure)
3916 {
3917         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3918         PyObject *py_fAutoReverseZones;
3919         py_fAutoReverseZones = PyInt_FromLong(object->fAutoReverseZones);
3920         return py_fAutoReverseZones;
3921 }
3922
3923 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fAutoReverseZones(PyObject *py_obj, PyObject *value, void *closure)
3924 {
3925         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3926         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3927         object->fAutoReverseZones = PyInt_AsLong(value);
3928         return 0;
3929 }
3930
3931 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fAutoCacheUpdate(PyObject *obj, void *closure)
3932 {
3933         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3934         PyObject *py_fAutoCacheUpdate;
3935         py_fAutoCacheUpdate = PyInt_FromLong(object->fAutoCacheUpdate);
3936         return py_fAutoCacheUpdate;
3937 }
3938
3939 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fAutoCacheUpdate(PyObject *py_obj, PyObject *value, void *closure)
3940 {
3941         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3942         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3943         object->fAutoCacheUpdate = PyInt_AsLong(value);
3944         return 0;
3945 }
3946
3947 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
3948 {
3949         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3950         PyObject *py_fRecurseAfterForwarding;
3951         py_fRecurseAfterForwarding = PyInt_FromLong(object->fRecurseAfterForwarding);
3952         return py_fRecurseAfterForwarding;
3953 }
3954
3955 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
3956 {
3957         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3958         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3959         object->fRecurseAfterForwarding = PyInt_AsLong(value);
3960         return 0;
3961 }
3962
3963 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fForwardDelegations(PyObject *obj, void *closure)
3964 {
3965         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3966         PyObject *py_fForwardDelegations;
3967         py_fForwardDelegations = PyInt_FromLong(object->fForwardDelegations);
3968         return py_fForwardDelegations;
3969 }
3970
3971 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fForwardDelegations(PyObject *py_obj, PyObject *value, void *closure)
3972 {
3973         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3974         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3975         object->fForwardDelegations = PyInt_AsLong(value);
3976         return 0;
3977 }
3978
3979 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fNoRecursion(PyObject *obj, void *closure)
3980 {
3981         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3982         PyObject *py_fNoRecursion;
3983         py_fNoRecursion = PyInt_FromLong(object->fNoRecursion);
3984         return py_fNoRecursion;
3985 }
3986
3987 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fNoRecursion(PyObject *py_obj, PyObject *value, void *closure)
3988 {
3989         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
3990         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
3991         object->fNoRecursion = PyInt_AsLong(value);
3992         return 0;
3993 }
3994
3995 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fSecureResponses(PyObject *obj, void *closure)
3996 {
3997         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
3998         PyObject *py_fSecureResponses;
3999         py_fSecureResponses = PyInt_FromLong(object->fSecureResponses);
4000         return py_fSecureResponses;
4001 }
4002
4003 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fSecureResponses(PyObject *py_obj, PyObject *value, void *closure)
4004 {
4005         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
4006         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4007         object->fSecureResponses = PyInt_AsLong(value);
4008         return 0;
4009 }
4010
4011 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fRoundRobin(PyObject *obj, void *closure)
4012 {
4013         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
4014         PyObject *py_fRoundRobin;
4015         py_fRoundRobin = PyInt_FromLong(object->fRoundRobin);
4016         return py_fRoundRobin;
4017 }
4018
4019 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fRoundRobin(PyObject *py_obj, PyObject *value, void *closure)
4020 {
4021         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
4022         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4023         object->fRoundRobin = PyInt_AsLong(value);
4024         return 0;
4025 }
4026
4027 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fLocalNetPriority(PyObject *obj, void *closure)
4028 {
4029         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
4030         PyObject *py_fLocalNetPriority;
4031         py_fLocalNetPriority = PyInt_FromLong(object->fLocalNetPriority);
4032         return py_fLocalNetPriority;
4033 }
4034
4035 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fLocalNetPriority(PyObject *py_obj, PyObject *value, void *closure)
4036 {
4037         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
4038         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4039         object->fLocalNetPriority = PyInt_AsLong(value);
4040         return 0;
4041 }
4042
4043 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fBindSecondaries(PyObject *obj, void *closure)
4044 {
4045         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
4046         PyObject *py_fBindSecondaries;
4047         py_fBindSecondaries = PyInt_FromLong(object->fBindSecondaries);
4048         return py_fBindSecondaries;
4049 }
4050
4051 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fBindSecondaries(PyObject *py_obj, PyObject *value, void *closure)
4052 {
4053         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
4054         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4055         object->fBindSecondaries = PyInt_AsLong(value);
4056         return 0;
4057 }
4058
4059 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fWriteAuthorityNs(PyObject *obj, void *closure)
4060 {
4061         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
4062         PyObject *py_fWriteAuthorityNs;
4063         py_fWriteAuthorityNs = PyInt_FromLong(object->fWriteAuthorityNs);
4064         return py_fWriteAuthorityNs;
4065 }
4066
4067 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fWriteAuthorityNs(PyObject *py_obj, PyObject *value, void *closure)
4068 {
4069         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
4070         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4071         object->fWriteAuthorityNs = PyInt_AsLong(value);
4072         return 0;
4073 }
4074
4075 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fStrictFileParsing(PyObject *obj, void *closure)
4076 {
4077         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
4078         PyObject *py_fStrictFileParsing;
4079         py_fStrictFileParsing = PyInt_FromLong(object->fStrictFileParsing);
4080         return py_fStrictFileParsing;
4081 }
4082
4083 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fStrictFileParsing(PyObject *py_obj, PyObject *value, void *closure)
4084 {
4085         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
4086         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4087         object->fStrictFileParsing = PyInt_AsLong(value);
4088         return 0;
4089 }
4090
4091 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fLooseWildcarding(PyObject *obj, void *closure)
4092 {
4093         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
4094         PyObject *py_fLooseWildcarding;
4095         py_fLooseWildcarding = PyInt_FromLong(object->fLooseWildcarding);
4096         return py_fLooseWildcarding;
4097 }
4098
4099 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fLooseWildcarding(PyObject *py_obj, PyObject *value, void *closure)
4100 {
4101         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
4102         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4103         object->fLooseWildcarding = PyInt_AsLong(value);
4104         return 0;
4105 }
4106
4107 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fDefaultAgingState(PyObject *obj, void *closure)
4108 {
4109         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
4110         PyObject *py_fDefaultAgingState;
4111         py_fDefaultAgingState = PyInt_FromLong(object->fDefaultAgingState);
4112         return py_fDefaultAgingState;
4113 }
4114
4115 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fDefaultAgingState(PyObject *py_obj, PyObject *value, void *closure)
4116 {
4117         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
4118         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4119         object->fDefaultAgingState = PyInt_AsLong(value);
4120         return 0;
4121 }
4122
4123 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fReserveArray(PyObject *obj, void *closure)
4124 {
4125         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
4126         PyObject *py_fReserveArray;
4127         py_fReserveArray = PyList_New(15);
4128         if (py_fReserveArray == NULL) {
4129                 return NULL;
4130         }
4131         {
4132                 int fReserveArray_cntr_0;
4133                 for (fReserveArray_cntr_0 = 0; fReserveArray_cntr_0 < 15; fReserveArray_cntr_0++) {
4134                         PyObject *py_fReserveArray_0;
4135                         py_fReserveArray_0 = PyInt_FromLong(object->fReserveArray[fReserveArray_cntr_0]);
4136                         PyList_SetItem(py_fReserveArray, fReserveArray_cntr_0, py_fReserveArray_0);
4137                 }
4138         }
4139         return py_fReserveArray;
4140 }
4141
4142 static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fReserveArray(PyObject *py_obj, PyObject *value, void *closure)
4143 {
4144         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
4145         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
4146         {
4147                 int fReserveArray_cntr_0;
4148                 for (fReserveArray_cntr_0 = 0; fReserveArray_cntr_0 < PyList_GET_SIZE(value); fReserveArray_cntr_0++) {
4149                         PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, fReserveArray_cntr_0), return -1;);
4150                         object->fReserveArray[fReserveArray_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, fReserveArray_cntr_0));
4151                 }
4152         }
4153         return 0;
4154 }
4155
4156 static PyGetSetDef py_DNS_RPC_SERVER_INFO_DOTNET_getsetters[] = {
4157         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRpcStructureVersion, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRpcStructureVersion },
4158         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwReserved0, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwReserved0 },
4159         { discard_const_p(char, "dwVersion"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwVersion, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwVersion },
4160         { discard_const_p(char, "fBootMethod"), py_DNS_RPC_SERVER_INFO_DOTNET_get_fBootMethod, py_DNS_RPC_SERVER_INFO_DOTNET_set_fBootMethod },
4161         { discard_const_p(char, "fAdminConfigured"), py_DNS_RPC_SERVER_INFO_DOTNET_get_fAdminConfigured, py_DNS_RPC_SERVER_INFO_DOTNET_set_fAdminConfigured },
4162         { discard_const_p(char, "fAllowUpdate"), py_DNS_RPC_SERVER_INFO_DOTNET_get_fAllowUpdate, py_DNS_RPC_SERVER_INFO_DOTNET_set_fAllowUpdate },
4163         { discard_const_p(char, "fDsAvailable"), py_DNS_RPC_SERVER_INFO_DOTNET_get_fDsAvailable, py_DNS_RPC_SERVER_INFO_DOTNET_set_fDsAvailable },
4164         { discard_const_p(char, "pszServerName"), py_DNS_RPC_SERVER_INFO_DOTNET_get_pszServerName, py_DNS_RPC_SERVER_INFO_DOTNET_set_pszServerName },
4165         { discard_const_p(char, "pszDsContainer"), py_DNS_RPC_SERVER_INFO_DOTNET_get_pszDsContainer, py_DNS_RPC_SERVER_INFO_DOTNET_set_pszDsContainer },
4166         { discard_const_p(char, "aipServerAddrs"), py_DNS_RPC_SERVER_INFO_DOTNET_get_aipServerAddrs, py_DNS_RPC_SERVER_INFO_DOTNET_set_aipServerAddrs },
4167         { discard_const_p(char, "aipListenAddrs"), py_DNS_RPC_SERVER_INFO_DOTNET_get_aipListenAddrs, py_DNS_RPC_SERVER_INFO_DOTNET_set_aipListenAddrs },
4168         { discard_const_p(char, "aipForwarders"), py_DNS_RPC_SERVER_INFO_DOTNET_get_aipForwarders, py_DNS_RPC_SERVER_INFO_DOTNET_set_aipForwarders },
4169         { discard_const_p(char, "aipLogFilter"), py_DNS_RPC_SERVER_INFO_DOTNET_get_aipLogFilter, py_DNS_RPC_SERVER_INFO_DOTNET_set_aipLogFilter },
4170         { discard_const_p(char, "pwszLogFilePath"), py_DNS_RPC_SERVER_INFO_DOTNET_get_pwszLogFilePath, py_DNS_RPC_SERVER_INFO_DOTNET_set_pwszLogFilePath },
4171         { discard_const_p(char, "pszDomainName"), py_DNS_RPC_SERVER_INFO_DOTNET_get_pszDomainName, py_DNS_RPC_SERVER_INFO_DOTNET_set_pszDomainName },
4172         { discard_const_p(char, "pszForestName"), py_DNS_RPC_SERVER_INFO_DOTNET_get_pszForestName, py_DNS_RPC_SERVER_INFO_DOTNET_set_pszForestName },
4173         { discard_const_p(char, "pszDomainDirectoryPartition"), py_DNS_RPC_SERVER_INFO_DOTNET_get_pszDomainDirectoryPartition, py_DNS_RPC_SERVER_INFO_DOTNET_set_pszDomainDirectoryPartition },
4174         { discard_const_p(char, "pszForestDirectoryPartition"), py_DNS_RPC_SERVER_INFO_DOTNET_get_pszForestDirectoryPartition, py_DNS_RPC_SERVER_INFO_DOTNET_set_pszForestDirectoryPartition },
4175         { discard_const_p(char, "pExtensions"), py_DNS_RPC_SERVER_INFO_DOTNET_get_pExtensions, py_DNS_RPC_SERVER_INFO_DOTNET_set_pExtensions },
4176         { discard_const_p(char, "dwLogLevel"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLogLevel, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLogLevel },
4177         { discard_const_p(char, "dwDebugLevel"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDebugLevel, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDebugLevel },
4178         { discard_const_p(char, "dwForwardTimeout"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwForwardTimeout, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwForwardTimeout },
4179         { discard_const_p(char, "dwRpcProtocol"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRpcProtocol, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRpcProtocol },
4180         { discard_const_p(char, "dwNameCheckFlag"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwNameCheckFlag, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwNameCheckFlag },
4181         { discard_const_p(char, "cAddressAnswerLimit"), py_DNS_RPC_SERVER_INFO_DOTNET_get_cAddressAnswerLimit, py_DNS_RPC_SERVER_INFO_DOTNET_set_cAddressAnswerLimit },
4182         { discard_const_p(char, "dwRecursionRetry"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRecursionRetry, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRecursionRetry },
4183         { discard_const_p(char, "dwRecursionTimeout"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRecursionTimeout, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRecursionTimeout },
4184         { discard_const_p(char, "dwMaxCacheTtl"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwMaxCacheTtl, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwMaxCacheTtl },
4185         { discard_const_p(char, "dwDsPollingInterval"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsPollingInterval, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsPollingInterval },
4186         { discard_const_p(char, "dwLocalNetPriorityNetMask"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLocalNetPriorityNetMask, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLocalNetPriorityNetMask },
4187         { discard_const_p(char, "dwScavengingInterval"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwScavengingInterval, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwScavengingInterval },
4188         { discard_const_p(char, "dwDefaultRefreshInterval"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDefaultRefreshInterval, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDefaultRefreshInterval },
4189         { discard_const_p(char, "dwDefaultNoRefreshInterval"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDefaultNoRefreshInterval, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDefaultNoRefreshInterval },
4190         { discard_const_p(char, "dwLastScavengeTime"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLastScavengeTime, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLastScavengeTime },
4191         { discard_const_p(char, "dwEventLogLevel"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwEventLogLevel, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwEventLogLevel },
4192         { discard_const_p(char, "dwLogFileMaxSize"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLogFileMaxSize, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLogFileMaxSize },
4193         { discard_const_p(char, "dwDsForestVersion"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsForestVersion, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsForestVersion },
4194         { discard_const_p(char, "dwDsDomainVersion"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsDomainVersion, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsDomainVersion },
4195         { discard_const_p(char, "dwDsDsaVersion"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsDsaVersion, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsDsaVersion },
4196         { discard_const_p(char, "dwReserveArray"), py_DNS_RPC_SERVER_INFO_DOTNET_get_dwReserveArray, py_DNS_RPC_SERVER_INFO_DOTNET_set_dwReserveArray },
4197         { discard_const_p(char, "fAutoReverseZones"), py_DNS_RPC_SERVER_INFO_DOTNET_get_fAutoReverseZones, py_DNS_RPC_SERVER_INFO_DOTNET_set_fAutoReverseZones },
4198         { discard_const_p(char, "fAutoCacheUpdate"), py_DNS_RPC_SERVER_INFO_DOTNET_get_fAutoCacheUpdate, py_DNS_RPC_SERVER_INFO_DOTNET_set_fAutoCacheUpdate },
4199         { discard_const_p(char, "fRecurseAfterForwarding"), py_DNS_RPC_SERVER_INFO_DOTNET_get_fRecurseAfterForwarding, py_DNS_RPC_SERVER_INFO_DOTNET_set_fRecurseAfterForwarding },
4200         { discard_const_p(char, "fForwardDelegations"), py_DNS_RPC_SERVER_INFO_DOTNET_get_fForwardDelegations, py_DNS_RPC_SERVER_INFO_DOTNET_set_fForwardDelegations },
4201         { discard_const_p(char, "fNoRecursion"), py_DNS_RPC_SERVER_INFO_DOTNET_get_fNoRecursion, py_DNS_RPC_SERVER_INFO_DOTNET_set_fNoRecursion },
4202         { discard_const_p(char, "fSecureResponses"), py_DNS_RPC_SERVER_INFO_DOTNET_get_fSecureResponses, py_DNS_RPC_SERVER_INFO_DOTNET_set_fSecureResponses },
4203         { discard_const_p(char, "fRoundRobin"), py_DNS_RPC_SERVER_INFO_DOTNET_get_fRoundRobin, py_DNS_RPC_SERVER_INFO_DOTNET_set_fRoundRobin },
4204         { discard_const_p(char, "fLocalNetPriority"), py_DNS_RPC_SERVER_INFO_DOTNET_get_fLocalNetPriority, py_DNS_RPC_SERVER_INFO_DOTNET_set_fLocalNetPriority },
4205         { discard_const_p(char, "fBindSecondaries"), py_DNS_RPC_SERVER_INFO_DOTNET_get_fBindSecondaries, py_DNS_RPC_SERVER_INFO_DOTNET_set_fBindSecondaries },
4206         { discard_const_p(char, "fWriteAuthorityNs"), py_DNS_RPC_SERVER_INFO_DOTNET_get_fWriteAuthorityNs, py_DNS_RPC_SERVER_INFO_DOTNET_set_fWriteAuthorityNs },
4207         { discard_const_p(char, "fStrictFileParsing"), py_DNS_RPC_SERVER_INFO_DOTNET_get_fStrictFileParsing, py_DNS_RPC_SERVER_INFO_DOTNET_set_fStrictFileParsing },
4208         { discard_const_p(char, "fLooseWildcarding"), py_DNS_RPC_SERVER_INFO_DOTNET_get_fLooseWildcarding, py_DNS_RPC_SERVER_INFO_DOTNET_set_fLooseWildcarding },
4209         { discard_const_p(char, "fDefaultAgingState"), py_DNS_RPC_SERVER_INFO_DOTNET_get_fDefaultAgingState, py_DNS_RPC_SERVER_INFO_DOTNET_set_fDefaultAgingState },
4210         { discard_const_p(char, "fReserveArray"), py_DNS_RPC_SERVER_INFO_DOTNET_get_fReserveArray, py_DNS_RPC_SERVER_INFO_DOTNET_set_fReserveArray },
4211         { NULL }
4212 };
4213
4214 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
4215 {
4216         return pytalloc_new(struct DNS_RPC_SERVER_INFO_DOTNET, type);
4217 }
4218
4219 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_ndr_pack(PyObject *py_obj)
4220 {
4221         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
4222         DATA_BLOB blob;
4223         enum ndr_err_code err;
4224         err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_SERVER_INFO_DOTNET);
4225         if (err != NDR_ERR_SUCCESS) {
4226                 PyErr_SetNdrError(err);
4227                 return NULL;
4228         }
4229
4230         return PyString_FromStringAndSize((char *)blob.data, blob.length);
4231 }
4232
4233 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
4234 {
4235         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
4236         DATA_BLOB blob;
4237         int blob_length = 0;
4238         enum ndr_err_code err;
4239         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
4240         PyObject *allow_remaining_obj = NULL;
4241         bool allow_remaining = false;
4242
4243         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
4244                 discard_const_p(char *, kwnames),
4245                 &blob.data, &blob_length,
4246                 &allow_remaining_obj)) {
4247                 return NULL;
4248         }
4249         blob.length = blob_length;
4250
4251         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
4252                 allow_remaining = true;
4253         }
4254
4255         if (allow_remaining) {
4256                 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);
4257         } else {
4258                 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);
4259         }
4260         if (err != NDR_ERR_SUCCESS) {
4261                 PyErr_SetNdrError(err);
4262                 return NULL;
4263         }
4264
4265         Py_RETURN_NONE;
4266 }
4267
4268 static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_ndr_print(PyObject *py_obj)
4269 {
4270         struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
4271         PyObject *ret;
4272         char *retstr;
4273
4274         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);
4275         ret = PyString_FromString(retstr);
4276         talloc_free(retstr);
4277
4278         return ret;
4279 }
4280
4281 static PyMethodDef py_DNS_RPC_SERVER_INFO_DOTNET_methods[] = {
4282         { "__ndr_pack__", (PyCFunction)py_DNS_RPC_SERVER_INFO_DOTNET_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
4283         { "__ndr_unpack__", (PyCFunction)py_DNS_RPC_SERVER_INFO_DOTNET_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
4284         { "__ndr_print__", (PyCFunction)py_DNS_RPC_SERVER_INFO_DOTNET_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
4285         { NULL, NULL, 0, NULL }
4286 };
4287
4288
4289 static PyTypeObject DNS_RPC_SERVER_INFO_DOTNET_Type = {
4290         PyObject_HEAD_INIT(NULL) 0,
4291         .tp_name = "dnsserver.DNS_RPC_SERVER_INFO_DOTNET",
4292         .tp_getset = py_DNS_RPC_SERVER_INFO_DOTNET_getsetters,
4293         .tp_methods = py_DNS_RPC_SERVER_INFO_DOTNET_methods,
4294         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
4295         .tp_basicsize = sizeof(pytalloc_Object),
4296         .tp_new = py_DNS_RPC_SERVER_INFO_DOTNET_new,
4297 };
4298
4299
4300 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRpcStructureVersion(PyObject *obj, void *closure)
4301 {
4302         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4303         PyObject *py_dwRpcStructureVersion;
4304         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
4305         return py_dwRpcStructureVersion;
4306 }
4307
4308 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
4309 {
4310         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4311         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4312         object->dwRpcStructureVersion = PyInt_AsLong(value);
4313         return 0;
4314 }
4315
4316 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwReserved0(PyObject *obj, void *closure)
4317 {
4318         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4319         PyObject *py_dwReserved0;
4320         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
4321         return py_dwReserved0;
4322 }
4323
4324 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
4325 {
4326         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4327         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4328         object->dwReserved0 = PyInt_AsLong(value);
4329         return 0;
4330 }
4331
4332 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwVersion(PyObject *obj, void *closure)
4333 {
4334         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4335         PyObject *py_dwVersion;
4336         py_dwVersion = PyInt_FromLong(object->dwVersion);
4337         return py_dwVersion;
4338 }
4339
4340 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwVersion(PyObject *py_obj, PyObject *value, void *closure)
4341 {
4342         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4343         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4344         object->dwVersion = PyInt_AsLong(value);
4345         return 0;
4346 }
4347
4348 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fBootMethod(PyObject *obj, void *closure)
4349 {
4350         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4351         PyObject *py_fBootMethod;
4352         py_fBootMethod = PyInt_FromLong(object->fBootMethod);
4353         return py_fBootMethod;
4354 }
4355
4356 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fBootMethod(PyObject *py_obj, PyObject *value, void *closure)
4357 {
4358         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4359         if (PyLong_Check(value)) {
4360                 object->fBootMethod = PyLong_AsLongLong(value);
4361         } else if (PyInt_Check(value)) {
4362                 object->fBootMethod = PyInt_AsLong(value);
4363         } else {
4364                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
4365                   PyInt_Type.tp_name, PyLong_Type.tp_name);
4366                 return -1;
4367         }
4368         return 0;
4369 }
4370
4371 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAdminConfigured(PyObject *obj, void *closure)
4372 {
4373         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4374         PyObject *py_fAdminConfigured;
4375         py_fAdminConfigured = PyInt_FromLong(object->fAdminConfigured);
4376         return py_fAdminConfigured;
4377 }
4378
4379 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAdminConfigured(PyObject *py_obj, PyObject *value, void *closure)
4380 {
4381         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4382         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4383         object->fAdminConfigured = PyInt_AsLong(value);
4384         return 0;
4385 }
4386
4387 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAllowUpdate(PyObject *obj, void *closure)
4388 {
4389         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4390         PyObject *py_fAllowUpdate;
4391         py_fAllowUpdate = PyInt_FromLong(object->fAllowUpdate);
4392         return py_fAllowUpdate;
4393 }
4394
4395 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
4396 {
4397         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4398         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4399         object->fAllowUpdate = PyInt_AsLong(value);
4400         return 0;
4401 }
4402
4403 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fDsAvailable(PyObject *obj, void *closure)
4404 {
4405         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4406         PyObject *py_fDsAvailable;
4407         py_fDsAvailable = PyInt_FromLong(object->fDsAvailable);
4408         return py_fDsAvailable;
4409 }
4410
4411 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fDsAvailable(PyObject *py_obj, PyObject *value, void *closure)
4412 {
4413         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4414         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4415         object->fDsAvailable = PyInt_AsLong(value);
4416         return 0;
4417 }
4418
4419 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszServerName(PyObject *obj, void *closure)
4420 {
4421         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4422         PyObject *py_pszServerName;
4423         if (object->pszServerName == NULL) {
4424                 py_pszServerName = Py_None;
4425                 Py_INCREF(py_pszServerName);
4426         } else {
4427                 if (object->pszServerName == NULL) {
4428                         py_pszServerName = Py_None;
4429                         Py_INCREF(py_pszServerName);
4430                 } else {
4431                         py_pszServerName = PyUnicode_Decode(object->pszServerName, strlen(object->pszServerName), "utf-8", "ignore");
4432                 }
4433         }
4434         return py_pszServerName;
4435 }
4436
4437 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszServerName(PyObject *py_obj, PyObject *value, void *closure)
4438 {
4439         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4440         if (value == Py_None) {
4441                 object->pszServerName = NULL;
4442         } else {
4443                 object->pszServerName = NULL;
4444                 if (PyUnicode_Check(value)) {
4445                         object->pszServerName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
4446                 } else if (PyString_Check(value)) {
4447                         object->pszServerName = PyString_AS_STRING(value);
4448                 } else {
4449                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
4450                         return -1;
4451                 }
4452         }
4453         return 0;
4454 }
4455
4456 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszDsContainer(PyObject *obj, void *closure)
4457 {
4458         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4459         PyObject *py_pszDsContainer;
4460         if (object->pszDsContainer == NULL) {
4461                 py_pszDsContainer = Py_None;
4462                 Py_INCREF(py_pszDsContainer);
4463         } else {
4464                 if (object->pszDsContainer == NULL) {
4465                         py_pszDsContainer = Py_None;
4466                         Py_INCREF(py_pszDsContainer);
4467                 } else {
4468                         py_pszDsContainer = PyUnicode_Decode(object->pszDsContainer, strlen(object->pszDsContainer), "utf-8", "ignore");
4469                 }
4470         }
4471         return py_pszDsContainer;
4472 }
4473
4474 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszDsContainer(PyObject *py_obj, PyObject *value, void *closure)
4475 {
4476         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4477         if (value == Py_None) {
4478                 object->pszDsContainer = NULL;
4479         } else {
4480                 object->pszDsContainer = NULL;
4481                 if (PyUnicode_Check(value)) {
4482                         object->pszDsContainer = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
4483                 } else if (PyString_Check(value)) {
4484                         object->pszDsContainer = PyString_AS_STRING(value);
4485                 } else {
4486                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
4487                         return -1;
4488                 }
4489         }
4490         return 0;
4491 }
4492
4493 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipServerAddrs(PyObject *obj, void *closure)
4494 {
4495         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4496         PyObject *py_aipServerAddrs;
4497         if (object->aipServerAddrs == NULL) {
4498                 py_aipServerAddrs = Py_None;
4499                 Py_INCREF(py_aipServerAddrs);
4500         } else {
4501                 py_aipServerAddrs = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipServerAddrs, object->aipServerAddrs);
4502         }
4503         return py_aipServerAddrs;
4504 }
4505
4506 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipServerAddrs(PyObject *py_obj, PyObject *value, void *closure)
4507 {
4508         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4509         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipServerAddrs);
4510         if (value == Py_None) {
4511                 object->aipServerAddrs = NULL;
4512         } else {
4513                 object->aipServerAddrs = NULL;
4514                 PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
4515                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
4516                         PyErr_NoMemory();
4517                         return -1;
4518                 }
4519                 object->aipServerAddrs = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
4520         }
4521         return 0;
4522 }
4523
4524 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipListenAddrs(PyObject *obj, void *closure)
4525 {
4526         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4527         PyObject *py_aipListenAddrs;
4528         if (object->aipListenAddrs == NULL) {
4529                 py_aipListenAddrs = Py_None;
4530                 Py_INCREF(py_aipListenAddrs);
4531         } else {
4532                 py_aipListenAddrs = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipListenAddrs, object->aipListenAddrs);
4533         }
4534         return py_aipListenAddrs;
4535 }
4536
4537 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipListenAddrs(PyObject *py_obj, PyObject *value, void *closure)
4538 {
4539         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4540         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipListenAddrs);
4541         if (value == Py_None) {
4542                 object->aipListenAddrs = NULL;
4543         } else {
4544                 object->aipListenAddrs = NULL;
4545                 PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
4546                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
4547                         PyErr_NoMemory();
4548                         return -1;
4549                 }
4550                 object->aipListenAddrs = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
4551         }
4552         return 0;
4553 }
4554
4555 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipForwarders(PyObject *obj, void *closure)
4556 {
4557         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4558         PyObject *py_aipForwarders;
4559         if (object->aipForwarders == NULL) {
4560                 py_aipForwarders = Py_None;
4561                 Py_INCREF(py_aipForwarders);
4562         } else {
4563                 py_aipForwarders = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipForwarders, object->aipForwarders);
4564         }
4565         return py_aipForwarders;
4566 }
4567
4568 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipForwarders(PyObject *py_obj, PyObject *value, void *closure)
4569 {
4570         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4571         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipForwarders);
4572         if (value == Py_None) {
4573                 object->aipForwarders = NULL;
4574         } else {
4575                 object->aipForwarders = NULL;
4576                 PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
4577                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
4578                         PyErr_NoMemory();
4579                         return -1;
4580                 }
4581                 object->aipForwarders = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
4582         }
4583         return 0;
4584 }
4585
4586 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipLogFilter(PyObject *obj, void *closure)
4587 {
4588         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4589         PyObject *py_aipLogFilter;
4590         if (object->aipLogFilter == NULL) {
4591                 py_aipLogFilter = Py_None;
4592                 Py_INCREF(py_aipLogFilter);
4593         } else {
4594                 py_aipLogFilter = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipLogFilter, object->aipLogFilter);
4595         }
4596         return py_aipLogFilter;
4597 }
4598
4599 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipLogFilter(PyObject *py_obj, PyObject *value, void *closure)
4600 {
4601         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4602         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipLogFilter);
4603         if (value == Py_None) {
4604                 object->aipLogFilter = NULL;
4605         } else {
4606                 object->aipLogFilter = NULL;
4607                 PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
4608                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
4609                         PyErr_NoMemory();
4610                         return -1;
4611                 }
4612                 object->aipLogFilter = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
4613         }
4614         return 0;
4615 }
4616
4617 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pwszLogFilePath(PyObject *obj, void *closure)
4618 {
4619         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4620         PyObject *py_pwszLogFilePath;
4621         if (object->pwszLogFilePath == NULL) {
4622                 py_pwszLogFilePath = Py_None;
4623                 Py_INCREF(py_pwszLogFilePath);
4624         } else {
4625                 if (object->pwszLogFilePath == NULL) {
4626                         py_pwszLogFilePath = Py_None;
4627                         Py_INCREF(py_pwszLogFilePath);
4628                 } else {
4629                         py_pwszLogFilePath = PyUnicode_Decode(object->pwszLogFilePath, strlen(object->pwszLogFilePath), "utf-8", "ignore");
4630                 }
4631         }
4632         return py_pwszLogFilePath;
4633 }
4634
4635 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pwszLogFilePath(PyObject *py_obj, PyObject *value, void *closure)
4636 {
4637         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4638         if (value == Py_None) {
4639                 object->pwszLogFilePath = NULL;
4640         } else {
4641                 object->pwszLogFilePath = NULL;
4642                 if (PyUnicode_Check(value)) {
4643                         object->pwszLogFilePath = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
4644                 } else if (PyString_Check(value)) {
4645                         object->pwszLogFilePath = PyString_AS_STRING(value);
4646                 } else {
4647                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
4648                         return -1;
4649                 }
4650         }
4651         return 0;
4652 }
4653
4654 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszDomainName(PyObject *obj, void *closure)
4655 {
4656         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4657         PyObject *py_pszDomainName;
4658         if (object->pszDomainName == NULL) {
4659                 py_pszDomainName = Py_None;
4660                 Py_INCREF(py_pszDomainName);
4661         } else {
4662                 if (object->pszDomainName == NULL) {
4663                         py_pszDomainName = Py_None;
4664                         Py_INCREF(py_pszDomainName);
4665                 } else {
4666                         py_pszDomainName = PyUnicode_Decode(object->pszDomainName, strlen(object->pszDomainName), "utf-8", "ignore");
4667                 }
4668         }
4669         return py_pszDomainName;
4670 }
4671
4672 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszDomainName(PyObject *py_obj, PyObject *value, void *closure)
4673 {
4674         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4675         if (value == Py_None) {
4676                 object->pszDomainName = NULL;
4677         } else {
4678                 object->pszDomainName = NULL;
4679                 if (PyUnicode_Check(value)) {
4680                         object->pszDomainName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
4681                 } else if (PyString_Check(value)) {
4682                         object->pszDomainName = PyString_AS_STRING(value);
4683                 } else {
4684                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
4685                         return -1;
4686                 }
4687         }
4688         return 0;
4689 }
4690
4691 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszForestName(PyObject *obj, void *closure)
4692 {
4693         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4694         PyObject *py_pszForestName;
4695         if (object->pszForestName == NULL) {
4696                 py_pszForestName = Py_None;
4697                 Py_INCREF(py_pszForestName);
4698         } else {
4699                 if (object->pszForestName == NULL) {
4700                         py_pszForestName = Py_None;
4701                         Py_INCREF(py_pszForestName);
4702                 } else {
4703                         py_pszForestName = PyUnicode_Decode(object->pszForestName, strlen(object->pszForestName), "utf-8", "ignore");
4704                 }
4705         }
4706         return py_pszForestName;
4707 }
4708
4709 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszForestName(PyObject *py_obj, PyObject *value, void *closure)
4710 {
4711         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4712         if (value == Py_None) {
4713                 object->pszForestName = NULL;
4714         } else {
4715                 object->pszForestName = NULL;
4716                 if (PyUnicode_Check(value)) {
4717                         object->pszForestName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
4718                 } else if (PyString_Check(value)) {
4719                         object->pszForestName = PyString_AS_STRING(value);
4720                 } else {
4721                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
4722                         return -1;
4723                 }
4724         }
4725         return 0;
4726 }
4727
4728 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszDomainDirectoryPartition(PyObject *obj, void *closure)
4729 {
4730         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4731         PyObject *py_pszDomainDirectoryPartition;
4732         if (object->pszDomainDirectoryPartition == NULL) {
4733                 py_pszDomainDirectoryPartition = Py_None;
4734                 Py_INCREF(py_pszDomainDirectoryPartition);
4735         } else {
4736                 if (object->pszDomainDirectoryPartition == NULL) {
4737                         py_pszDomainDirectoryPartition = Py_None;
4738                         Py_INCREF(py_pszDomainDirectoryPartition);
4739                 } else {
4740                         py_pszDomainDirectoryPartition = PyUnicode_Decode(object->pszDomainDirectoryPartition, strlen(object->pszDomainDirectoryPartition), "utf-8", "ignore");
4741                 }
4742         }
4743         return py_pszDomainDirectoryPartition;
4744 }
4745
4746 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszDomainDirectoryPartition(PyObject *py_obj, PyObject *value, void *closure)
4747 {
4748         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4749         if (value == Py_None) {
4750                 object->pszDomainDirectoryPartition = NULL;
4751         } else {
4752                 object->pszDomainDirectoryPartition = NULL;
4753                 if (PyUnicode_Check(value)) {
4754                         object->pszDomainDirectoryPartition = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
4755                 } else if (PyString_Check(value)) {
4756                         object->pszDomainDirectoryPartition = PyString_AS_STRING(value);
4757                 } else {
4758                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
4759                         return -1;
4760                 }
4761         }
4762         return 0;
4763 }
4764
4765 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszForestDirectoryPartition(PyObject *obj, void *closure)
4766 {
4767         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4768         PyObject *py_pszForestDirectoryPartition;
4769         if (object->pszForestDirectoryPartition == NULL) {
4770                 py_pszForestDirectoryPartition = Py_None;
4771                 Py_INCREF(py_pszForestDirectoryPartition);
4772         } else {
4773                 if (object->pszForestDirectoryPartition == NULL) {
4774                         py_pszForestDirectoryPartition = Py_None;
4775                         Py_INCREF(py_pszForestDirectoryPartition);
4776                 } else {
4777                         py_pszForestDirectoryPartition = PyUnicode_Decode(object->pszForestDirectoryPartition, strlen(object->pszForestDirectoryPartition), "utf-8", "ignore");
4778                 }
4779         }
4780         return py_pszForestDirectoryPartition;
4781 }
4782
4783 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszForestDirectoryPartition(PyObject *py_obj, PyObject *value, void *closure)
4784 {
4785         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4786         if (value == Py_None) {
4787                 object->pszForestDirectoryPartition = NULL;
4788         } else {
4789                 object->pszForestDirectoryPartition = NULL;
4790                 if (PyUnicode_Check(value)) {
4791                         object->pszForestDirectoryPartition = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
4792                 } else if (PyString_Check(value)) {
4793                         object->pszForestDirectoryPartition = PyString_AS_STRING(value);
4794                 } else {
4795                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
4796                         return -1;
4797                 }
4798         }
4799         return 0;
4800 }
4801
4802 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pExtensions(PyObject *obj, void *closure)
4803 {
4804         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4805         PyObject *py_pExtensions;
4806         py_pExtensions = PyList_New(6);
4807         if (py_pExtensions == NULL) {
4808                 return NULL;
4809         }
4810         {
4811                 int pExtensions_cntr_0;
4812                 for (pExtensions_cntr_0 = 0; pExtensions_cntr_0 < 6; pExtensions_cntr_0++) {
4813                         PyObject *py_pExtensions_0;
4814                         py_pExtensions_0 = pytalloc_reference_ex(&DNS_EXTENSION_Type, object->pExtensions, &object->pExtensions[pExtensions_cntr_0]);
4815                         PyList_SetItem(py_pExtensions, pExtensions_cntr_0, py_pExtensions_0);
4816                 }
4817         }
4818         return py_pExtensions;
4819 }
4820
4821 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pExtensions(PyObject *py_obj, PyObject *value, void *closure)
4822 {
4823         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4824         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
4825         {
4826                 int pExtensions_cntr_0;
4827                 for (pExtensions_cntr_0 = 0; pExtensions_cntr_0 < PyList_GET_SIZE(value); pExtensions_cntr_0++) {
4828                         PY_CHECK_TYPE(&DNS_EXTENSION_Type, PyList_GET_ITEM(value, pExtensions_cntr_0), return -1;);
4829                         if (talloc_reference(object->pExtensions, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, pExtensions_cntr_0))) == NULL) {
4830                                 PyErr_NoMemory();
4831                                 return -1;
4832                         }
4833                         object->pExtensions[pExtensions_cntr_0] = *(struct DNS_EXTENSION *)pytalloc_get_ptr(PyList_GET_ITEM(value, pExtensions_cntr_0));
4834                 }
4835         }
4836         return 0;
4837 }
4838
4839 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLogLevel(PyObject *obj, void *closure)
4840 {
4841         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4842         PyObject *py_dwLogLevel;
4843         py_dwLogLevel = PyInt_FromLong(object->dwLogLevel);
4844         return py_dwLogLevel;
4845 }
4846
4847 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLogLevel(PyObject *py_obj, PyObject *value, void *closure)
4848 {
4849         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4850         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4851         object->dwLogLevel = PyInt_AsLong(value);
4852         return 0;
4853 }
4854
4855 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDebugLevel(PyObject *obj, void *closure)
4856 {
4857         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4858         PyObject *py_dwDebugLevel;
4859         py_dwDebugLevel = PyInt_FromLong(object->dwDebugLevel);
4860         return py_dwDebugLevel;
4861 }
4862
4863 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDebugLevel(PyObject *py_obj, PyObject *value, void *closure)
4864 {
4865         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4866         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4867         object->dwDebugLevel = PyInt_AsLong(value);
4868         return 0;
4869 }
4870
4871 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwForwardTimeout(PyObject *obj, void *closure)
4872 {
4873         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4874         PyObject *py_dwForwardTimeout;
4875         py_dwForwardTimeout = PyInt_FromLong(object->dwForwardTimeout);
4876         return py_dwForwardTimeout;
4877 }
4878
4879 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwForwardTimeout(PyObject *py_obj, PyObject *value, void *closure)
4880 {
4881         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4882         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4883         object->dwForwardTimeout = PyInt_AsLong(value);
4884         return 0;
4885 }
4886
4887 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRpcProtocol(PyObject *obj, void *closure)
4888 {
4889         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4890         PyObject *py_dwRpcProtocol;
4891         py_dwRpcProtocol = PyInt_FromLong(object->dwRpcProtocol);
4892         return py_dwRpcProtocol;
4893 }
4894
4895 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRpcProtocol(PyObject *py_obj, PyObject *value, void *closure)
4896 {
4897         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4898         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4899         object->dwRpcProtocol = PyInt_AsLong(value);
4900         return 0;
4901 }
4902
4903 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwNameCheckFlag(PyObject *obj, void *closure)
4904 {
4905         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4906         PyObject *py_dwNameCheckFlag;
4907         py_dwNameCheckFlag = PyInt_FromLong(object->dwNameCheckFlag);
4908         return py_dwNameCheckFlag;
4909 }
4910
4911 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwNameCheckFlag(PyObject *py_obj, PyObject *value, void *closure)
4912 {
4913         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4914         if (PyLong_Check(value)) {
4915                 object->dwNameCheckFlag = PyLong_AsLongLong(value);
4916         } else if (PyInt_Check(value)) {
4917                 object->dwNameCheckFlag = PyInt_AsLong(value);
4918         } else {
4919                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
4920                   PyInt_Type.tp_name, PyLong_Type.tp_name);
4921                 return -1;
4922         }
4923         return 0;
4924 }
4925
4926 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_cAddressAnswerLimit(PyObject *obj, void *closure)
4927 {
4928         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4929         PyObject *py_cAddressAnswerLimit;
4930         py_cAddressAnswerLimit = PyInt_FromLong(object->cAddressAnswerLimit);
4931         return py_cAddressAnswerLimit;
4932 }
4933
4934 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_cAddressAnswerLimit(PyObject *py_obj, PyObject *value, void *closure)
4935 {
4936         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4937         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4938         object->cAddressAnswerLimit = PyInt_AsLong(value);
4939         return 0;
4940 }
4941
4942 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRecursionRetry(PyObject *obj, void *closure)
4943 {
4944         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4945         PyObject *py_dwRecursionRetry;
4946         py_dwRecursionRetry = PyInt_FromLong(object->dwRecursionRetry);
4947         return py_dwRecursionRetry;
4948 }
4949
4950 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRecursionRetry(PyObject *py_obj, PyObject *value, void *closure)
4951 {
4952         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4953         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4954         object->dwRecursionRetry = PyInt_AsLong(value);
4955         return 0;
4956 }
4957
4958 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRecursionTimeout(PyObject *obj, void *closure)
4959 {
4960         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4961         PyObject *py_dwRecursionTimeout;
4962         py_dwRecursionTimeout = PyInt_FromLong(object->dwRecursionTimeout);
4963         return py_dwRecursionTimeout;
4964 }
4965
4966 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRecursionTimeout(PyObject *py_obj, PyObject *value, void *closure)
4967 {
4968         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4969         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4970         object->dwRecursionTimeout = PyInt_AsLong(value);
4971         return 0;
4972 }
4973
4974 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwMaxCacheTtl(PyObject *obj, void *closure)
4975 {
4976         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4977         PyObject *py_dwMaxCacheTtl;
4978         py_dwMaxCacheTtl = PyInt_FromLong(object->dwMaxCacheTtl);
4979         return py_dwMaxCacheTtl;
4980 }
4981
4982 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwMaxCacheTtl(PyObject *py_obj, PyObject *value, void *closure)
4983 {
4984         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
4985         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
4986         object->dwMaxCacheTtl = PyInt_AsLong(value);
4987         return 0;
4988 }
4989
4990 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsPollingInterval(PyObject *obj, void *closure)
4991 {
4992         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
4993         PyObject *py_dwDsPollingInterval;
4994         py_dwDsPollingInterval = PyInt_FromLong(object->dwDsPollingInterval);
4995         return py_dwDsPollingInterval;
4996 }
4997
4998 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsPollingInterval(PyObject *py_obj, PyObject *value, void *closure)
4999 {
5000         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5001         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5002         object->dwDsPollingInterval = PyInt_AsLong(value);
5003         return 0;
5004 }
5005
5006 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLocalNetPriorityNetMask(PyObject *obj, void *closure)
5007 {
5008         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5009         PyObject *py_dwLocalNetPriorityNetMask;
5010         py_dwLocalNetPriorityNetMask = PyInt_FromLong(object->dwLocalNetPriorityNetMask);
5011         return py_dwLocalNetPriorityNetMask;
5012 }
5013
5014 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLocalNetPriorityNetMask(PyObject *py_obj, PyObject *value, void *closure)
5015 {
5016         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5017         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5018         object->dwLocalNetPriorityNetMask = PyInt_AsLong(value);
5019         return 0;
5020 }
5021
5022 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwScavengingInterval(PyObject *obj, void *closure)
5023 {
5024         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5025         PyObject *py_dwScavengingInterval;
5026         py_dwScavengingInterval = PyInt_FromLong(object->dwScavengingInterval);
5027         return py_dwScavengingInterval;
5028 }
5029
5030 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwScavengingInterval(PyObject *py_obj, PyObject *value, void *closure)
5031 {
5032         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5033         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5034         object->dwScavengingInterval = PyInt_AsLong(value);
5035         return 0;
5036 }
5037
5038 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDefaultRefreshInterval(PyObject *obj, void *closure)
5039 {
5040         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5041         PyObject *py_dwDefaultRefreshInterval;
5042         py_dwDefaultRefreshInterval = PyInt_FromLong(object->dwDefaultRefreshInterval);
5043         return py_dwDefaultRefreshInterval;
5044 }
5045
5046 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDefaultRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
5047 {
5048         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5049         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5050         object->dwDefaultRefreshInterval = PyInt_AsLong(value);
5051         return 0;
5052 }
5053
5054 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDefaultNoRefreshInterval(PyObject *obj, void *closure)
5055 {
5056         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5057         PyObject *py_dwDefaultNoRefreshInterval;
5058         py_dwDefaultNoRefreshInterval = PyInt_FromLong(object->dwDefaultNoRefreshInterval);
5059         return py_dwDefaultNoRefreshInterval;
5060 }
5061
5062 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDefaultNoRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
5063 {
5064         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5065         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5066         object->dwDefaultNoRefreshInterval = PyInt_AsLong(value);
5067         return 0;
5068 }
5069
5070 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLastScavengeTime(PyObject *obj, void *closure)
5071 {
5072         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5073         PyObject *py_dwLastScavengeTime;
5074         py_dwLastScavengeTime = PyInt_FromLong(object->dwLastScavengeTime);
5075         return py_dwLastScavengeTime;
5076 }
5077
5078 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLastScavengeTime(PyObject *py_obj, PyObject *value, void *closure)
5079 {
5080         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5081         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5082         object->dwLastScavengeTime = PyInt_AsLong(value);
5083         return 0;
5084 }
5085
5086 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwEventLogLevel(PyObject *obj, void *closure)
5087 {
5088         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5089         PyObject *py_dwEventLogLevel;
5090         py_dwEventLogLevel = PyInt_FromLong(object->dwEventLogLevel);
5091         return py_dwEventLogLevel;
5092 }
5093
5094 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwEventLogLevel(PyObject *py_obj, PyObject *value, void *closure)
5095 {
5096         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5097         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5098         object->dwEventLogLevel = PyInt_AsLong(value);
5099         return 0;
5100 }
5101
5102 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLogFileMaxSize(PyObject *obj, void *closure)
5103 {
5104         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5105         PyObject *py_dwLogFileMaxSize;
5106         py_dwLogFileMaxSize = PyInt_FromLong(object->dwLogFileMaxSize);
5107         return py_dwLogFileMaxSize;
5108 }
5109
5110 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLogFileMaxSize(PyObject *py_obj, PyObject *value, void *closure)
5111 {
5112         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5113         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5114         object->dwLogFileMaxSize = PyInt_AsLong(value);
5115         return 0;
5116 }
5117
5118 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsForestVersion(PyObject *obj, void *closure)
5119 {
5120         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5121         PyObject *py_dwDsForestVersion;
5122         py_dwDsForestVersion = PyInt_FromLong(object->dwDsForestVersion);
5123         return py_dwDsForestVersion;
5124 }
5125
5126 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsForestVersion(PyObject *py_obj, PyObject *value, void *closure)
5127 {
5128         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5129         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5130         object->dwDsForestVersion = PyInt_AsLong(value);
5131         return 0;
5132 }
5133
5134 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsDomainVersion(PyObject *obj, void *closure)
5135 {
5136         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5137         PyObject *py_dwDsDomainVersion;
5138         py_dwDsDomainVersion = PyInt_FromLong(object->dwDsDomainVersion);
5139         return py_dwDsDomainVersion;
5140 }
5141
5142 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsDomainVersion(PyObject *py_obj, PyObject *value, void *closure)
5143 {
5144         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5145         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5146         object->dwDsDomainVersion = PyInt_AsLong(value);
5147         return 0;
5148 }
5149
5150 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsDsaVersion(PyObject *obj, void *closure)
5151 {
5152         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5153         PyObject *py_dwDsDsaVersion;
5154         py_dwDsDsaVersion = PyInt_FromLong(object->dwDsDsaVersion);
5155         return py_dwDsDsaVersion;
5156 }
5157
5158 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsDsaVersion(PyObject *py_obj, PyObject *value, void *closure)
5159 {
5160         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5161         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5162         object->dwDsDsaVersion = PyInt_AsLong(value);
5163         return 0;
5164 }
5165
5166 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fReadOnlyDC(PyObject *obj, void *closure)
5167 {
5168         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5169         PyObject *py_fReadOnlyDC;
5170         py_fReadOnlyDC = PyInt_FromLong(object->fReadOnlyDC);
5171         return py_fReadOnlyDC;
5172 }
5173
5174 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fReadOnlyDC(PyObject *py_obj, PyObject *value, void *closure)
5175 {
5176         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5177         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5178         object->fReadOnlyDC = PyInt_AsLong(value);
5179         return 0;
5180 }
5181
5182 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwReserveArray(PyObject *obj, void *closure)
5183 {
5184         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5185         PyObject *py_dwReserveArray;
5186         py_dwReserveArray = PyList_New(3);
5187         if (py_dwReserveArray == NULL) {
5188                 return NULL;
5189         }
5190         {
5191                 int dwReserveArray_cntr_0;
5192                 for (dwReserveArray_cntr_0 = 0; dwReserveArray_cntr_0 < 3; dwReserveArray_cntr_0++) {
5193                         PyObject *py_dwReserveArray_0;
5194                         py_dwReserveArray_0 = PyInt_FromLong(object->dwReserveArray[dwReserveArray_cntr_0]);
5195                         PyList_SetItem(py_dwReserveArray, dwReserveArray_cntr_0, py_dwReserveArray_0);
5196                 }
5197         }
5198         return py_dwReserveArray;
5199 }
5200
5201 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwReserveArray(PyObject *py_obj, PyObject *value, void *closure)
5202 {
5203         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5204         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
5205         {
5206                 int dwReserveArray_cntr_0;
5207                 for (dwReserveArray_cntr_0 = 0; dwReserveArray_cntr_0 < PyList_GET_SIZE(value); dwReserveArray_cntr_0++) {
5208                         PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, dwReserveArray_cntr_0), return -1;);
5209                         object->dwReserveArray[dwReserveArray_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, dwReserveArray_cntr_0));
5210                 }
5211         }
5212         return 0;
5213 }
5214
5215 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAutoReverseZones(PyObject *obj, void *closure)
5216 {
5217         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5218         PyObject *py_fAutoReverseZones;
5219         py_fAutoReverseZones = PyInt_FromLong(object->fAutoReverseZones);
5220         return py_fAutoReverseZones;
5221 }
5222
5223 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAutoReverseZones(PyObject *py_obj, PyObject *value, void *closure)
5224 {
5225         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5226         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5227         object->fAutoReverseZones = PyInt_AsLong(value);
5228         return 0;
5229 }
5230
5231 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAutoCacheUpdate(PyObject *obj, void *closure)
5232 {
5233         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5234         PyObject *py_fAutoCacheUpdate;
5235         py_fAutoCacheUpdate = PyInt_FromLong(object->fAutoCacheUpdate);
5236         return py_fAutoCacheUpdate;
5237 }
5238
5239 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAutoCacheUpdate(PyObject *py_obj, PyObject *value, void *closure)
5240 {
5241         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5242         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5243         object->fAutoCacheUpdate = PyInt_AsLong(value);
5244         return 0;
5245 }
5246
5247 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
5248 {
5249         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5250         PyObject *py_fRecurseAfterForwarding;
5251         py_fRecurseAfterForwarding = PyInt_FromLong(object->fRecurseAfterForwarding);
5252         return py_fRecurseAfterForwarding;
5253 }
5254
5255 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
5256 {
5257         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5258         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5259         object->fRecurseAfterForwarding = PyInt_AsLong(value);
5260         return 0;
5261 }
5262
5263 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fForwardDelegations(PyObject *obj, void *closure)
5264 {
5265         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5266         PyObject *py_fForwardDelegations;
5267         py_fForwardDelegations = PyInt_FromLong(object->fForwardDelegations);
5268         return py_fForwardDelegations;
5269 }
5270
5271 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fForwardDelegations(PyObject *py_obj, PyObject *value, void *closure)
5272 {
5273         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5274         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5275         object->fForwardDelegations = PyInt_AsLong(value);
5276         return 0;
5277 }
5278
5279 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fNoRecursion(PyObject *obj, void *closure)
5280 {
5281         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5282         PyObject *py_fNoRecursion;
5283         py_fNoRecursion = PyInt_FromLong(object->fNoRecursion);
5284         return py_fNoRecursion;
5285 }
5286
5287 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fNoRecursion(PyObject *py_obj, PyObject *value, void *closure)
5288 {
5289         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5290         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5291         object->fNoRecursion = PyInt_AsLong(value);
5292         return 0;
5293 }
5294
5295 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fSecureResponses(PyObject *obj, void *closure)
5296 {
5297         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5298         PyObject *py_fSecureResponses;
5299         py_fSecureResponses = PyInt_FromLong(object->fSecureResponses);
5300         return py_fSecureResponses;
5301 }
5302
5303 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fSecureResponses(PyObject *py_obj, PyObject *value, void *closure)
5304 {
5305         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5306         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5307         object->fSecureResponses = PyInt_AsLong(value);
5308         return 0;
5309 }
5310
5311 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fRoundRobin(PyObject *obj, void *closure)
5312 {
5313         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5314         PyObject *py_fRoundRobin;
5315         py_fRoundRobin = PyInt_FromLong(object->fRoundRobin);
5316         return py_fRoundRobin;
5317 }
5318
5319 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fRoundRobin(PyObject *py_obj, PyObject *value, void *closure)
5320 {
5321         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5322         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5323         object->fRoundRobin = PyInt_AsLong(value);
5324         return 0;
5325 }
5326
5327 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fLocalNetPriority(PyObject *obj, void *closure)
5328 {
5329         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5330         PyObject *py_fLocalNetPriority;
5331         py_fLocalNetPriority = PyInt_FromLong(object->fLocalNetPriority);
5332         return py_fLocalNetPriority;
5333 }
5334
5335 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fLocalNetPriority(PyObject *py_obj, PyObject *value, void *closure)
5336 {
5337         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5338         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5339         object->fLocalNetPriority = PyInt_AsLong(value);
5340         return 0;
5341 }
5342
5343 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fBindSecondaries(PyObject *obj, void *closure)
5344 {
5345         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5346         PyObject *py_fBindSecondaries;
5347         py_fBindSecondaries = PyInt_FromLong(object->fBindSecondaries);
5348         return py_fBindSecondaries;
5349 }
5350
5351 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fBindSecondaries(PyObject *py_obj, PyObject *value, void *closure)
5352 {
5353         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5354         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5355         object->fBindSecondaries = PyInt_AsLong(value);
5356         return 0;
5357 }
5358
5359 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fWriteAuthorityNs(PyObject *obj, void *closure)
5360 {
5361         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5362         PyObject *py_fWriteAuthorityNs;
5363         py_fWriteAuthorityNs = PyInt_FromLong(object->fWriteAuthorityNs);
5364         return py_fWriteAuthorityNs;
5365 }
5366
5367 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fWriteAuthorityNs(PyObject *py_obj, PyObject *value, void *closure)
5368 {
5369         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5370         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5371         object->fWriteAuthorityNs = PyInt_AsLong(value);
5372         return 0;
5373 }
5374
5375 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fStrictFileParsing(PyObject *obj, void *closure)
5376 {
5377         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5378         PyObject *py_fStrictFileParsing;
5379         py_fStrictFileParsing = PyInt_FromLong(object->fStrictFileParsing);
5380         return py_fStrictFileParsing;
5381 }
5382
5383 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fStrictFileParsing(PyObject *py_obj, PyObject *value, void *closure)
5384 {
5385         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5386         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5387         object->fStrictFileParsing = PyInt_AsLong(value);
5388         return 0;
5389 }
5390
5391 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fLooseWildcarding(PyObject *obj, void *closure)
5392 {
5393         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5394         PyObject *py_fLooseWildcarding;
5395         py_fLooseWildcarding = PyInt_FromLong(object->fLooseWildcarding);
5396         return py_fLooseWildcarding;
5397 }
5398
5399 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fLooseWildcarding(PyObject *py_obj, PyObject *value, void *closure)
5400 {
5401         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5402         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5403         object->fLooseWildcarding = PyInt_AsLong(value);
5404         return 0;
5405 }
5406
5407 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fDefaultAgingState(PyObject *obj, void *closure)
5408 {
5409         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5410         PyObject *py_fDefaultAgingState;
5411         py_fDefaultAgingState = PyInt_FromLong(object->fDefaultAgingState);
5412         return py_fDefaultAgingState;
5413 }
5414
5415 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fDefaultAgingState(PyObject *py_obj, PyObject *value, void *closure)
5416 {
5417         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5418         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5419         object->fDefaultAgingState = PyInt_AsLong(value);
5420         return 0;
5421 }
5422
5423 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fReserveArray(PyObject *obj, void *closure)
5424 {
5425         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
5426         PyObject *py_fReserveArray;
5427         py_fReserveArray = PyList_New(15);
5428         if (py_fReserveArray == NULL) {
5429                 return NULL;
5430         }
5431         {
5432                 int fReserveArray_cntr_0;
5433                 for (fReserveArray_cntr_0 = 0; fReserveArray_cntr_0 < 15; fReserveArray_cntr_0++) {
5434                         PyObject *py_fReserveArray_0;
5435                         py_fReserveArray_0 = PyInt_FromLong(object->fReserveArray[fReserveArray_cntr_0]);
5436                         PyList_SetItem(py_fReserveArray, fReserveArray_cntr_0, py_fReserveArray_0);
5437                 }
5438         }
5439         return py_fReserveArray;
5440 }
5441
5442 static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fReserveArray(PyObject *py_obj, PyObject *value, void *closure)
5443 {
5444         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5445         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
5446         {
5447                 int fReserveArray_cntr_0;
5448                 for (fReserveArray_cntr_0 = 0; fReserveArray_cntr_0 < PyList_GET_SIZE(value); fReserveArray_cntr_0++) {
5449                         PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, fReserveArray_cntr_0), return -1;);
5450                         object->fReserveArray[fReserveArray_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, fReserveArray_cntr_0));
5451                 }
5452         }
5453         return 0;
5454 }
5455
5456 static PyGetSetDef py_DNS_RPC_SERVER_INFO_LONGHORN_getsetters[] = {
5457         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRpcStructureVersion, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRpcStructureVersion },
5458         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwReserved0, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwReserved0 },
5459         { discard_const_p(char, "dwVersion"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwVersion, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwVersion },
5460         { discard_const_p(char, "fBootMethod"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_fBootMethod, py_DNS_RPC_SERVER_INFO_LONGHORN_set_fBootMethod },
5461         { discard_const_p(char, "fAdminConfigured"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAdminConfigured, py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAdminConfigured },
5462         { discard_const_p(char, "fAllowUpdate"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAllowUpdate, py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAllowUpdate },
5463         { discard_const_p(char, "fDsAvailable"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_fDsAvailable, py_DNS_RPC_SERVER_INFO_LONGHORN_set_fDsAvailable },
5464         { discard_const_p(char, "pszServerName"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszServerName, py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszServerName },
5465         { discard_const_p(char, "pszDsContainer"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszDsContainer, py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszDsContainer },
5466         { discard_const_p(char, "aipServerAddrs"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipServerAddrs, py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipServerAddrs },
5467         { discard_const_p(char, "aipListenAddrs"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipListenAddrs, py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipListenAddrs },
5468         { discard_const_p(char, "aipForwarders"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipForwarders, py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipForwarders },
5469         { discard_const_p(char, "aipLogFilter"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipLogFilter, py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipLogFilter },
5470         { discard_const_p(char, "pwszLogFilePath"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_pwszLogFilePath, py_DNS_RPC_SERVER_INFO_LONGHORN_set_pwszLogFilePath },
5471         { discard_const_p(char, "pszDomainName"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszDomainName, py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszDomainName },
5472         { discard_const_p(char, "pszForestName"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszForestName, py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszForestName },
5473         { discard_const_p(char, "pszDomainDirectoryPartition"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszDomainDirectoryPartition, py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszDomainDirectoryPartition },
5474         { discard_const_p(char, "pszForestDirectoryPartition"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszForestDirectoryPartition, py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszForestDirectoryPartition },
5475         { discard_const_p(char, "pExtensions"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_pExtensions, py_DNS_RPC_SERVER_INFO_LONGHORN_set_pExtensions },
5476         { discard_const_p(char, "dwLogLevel"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLogLevel, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLogLevel },
5477         { discard_const_p(char, "dwDebugLevel"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDebugLevel, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDebugLevel },
5478         { discard_const_p(char, "dwForwardTimeout"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwForwardTimeout, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwForwardTimeout },
5479         { discard_const_p(char, "dwRpcProtocol"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRpcProtocol, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRpcProtocol },
5480         { discard_const_p(char, "dwNameCheckFlag"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwNameCheckFlag, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwNameCheckFlag },
5481         { discard_const_p(char, "cAddressAnswerLimit"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_cAddressAnswerLimit, py_DNS_RPC_SERVER_INFO_LONGHORN_set_cAddressAnswerLimit },
5482         { discard_const_p(char, "dwRecursionRetry"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRecursionRetry, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRecursionRetry },
5483         { discard_const_p(char, "dwRecursionTimeout"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRecursionTimeout, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRecursionTimeout },
5484         { discard_const_p(char, "dwMaxCacheTtl"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwMaxCacheTtl, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwMaxCacheTtl },
5485         { discard_const_p(char, "dwDsPollingInterval"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsPollingInterval, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsPollingInterval },
5486         { discard_const_p(char, "dwLocalNetPriorityNetMask"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLocalNetPriorityNetMask, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLocalNetPriorityNetMask },
5487         { discard_const_p(char, "dwScavengingInterval"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwScavengingInterval, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwScavengingInterval },
5488         { discard_const_p(char, "dwDefaultRefreshInterval"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDefaultRefreshInterval, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDefaultRefreshInterval },
5489         { discard_const_p(char, "dwDefaultNoRefreshInterval"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDefaultNoRefreshInterval, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDefaultNoRefreshInterval },
5490         { discard_const_p(char, "dwLastScavengeTime"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLastScavengeTime, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLastScavengeTime },
5491         { discard_const_p(char, "dwEventLogLevel"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwEventLogLevel, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwEventLogLevel },
5492         { discard_const_p(char, "dwLogFileMaxSize"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLogFileMaxSize, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLogFileMaxSize },
5493         { discard_const_p(char, "dwDsForestVersion"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsForestVersion, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsForestVersion },
5494         { discard_const_p(char, "dwDsDomainVersion"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsDomainVersion, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsDomainVersion },
5495         { discard_const_p(char, "dwDsDsaVersion"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsDsaVersion, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsDsaVersion },
5496         { discard_const_p(char, "fReadOnlyDC"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_fReadOnlyDC, py_DNS_RPC_SERVER_INFO_LONGHORN_set_fReadOnlyDC },
5497         { discard_const_p(char, "dwReserveArray"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwReserveArray, py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwReserveArray },
5498         { discard_const_p(char, "fAutoReverseZones"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAutoReverseZones, py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAutoReverseZones },
5499         { discard_const_p(char, "fAutoCacheUpdate"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAutoCacheUpdate, py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAutoCacheUpdate },
5500         { discard_const_p(char, "fRecurseAfterForwarding"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_fRecurseAfterForwarding, py_DNS_RPC_SERVER_INFO_LONGHORN_set_fRecurseAfterForwarding },
5501         { discard_const_p(char, "fForwardDelegations"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_fForwardDelegations, py_DNS_RPC_SERVER_INFO_LONGHORN_set_fForwardDelegations },
5502         { discard_const_p(char, "fNoRecursion"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_fNoRecursion, py_DNS_RPC_SERVER_INFO_LONGHORN_set_fNoRecursion },
5503         { discard_const_p(char, "fSecureResponses"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_fSecureResponses, py_DNS_RPC_SERVER_INFO_LONGHORN_set_fSecureResponses },
5504         { discard_const_p(char, "fRoundRobin"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_fRoundRobin, py_DNS_RPC_SERVER_INFO_LONGHORN_set_fRoundRobin },
5505         { discard_const_p(char, "fLocalNetPriority"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_fLocalNetPriority, py_DNS_RPC_SERVER_INFO_LONGHORN_set_fLocalNetPriority },
5506         { discard_const_p(char, "fBindSecondaries"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_fBindSecondaries, py_DNS_RPC_SERVER_INFO_LONGHORN_set_fBindSecondaries },
5507         { discard_const_p(char, "fWriteAuthorityNs"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_fWriteAuthorityNs, py_DNS_RPC_SERVER_INFO_LONGHORN_set_fWriteAuthorityNs },
5508         { discard_const_p(char, "fStrictFileParsing"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_fStrictFileParsing, py_DNS_RPC_SERVER_INFO_LONGHORN_set_fStrictFileParsing },
5509         { discard_const_p(char, "fLooseWildcarding"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_fLooseWildcarding, py_DNS_RPC_SERVER_INFO_LONGHORN_set_fLooseWildcarding },
5510         { discard_const_p(char, "fDefaultAgingState"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_fDefaultAgingState, py_DNS_RPC_SERVER_INFO_LONGHORN_set_fDefaultAgingState },
5511         { discard_const_p(char, "fReserveArray"), py_DNS_RPC_SERVER_INFO_LONGHORN_get_fReserveArray, py_DNS_RPC_SERVER_INFO_LONGHORN_set_fReserveArray },
5512         { NULL }
5513 };
5514
5515 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
5516 {
5517         return pytalloc_new(struct DNS_RPC_SERVER_INFO_LONGHORN, type);
5518 }
5519
5520 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_ndr_pack(PyObject *py_obj)
5521 {
5522         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5523         DATA_BLOB blob;
5524         enum ndr_err_code err;
5525         err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_SERVER_INFO_LONGHORN);
5526         if (err != NDR_ERR_SUCCESS) {
5527                 PyErr_SetNdrError(err);
5528                 return NULL;
5529         }
5530
5531         return PyString_FromStringAndSize((char *)blob.data, blob.length);
5532 }
5533
5534 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
5535 {
5536         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5537         DATA_BLOB blob;
5538         int blob_length = 0;
5539         enum ndr_err_code err;
5540         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
5541         PyObject *allow_remaining_obj = NULL;
5542         bool allow_remaining = false;
5543
5544         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
5545                 discard_const_p(char *, kwnames),
5546                 &blob.data, &blob_length,
5547                 &allow_remaining_obj)) {
5548                 return NULL;
5549         }
5550         blob.length = blob_length;
5551
5552         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
5553                 allow_remaining = true;
5554         }
5555
5556         if (allow_remaining) {
5557                 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);
5558         } else {
5559                 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);
5560         }
5561         if (err != NDR_ERR_SUCCESS) {
5562                 PyErr_SetNdrError(err);
5563                 return NULL;
5564         }
5565
5566         Py_RETURN_NONE;
5567 }
5568
5569 static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_ndr_print(PyObject *py_obj)
5570 {
5571         struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
5572         PyObject *ret;
5573         char *retstr;
5574
5575         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);
5576         ret = PyString_FromString(retstr);
5577         talloc_free(retstr);
5578
5579         return ret;
5580 }
5581
5582 static PyMethodDef py_DNS_RPC_SERVER_INFO_LONGHORN_methods[] = {
5583         { "__ndr_pack__", (PyCFunction)py_DNS_RPC_SERVER_INFO_LONGHORN_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
5584         { "__ndr_unpack__", (PyCFunction)py_DNS_RPC_SERVER_INFO_LONGHORN_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
5585         { "__ndr_print__", (PyCFunction)py_DNS_RPC_SERVER_INFO_LONGHORN_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
5586         { NULL, NULL, 0, NULL }
5587 };
5588
5589
5590 static PyTypeObject DNS_RPC_SERVER_INFO_LONGHORN_Type = {
5591         PyObject_HEAD_INIT(NULL) 0,
5592         .tp_name = "dnsserver.DNS_RPC_SERVER_INFO_LONGHORN",
5593         .tp_getset = py_DNS_RPC_SERVER_INFO_LONGHORN_getsetters,
5594         .tp_methods = py_DNS_RPC_SERVER_INFO_LONGHORN_methods,
5595         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
5596         .tp_basicsize = sizeof(pytalloc_Object),
5597         .tp_new = py_DNS_RPC_SERVER_INFO_LONGHORN_new,
5598 };
5599
5600
5601 static PyObject *py_DNS_RPC_DP_REPLICA_get_pszReplicaDn(PyObject *obj, void *closure)
5602 {
5603         struct DNS_RPC_DP_REPLICA *object = (struct DNS_RPC_DP_REPLICA *)pytalloc_get_ptr(obj);
5604         PyObject *py_pszReplicaDn;
5605         if (object->pszReplicaDn == NULL) {
5606                 py_pszReplicaDn = Py_None;
5607                 Py_INCREF(py_pszReplicaDn);
5608         } else {
5609                 if (object->pszReplicaDn == NULL) {
5610                         py_pszReplicaDn = Py_None;
5611                         Py_INCREF(py_pszReplicaDn);
5612                 } else {
5613                         py_pszReplicaDn = PyUnicode_Decode(object->pszReplicaDn, strlen(object->pszReplicaDn), "utf-8", "ignore");
5614                 }
5615         }
5616         return py_pszReplicaDn;
5617 }
5618
5619 static int py_DNS_RPC_DP_REPLICA_set_pszReplicaDn(PyObject *py_obj, PyObject *value, void *closure)
5620 {
5621         struct DNS_RPC_DP_REPLICA *object = (struct DNS_RPC_DP_REPLICA *)pytalloc_get_ptr(py_obj);
5622         if (value == Py_None) {
5623                 object->pszReplicaDn = NULL;
5624         } else {
5625                 object->pszReplicaDn = NULL;
5626                 if (PyUnicode_Check(value)) {
5627                         object->pszReplicaDn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
5628                 } else if (PyString_Check(value)) {
5629                         object->pszReplicaDn = PyString_AS_STRING(value);
5630                 } else {
5631                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
5632                         return -1;
5633                 }
5634         }
5635         return 0;
5636 }
5637
5638 static PyGetSetDef py_DNS_RPC_DP_REPLICA_getsetters[] = {
5639         { discard_const_p(char, "pszReplicaDn"), py_DNS_RPC_DP_REPLICA_get_pszReplicaDn, py_DNS_RPC_DP_REPLICA_set_pszReplicaDn },
5640         { NULL }
5641 };
5642
5643 static PyObject *py_DNS_RPC_DP_REPLICA_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
5644 {
5645         return pytalloc_new(struct DNS_RPC_DP_REPLICA, type);
5646 }
5647
5648
5649 static PyTypeObject DNS_RPC_DP_REPLICA_Type = {
5650         PyObject_HEAD_INIT(NULL) 0,
5651         .tp_name = "dnsserver.DNS_RPC_DP_REPLICA",
5652         .tp_getset = py_DNS_RPC_DP_REPLICA_getsetters,
5653         .tp_methods = NULL,
5654         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
5655         .tp_basicsize = sizeof(pytalloc_Object),
5656         .tp_new = py_DNS_RPC_DP_REPLICA_new,
5657 };
5658
5659
5660 static PyObject *py_DNS_RPC_DP_INFO_get_dwRpcStructureVersion(PyObject *obj, void *closure)
5661 {
5662         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
5663         PyObject *py_dwRpcStructureVersion;
5664         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
5665         return py_dwRpcStructureVersion;
5666 }
5667
5668 static int py_DNS_RPC_DP_INFO_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
5669 {
5670         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
5671         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5672         object->dwRpcStructureVersion = PyInt_AsLong(value);
5673         return 0;
5674 }
5675
5676 static PyObject *py_DNS_RPC_DP_INFO_get_dwReserved0(PyObject *obj, void *closure)
5677 {
5678         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
5679         PyObject *py_dwReserved0;
5680         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
5681         return py_dwReserved0;
5682 }
5683
5684 static int py_DNS_RPC_DP_INFO_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
5685 {
5686         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
5687         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5688         object->dwReserved0 = PyInt_AsLong(value);
5689         return 0;
5690 }
5691
5692 static PyObject *py_DNS_RPC_DP_INFO_get_pszDpFqdn(PyObject *obj, void *closure)
5693 {
5694         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
5695         PyObject *py_pszDpFqdn;
5696         if (object->pszDpFqdn == NULL) {
5697                 py_pszDpFqdn = Py_None;
5698                 Py_INCREF(py_pszDpFqdn);
5699         } else {
5700                 if (object->pszDpFqdn == NULL) {
5701                         py_pszDpFqdn = Py_None;
5702                         Py_INCREF(py_pszDpFqdn);
5703                 } else {
5704                         py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
5705                 }
5706         }
5707         return py_pszDpFqdn;
5708 }
5709
5710 static int py_DNS_RPC_DP_INFO_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
5711 {
5712         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
5713         if (value == Py_None) {
5714                 object->pszDpFqdn = NULL;
5715         } else {
5716                 object->pszDpFqdn = NULL;
5717                 if (PyUnicode_Check(value)) {
5718                         object->pszDpFqdn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
5719                 } else if (PyString_Check(value)) {
5720                         object->pszDpFqdn = PyString_AS_STRING(value);
5721                 } else {
5722                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
5723                         return -1;
5724                 }
5725         }
5726         return 0;
5727 }
5728
5729 static PyObject *py_DNS_RPC_DP_INFO_get_pszDpDn(PyObject *obj, void *closure)
5730 {
5731         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
5732         PyObject *py_pszDpDn;
5733         if (object->pszDpDn == NULL) {
5734                 py_pszDpDn = Py_None;
5735                 Py_INCREF(py_pszDpDn);
5736         } else {
5737                 if (object->pszDpDn == NULL) {
5738                         py_pszDpDn = Py_None;
5739                         Py_INCREF(py_pszDpDn);
5740                 } else {
5741                         py_pszDpDn = PyUnicode_Decode(object->pszDpDn, strlen(object->pszDpDn), "utf-8", "ignore");
5742                 }
5743         }
5744         return py_pszDpDn;
5745 }
5746
5747 static int py_DNS_RPC_DP_INFO_set_pszDpDn(PyObject *py_obj, PyObject *value, void *closure)
5748 {
5749         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
5750         if (value == Py_None) {
5751                 object->pszDpDn = NULL;
5752         } else {
5753                 object->pszDpDn = NULL;
5754                 if (PyUnicode_Check(value)) {
5755                         object->pszDpDn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
5756                 } else if (PyString_Check(value)) {
5757                         object->pszDpDn = PyString_AS_STRING(value);
5758                 } else {
5759                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
5760                         return -1;
5761                 }
5762         }
5763         return 0;
5764 }
5765
5766 static PyObject *py_DNS_RPC_DP_INFO_get_pszCrDn(PyObject *obj, void *closure)
5767 {
5768         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
5769         PyObject *py_pszCrDn;
5770         if (object->pszCrDn == NULL) {
5771                 py_pszCrDn = Py_None;
5772                 Py_INCREF(py_pszCrDn);
5773         } else {
5774                 if (object->pszCrDn == NULL) {
5775                         py_pszCrDn = Py_None;
5776                         Py_INCREF(py_pszCrDn);
5777                 } else {
5778                         py_pszCrDn = PyUnicode_Decode(object->pszCrDn, strlen(object->pszCrDn), "utf-8", "ignore");
5779                 }
5780         }
5781         return py_pszCrDn;
5782 }
5783
5784 static int py_DNS_RPC_DP_INFO_set_pszCrDn(PyObject *py_obj, PyObject *value, void *closure)
5785 {
5786         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
5787         if (value == Py_None) {
5788                 object->pszCrDn = NULL;
5789         } else {
5790                 object->pszCrDn = NULL;
5791                 if (PyUnicode_Check(value)) {
5792                         object->pszCrDn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
5793                 } else if (PyString_Check(value)) {
5794                         object->pszCrDn = PyString_AS_STRING(value);
5795                 } else {
5796                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
5797                         return -1;
5798                 }
5799         }
5800         return 0;
5801 }
5802
5803 static PyObject *py_DNS_RPC_DP_INFO_get_dwFlags(PyObject *obj, void *closure)
5804 {
5805         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
5806         PyObject *py_dwFlags;
5807         py_dwFlags = PyInt_FromLong(object->dwFlags);
5808         return py_dwFlags;
5809 }
5810
5811 static int py_DNS_RPC_DP_INFO_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
5812 {
5813         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
5814         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5815         object->dwFlags = PyInt_AsLong(value);
5816         return 0;
5817 }
5818
5819 static PyObject *py_DNS_RPC_DP_INFO_get_dwZoneCount(PyObject *obj, void *closure)
5820 {
5821         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
5822         PyObject *py_dwZoneCount;
5823         py_dwZoneCount = PyInt_FromLong(object->dwZoneCount);
5824         return py_dwZoneCount;
5825 }
5826
5827 static int py_DNS_RPC_DP_INFO_set_dwZoneCount(PyObject *py_obj, PyObject *value, void *closure)
5828 {
5829         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
5830         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5831         object->dwZoneCount = PyInt_AsLong(value);
5832         return 0;
5833 }
5834
5835 static PyObject *py_DNS_RPC_DP_INFO_get_dwState(PyObject *obj, void *closure)
5836 {
5837         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
5838         PyObject *py_dwState;
5839         py_dwState = PyInt_FromLong(object->dwState);
5840         return py_dwState;
5841 }
5842
5843 static int py_DNS_RPC_DP_INFO_set_dwState(PyObject *py_obj, PyObject *value, void *closure)
5844 {
5845         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
5846         if (PyLong_Check(value)) {
5847                 object->dwState = PyLong_AsLongLong(value);
5848         } else if (PyInt_Check(value)) {
5849                 object->dwState = PyInt_AsLong(value);
5850         } else {
5851                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
5852                   PyInt_Type.tp_name, PyLong_Type.tp_name);
5853                 return -1;
5854         }
5855         return 0;
5856 }
5857
5858 static PyObject *py_DNS_RPC_DP_INFO_get_dwReserved(PyObject *obj, void *closure)
5859 {
5860         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
5861         PyObject *py_dwReserved;
5862         py_dwReserved = PyList_New(3);
5863         if (py_dwReserved == NULL) {
5864                 return NULL;
5865         }
5866         {
5867                 int dwReserved_cntr_0;
5868                 for (dwReserved_cntr_0 = 0; dwReserved_cntr_0 < 3; dwReserved_cntr_0++) {
5869                         PyObject *py_dwReserved_0;
5870                         py_dwReserved_0 = PyInt_FromLong(object->dwReserved[dwReserved_cntr_0]);
5871                         PyList_SetItem(py_dwReserved, dwReserved_cntr_0, py_dwReserved_0);
5872                 }
5873         }
5874         return py_dwReserved;
5875 }
5876
5877 static int py_DNS_RPC_DP_INFO_set_dwReserved(PyObject *py_obj, PyObject *value, void *closure)
5878 {
5879         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
5880         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
5881         {
5882                 int dwReserved_cntr_0;
5883                 for (dwReserved_cntr_0 = 0; dwReserved_cntr_0 < PyList_GET_SIZE(value); dwReserved_cntr_0++) {
5884                         PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, dwReserved_cntr_0), return -1;);
5885                         object->dwReserved[dwReserved_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, dwReserved_cntr_0));
5886                 }
5887         }
5888         return 0;
5889 }
5890
5891 static PyObject *py_DNS_RPC_DP_INFO_get_pwszReserved(PyObject *obj, void *closure)
5892 {
5893         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
5894         PyObject *py_pwszReserved;
5895         py_pwszReserved = PyList_New(3);
5896         if (py_pwszReserved == NULL) {
5897                 return NULL;
5898         }
5899         {
5900                 int pwszReserved_cntr_0;
5901                 for (pwszReserved_cntr_0 = 0; pwszReserved_cntr_0 < 3; pwszReserved_cntr_0++) {
5902                         PyObject *py_pwszReserved_0;
5903                         py_pwszReserved_0 = pytalloc_reference_ex(&DNS_EXTENSION_Type, object->pwszReserved, &object->pwszReserved[pwszReserved_cntr_0]);
5904                         PyList_SetItem(py_pwszReserved, pwszReserved_cntr_0, py_pwszReserved_0);
5905                 }
5906         }
5907         return py_pwszReserved;
5908 }
5909
5910 static int py_DNS_RPC_DP_INFO_set_pwszReserved(PyObject *py_obj, PyObject *value, void *closure)
5911 {
5912         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
5913         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
5914         {
5915                 int pwszReserved_cntr_0;
5916                 for (pwszReserved_cntr_0 = 0; pwszReserved_cntr_0 < PyList_GET_SIZE(value); pwszReserved_cntr_0++) {
5917                         PY_CHECK_TYPE(&DNS_EXTENSION_Type, PyList_GET_ITEM(value, pwszReserved_cntr_0), return -1;);
5918                         if (talloc_reference(object->pwszReserved, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, pwszReserved_cntr_0))) == NULL) {
5919                                 PyErr_NoMemory();
5920                                 return -1;
5921                         }
5922                         object->pwszReserved[pwszReserved_cntr_0] = *(struct DNS_EXTENSION *)pytalloc_get_ptr(PyList_GET_ITEM(value, pwszReserved_cntr_0));
5923                 }
5924         }
5925         return 0;
5926 }
5927
5928 static PyObject *py_DNS_RPC_DP_INFO_get_dwReplicaCount(PyObject *obj, void *closure)
5929 {
5930         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
5931         PyObject *py_dwReplicaCount;
5932         py_dwReplicaCount = PyInt_FromLong(object->dwReplicaCount);
5933         return py_dwReplicaCount;
5934 }
5935
5936 static int py_DNS_RPC_DP_INFO_set_dwReplicaCount(PyObject *py_obj, PyObject *value, void *closure)
5937 {
5938         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
5939         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
5940         object->dwReplicaCount = PyInt_AsLong(value);
5941         return 0;
5942 }
5943
5944 static PyObject *py_DNS_RPC_DP_INFO_get_ReplicaArray(PyObject *obj, void *closure)
5945 {
5946         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
5947         PyObject *py_ReplicaArray;
5948         py_ReplicaArray = PyList_New(object->dwReplicaCount);
5949         if (py_ReplicaArray == NULL) {
5950                 return NULL;
5951         }
5952         {
5953                 int ReplicaArray_cntr_0;
5954                 for (ReplicaArray_cntr_0 = 0; ReplicaArray_cntr_0 < object->dwReplicaCount; ReplicaArray_cntr_0++) {
5955                         PyObject *py_ReplicaArray_0;
5956                         if (object->ReplicaArray[ReplicaArray_cntr_0] == NULL) {
5957                                 py_ReplicaArray_0 = Py_None;
5958                                 Py_INCREF(py_ReplicaArray_0);
5959                         } else {
5960                                 py_ReplicaArray_0 = pytalloc_reference_ex(&DNS_RPC_DP_REPLICA_Type, object->ReplicaArray[ReplicaArray_cntr_0], object->ReplicaArray[ReplicaArray_cntr_0]);
5961                         }
5962                         PyList_SetItem(py_ReplicaArray, ReplicaArray_cntr_0, py_ReplicaArray_0);
5963                 }
5964         }
5965         return py_ReplicaArray;
5966 }
5967
5968 static int py_DNS_RPC_DP_INFO_set_ReplicaArray(PyObject *py_obj, PyObject *value, void *closure)
5969 {
5970         struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
5971         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
5972         {
5973                 int ReplicaArray_cntr_0;
5974                 object->ReplicaArray = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->ReplicaArray, PyList_GET_SIZE(value));
5975                 if (!object->ReplicaArray) { return -1;; }
5976                 talloc_set_name_const(object->ReplicaArray, "ARRAY: object->ReplicaArray");
5977                 for (ReplicaArray_cntr_0 = 0; ReplicaArray_cntr_0 < PyList_GET_SIZE(value); ReplicaArray_cntr_0++) {
5978                         if (PyList_GET_ITEM(value, ReplicaArray_cntr_0) == Py_None) {
5979                                 object->ReplicaArray[ReplicaArray_cntr_0] = NULL;
5980                         } else {
5981                                 object->ReplicaArray[ReplicaArray_cntr_0] = NULL;
5982                                 PY_CHECK_TYPE(&DNS_RPC_DP_REPLICA_Type, PyList_GET_ITEM(value, ReplicaArray_cntr_0), return -1;);
5983                                 if (talloc_reference(object->ReplicaArray, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, ReplicaArray_cntr_0))) == NULL) {
5984                                         PyErr_NoMemory();
5985                                         return -1;
5986                                 }
5987                                 object->ReplicaArray[ReplicaArray_cntr_0] = (struct DNS_RPC_DP_REPLICA *)pytalloc_get_ptr(PyList_GET_ITEM(value, ReplicaArray_cntr_0));
5988                         }
5989                 }
5990         }
5991         return 0;
5992 }
5993
5994 static PyGetSetDef py_DNS_RPC_DP_INFO_getsetters[] = {
5995         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_DP_INFO_get_dwRpcStructureVersion, py_DNS_RPC_DP_INFO_set_dwRpcStructureVersion },
5996         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_DP_INFO_get_dwReserved0, py_DNS_RPC_DP_INFO_set_dwReserved0 },
5997         { discard_const_p(char, "pszDpFqdn"), py_DNS_RPC_DP_INFO_get_pszDpFqdn, py_DNS_RPC_DP_INFO_set_pszDpFqdn },
5998         { discard_const_p(char, "pszDpDn"), py_DNS_RPC_DP_INFO_get_pszDpDn, py_DNS_RPC_DP_INFO_set_pszDpDn },
5999         { discard_const_p(char, "pszCrDn"), py_DNS_RPC_DP_INFO_get_pszCrDn, py_DNS_RPC_DP_INFO_set_pszCrDn },
6000         { discard_const_p(char, "dwFlags"), py_DNS_RPC_DP_INFO_get_dwFlags, py_DNS_RPC_DP_INFO_set_dwFlags },
6001         { discard_const_p(char, "dwZoneCount"), py_DNS_RPC_DP_INFO_get_dwZoneCount, py_DNS_RPC_DP_INFO_set_dwZoneCount },
6002         { discard_const_p(char, "dwState"), py_DNS_RPC_DP_INFO_get_dwState, py_DNS_RPC_DP_INFO_set_dwState },
6003         { discard_const_p(char, "dwReserved"), py_DNS_RPC_DP_INFO_get_dwReserved, py_DNS_RPC_DP_INFO_set_dwReserved },
6004         { discard_const_p(char, "pwszReserved"), py_DNS_RPC_DP_INFO_get_pwszReserved, py_DNS_RPC_DP_INFO_set_pwszReserved },
6005         { discard_const_p(char, "dwReplicaCount"), py_DNS_RPC_DP_INFO_get_dwReplicaCount, py_DNS_RPC_DP_INFO_set_dwReplicaCount },
6006         { discard_const_p(char, "ReplicaArray"), py_DNS_RPC_DP_INFO_get_ReplicaArray, py_DNS_RPC_DP_INFO_set_ReplicaArray },
6007         { NULL }
6008 };
6009
6010 static PyObject *py_DNS_RPC_DP_INFO_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
6011 {
6012         return pytalloc_new(struct DNS_RPC_DP_INFO, type);
6013 }
6014
6015
6016 static PyTypeObject DNS_RPC_DP_INFO_Type = {
6017         PyObject_HEAD_INIT(NULL) 0,
6018         .tp_name = "dnsserver.DNS_RPC_DP_INFO",
6019         .tp_getset = py_DNS_RPC_DP_INFO_getsetters,
6020         .tp_methods = NULL,
6021         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
6022         .tp_basicsize = sizeof(pytalloc_Object),
6023         .tp_new = py_DNS_RPC_DP_INFO_new,
6024 };
6025
6026
6027 static PyObject *py_DNS_RPC_DP_ENUM_get_dwRpcStructureVersion(PyObject *obj, void *closure)
6028 {
6029         struct DNS_RPC_DP_ENUM *object = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(obj);
6030         PyObject *py_dwRpcStructureVersion;
6031         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
6032         return py_dwRpcStructureVersion;
6033 }
6034
6035 static int py_DNS_RPC_DP_ENUM_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
6036 {
6037         struct DNS_RPC_DP_ENUM *object = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(py_obj);
6038         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6039         object->dwRpcStructureVersion = PyInt_AsLong(value);
6040         return 0;
6041 }
6042
6043 static PyObject *py_DNS_RPC_DP_ENUM_get_dwReserved0(PyObject *obj, void *closure)
6044 {
6045         struct DNS_RPC_DP_ENUM *object = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(obj);
6046         PyObject *py_dwReserved0;
6047         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
6048         return py_dwReserved0;
6049 }
6050
6051 static int py_DNS_RPC_DP_ENUM_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
6052 {
6053         struct DNS_RPC_DP_ENUM *object = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(py_obj);
6054         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6055         object->dwReserved0 = PyInt_AsLong(value);
6056         return 0;
6057 }
6058
6059 static PyObject *py_DNS_RPC_DP_ENUM_get_pszDpFqdn(PyObject *obj, void *closure)
6060 {
6061         struct DNS_RPC_DP_ENUM *object = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(obj);
6062         PyObject *py_pszDpFqdn;
6063         if (object->pszDpFqdn == NULL) {
6064                 py_pszDpFqdn = Py_None;
6065                 Py_INCREF(py_pszDpFqdn);
6066         } else {
6067                 if (object->pszDpFqdn == NULL) {
6068                         py_pszDpFqdn = Py_None;
6069                         Py_INCREF(py_pszDpFqdn);
6070                 } else {
6071                         py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
6072                 }
6073         }
6074         return py_pszDpFqdn;
6075 }
6076
6077 static int py_DNS_RPC_DP_ENUM_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
6078 {
6079         struct DNS_RPC_DP_ENUM *object = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(py_obj);
6080         if (value == Py_None) {
6081                 object->pszDpFqdn = NULL;
6082         } else {
6083                 object->pszDpFqdn = NULL;
6084                 if (PyUnicode_Check(value)) {
6085                         object->pszDpFqdn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
6086                 } else if (PyString_Check(value)) {
6087                         object->pszDpFqdn = PyString_AS_STRING(value);
6088                 } else {
6089                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6090                         return -1;
6091                 }
6092         }
6093         return 0;
6094 }
6095
6096 static PyObject *py_DNS_RPC_DP_ENUM_get_dwFlags(PyObject *obj, void *closure)
6097 {
6098         struct DNS_RPC_DP_ENUM *object = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(obj);
6099         PyObject *py_dwFlags;
6100         py_dwFlags = PyInt_FromLong(object->dwFlags);
6101         return py_dwFlags;
6102 }
6103
6104 static int py_DNS_RPC_DP_ENUM_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
6105 {
6106         struct DNS_RPC_DP_ENUM *object = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(py_obj);
6107         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6108         object->dwFlags = PyInt_AsLong(value);
6109         return 0;
6110 }
6111
6112 static PyObject *py_DNS_RPC_DP_ENUM_get_dwZoneCount(PyObject *obj, void *closure)
6113 {
6114         struct DNS_RPC_DP_ENUM *object = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(obj);
6115         PyObject *py_dwZoneCount;
6116         py_dwZoneCount = PyInt_FromLong(object->dwZoneCount);
6117         return py_dwZoneCount;
6118 }
6119
6120 static int py_DNS_RPC_DP_ENUM_set_dwZoneCount(PyObject *py_obj, PyObject *value, void *closure)
6121 {
6122         struct DNS_RPC_DP_ENUM *object = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(py_obj);
6123         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6124         object->dwZoneCount = PyInt_AsLong(value);
6125         return 0;
6126 }
6127
6128 static PyGetSetDef py_DNS_RPC_DP_ENUM_getsetters[] = {
6129         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_DP_ENUM_get_dwRpcStructureVersion, py_DNS_RPC_DP_ENUM_set_dwRpcStructureVersion },
6130         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_DP_ENUM_get_dwReserved0, py_DNS_RPC_DP_ENUM_set_dwReserved0 },
6131         { discard_const_p(char, "pszDpFqdn"), py_DNS_RPC_DP_ENUM_get_pszDpFqdn, py_DNS_RPC_DP_ENUM_set_pszDpFqdn },
6132         { discard_const_p(char, "dwFlags"), py_DNS_RPC_DP_ENUM_get_dwFlags, py_DNS_RPC_DP_ENUM_set_dwFlags },
6133         { discard_const_p(char, "dwZoneCount"), py_DNS_RPC_DP_ENUM_get_dwZoneCount, py_DNS_RPC_DP_ENUM_set_dwZoneCount },
6134         { NULL }
6135 };
6136
6137 static PyObject *py_DNS_RPC_DP_ENUM_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
6138 {
6139         return pytalloc_new(struct DNS_RPC_DP_ENUM, type);
6140 }
6141
6142
6143 static PyTypeObject DNS_RPC_DP_ENUM_Type = {
6144         PyObject_HEAD_INIT(NULL) 0,
6145         .tp_name = "dnsserver.DNS_RPC_DP_ENUM",
6146         .tp_getset = py_DNS_RPC_DP_ENUM_getsetters,
6147         .tp_methods = NULL,
6148         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
6149         .tp_basicsize = sizeof(pytalloc_Object),
6150         .tp_new = py_DNS_RPC_DP_ENUM_new,
6151 };
6152
6153
6154 static PyObject *py_DNS_RPC_DP_LIST_get_dwRpcStructureVersion(PyObject *obj, void *closure)
6155 {
6156         struct DNS_RPC_DP_LIST *object = (struct DNS_RPC_DP_LIST *)pytalloc_get_ptr(obj);
6157         PyObject *py_dwRpcStructureVersion;
6158         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
6159         return py_dwRpcStructureVersion;
6160 }
6161
6162 static int py_DNS_RPC_DP_LIST_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
6163 {
6164         struct DNS_RPC_DP_LIST *object = (struct DNS_RPC_DP_LIST *)pytalloc_get_ptr(py_obj);
6165         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6166         object->dwRpcStructureVersion = PyInt_AsLong(value);
6167         return 0;
6168 }
6169
6170 static PyObject *py_DNS_RPC_DP_LIST_get_dwReserved0(PyObject *obj, void *closure)
6171 {
6172         struct DNS_RPC_DP_LIST *object = (struct DNS_RPC_DP_LIST *)pytalloc_get_ptr(obj);
6173         PyObject *py_dwReserved0;
6174         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
6175         return py_dwReserved0;
6176 }
6177
6178 static int py_DNS_RPC_DP_LIST_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
6179 {
6180         struct DNS_RPC_DP_LIST *object = (struct DNS_RPC_DP_LIST *)pytalloc_get_ptr(py_obj);
6181         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6182         object->dwReserved0 = PyInt_AsLong(value);
6183         return 0;
6184 }
6185
6186 static PyObject *py_DNS_RPC_DP_LIST_get_dwDpCount(PyObject *obj, void *closure)
6187 {
6188         struct DNS_RPC_DP_LIST *object = (struct DNS_RPC_DP_LIST *)pytalloc_get_ptr(obj);
6189         PyObject *py_dwDpCount;
6190         py_dwDpCount = PyInt_FromLong(object->dwDpCount);
6191         return py_dwDpCount;
6192 }
6193
6194 static int py_DNS_RPC_DP_LIST_set_dwDpCount(PyObject *py_obj, PyObject *value, void *closure)
6195 {
6196         struct DNS_RPC_DP_LIST *object = (struct DNS_RPC_DP_LIST *)pytalloc_get_ptr(py_obj);
6197         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6198         object->dwDpCount = PyInt_AsLong(value);
6199         return 0;
6200 }
6201
6202 static PyObject *py_DNS_RPC_DP_LIST_get_DpArray(PyObject *obj, void *closure)
6203 {
6204         struct DNS_RPC_DP_LIST *object = (struct DNS_RPC_DP_LIST *)pytalloc_get_ptr(obj);
6205         PyObject *py_DpArray;
6206         py_DpArray = PyList_New(object->dwDpCount);
6207         if (py_DpArray == NULL) {
6208                 return NULL;
6209         }
6210         {
6211                 int DpArray_cntr_0;
6212                 for (DpArray_cntr_0 = 0; DpArray_cntr_0 < object->dwDpCount; DpArray_cntr_0++) {
6213                         PyObject *py_DpArray_0;
6214                         if (object->DpArray[DpArray_cntr_0] == NULL) {
6215                                 py_DpArray_0 = Py_None;
6216                                 Py_INCREF(py_DpArray_0);
6217                         } else {
6218                                 py_DpArray_0 = pytalloc_reference_ex(&DNS_RPC_DP_ENUM_Type, object->DpArray[DpArray_cntr_0], object->DpArray[DpArray_cntr_0]);
6219                         }
6220                         PyList_SetItem(py_DpArray, DpArray_cntr_0, py_DpArray_0);
6221                 }
6222         }
6223         return py_DpArray;
6224 }
6225
6226 static int py_DNS_RPC_DP_LIST_set_DpArray(PyObject *py_obj, PyObject *value, void *closure)
6227 {
6228         struct DNS_RPC_DP_LIST *object = (struct DNS_RPC_DP_LIST *)pytalloc_get_ptr(py_obj);
6229         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
6230         {
6231                 int DpArray_cntr_0;
6232                 object->DpArray = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->DpArray, PyList_GET_SIZE(value));
6233                 if (!object->DpArray) { return -1;; }
6234                 talloc_set_name_const(object->DpArray, "ARRAY: object->DpArray");
6235                 for (DpArray_cntr_0 = 0; DpArray_cntr_0 < PyList_GET_SIZE(value); DpArray_cntr_0++) {
6236                         if (PyList_GET_ITEM(value, DpArray_cntr_0) == Py_None) {
6237                                 object->DpArray[DpArray_cntr_0] = NULL;
6238                         } else {
6239                                 object->DpArray[DpArray_cntr_0] = NULL;
6240                                 PY_CHECK_TYPE(&DNS_RPC_DP_ENUM_Type, PyList_GET_ITEM(value, DpArray_cntr_0), return -1;);
6241                                 if (talloc_reference(object->DpArray, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, DpArray_cntr_0))) == NULL) {
6242                                         PyErr_NoMemory();
6243                                         return -1;
6244                                 }
6245                                 object->DpArray[DpArray_cntr_0] = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(PyList_GET_ITEM(value, DpArray_cntr_0));
6246                         }
6247                 }
6248         }
6249         return 0;
6250 }
6251
6252 static PyGetSetDef py_DNS_RPC_DP_LIST_getsetters[] = {
6253         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_DP_LIST_get_dwRpcStructureVersion, py_DNS_RPC_DP_LIST_set_dwRpcStructureVersion },
6254         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_DP_LIST_get_dwReserved0, py_DNS_RPC_DP_LIST_set_dwReserved0 },
6255         { discard_const_p(char, "dwDpCount"), py_DNS_RPC_DP_LIST_get_dwDpCount, py_DNS_RPC_DP_LIST_set_dwDpCount },
6256         { discard_const_p(char, "DpArray"), py_DNS_RPC_DP_LIST_get_DpArray, py_DNS_RPC_DP_LIST_set_DpArray },
6257         { NULL }
6258 };
6259
6260 static PyObject *py_DNS_RPC_DP_LIST_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
6261 {
6262         return pytalloc_new(struct DNS_RPC_DP_LIST, type);
6263 }
6264
6265
6266 static PyTypeObject DNS_RPC_DP_LIST_Type = {
6267         PyObject_HEAD_INIT(NULL) 0,
6268         .tp_name = "dnsserver.DNS_RPC_DP_LIST",
6269         .tp_getset = py_DNS_RPC_DP_LIST_getsetters,
6270         .tp_methods = NULL,
6271         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
6272         .tp_basicsize = sizeof(pytalloc_Object),
6273         .tp_new = py_DNS_RPC_DP_LIST_new,
6274 };
6275
6276
6277 static PyObject *py_DNS_RPC_ENLIST_DP_get_dwRpcStructureVersion(PyObject *obj, void *closure)
6278 {
6279         struct DNS_RPC_ENLIST_DP *object = (struct DNS_RPC_ENLIST_DP *)pytalloc_get_ptr(obj);
6280         PyObject *py_dwRpcStructureVersion;
6281         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
6282         return py_dwRpcStructureVersion;
6283 }
6284
6285 static int py_DNS_RPC_ENLIST_DP_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
6286 {
6287         struct DNS_RPC_ENLIST_DP *object = (struct DNS_RPC_ENLIST_DP *)pytalloc_get_ptr(py_obj);
6288         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6289         object->dwRpcStructureVersion = PyInt_AsLong(value);
6290         return 0;
6291 }
6292
6293 static PyObject *py_DNS_RPC_ENLIST_DP_get_dwReserved0(PyObject *obj, void *closure)
6294 {
6295         struct DNS_RPC_ENLIST_DP *object = (struct DNS_RPC_ENLIST_DP *)pytalloc_get_ptr(obj);
6296         PyObject *py_dwReserved0;
6297         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
6298         return py_dwReserved0;
6299 }
6300
6301 static int py_DNS_RPC_ENLIST_DP_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
6302 {
6303         struct DNS_RPC_ENLIST_DP *object = (struct DNS_RPC_ENLIST_DP *)pytalloc_get_ptr(py_obj);
6304         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6305         object->dwReserved0 = PyInt_AsLong(value);
6306         return 0;
6307 }
6308
6309 static PyObject *py_DNS_RPC_ENLIST_DP_get_pszDpFqdn(PyObject *obj, void *closure)
6310 {
6311         struct DNS_RPC_ENLIST_DP *object = (struct DNS_RPC_ENLIST_DP *)pytalloc_get_ptr(obj);
6312         PyObject *py_pszDpFqdn;
6313         if (object->pszDpFqdn == NULL) {
6314                 py_pszDpFqdn = Py_None;
6315                 Py_INCREF(py_pszDpFqdn);
6316         } else {
6317                 if (object->pszDpFqdn == NULL) {
6318                         py_pszDpFqdn = Py_None;
6319                         Py_INCREF(py_pszDpFqdn);
6320                 } else {
6321                         py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
6322                 }
6323         }
6324         return py_pszDpFqdn;
6325 }
6326
6327 static int py_DNS_RPC_ENLIST_DP_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
6328 {
6329         struct DNS_RPC_ENLIST_DP *object = (struct DNS_RPC_ENLIST_DP *)pytalloc_get_ptr(py_obj);
6330         if (value == Py_None) {
6331                 object->pszDpFqdn = NULL;
6332         } else {
6333                 object->pszDpFqdn = NULL;
6334                 if (PyUnicode_Check(value)) {
6335                         object->pszDpFqdn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
6336                 } else if (PyString_Check(value)) {
6337                         object->pszDpFqdn = PyString_AS_STRING(value);
6338                 } else {
6339                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6340                         return -1;
6341                 }
6342         }
6343         return 0;
6344 }
6345
6346 static PyObject *py_DNS_RPC_ENLIST_DP_get_dwOperation(PyObject *obj, void *closure)
6347 {
6348         struct DNS_RPC_ENLIST_DP *object = (struct DNS_RPC_ENLIST_DP *)pytalloc_get_ptr(obj);
6349         PyObject *py_dwOperation;
6350         py_dwOperation = PyInt_FromLong(object->dwOperation);
6351         return py_dwOperation;
6352 }
6353
6354 static int py_DNS_RPC_ENLIST_DP_set_dwOperation(PyObject *py_obj, PyObject *value, void *closure)
6355 {
6356         struct DNS_RPC_ENLIST_DP *object = (struct DNS_RPC_ENLIST_DP *)pytalloc_get_ptr(py_obj);
6357         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6358         object->dwOperation = PyInt_AsLong(value);
6359         return 0;
6360 }
6361
6362 static PyGetSetDef py_DNS_RPC_ENLIST_DP_getsetters[] = {
6363         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_ENLIST_DP_get_dwRpcStructureVersion, py_DNS_RPC_ENLIST_DP_set_dwRpcStructureVersion },
6364         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_ENLIST_DP_get_dwReserved0, py_DNS_RPC_ENLIST_DP_set_dwReserved0 },
6365         { discard_const_p(char, "pszDpFqdn"), py_DNS_RPC_ENLIST_DP_get_pszDpFqdn, py_DNS_RPC_ENLIST_DP_set_pszDpFqdn },
6366         { discard_const_p(char, "dwOperation"), py_DNS_RPC_ENLIST_DP_get_dwOperation, py_DNS_RPC_ENLIST_DP_set_dwOperation },
6367         { NULL }
6368 };
6369
6370 static PyObject *py_DNS_RPC_ENLIST_DP_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
6371 {
6372         return pytalloc_new(struct DNS_RPC_ENLIST_DP, type);
6373 }
6374
6375
6376 static PyTypeObject DNS_RPC_ENLIST_DP_Type = {
6377         PyObject_HEAD_INIT(NULL) 0,
6378         .tp_name = "dnsserver.DNS_RPC_ENLIST_DP",
6379         .tp_getset = py_DNS_RPC_ENLIST_DP_getsetters,
6380         .tp_methods = NULL,
6381         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
6382         .tp_basicsize = sizeof(pytalloc_Object),
6383         .tp_new = py_DNS_RPC_ENLIST_DP_new,
6384 };
6385
6386
6387 static PyObject *py_DNS_RPC_ZONE_CHANGE_DP_get_dwRpcStructureVersion(PyObject *obj, void *closure)
6388 {
6389         struct DNS_RPC_ZONE_CHANGE_DP *object = (struct DNS_RPC_ZONE_CHANGE_DP *)pytalloc_get_ptr(obj);
6390         PyObject *py_dwRpcStructureVersion;
6391         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
6392         return py_dwRpcStructureVersion;
6393 }
6394
6395 static int py_DNS_RPC_ZONE_CHANGE_DP_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
6396 {
6397         struct DNS_RPC_ZONE_CHANGE_DP *object = (struct DNS_RPC_ZONE_CHANGE_DP *)pytalloc_get_ptr(py_obj);
6398         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6399         object->dwRpcStructureVersion = PyInt_AsLong(value);
6400         return 0;
6401 }
6402
6403 static PyObject *py_DNS_RPC_ZONE_CHANGE_DP_get_dwReserved0(PyObject *obj, void *closure)
6404 {
6405         struct DNS_RPC_ZONE_CHANGE_DP *object = (struct DNS_RPC_ZONE_CHANGE_DP *)pytalloc_get_ptr(obj);
6406         PyObject *py_dwReserved0;
6407         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
6408         return py_dwReserved0;
6409 }
6410
6411 static int py_DNS_RPC_ZONE_CHANGE_DP_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
6412 {
6413         struct DNS_RPC_ZONE_CHANGE_DP *object = (struct DNS_RPC_ZONE_CHANGE_DP *)pytalloc_get_ptr(py_obj);
6414         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6415         object->dwReserved0 = PyInt_AsLong(value);
6416         return 0;
6417 }
6418
6419 static PyObject *py_DNS_RPC_ZONE_CHANGE_DP_get_pszDestPartition(PyObject *obj, void *closure)
6420 {
6421         struct DNS_RPC_ZONE_CHANGE_DP *object = (struct DNS_RPC_ZONE_CHANGE_DP *)pytalloc_get_ptr(obj);
6422         PyObject *py_pszDestPartition;
6423         if (object->pszDestPartition == NULL) {
6424                 py_pszDestPartition = Py_None;
6425                 Py_INCREF(py_pszDestPartition);
6426         } else {
6427                 if (object->pszDestPartition == NULL) {
6428                         py_pszDestPartition = Py_None;
6429                         Py_INCREF(py_pszDestPartition);
6430                 } else {
6431                         py_pszDestPartition = PyUnicode_Decode(object->pszDestPartition, strlen(object->pszDestPartition), "utf-8", "ignore");
6432                 }
6433         }
6434         return py_pszDestPartition;
6435 }
6436
6437 static int py_DNS_RPC_ZONE_CHANGE_DP_set_pszDestPartition(PyObject *py_obj, PyObject *value, void *closure)
6438 {
6439         struct DNS_RPC_ZONE_CHANGE_DP *object = (struct DNS_RPC_ZONE_CHANGE_DP *)pytalloc_get_ptr(py_obj);
6440         if (value == Py_None) {
6441                 object->pszDestPartition = NULL;
6442         } else {
6443                 object->pszDestPartition = NULL;
6444                 if (PyUnicode_Check(value)) {
6445                         object->pszDestPartition = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
6446                 } else if (PyString_Check(value)) {
6447                         object->pszDestPartition = PyString_AS_STRING(value);
6448                 } else {
6449                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6450                         return -1;
6451                 }
6452         }
6453         return 0;
6454 }
6455
6456 static PyGetSetDef py_DNS_RPC_ZONE_CHANGE_DP_getsetters[] = {
6457         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_ZONE_CHANGE_DP_get_dwRpcStructureVersion, py_DNS_RPC_ZONE_CHANGE_DP_set_dwRpcStructureVersion },
6458         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_ZONE_CHANGE_DP_get_dwReserved0, py_DNS_RPC_ZONE_CHANGE_DP_set_dwReserved0 },
6459         { discard_const_p(char, "pszDestPartition"), py_DNS_RPC_ZONE_CHANGE_DP_get_pszDestPartition, py_DNS_RPC_ZONE_CHANGE_DP_set_pszDestPartition },
6460         { NULL }
6461 };
6462
6463 static PyObject *py_DNS_RPC_ZONE_CHANGE_DP_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
6464 {
6465         return pytalloc_new(struct DNS_RPC_ZONE_CHANGE_DP, type);
6466 }
6467
6468
6469 static PyTypeObject DNS_RPC_ZONE_CHANGE_DP_Type = {
6470         PyObject_HEAD_INIT(NULL) 0,
6471         .tp_name = "dnsserver.DNS_RPC_ZONE_CHANGE_DP",
6472         .tp_getset = py_DNS_RPC_ZONE_CHANGE_DP_getsetters,
6473         .tp_methods = NULL,
6474         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
6475         .tp_basicsize = sizeof(pytalloc_Object),
6476         .tp_new = py_DNS_RPC_ZONE_CHANGE_DP_new,
6477 };
6478
6479
6480 static PyObject *py_DNS_RPC_ZONE_W2K_get_pszZoneName(PyObject *obj, void *closure)
6481 {
6482         struct DNS_RPC_ZONE_W2K *object = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(obj);
6483         PyObject *py_pszZoneName;
6484         if (object->pszZoneName == NULL) {
6485                 py_pszZoneName = Py_None;
6486                 Py_INCREF(py_pszZoneName);
6487         } else {
6488                 if (object->pszZoneName == NULL) {
6489                         py_pszZoneName = Py_None;
6490                         Py_INCREF(py_pszZoneName);
6491                 } else {
6492                         py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
6493                 }
6494         }
6495         return py_pszZoneName;
6496 }
6497
6498 static int py_DNS_RPC_ZONE_W2K_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
6499 {
6500         struct DNS_RPC_ZONE_W2K *object = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(py_obj);
6501         if (value == Py_None) {
6502                 object->pszZoneName = NULL;
6503         } else {
6504                 object->pszZoneName = NULL;
6505                 if (PyUnicode_Check(value)) {
6506                         object->pszZoneName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
6507                 } else if (PyString_Check(value)) {
6508                         object->pszZoneName = PyString_AS_STRING(value);
6509                 } else {
6510                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6511                         return -1;
6512                 }
6513         }
6514         return 0;
6515 }
6516
6517 static PyObject *py_DNS_RPC_ZONE_W2K_get_Flags(PyObject *obj, void *closure)
6518 {
6519         struct DNS_RPC_ZONE_W2K *object = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(obj);
6520         PyObject *py_Flags;
6521         py_Flags = PyInt_FromLong(object->Flags);
6522         return py_Flags;
6523 }
6524
6525 static int py_DNS_RPC_ZONE_W2K_set_Flags(PyObject *py_obj, PyObject *value, void *closure)
6526 {
6527         struct DNS_RPC_ZONE_W2K *object = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(py_obj);
6528         if (PyLong_Check(value)) {
6529                 object->Flags = PyLong_AsLongLong(value);
6530         } else if (PyInt_Check(value)) {
6531                 object->Flags = PyInt_AsLong(value);
6532         } else {
6533                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
6534                   PyInt_Type.tp_name, PyLong_Type.tp_name);
6535                 return -1;
6536         }
6537         return 0;
6538 }
6539
6540 static PyObject *py_DNS_RPC_ZONE_W2K_get_ZoneType(PyObject *obj, void *closure)
6541 {
6542         struct DNS_RPC_ZONE_W2K *object = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(obj);
6543         PyObject *py_ZoneType;
6544         py_ZoneType = PyInt_FromLong(object->ZoneType);
6545         return py_ZoneType;
6546 }
6547
6548 static int py_DNS_RPC_ZONE_W2K_set_ZoneType(PyObject *py_obj, PyObject *value, void *closure)
6549 {
6550         struct DNS_RPC_ZONE_W2K *object = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(py_obj);
6551         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6552         object->ZoneType = PyInt_AsLong(value);
6553         return 0;
6554 }
6555
6556 static PyObject *py_DNS_RPC_ZONE_W2K_get_Version(PyObject *obj, void *closure)
6557 {
6558         struct DNS_RPC_ZONE_W2K *object = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(obj);
6559         PyObject *py_Version;
6560         py_Version = PyInt_FromLong(object->Version);
6561         return py_Version;
6562 }
6563
6564 static int py_DNS_RPC_ZONE_W2K_set_Version(PyObject *py_obj, PyObject *value, void *closure)
6565 {
6566         struct DNS_RPC_ZONE_W2K *object = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(py_obj);
6567         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6568         object->Version = PyInt_AsLong(value);
6569         return 0;
6570 }
6571
6572 static PyGetSetDef py_DNS_RPC_ZONE_W2K_getsetters[] = {
6573         { discard_const_p(char, "pszZoneName"), py_DNS_RPC_ZONE_W2K_get_pszZoneName, py_DNS_RPC_ZONE_W2K_set_pszZoneName },
6574         { discard_const_p(char, "Flags"), py_DNS_RPC_ZONE_W2K_get_Flags, py_DNS_RPC_ZONE_W2K_set_Flags },
6575         { discard_const_p(char, "ZoneType"), py_DNS_RPC_ZONE_W2K_get_ZoneType, py_DNS_RPC_ZONE_W2K_set_ZoneType },
6576         { discard_const_p(char, "Version"), py_DNS_RPC_ZONE_W2K_get_Version, py_DNS_RPC_ZONE_W2K_set_Version },
6577         { NULL }
6578 };
6579
6580 static PyObject *py_DNS_RPC_ZONE_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
6581 {
6582         return pytalloc_new(struct DNS_RPC_ZONE_W2K, type);
6583 }
6584
6585
6586 static PyTypeObject DNS_RPC_ZONE_W2K_Type = {
6587         PyObject_HEAD_INIT(NULL) 0,
6588         .tp_name = "dnsserver.DNS_RPC_ZONE_W2K",
6589         .tp_getset = py_DNS_RPC_ZONE_W2K_getsetters,
6590         .tp_methods = NULL,
6591         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
6592         .tp_basicsize = sizeof(pytalloc_Object),
6593         .tp_new = py_DNS_RPC_ZONE_W2K_new,
6594 };
6595
6596
6597 static PyObject *py_DNS_RPC_ZONE_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
6598 {
6599         struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(obj);
6600         PyObject *py_dwRpcStructureVersion;
6601         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
6602         return py_dwRpcStructureVersion;
6603 }
6604
6605 static int py_DNS_RPC_ZONE_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
6606 {
6607         struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(py_obj);
6608         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6609         object->dwRpcStructureVersion = PyInt_AsLong(value);
6610         return 0;
6611 }
6612
6613 static PyObject *py_DNS_RPC_ZONE_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
6614 {
6615         struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(obj);
6616         PyObject *py_dwReserved0;
6617         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
6618         return py_dwReserved0;
6619 }
6620
6621 static int py_DNS_RPC_ZONE_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
6622 {
6623         struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(py_obj);
6624         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6625         object->dwReserved0 = PyInt_AsLong(value);
6626         return 0;
6627 }
6628
6629 static PyObject *py_DNS_RPC_ZONE_DOTNET_get_pszZoneName(PyObject *obj, void *closure)
6630 {
6631         struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(obj);
6632         PyObject *py_pszZoneName;
6633         if (object->pszZoneName == NULL) {
6634                 py_pszZoneName = Py_None;
6635                 Py_INCREF(py_pszZoneName);
6636         } else {
6637                 if (object->pszZoneName == NULL) {
6638                         py_pszZoneName = Py_None;
6639                         Py_INCREF(py_pszZoneName);
6640                 } else {
6641                         py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
6642                 }
6643         }
6644         return py_pszZoneName;
6645 }
6646
6647 static int py_DNS_RPC_ZONE_DOTNET_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
6648 {
6649         struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(py_obj);
6650         if (value == Py_None) {
6651                 object->pszZoneName = NULL;
6652         } else {
6653                 object->pszZoneName = NULL;
6654                 if (PyUnicode_Check(value)) {
6655                         object->pszZoneName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
6656                 } else if (PyString_Check(value)) {
6657                         object->pszZoneName = PyString_AS_STRING(value);
6658                 } else {
6659                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6660                         return -1;
6661                 }
6662         }
6663         return 0;
6664 }
6665
6666 static PyObject *py_DNS_RPC_ZONE_DOTNET_get_Flags(PyObject *obj, void *closure)
6667 {
6668         struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(obj);
6669         PyObject *py_Flags;
6670         py_Flags = PyInt_FromLong(object->Flags);
6671         return py_Flags;
6672 }
6673
6674 static int py_DNS_RPC_ZONE_DOTNET_set_Flags(PyObject *py_obj, PyObject *value, void *closure)
6675 {
6676         struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(py_obj);
6677         if (PyLong_Check(value)) {
6678                 object->Flags = PyLong_AsLongLong(value);
6679         } else if (PyInt_Check(value)) {
6680                 object->Flags = PyInt_AsLong(value);
6681         } else {
6682                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
6683                   PyInt_Type.tp_name, PyLong_Type.tp_name);
6684                 return -1;
6685         }
6686         return 0;
6687 }
6688
6689 static PyObject *py_DNS_RPC_ZONE_DOTNET_get_ZoneType(PyObject *obj, void *closure)
6690 {
6691         struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(obj);
6692         PyObject *py_ZoneType;
6693         py_ZoneType = PyInt_FromLong(object->ZoneType);
6694         return py_ZoneType;
6695 }
6696
6697 static int py_DNS_RPC_ZONE_DOTNET_set_ZoneType(PyObject *py_obj, PyObject *value, void *closure)
6698 {
6699         struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(py_obj);
6700         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6701         object->ZoneType = PyInt_AsLong(value);
6702         return 0;
6703 }
6704
6705 static PyObject *py_DNS_RPC_ZONE_DOTNET_get_Version(PyObject *obj, void *closure)
6706 {
6707         struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(obj);
6708         PyObject *py_Version;
6709         py_Version = PyInt_FromLong(object->Version);
6710         return py_Version;
6711 }
6712
6713 static int py_DNS_RPC_ZONE_DOTNET_set_Version(PyObject *py_obj, PyObject *value, void *closure)
6714 {
6715         struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(py_obj);
6716         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6717         object->Version = PyInt_AsLong(value);
6718         return 0;
6719 }
6720
6721 static PyObject *py_DNS_RPC_ZONE_DOTNET_get_dwDpFlags(PyObject *obj, void *closure)
6722 {
6723         struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(obj);
6724         PyObject *py_dwDpFlags;
6725         py_dwDpFlags = PyInt_FromLong(object->dwDpFlags);
6726         return py_dwDpFlags;
6727 }
6728
6729 static int py_DNS_RPC_ZONE_DOTNET_set_dwDpFlags(PyObject *py_obj, PyObject *value, void *closure)
6730 {
6731         struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(py_obj);
6732         if (PyLong_Check(value)) {
6733                 object->dwDpFlags = PyLong_AsLongLong(value);
6734         } else if (PyInt_Check(value)) {
6735                 object->dwDpFlags = PyInt_AsLong(value);
6736         } else {
6737                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
6738                   PyInt_Type.tp_name, PyLong_Type.tp_name);
6739                 return -1;
6740         }
6741         return 0;
6742 }
6743
6744 static PyObject *py_DNS_RPC_ZONE_DOTNET_get_pszDpFqdn(PyObject *obj, void *closure)
6745 {
6746         struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(obj);
6747         PyObject *py_pszDpFqdn;
6748         if (object->pszDpFqdn == NULL) {
6749                 py_pszDpFqdn = Py_None;
6750                 Py_INCREF(py_pszDpFqdn);
6751         } else {
6752                 if (object->pszDpFqdn == NULL) {
6753                         py_pszDpFqdn = Py_None;
6754                         Py_INCREF(py_pszDpFqdn);
6755                 } else {
6756                         py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
6757                 }
6758         }
6759         return py_pszDpFqdn;
6760 }
6761
6762 static int py_DNS_RPC_ZONE_DOTNET_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
6763 {
6764         struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(py_obj);
6765         if (value == Py_None) {
6766                 object->pszDpFqdn = NULL;
6767         } else {
6768                 object->pszDpFqdn = NULL;
6769                 if (PyUnicode_Check(value)) {
6770                         object->pszDpFqdn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
6771                 } else if (PyString_Check(value)) {
6772                         object->pszDpFqdn = PyString_AS_STRING(value);
6773                 } else {
6774                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6775                         return -1;
6776                 }
6777         }
6778         return 0;
6779 }
6780
6781 static PyGetSetDef py_DNS_RPC_ZONE_DOTNET_getsetters[] = {
6782         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_ZONE_DOTNET_get_dwRpcStructureVersion, py_DNS_RPC_ZONE_DOTNET_set_dwRpcStructureVersion },
6783         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_ZONE_DOTNET_get_dwReserved0, py_DNS_RPC_ZONE_DOTNET_set_dwReserved0 },
6784         { discard_const_p(char, "pszZoneName"), py_DNS_RPC_ZONE_DOTNET_get_pszZoneName, py_DNS_RPC_ZONE_DOTNET_set_pszZoneName },
6785         { discard_const_p(char, "Flags"), py_DNS_RPC_ZONE_DOTNET_get_Flags, py_DNS_RPC_ZONE_DOTNET_set_Flags },
6786         { discard_const_p(char, "ZoneType"), py_DNS_RPC_ZONE_DOTNET_get_ZoneType, py_DNS_RPC_ZONE_DOTNET_set_ZoneType },
6787         { discard_const_p(char, "Version"), py_DNS_RPC_ZONE_DOTNET_get_Version, py_DNS_RPC_ZONE_DOTNET_set_Version },
6788         { discard_const_p(char, "dwDpFlags"), py_DNS_RPC_ZONE_DOTNET_get_dwDpFlags, py_DNS_RPC_ZONE_DOTNET_set_dwDpFlags },
6789         { discard_const_p(char, "pszDpFqdn"), py_DNS_RPC_ZONE_DOTNET_get_pszDpFqdn, py_DNS_RPC_ZONE_DOTNET_set_pszDpFqdn },
6790         { NULL }
6791 };
6792
6793 static PyObject *py_DNS_RPC_ZONE_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
6794 {
6795         return pytalloc_new(struct DNS_RPC_ZONE_DOTNET, type);
6796 }
6797
6798
6799 static PyTypeObject DNS_RPC_ZONE_DOTNET_Type = {
6800         PyObject_HEAD_INIT(NULL) 0,
6801         .tp_name = "dnsserver.DNS_RPC_ZONE_DOTNET",
6802         .tp_getset = py_DNS_RPC_ZONE_DOTNET_getsetters,
6803         .tp_methods = NULL,
6804         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
6805         .tp_basicsize = sizeof(pytalloc_Object),
6806         .tp_new = py_DNS_RPC_ZONE_DOTNET_new,
6807 };
6808
6809
6810 static PyObject *py_DNS_RPC_ZONE_LIST_W2K_get_dwZoneCount(PyObject *obj, void *closure)
6811 {
6812         struct DNS_RPC_ZONE_LIST_W2K *object = (struct DNS_RPC_ZONE_LIST_W2K *)pytalloc_get_ptr(obj);
6813         PyObject *py_dwZoneCount;
6814         py_dwZoneCount = PyInt_FromLong(object->dwZoneCount);
6815         return py_dwZoneCount;
6816 }
6817
6818 static int py_DNS_RPC_ZONE_LIST_W2K_set_dwZoneCount(PyObject *py_obj, PyObject *value, void *closure)
6819 {
6820         struct DNS_RPC_ZONE_LIST_W2K *object = (struct DNS_RPC_ZONE_LIST_W2K *)pytalloc_get_ptr(py_obj);
6821         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6822         object->dwZoneCount = PyInt_AsLong(value);
6823         return 0;
6824 }
6825
6826 static PyObject *py_DNS_RPC_ZONE_LIST_W2K_get_ZoneArray(PyObject *obj, void *closure)
6827 {
6828         struct DNS_RPC_ZONE_LIST_W2K *object = (struct DNS_RPC_ZONE_LIST_W2K *)pytalloc_get_ptr(obj);
6829         PyObject *py_ZoneArray;
6830         py_ZoneArray = PyList_New(object->dwZoneCount);
6831         if (py_ZoneArray == NULL) {
6832                 return NULL;
6833         }
6834         {
6835                 int ZoneArray_cntr_0;
6836                 for (ZoneArray_cntr_0 = 0; ZoneArray_cntr_0 < object->dwZoneCount; ZoneArray_cntr_0++) {
6837                         PyObject *py_ZoneArray_0;
6838                         if (object->ZoneArray[ZoneArray_cntr_0] == NULL) {
6839                                 py_ZoneArray_0 = Py_None;
6840                                 Py_INCREF(py_ZoneArray_0);
6841                         } else {
6842                                 py_ZoneArray_0 = pytalloc_reference_ex(&DNS_RPC_ZONE_W2K_Type, object->ZoneArray[ZoneArray_cntr_0], object->ZoneArray[ZoneArray_cntr_0]);
6843                         }
6844                         PyList_SetItem(py_ZoneArray, ZoneArray_cntr_0, py_ZoneArray_0);
6845                 }
6846         }
6847         return py_ZoneArray;
6848 }
6849
6850 static int py_DNS_RPC_ZONE_LIST_W2K_set_ZoneArray(PyObject *py_obj, PyObject *value, void *closure)
6851 {
6852         struct DNS_RPC_ZONE_LIST_W2K *object = (struct DNS_RPC_ZONE_LIST_W2K *)pytalloc_get_ptr(py_obj);
6853         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
6854         {
6855                 int ZoneArray_cntr_0;
6856                 object->ZoneArray = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->ZoneArray, PyList_GET_SIZE(value));
6857                 if (!object->ZoneArray) { return -1;; }
6858                 talloc_set_name_const(object->ZoneArray, "ARRAY: object->ZoneArray");
6859                 for (ZoneArray_cntr_0 = 0; ZoneArray_cntr_0 < PyList_GET_SIZE(value); ZoneArray_cntr_0++) {
6860                         if (PyList_GET_ITEM(value, ZoneArray_cntr_0) == Py_None) {
6861                                 object->ZoneArray[ZoneArray_cntr_0] = NULL;
6862                         } else {
6863                                 object->ZoneArray[ZoneArray_cntr_0] = NULL;
6864                                 PY_CHECK_TYPE(&DNS_RPC_ZONE_W2K_Type, PyList_GET_ITEM(value, ZoneArray_cntr_0), return -1;);
6865                                 if (talloc_reference(object->ZoneArray, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, ZoneArray_cntr_0))) == NULL) {
6866                                         PyErr_NoMemory();
6867                                         return -1;
6868                                 }
6869                                 object->ZoneArray[ZoneArray_cntr_0] = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(PyList_GET_ITEM(value, ZoneArray_cntr_0));
6870                         }
6871                 }
6872         }
6873         return 0;
6874 }
6875
6876 static PyGetSetDef py_DNS_RPC_ZONE_LIST_W2K_getsetters[] = {
6877         { discard_const_p(char, "dwZoneCount"), py_DNS_RPC_ZONE_LIST_W2K_get_dwZoneCount, py_DNS_RPC_ZONE_LIST_W2K_set_dwZoneCount },
6878         { discard_const_p(char, "ZoneArray"), py_DNS_RPC_ZONE_LIST_W2K_get_ZoneArray, py_DNS_RPC_ZONE_LIST_W2K_set_ZoneArray },
6879         { NULL }
6880 };
6881
6882 static PyObject *py_DNS_RPC_ZONE_LIST_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
6883 {
6884         return pytalloc_new(struct DNS_RPC_ZONE_LIST_W2K, type);
6885 }
6886
6887
6888 static PyTypeObject DNS_RPC_ZONE_LIST_W2K_Type = {
6889         PyObject_HEAD_INIT(NULL) 0,
6890         .tp_name = "dnsserver.DNS_RPC_ZONE_LIST_W2K",
6891         .tp_getset = py_DNS_RPC_ZONE_LIST_W2K_getsetters,
6892         .tp_methods = NULL,
6893         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
6894         .tp_basicsize = sizeof(pytalloc_Object),
6895         .tp_new = py_DNS_RPC_ZONE_LIST_W2K_new,
6896 };
6897
6898
6899 static PyObject *py_DNS_RPC_ZONE_LIST_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
6900 {
6901         struct DNS_RPC_ZONE_LIST_DOTNET *object = (struct DNS_RPC_ZONE_LIST_DOTNET *)pytalloc_get_ptr(obj);
6902         PyObject *py_dwRpcStructureVersion;
6903         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
6904         return py_dwRpcStructureVersion;
6905 }
6906
6907 static int py_DNS_RPC_ZONE_LIST_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
6908 {
6909         struct DNS_RPC_ZONE_LIST_DOTNET *object = (struct DNS_RPC_ZONE_LIST_DOTNET *)pytalloc_get_ptr(py_obj);
6910         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6911         object->dwRpcStructureVersion = PyInt_AsLong(value);
6912         return 0;
6913 }
6914
6915 static PyObject *py_DNS_RPC_ZONE_LIST_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
6916 {
6917         struct DNS_RPC_ZONE_LIST_DOTNET *object = (struct DNS_RPC_ZONE_LIST_DOTNET *)pytalloc_get_ptr(obj);
6918         PyObject *py_dwReserved0;
6919         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
6920         return py_dwReserved0;
6921 }
6922
6923 static int py_DNS_RPC_ZONE_LIST_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
6924 {
6925         struct DNS_RPC_ZONE_LIST_DOTNET *object = (struct DNS_RPC_ZONE_LIST_DOTNET *)pytalloc_get_ptr(py_obj);
6926         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6927         object->dwReserved0 = PyInt_AsLong(value);
6928         return 0;
6929 }
6930
6931 static PyObject *py_DNS_RPC_ZONE_LIST_DOTNET_get_dwZoneCount(PyObject *obj, void *closure)
6932 {
6933         struct DNS_RPC_ZONE_LIST_DOTNET *object = (struct DNS_RPC_ZONE_LIST_DOTNET *)pytalloc_get_ptr(obj);
6934         PyObject *py_dwZoneCount;
6935         py_dwZoneCount = PyInt_FromLong(object->dwZoneCount);
6936         return py_dwZoneCount;
6937 }
6938
6939 static int py_DNS_RPC_ZONE_LIST_DOTNET_set_dwZoneCount(PyObject *py_obj, PyObject *value, void *closure)
6940 {
6941         struct DNS_RPC_ZONE_LIST_DOTNET *object = (struct DNS_RPC_ZONE_LIST_DOTNET *)pytalloc_get_ptr(py_obj);
6942         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
6943         object->dwZoneCount = PyInt_AsLong(value);
6944         return 0;
6945 }
6946
6947 static PyObject *py_DNS_RPC_ZONE_LIST_DOTNET_get_ZoneArray(PyObject *obj, void *closure)
6948 {
6949         struct DNS_RPC_ZONE_LIST_DOTNET *object = (struct DNS_RPC_ZONE_LIST_DOTNET *)pytalloc_get_ptr(obj);
6950         PyObject *py_ZoneArray;
6951         py_ZoneArray = PyList_New(object->dwZoneCount);
6952         if (py_ZoneArray == NULL) {
6953                 return NULL;
6954         }
6955         {
6956                 int ZoneArray_cntr_0;
6957                 for (ZoneArray_cntr_0 = 0; ZoneArray_cntr_0 < object->dwZoneCount; ZoneArray_cntr_0++) {
6958                         PyObject *py_ZoneArray_0;
6959                         if (object->ZoneArray[ZoneArray_cntr_0] == NULL) {
6960                                 py_ZoneArray_0 = Py_None;
6961                                 Py_INCREF(py_ZoneArray_0);
6962                         } else {
6963                                 py_ZoneArray_0 = pytalloc_reference_ex(&DNS_RPC_ZONE_DOTNET_Type, object->ZoneArray[ZoneArray_cntr_0], object->ZoneArray[ZoneArray_cntr_0]);
6964                         }
6965                         PyList_SetItem(py_ZoneArray, ZoneArray_cntr_0, py_ZoneArray_0);
6966                 }
6967         }
6968         return py_ZoneArray;
6969 }
6970
6971 static int py_DNS_RPC_ZONE_LIST_DOTNET_set_ZoneArray(PyObject *py_obj, PyObject *value, void *closure)
6972 {
6973         struct DNS_RPC_ZONE_LIST_DOTNET *object = (struct DNS_RPC_ZONE_LIST_DOTNET *)pytalloc_get_ptr(py_obj);
6974         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
6975         {
6976                 int ZoneArray_cntr_0;
6977                 object->ZoneArray = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->ZoneArray, PyList_GET_SIZE(value));
6978                 if (!object->ZoneArray) { return -1;; }
6979                 talloc_set_name_const(object->ZoneArray, "ARRAY: object->ZoneArray");
6980                 for (ZoneArray_cntr_0 = 0; ZoneArray_cntr_0 < PyList_GET_SIZE(value); ZoneArray_cntr_0++) {
6981                         if (PyList_GET_ITEM(value, ZoneArray_cntr_0) == Py_None) {
6982                                 object->ZoneArray[ZoneArray_cntr_0] = NULL;
6983                         } else {
6984                                 object->ZoneArray[ZoneArray_cntr_0] = NULL;
6985                                 PY_CHECK_TYPE(&DNS_RPC_ZONE_DOTNET_Type, PyList_GET_ITEM(value, ZoneArray_cntr_0), return -1;);
6986                                 if (talloc_reference(object->ZoneArray, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, ZoneArray_cntr_0))) == NULL) {
6987                                         PyErr_NoMemory();
6988                                         return -1;
6989                                 }
6990                                 object->ZoneArray[ZoneArray_cntr_0] = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(PyList_GET_ITEM(value, ZoneArray_cntr_0));
6991                         }
6992                 }
6993         }
6994         return 0;
6995 }
6996
6997 static PyGetSetDef py_DNS_RPC_ZONE_LIST_DOTNET_getsetters[] = {
6998         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_ZONE_LIST_DOTNET_get_dwRpcStructureVersion, py_DNS_RPC_ZONE_LIST_DOTNET_set_dwRpcStructureVersion },
6999         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_ZONE_LIST_DOTNET_get_dwReserved0, py_DNS_RPC_ZONE_LIST_DOTNET_set_dwReserved0 },
7000         { discard_const_p(char, "dwZoneCount"), py_DNS_RPC_ZONE_LIST_DOTNET_get_dwZoneCount, py_DNS_RPC_ZONE_LIST_DOTNET_set_dwZoneCount },
7001         { discard_const_p(char, "ZoneArray"), py_DNS_RPC_ZONE_LIST_DOTNET_get_ZoneArray, py_DNS_RPC_ZONE_LIST_DOTNET_set_ZoneArray },
7002         { NULL }
7003 };
7004
7005 static PyObject *py_DNS_RPC_ZONE_LIST_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
7006 {
7007         return pytalloc_new(struct DNS_RPC_ZONE_LIST_DOTNET, type);
7008 }
7009
7010
7011 static PyTypeObject DNS_RPC_ZONE_LIST_DOTNET_Type = {
7012         PyObject_HEAD_INIT(NULL) 0,
7013         .tp_name = "dnsserver.DNS_RPC_ZONE_LIST_DOTNET",
7014         .tp_getset = py_DNS_RPC_ZONE_LIST_DOTNET_getsetters,
7015         .tp_methods = NULL,
7016         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
7017         .tp_basicsize = sizeof(pytalloc_Object),
7018         .tp_new = py_DNS_RPC_ZONE_LIST_DOTNET_new,
7019 };
7020
7021
7022 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_pszZoneName(PyObject *obj, void *closure)
7023 {
7024         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7025         PyObject *py_pszZoneName;
7026         if (object->pszZoneName == NULL) {
7027                 py_pszZoneName = Py_None;
7028                 Py_INCREF(py_pszZoneName);
7029         } else {
7030                 if (object->pszZoneName == NULL) {
7031                         py_pszZoneName = Py_None;
7032                         Py_INCREF(py_pszZoneName);
7033                 } else {
7034                         py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
7035                 }
7036         }
7037         return py_pszZoneName;
7038 }
7039
7040 static int py_DNS_RPC_ZONE_INFO_W2K_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
7041 {
7042         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7043         if (value == Py_None) {
7044                 object->pszZoneName = NULL;
7045         } else {
7046                 object->pszZoneName = NULL;
7047                 if (PyUnicode_Check(value)) {
7048                         object->pszZoneName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
7049                 } else if (PyString_Check(value)) {
7050                         object->pszZoneName = PyString_AS_STRING(value);
7051                 } else {
7052                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
7053                         return -1;
7054                 }
7055         }
7056         return 0;
7057 }
7058
7059 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_dwZoneType(PyObject *obj, void *closure)
7060 {
7061         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7062         PyObject *py_dwZoneType;
7063         py_dwZoneType = PyInt_FromLong(object->dwZoneType);
7064         return py_dwZoneType;
7065 }
7066
7067 static int py_DNS_RPC_ZONE_INFO_W2K_set_dwZoneType(PyObject *py_obj, PyObject *value, void *closure)
7068 {
7069         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7070         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7071         object->dwZoneType = PyInt_AsLong(value);
7072         return 0;
7073 }
7074
7075 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fReverse(PyObject *obj, void *closure)
7076 {
7077         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7078         PyObject *py_fReverse;
7079         py_fReverse = PyInt_FromLong(object->fReverse);
7080         return py_fReverse;
7081 }
7082
7083 static int py_DNS_RPC_ZONE_INFO_W2K_set_fReverse(PyObject *py_obj, PyObject *value, void *closure)
7084 {
7085         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7086         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7087         object->fReverse = PyInt_AsLong(value);
7088         return 0;
7089 }
7090
7091 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fAllowUpdate(PyObject *obj, void *closure)
7092 {
7093         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7094         PyObject *py_fAllowUpdate;
7095         py_fAllowUpdate = PyInt_FromLong(object->fAllowUpdate);
7096         return py_fAllowUpdate;
7097 }
7098
7099 static int py_DNS_RPC_ZONE_INFO_W2K_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
7100 {
7101         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7102         if (PyLong_Check(value)) {
7103                 object->fAllowUpdate = PyLong_AsLongLong(value);
7104         } else if (PyInt_Check(value)) {
7105                 object->fAllowUpdate = PyInt_AsLong(value);
7106         } else {
7107                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
7108                   PyInt_Type.tp_name, PyLong_Type.tp_name);
7109                 return -1;
7110         }
7111         return 0;
7112 }
7113
7114 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fPaused(PyObject *obj, void *closure)
7115 {
7116         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7117         PyObject *py_fPaused;
7118         py_fPaused = PyInt_FromLong(object->fPaused);
7119         return py_fPaused;
7120 }
7121
7122 static int py_DNS_RPC_ZONE_INFO_W2K_set_fPaused(PyObject *py_obj, PyObject *value, void *closure)
7123 {
7124         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7125         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7126         object->fPaused = PyInt_AsLong(value);
7127         return 0;
7128 }
7129
7130 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fShutdown(PyObject *obj, void *closure)
7131 {
7132         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7133         PyObject *py_fShutdown;
7134         py_fShutdown = PyInt_FromLong(object->fShutdown);
7135         return py_fShutdown;
7136 }
7137
7138 static int py_DNS_RPC_ZONE_INFO_W2K_set_fShutdown(PyObject *py_obj, PyObject *value, void *closure)
7139 {
7140         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7141         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7142         object->fShutdown = PyInt_AsLong(value);
7143         return 0;
7144 }
7145
7146 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fAutoCreated(PyObject *obj, void *closure)
7147 {
7148         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7149         PyObject *py_fAutoCreated;
7150         py_fAutoCreated = PyInt_FromLong(object->fAutoCreated);
7151         return py_fAutoCreated;
7152 }
7153
7154 static int py_DNS_RPC_ZONE_INFO_W2K_set_fAutoCreated(PyObject *py_obj, PyObject *value, void *closure)
7155 {
7156         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7157         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7158         object->fAutoCreated = PyInt_AsLong(value);
7159         return 0;
7160 }
7161
7162 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fUseDatabase(PyObject *obj, void *closure)
7163 {
7164         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7165         PyObject *py_fUseDatabase;
7166         py_fUseDatabase = PyInt_FromLong(object->fUseDatabase);
7167         return py_fUseDatabase;
7168 }
7169
7170 static int py_DNS_RPC_ZONE_INFO_W2K_set_fUseDatabase(PyObject *py_obj, PyObject *value, void *closure)
7171 {
7172         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7173         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7174         object->fUseDatabase = PyInt_AsLong(value);
7175         return 0;
7176 }
7177
7178 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_pszDataFile(PyObject *obj, void *closure)
7179 {
7180         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7181         PyObject *py_pszDataFile;
7182         if (object->pszDataFile == NULL) {
7183                 py_pszDataFile = Py_None;
7184                 Py_INCREF(py_pszDataFile);
7185         } else {
7186                 if (object->pszDataFile == NULL) {
7187                         py_pszDataFile = Py_None;
7188                         Py_INCREF(py_pszDataFile);
7189                 } else {
7190                         py_pszDataFile = PyUnicode_Decode(object->pszDataFile, strlen(object->pszDataFile), "utf-8", "ignore");
7191                 }
7192         }
7193         return py_pszDataFile;
7194 }
7195
7196 static int py_DNS_RPC_ZONE_INFO_W2K_set_pszDataFile(PyObject *py_obj, PyObject *value, void *closure)
7197 {
7198         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7199         if (value == Py_None) {
7200                 object->pszDataFile = NULL;
7201         } else {
7202                 object->pszDataFile = NULL;
7203                 if (PyUnicode_Check(value)) {
7204                         object->pszDataFile = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
7205                 } else if (PyString_Check(value)) {
7206                         object->pszDataFile = PyString_AS_STRING(value);
7207                 } else {
7208                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
7209                         return -1;
7210                 }
7211         }
7212         return 0;
7213 }
7214
7215 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_aipMasters(PyObject *obj, void *closure)
7216 {
7217         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7218         PyObject *py_aipMasters;
7219         if (object->aipMasters == NULL) {
7220                 py_aipMasters = Py_None;
7221                 Py_INCREF(py_aipMasters);
7222         } else {
7223                 py_aipMasters = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipMasters, object->aipMasters);
7224         }
7225         return py_aipMasters;
7226 }
7227
7228 static int py_DNS_RPC_ZONE_INFO_W2K_set_aipMasters(PyObject *py_obj, PyObject *value, void *closure)
7229 {
7230         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7231         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipMasters);
7232         if (value == Py_None) {
7233                 object->aipMasters = NULL;
7234         } else {
7235                 object->aipMasters = NULL;
7236                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
7237                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
7238                         PyErr_NoMemory();
7239                         return -1;
7240                 }
7241                 object->aipMasters = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
7242         }
7243         return 0;
7244 }
7245
7246 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fSecureSecondaries(PyObject *obj, void *closure)
7247 {
7248         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7249         PyObject *py_fSecureSecondaries;
7250         py_fSecureSecondaries = PyInt_FromLong(object->fSecureSecondaries);
7251         return py_fSecureSecondaries;
7252 }
7253
7254 static int py_DNS_RPC_ZONE_INFO_W2K_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
7255 {
7256         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7257         if (PyLong_Check(value)) {
7258                 object->fSecureSecondaries = PyLong_AsLongLong(value);
7259         } else if (PyInt_Check(value)) {
7260                 object->fSecureSecondaries = PyInt_AsLong(value);
7261         } else {
7262                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
7263                   PyInt_Type.tp_name, PyLong_Type.tp_name);
7264                 return -1;
7265         }
7266         return 0;
7267 }
7268
7269 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fNotifyLevel(PyObject *obj, void *closure)
7270 {
7271         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7272         PyObject *py_fNotifyLevel;
7273         py_fNotifyLevel = PyInt_FromLong(object->fNotifyLevel);
7274         return py_fNotifyLevel;
7275 }
7276
7277 static int py_DNS_RPC_ZONE_INFO_W2K_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
7278 {
7279         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7280         if (PyLong_Check(value)) {
7281                 object->fNotifyLevel = PyLong_AsLongLong(value);
7282         } else if (PyInt_Check(value)) {
7283                 object->fNotifyLevel = PyInt_AsLong(value);
7284         } else {
7285                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
7286                   PyInt_Type.tp_name, PyLong_Type.tp_name);
7287                 return -1;
7288         }
7289         return 0;
7290 }
7291
7292 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_aipSecondaries(PyObject *obj, void *closure)
7293 {
7294         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7295         PyObject *py_aipSecondaries;
7296         if (object->aipSecondaries == NULL) {
7297                 py_aipSecondaries = Py_None;
7298                 Py_INCREF(py_aipSecondaries);
7299         } else {
7300                 py_aipSecondaries = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
7301         }
7302         return py_aipSecondaries;
7303 }
7304
7305 static int py_DNS_RPC_ZONE_INFO_W2K_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
7306 {
7307         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7308         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipSecondaries);
7309         if (value == Py_None) {
7310                 object->aipSecondaries = NULL;
7311         } else {
7312                 object->aipSecondaries = NULL;
7313                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
7314                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
7315                         PyErr_NoMemory();
7316                         return -1;
7317                 }
7318                 object->aipSecondaries = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
7319         }
7320         return 0;
7321 }
7322
7323 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_aipNotify(PyObject *obj, void *closure)
7324 {
7325         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7326         PyObject *py_aipNotify;
7327         if (object->aipNotify == NULL) {
7328                 py_aipNotify = Py_None;
7329                 Py_INCREF(py_aipNotify);
7330         } else {
7331                 py_aipNotify = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipNotify, object->aipNotify);
7332         }
7333         return py_aipNotify;
7334 }
7335
7336 static int py_DNS_RPC_ZONE_INFO_W2K_set_aipNotify(PyObject *py_obj, PyObject *value, void *closure)
7337 {
7338         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7339         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipNotify);
7340         if (value == Py_None) {
7341                 object->aipNotify = NULL;
7342         } else {
7343                 object->aipNotify = NULL;
7344                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
7345                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
7346                         PyErr_NoMemory();
7347                         return -1;
7348                 }
7349                 object->aipNotify = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
7350         }
7351         return 0;
7352 }
7353
7354 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fUseWins(PyObject *obj, void *closure)
7355 {
7356         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7357         PyObject *py_fUseWins;
7358         py_fUseWins = PyInt_FromLong(object->fUseWins);
7359         return py_fUseWins;
7360 }
7361
7362 static int py_DNS_RPC_ZONE_INFO_W2K_set_fUseWins(PyObject *py_obj, PyObject *value, void *closure)
7363 {
7364         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7365         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7366         object->fUseWins = PyInt_AsLong(value);
7367         return 0;
7368 }
7369
7370 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fUseNbstat(PyObject *obj, void *closure)
7371 {
7372         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7373         PyObject *py_fUseNbstat;
7374         py_fUseNbstat = PyInt_FromLong(object->fUseNbstat);
7375         return py_fUseNbstat;
7376 }
7377
7378 static int py_DNS_RPC_ZONE_INFO_W2K_set_fUseNbstat(PyObject *py_obj, PyObject *value, void *closure)
7379 {
7380         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7381         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7382         object->fUseNbstat = PyInt_AsLong(value);
7383         return 0;
7384 }
7385
7386 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fAging(PyObject *obj, void *closure)
7387 {
7388         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7389         PyObject *py_fAging;
7390         py_fAging = PyInt_FromLong(object->fAging);
7391         return py_fAging;
7392 }
7393
7394 static int py_DNS_RPC_ZONE_INFO_W2K_set_fAging(PyObject *py_obj, PyObject *value, void *closure)
7395 {
7396         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7397         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7398         object->fAging = PyInt_AsLong(value);
7399         return 0;
7400 }
7401
7402 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_dwNoRefreshInterval(PyObject *obj, void *closure)
7403 {
7404         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7405         PyObject *py_dwNoRefreshInterval;
7406         py_dwNoRefreshInterval = PyInt_FromLong(object->dwNoRefreshInterval);
7407         return py_dwNoRefreshInterval;
7408 }
7409
7410 static int py_DNS_RPC_ZONE_INFO_W2K_set_dwNoRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
7411 {
7412         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7413         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7414         object->dwNoRefreshInterval = PyInt_AsLong(value);
7415         return 0;
7416 }
7417
7418 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_dwRefreshInterval(PyObject *obj, void *closure)
7419 {
7420         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7421         PyObject *py_dwRefreshInterval;
7422         py_dwRefreshInterval = PyInt_FromLong(object->dwRefreshInterval);
7423         return py_dwRefreshInterval;
7424 }
7425
7426 static int py_DNS_RPC_ZONE_INFO_W2K_set_dwRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
7427 {
7428         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7429         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7430         object->dwRefreshInterval = PyInt_AsLong(value);
7431         return 0;
7432 }
7433
7434 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_dwAvailForScavengeTime(PyObject *obj, void *closure)
7435 {
7436         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7437         PyObject *py_dwAvailForScavengeTime;
7438         py_dwAvailForScavengeTime = PyInt_FromLong(object->dwAvailForScavengeTime);
7439         return py_dwAvailForScavengeTime;
7440 }
7441
7442 static int py_DNS_RPC_ZONE_INFO_W2K_set_dwAvailForScavengeTime(PyObject *py_obj, PyObject *value, void *closure)
7443 {
7444         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7445         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7446         object->dwAvailForScavengeTime = PyInt_AsLong(value);
7447         return 0;
7448 }
7449
7450 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_aipScavengeServers(PyObject *obj, void *closure)
7451 {
7452         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7453         PyObject *py_aipScavengeServers;
7454         if (object->aipScavengeServers == NULL) {
7455                 py_aipScavengeServers = Py_None;
7456                 Py_INCREF(py_aipScavengeServers);
7457         } else {
7458                 py_aipScavengeServers = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipScavengeServers, object->aipScavengeServers);
7459         }
7460         return py_aipScavengeServers;
7461 }
7462
7463 static int py_DNS_RPC_ZONE_INFO_W2K_set_aipScavengeServers(PyObject *py_obj, PyObject *value, void *closure)
7464 {
7465         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7466         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipScavengeServers);
7467         if (value == Py_None) {
7468                 object->aipScavengeServers = NULL;
7469         } else {
7470                 object->aipScavengeServers = NULL;
7471                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
7472                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
7473                         PyErr_NoMemory();
7474                         return -1;
7475                 }
7476                 object->aipScavengeServers = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
7477         }
7478         return 0;
7479 }
7480
7481 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved1(PyObject *obj, void *closure)
7482 {
7483         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7484         PyObject *py_pvReserved1;
7485         py_pvReserved1 = PyInt_FromLong(object->pvReserved1);
7486         return py_pvReserved1;
7487 }
7488
7489 static int py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved1(PyObject *py_obj, PyObject *value, void *closure)
7490 {
7491         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7492         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7493         object->pvReserved1 = PyInt_AsLong(value);
7494         return 0;
7495 }
7496
7497 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved2(PyObject *obj, void *closure)
7498 {
7499         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7500         PyObject *py_pvReserved2;
7501         py_pvReserved2 = PyInt_FromLong(object->pvReserved2);
7502         return py_pvReserved2;
7503 }
7504
7505 static int py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved2(PyObject *py_obj, PyObject *value, void *closure)
7506 {
7507         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7508         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7509         object->pvReserved2 = PyInt_AsLong(value);
7510         return 0;
7511 }
7512
7513 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved3(PyObject *obj, void *closure)
7514 {
7515         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7516         PyObject *py_pvReserved3;
7517         py_pvReserved3 = PyInt_FromLong(object->pvReserved3);
7518         return py_pvReserved3;
7519 }
7520
7521 static int py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved3(PyObject *py_obj, PyObject *value, void *closure)
7522 {
7523         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7524         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7525         object->pvReserved3 = PyInt_AsLong(value);
7526         return 0;
7527 }
7528
7529 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved4(PyObject *obj, void *closure)
7530 {
7531         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
7532         PyObject *py_pvReserved4;
7533         py_pvReserved4 = PyInt_FromLong(object->pvReserved4);
7534         return py_pvReserved4;
7535 }
7536
7537 static int py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved4(PyObject *py_obj, PyObject *value, void *closure)
7538 {
7539         struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
7540         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7541         object->pvReserved4 = PyInt_AsLong(value);
7542         return 0;
7543 }
7544
7545 static PyGetSetDef py_DNS_RPC_ZONE_INFO_W2K_getsetters[] = {
7546         { discard_const_p(char, "pszZoneName"), py_DNS_RPC_ZONE_INFO_W2K_get_pszZoneName, py_DNS_RPC_ZONE_INFO_W2K_set_pszZoneName },
7547         { discard_const_p(char, "dwZoneType"), py_DNS_RPC_ZONE_INFO_W2K_get_dwZoneType, py_DNS_RPC_ZONE_INFO_W2K_set_dwZoneType },
7548         { discard_const_p(char, "fReverse"), py_DNS_RPC_ZONE_INFO_W2K_get_fReverse, py_DNS_RPC_ZONE_INFO_W2K_set_fReverse },
7549         { discard_const_p(char, "fAllowUpdate"), py_DNS_RPC_ZONE_INFO_W2K_get_fAllowUpdate, py_DNS_RPC_ZONE_INFO_W2K_set_fAllowUpdate },
7550         { discard_const_p(char, "fPaused"), py_DNS_RPC_ZONE_INFO_W2K_get_fPaused, py_DNS_RPC_ZONE_INFO_W2K_set_fPaused },
7551         { discard_const_p(char, "fShutdown"), py_DNS_RPC_ZONE_INFO_W2K_get_fShutdown, py_DNS_RPC_ZONE_INFO_W2K_set_fShutdown },
7552         { discard_const_p(char, "fAutoCreated"), py_DNS_RPC_ZONE_INFO_W2K_get_fAutoCreated, py_DNS_RPC_ZONE_INFO_W2K_set_fAutoCreated },
7553         { discard_const_p(char, "fUseDatabase"), py_DNS_RPC_ZONE_INFO_W2K_get_fUseDatabase, py_DNS_RPC_ZONE_INFO_W2K_set_fUseDatabase },
7554         { discard_const_p(char, "pszDataFile"), py_DNS_RPC_ZONE_INFO_W2K_get_pszDataFile, py_DNS_RPC_ZONE_INFO_W2K_set_pszDataFile },
7555         { discard_const_p(char, "aipMasters"), py_DNS_RPC_ZONE_INFO_W2K_get_aipMasters, py_DNS_RPC_ZONE_INFO_W2K_set_aipMasters },
7556         { discard_const_p(char, "fSecureSecondaries"), py_DNS_RPC_ZONE_INFO_W2K_get_fSecureSecondaries, py_DNS_RPC_ZONE_INFO_W2K_set_fSecureSecondaries },
7557         { discard_const_p(char, "fNotifyLevel"), py_DNS_RPC_ZONE_INFO_W2K_get_fNotifyLevel, py_DNS_RPC_ZONE_INFO_W2K_set_fNotifyLevel },
7558         { discard_const_p(char, "aipSecondaries"), py_DNS_RPC_ZONE_INFO_W2K_get_aipSecondaries, py_DNS_RPC_ZONE_INFO_W2K_set_aipSecondaries },
7559         { discard_const_p(char, "aipNotify"), py_DNS_RPC_ZONE_INFO_W2K_get_aipNotify, py_DNS_RPC_ZONE_INFO_W2K_set_aipNotify },
7560         { discard_const_p(char, "fUseWins"), py_DNS_RPC_ZONE_INFO_W2K_get_fUseWins, py_DNS_RPC_ZONE_INFO_W2K_set_fUseWins },
7561         { discard_const_p(char, "fUseNbstat"), py_DNS_RPC_ZONE_INFO_W2K_get_fUseNbstat, py_DNS_RPC_ZONE_INFO_W2K_set_fUseNbstat },
7562         { discard_const_p(char, "fAging"), py_DNS_RPC_ZONE_INFO_W2K_get_fAging, py_DNS_RPC_ZONE_INFO_W2K_set_fAging },
7563         { discard_const_p(char, "dwNoRefreshInterval"), py_DNS_RPC_ZONE_INFO_W2K_get_dwNoRefreshInterval, py_DNS_RPC_ZONE_INFO_W2K_set_dwNoRefreshInterval },
7564         { discard_const_p(char, "dwRefreshInterval"), py_DNS_RPC_ZONE_INFO_W2K_get_dwRefreshInterval, py_DNS_RPC_ZONE_INFO_W2K_set_dwRefreshInterval },
7565         { discard_const_p(char, "dwAvailForScavengeTime"), py_DNS_RPC_ZONE_INFO_W2K_get_dwAvailForScavengeTime, py_DNS_RPC_ZONE_INFO_W2K_set_dwAvailForScavengeTime },
7566         { discard_const_p(char, "aipScavengeServers"), py_DNS_RPC_ZONE_INFO_W2K_get_aipScavengeServers, py_DNS_RPC_ZONE_INFO_W2K_set_aipScavengeServers },
7567         { discard_const_p(char, "pvReserved1"), py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved1, py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved1 },
7568         { discard_const_p(char, "pvReserved2"), py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved2, py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved2 },
7569         { discard_const_p(char, "pvReserved3"), py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved3, py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved3 },
7570         { discard_const_p(char, "pvReserved4"), py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved4, py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved4 },
7571         { NULL }
7572 };
7573
7574 static PyObject *py_DNS_RPC_ZONE_INFO_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
7575 {
7576         return pytalloc_new(struct DNS_RPC_ZONE_INFO_W2K, type);
7577 }
7578
7579
7580 static PyTypeObject DNS_RPC_ZONE_INFO_W2K_Type = {
7581         PyObject_HEAD_INIT(NULL) 0,
7582         .tp_name = "dnsserver.DNS_RPC_ZONE_INFO_W2K",
7583         .tp_getset = py_DNS_RPC_ZONE_INFO_W2K_getsetters,
7584         .tp_methods = NULL,
7585         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
7586         .tp_basicsize = sizeof(pytalloc_Object),
7587         .tp_new = py_DNS_RPC_ZONE_INFO_W2K_new,
7588 };
7589
7590
7591 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
7592 {
7593         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
7594         PyObject *py_dwRpcStructureVersion;
7595         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
7596         return py_dwRpcStructureVersion;
7597 }
7598
7599 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
7600 {
7601         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7602         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7603         object->dwRpcStructureVersion = PyInt_AsLong(value);
7604         return 0;
7605 }
7606
7607 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
7608 {
7609         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
7610         PyObject *py_dwReserved0;
7611         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
7612         return py_dwReserved0;
7613 }
7614
7615 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
7616 {
7617         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7618         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7619         object->dwReserved0 = PyInt_AsLong(value);
7620         return 0;
7621 }
7622
7623 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pszZoneName(PyObject *obj, void *closure)
7624 {
7625         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
7626         PyObject *py_pszZoneName;
7627         if (object->pszZoneName == NULL) {
7628                 py_pszZoneName = Py_None;
7629                 Py_INCREF(py_pszZoneName);
7630         } else {
7631                 if (object->pszZoneName == NULL) {
7632                         py_pszZoneName = Py_None;
7633                         Py_INCREF(py_pszZoneName);
7634                 } else {
7635                         py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
7636                 }
7637         }
7638         return py_pszZoneName;
7639 }
7640
7641 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
7642 {
7643         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7644         if (value == Py_None) {
7645                 object->pszZoneName = NULL;
7646         } else {
7647                 object->pszZoneName = NULL;
7648                 if (PyUnicode_Check(value)) {
7649                         object->pszZoneName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
7650                 } else if (PyString_Check(value)) {
7651                         object->pszZoneName = PyString_AS_STRING(value);
7652                 } else {
7653                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
7654                         return -1;
7655                 }
7656         }
7657         return 0;
7658 }
7659
7660 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwZoneType(PyObject *obj, void *closure)
7661 {
7662         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
7663         PyObject *py_dwZoneType;
7664         py_dwZoneType = PyInt_FromLong(object->dwZoneType);
7665         return py_dwZoneType;
7666 }
7667
7668 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwZoneType(PyObject *py_obj, PyObject *value, void *closure)
7669 {
7670         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7671         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7672         object->dwZoneType = PyInt_AsLong(value);
7673         return 0;
7674 }
7675
7676 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fReverse(PyObject *obj, void *closure)
7677 {
7678         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
7679         PyObject *py_fReverse;
7680         py_fReverse = PyInt_FromLong(object->fReverse);
7681         return py_fReverse;
7682 }
7683
7684 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fReverse(PyObject *py_obj, PyObject *value, void *closure)
7685 {
7686         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7687         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7688         object->fReverse = PyInt_AsLong(value);
7689         return 0;
7690 }
7691
7692 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fAllowUpdate(PyObject *obj, void *closure)
7693 {
7694         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
7695         PyObject *py_fAllowUpdate;
7696         py_fAllowUpdate = PyInt_FromLong(object->fAllowUpdate);
7697         return py_fAllowUpdate;
7698 }
7699
7700 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
7701 {
7702         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7703         if (PyLong_Check(value)) {
7704                 object->fAllowUpdate = PyLong_AsLongLong(value);
7705         } else if (PyInt_Check(value)) {
7706                 object->fAllowUpdate = PyInt_AsLong(value);
7707         } else {
7708                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
7709                   PyInt_Type.tp_name, PyLong_Type.tp_name);
7710                 return -1;
7711         }
7712         return 0;
7713 }
7714
7715 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fPaused(PyObject *obj, void *closure)
7716 {
7717         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
7718         PyObject *py_fPaused;
7719         py_fPaused = PyInt_FromLong(object->fPaused);
7720         return py_fPaused;
7721 }
7722
7723 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fPaused(PyObject *py_obj, PyObject *value, void *closure)
7724 {
7725         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7726         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7727         object->fPaused = PyInt_AsLong(value);
7728         return 0;
7729 }
7730
7731 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fShutdown(PyObject *obj, void *closure)
7732 {
7733         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
7734         PyObject *py_fShutdown;
7735         py_fShutdown = PyInt_FromLong(object->fShutdown);
7736         return py_fShutdown;
7737 }
7738
7739 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fShutdown(PyObject *py_obj, PyObject *value, void *closure)
7740 {
7741         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7742         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7743         object->fShutdown = PyInt_AsLong(value);
7744         return 0;
7745 }
7746
7747 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fAutoCreated(PyObject *obj, void *closure)
7748 {
7749         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
7750         PyObject *py_fAutoCreated;
7751         py_fAutoCreated = PyInt_FromLong(object->fAutoCreated);
7752         return py_fAutoCreated;
7753 }
7754
7755 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fAutoCreated(PyObject *py_obj, PyObject *value, void *closure)
7756 {
7757         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7758         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7759         object->fAutoCreated = PyInt_AsLong(value);
7760         return 0;
7761 }
7762
7763 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fUseDatabase(PyObject *obj, void *closure)
7764 {
7765         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
7766         PyObject *py_fUseDatabase;
7767         py_fUseDatabase = PyInt_FromLong(object->fUseDatabase);
7768         return py_fUseDatabase;
7769 }
7770
7771 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fUseDatabase(PyObject *py_obj, PyObject *value, void *closure)
7772 {
7773         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7774         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7775         object->fUseDatabase = PyInt_AsLong(value);
7776         return 0;
7777 }
7778
7779 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pszDataFile(PyObject *obj, void *closure)
7780 {
7781         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
7782         PyObject *py_pszDataFile;
7783         if (object->pszDataFile == NULL) {
7784                 py_pszDataFile = Py_None;
7785                 Py_INCREF(py_pszDataFile);
7786         } else {
7787                 if (object->pszDataFile == NULL) {
7788                         py_pszDataFile = Py_None;
7789                         Py_INCREF(py_pszDataFile);
7790                 } else {
7791                         py_pszDataFile = PyUnicode_Decode(object->pszDataFile, strlen(object->pszDataFile), "utf-8", "ignore");
7792                 }
7793         }
7794         return py_pszDataFile;
7795 }
7796
7797 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pszDataFile(PyObject *py_obj, PyObject *value, void *closure)
7798 {
7799         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7800         if (value == Py_None) {
7801                 object->pszDataFile = NULL;
7802         } else {
7803                 object->pszDataFile = NULL;
7804                 if (PyUnicode_Check(value)) {
7805                         object->pszDataFile = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
7806                 } else if (PyString_Check(value)) {
7807                         object->pszDataFile = PyString_AS_STRING(value);
7808                 } else {
7809                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
7810                         return -1;
7811                 }
7812         }
7813         return 0;
7814 }
7815
7816 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_aipMasters(PyObject *obj, void *closure)
7817 {
7818         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
7819         PyObject *py_aipMasters;
7820         if (object->aipMasters == NULL) {
7821                 py_aipMasters = Py_None;
7822                 Py_INCREF(py_aipMasters);
7823         } else {
7824                 py_aipMasters = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipMasters, object->aipMasters);
7825         }
7826         return py_aipMasters;
7827 }
7828
7829 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_aipMasters(PyObject *py_obj, PyObject *value, void *closure)
7830 {
7831         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7832         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipMasters);
7833         if (value == Py_None) {
7834                 object->aipMasters = NULL;
7835         } else {
7836                 object->aipMasters = NULL;
7837                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
7838                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
7839                         PyErr_NoMemory();
7840                         return -1;
7841                 }
7842                 object->aipMasters = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
7843         }
7844         return 0;
7845 }
7846
7847 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fSecureSecondaries(PyObject *obj, void *closure)
7848 {
7849         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
7850         PyObject *py_fSecureSecondaries;
7851         py_fSecureSecondaries = PyInt_FromLong(object->fSecureSecondaries);
7852         return py_fSecureSecondaries;
7853 }
7854
7855 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
7856 {
7857         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7858         if (PyLong_Check(value)) {
7859                 object->fSecureSecondaries = PyLong_AsLongLong(value);
7860         } else if (PyInt_Check(value)) {
7861                 object->fSecureSecondaries = PyInt_AsLong(value);
7862         } else {
7863                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
7864                   PyInt_Type.tp_name, PyLong_Type.tp_name);
7865                 return -1;
7866         }
7867         return 0;
7868 }
7869
7870 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fNotifyLevel(PyObject *obj, void *closure)
7871 {
7872         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
7873         PyObject *py_fNotifyLevel;
7874         py_fNotifyLevel = PyInt_FromLong(object->fNotifyLevel);
7875         return py_fNotifyLevel;
7876 }
7877
7878 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
7879 {
7880         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7881         if (PyLong_Check(value)) {
7882                 object->fNotifyLevel = PyLong_AsLongLong(value);
7883         } else if (PyInt_Check(value)) {
7884                 object->fNotifyLevel = PyInt_AsLong(value);
7885         } else {
7886                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
7887                   PyInt_Type.tp_name, PyLong_Type.tp_name);
7888                 return -1;
7889         }
7890         return 0;
7891 }
7892
7893 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_aipSecondaries(PyObject *obj, void *closure)
7894 {
7895         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
7896         PyObject *py_aipSecondaries;
7897         if (object->aipSecondaries == NULL) {
7898                 py_aipSecondaries = Py_None;
7899                 Py_INCREF(py_aipSecondaries);
7900         } else {
7901                 py_aipSecondaries = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
7902         }
7903         return py_aipSecondaries;
7904 }
7905
7906 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
7907 {
7908         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7909         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipSecondaries);
7910         if (value == Py_None) {
7911                 object->aipSecondaries = NULL;
7912         } else {
7913                 object->aipSecondaries = NULL;
7914                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
7915                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
7916                         PyErr_NoMemory();
7917                         return -1;
7918                 }
7919                 object->aipSecondaries = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
7920         }
7921         return 0;
7922 }
7923
7924 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_aipNotify(PyObject *obj, void *closure)
7925 {
7926         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
7927         PyObject *py_aipNotify;
7928         if (object->aipNotify == NULL) {
7929                 py_aipNotify = Py_None;
7930                 Py_INCREF(py_aipNotify);
7931         } else {
7932                 py_aipNotify = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipNotify, object->aipNotify);
7933         }
7934         return py_aipNotify;
7935 }
7936
7937 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_aipNotify(PyObject *py_obj, PyObject *value, void *closure)
7938 {
7939         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7940         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipNotify);
7941         if (value == Py_None) {
7942                 object->aipNotify = NULL;
7943         } else {
7944                 object->aipNotify = NULL;
7945                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
7946                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
7947                         PyErr_NoMemory();
7948                         return -1;
7949                 }
7950                 object->aipNotify = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
7951         }
7952         return 0;
7953 }
7954
7955 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fUseWins(PyObject *obj, void *closure)
7956 {
7957         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
7958         PyObject *py_fUseWins;
7959         py_fUseWins = PyInt_FromLong(object->fUseWins);
7960         return py_fUseWins;
7961 }
7962
7963 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fUseWins(PyObject *py_obj, PyObject *value, void *closure)
7964 {
7965         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7966         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7967         object->fUseWins = PyInt_AsLong(value);
7968         return 0;
7969 }
7970
7971 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fUseNbstat(PyObject *obj, void *closure)
7972 {
7973         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
7974         PyObject *py_fUseNbstat;
7975         py_fUseNbstat = PyInt_FromLong(object->fUseNbstat);
7976         return py_fUseNbstat;
7977 }
7978
7979 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fUseNbstat(PyObject *py_obj, PyObject *value, void *closure)
7980 {
7981         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7982         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7983         object->fUseNbstat = PyInt_AsLong(value);
7984         return 0;
7985 }
7986
7987 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fAging(PyObject *obj, void *closure)
7988 {
7989         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
7990         PyObject *py_fAging;
7991         py_fAging = PyInt_FromLong(object->fAging);
7992         return py_fAging;
7993 }
7994
7995 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fAging(PyObject *py_obj, PyObject *value, void *closure)
7996 {
7997         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7998         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
7999         object->fAging = PyInt_AsLong(value);
8000         return 0;
8001 }
8002
8003 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwNoRefreshInterval(PyObject *obj, void *closure)
8004 {
8005         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
8006         PyObject *py_dwNoRefreshInterval;
8007         py_dwNoRefreshInterval = PyInt_FromLong(object->dwNoRefreshInterval);
8008         return py_dwNoRefreshInterval;
8009 }
8010
8011 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwNoRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
8012 {
8013         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8014         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8015         object->dwNoRefreshInterval = PyInt_AsLong(value);
8016         return 0;
8017 }
8018
8019 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwRefreshInterval(PyObject *obj, void *closure)
8020 {
8021         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
8022         PyObject *py_dwRefreshInterval;
8023         py_dwRefreshInterval = PyInt_FromLong(object->dwRefreshInterval);
8024         return py_dwRefreshInterval;
8025 }
8026
8027 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
8028 {
8029         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8030         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8031         object->dwRefreshInterval = PyInt_AsLong(value);
8032         return 0;
8033 }
8034
8035 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwAvailForScavengeTime(PyObject *obj, void *closure)
8036 {
8037         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
8038         PyObject *py_dwAvailForScavengeTime;
8039         py_dwAvailForScavengeTime = PyInt_FromLong(object->dwAvailForScavengeTime);
8040         return py_dwAvailForScavengeTime;
8041 }
8042
8043 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwAvailForScavengeTime(PyObject *py_obj, PyObject *value, void *closure)
8044 {
8045         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8046         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8047         object->dwAvailForScavengeTime = PyInt_AsLong(value);
8048         return 0;
8049 }
8050
8051 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_aipScavengeServers(PyObject *obj, void *closure)
8052 {
8053         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
8054         PyObject *py_aipScavengeServers;
8055         if (object->aipScavengeServers == NULL) {
8056                 py_aipScavengeServers = Py_None;
8057                 Py_INCREF(py_aipScavengeServers);
8058         } else {
8059                 py_aipScavengeServers = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipScavengeServers, object->aipScavengeServers);
8060         }
8061         return py_aipScavengeServers;
8062 }
8063
8064 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_aipScavengeServers(PyObject *py_obj, PyObject *value, void *closure)
8065 {
8066         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8067         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipScavengeServers);
8068         if (value == Py_None) {
8069                 object->aipScavengeServers = NULL;
8070         } else {
8071                 object->aipScavengeServers = NULL;
8072                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
8073                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
8074                         PyErr_NoMemory();
8075                         return -1;
8076                 }
8077                 object->aipScavengeServers = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
8078         }
8079         return 0;
8080 }
8081
8082 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwForwarderTimeout(PyObject *obj, void *closure)
8083 {
8084         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
8085         PyObject *py_dwForwarderTimeout;
8086         py_dwForwarderTimeout = PyInt_FromLong(object->dwForwarderTimeout);
8087         return py_dwForwarderTimeout;
8088 }
8089
8090 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwForwarderTimeout(PyObject *py_obj, PyObject *value, void *closure)
8091 {
8092         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8093         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8094         object->dwForwarderTimeout = PyInt_AsLong(value);
8095         return 0;
8096 }
8097
8098 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fForwarderSlave(PyObject *obj, void *closure)
8099 {
8100         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
8101         PyObject *py_fForwarderSlave;
8102         py_fForwarderSlave = PyInt_FromLong(object->fForwarderSlave);
8103         return py_fForwarderSlave;
8104 }
8105
8106 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fForwarderSlave(PyObject *py_obj, PyObject *value, void *closure)
8107 {
8108         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8109         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8110         object->fForwarderSlave = PyInt_AsLong(value);
8111         return 0;
8112 }
8113
8114 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_aipLocalMasters(PyObject *obj, void *closure)
8115 {
8116         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
8117         PyObject *py_aipLocalMasters;
8118         if (object->aipLocalMasters == NULL) {
8119                 py_aipLocalMasters = Py_None;
8120                 Py_INCREF(py_aipLocalMasters);
8121         } else {
8122                 py_aipLocalMasters = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipLocalMasters, object->aipLocalMasters);
8123         }
8124         return py_aipLocalMasters;
8125 }
8126
8127 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_aipLocalMasters(PyObject *py_obj, PyObject *value, void *closure)
8128 {
8129         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8130         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipLocalMasters);
8131         if (value == Py_None) {
8132                 object->aipLocalMasters = NULL;
8133         } else {
8134                 object->aipLocalMasters = NULL;
8135                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
8136                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
8137                         PyErr_NoMemory();
8138                         return -1;
8139                 }
8140                 object->aipLocalMasters = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
8141         }
8142         return 0;
8143 }
8144
8145 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwDpFlags(PyObject *obj, void *closure)
8146 {
8147         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
8148         PyObject *py_dwDpFlags;
8149         py_dwDpFlags = PyInt_FromLong(object->dwDpFlags);
8150         return py_dwDpFlags;
8151 }
8152
8153 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwDpFlags(PyObject *py_obj, PyObject *value, void *closure)
8154 {
8155         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8156         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8157         object->dwDpFlags = PyInt_AsLong(value);
8158         return 0;
8159 }
8160
8161 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pszDpFqdn(PyObject *obj, void *closure)
8162 {
8163         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
8164         PyObject *py_pszDpFqdn;
8165         if (object->pszDpFqdn == NULL) {
8166                 py_pszDpFqdn = Py_None;
8167                 Py_INCREF(py_pszDpFqdn);
8168         } else {
8169                 if (object->pszDpFqdn == NULL) {
8170                         py_pszDpFqdn = Py_None;
8171                         Py_INCREF(py_pszDpFqdn);
8172                 } else {
8173                         py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
8174                 }
8175         }
8176         return py_pszDpFqdn;
8177 }
8178
8179 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
8180 {
8181         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8182         if (value == Py_None) {
8183                 object->pszDpFqdn = NULL;
8184         } else {
8185                 object->pszDpFqdn = NULL;
8186                 if (PyUnicode_Check(value)) {
8187                         object->pszDpFqdn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
8188                 } else if (PyString_Check(value)) {
8189                         object->pszDpFqdn = PyString_AS_STRING(value);
8190                 } else {
8191                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
8192                         return -1;
8193                 }
8194         }
8195         return 0;
8196 }
8197
8198 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pwszZoneDn(PyObject *obj, void *closure)
8199 {
8200         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
8201         PyObject *py_pwszZoneDn;
8202         if (object->pwszZoneDn == NULL) {
8203                 py_pwszZoneDn = Py_None;
8204                 Py_INCREF(py_pwszZoneDn);
8205         } else {
8206                 if (object->pwszZoneDn == NULL) {
8207                         py_pwszZoneDn = Py_None;
8208                         Py_INCREF(py_pwszZoneDn);
8209                 } else {
8210                         py_pwszZoneDn = PyUnicode_Decode(object->pwszZoneDn, strlen(object->pwszZoneDn), "utf-8", "ignore");
8211                 }
8212         }
8213         return py_pwszZoneDn;
8214 }
8215
8216 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pwszZoneDn(PyObject *py_obj, PyObject *value, void *closure)
8217 {
8218         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8219         if (value == Py_None) {
8220                 object->pwszZoneDn = NULL;
8221         } else {
8222                 object->pwszZoneDn = NULL;
8223                 if (PyUnicode_Check(value)) {
8224                         object->pwszZoneDn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
8225                 } else if (PyString_Check(value)) {
8226                         object->pwszZoneDn = PyString_AS_STRING(value);
8227                 } else {
8228                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
8229                         return -1;
8230                 }
8231         }
8232         return 0;
8233 }
8234
8235 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwLastSuccessfulSoaCheck(PyObject *obj, void *closure)
8236 {
8237         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
8238         PyObject *py_dwLastSuccessfulSoaCheck;
8239         py_dwLastSuccessfulSoaCheck = PyInt_FromLong(object->dwLastSuccessfulSoaCheck);
8240         return py_dwLastSuccessfulSoaCheck;
8241 }
8242
8243 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwLastSuccessfulSoaCheck(PyObject *py_obj, PyObject *value, void *closure)
8244 {
8245         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8246         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8247         object->dwLastSuccessfulSoaCheck = PyInt_AsLong(value);
8248         return 0;
8249 }
8250
8251 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwLastSuccessfulXfr(PyObject *obj, void *closure)
8252 {
8253         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
8254         PyObject *py_dwLastSuccessfulXfr;
8255         py_dwLastSuccessfulXfr = PyInt_FromLong(object->dwLastSuccessfulXfr);
8256         return py_dwLastSuccessfulXfr;
8257 }
8258
8259 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwLastSuccessfulXfr(PyObject *py_obj, PyObject *value, void *closure)
8260 {
8261         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8262         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8263         object->dwLastSuccessfulXfr = PyInt_AsLong(value);
8264         return 0;
8265 }
8266
8267 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved1(PyObject *obj, void *closure)
8268 {
8269         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
8270         PyObject *py_dwReserved1;
8271         py_dwReserved1 = PyInt_FromLong(object->dwReserved1);
8272         return py_dwReserved1;
8273 }
8274
8275 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved1(PyObject *py_obj, PyObject *value, void *closure)
8276 {
8277         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8278         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8279         object->dwReserved1 = PyInt_AsLong(value);
8280         return 0;
8281 }
8282
8283 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved2(PyObject *obj, void *closure)
8284 {
8285         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
8286         PyObject *py_dwReserved2;
8287         py_dwReserved2 = PyInt_FromLong(object->dwReserved2);
8288         return py_dwReserved2;
8289 }
8290
8291 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved2(PyObject *py_obj, PyObject *value, void *closure)
8292 {
8293         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8294         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8295         object->dwReserved2 = PyInt_AsLong(value);
8296         return 0;
8297 }
8298
8299 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved3(PyObject *obj, void *closure)
8300 {
8301         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
8302         PyObject *py_dwReserved3;
8303         py_dwReserved3 = PyInt_FromLong(object->dwReserved3);
8304         return py_dwReserved3;
8305 }
8306
8307 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved3(PyObject *py_obj, PyObject *value, void *closure)
8308 {
8309         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8310         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8311         object->dwReserved3 = PyInt_AsLong(value);
8312         return 0;
8313 }
8314
8315 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved4(PyObject *obj, void *closure)
8316 {
8317         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
8318         PyObject *py_dwReserved4;
8319         py_dwReserved4 = PyInt_FromLong(object->dwReserved4);
8320         return py_dwReserved4;
8321 }
8322
8323 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved4(PyObject *py_obj, PyObject *value, void *closure)
8324 {
8325         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8326         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8327         object->dwReserved4 = PyInt_AsLong(value);
8328         return 0;
8329 }
8330
8331 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved5(PyObject *obj, void *closure)
8332 {
8333         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
8334         PyObject *py_dwReserved5;
8335         py_dwReserved5 = PyInt_FromLong(object->dwReserved5);
8336         return py_dwReserved5;
8337 }
8338
8339 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved5(PyObject *py_obj, PyObject *value, void *closure)
8340 {
8341         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8342         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8343         object->dwReserved5 = PyInt_AsLong(value);
8344         return 0;
8345 }
8346
8347 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved1(PyObject *obj, void *closure)
8348 {
8349         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
8350         PyObject *py_pReserved1;
8351         if (object->pReserved1 == NULL) {
8352                 py_pReserved1 = Py_None;
8353                 Py_INCREF(py_pReserved1);
8354         } else {
8355                 if (object->pReserved1 == NULL) {
8356                         py_pReserved1 = Py_None;
8357                         Py_INCREF(py_pReserved1);
8358                 } else {
8359                         py_pReserved1 = PyUnicode_Decode(object->pReserved1, strlen(object->pReserved1), "utf-8", "ignore");
8360                 }
8361         }
8362         return py_pReserved1;
8363 }
8364
8365 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved1(PyObject *py_obj, PyObject *value, void *closure)
8366 {
8367         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8368         if (value == Py_None) {
8369                 object->pReserved1 = NULL;
8370         } else {
8371                 object->pReserved1 = NULL;
8372                 if (PyUnicode_Check(value)) {
8373                         object->pReserved1 = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
8374                 } else if (PyString_Check(value)) {
8375                         object->pReserved1 = PyString_AS_STRING(value);
8376                 } else {
8377                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
8378                         return -1;
8379                 }
8380         }
8381         return 0;
8382 }
8383
8384 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved2(PyObject *obj, void *closure)
8385 {
8386         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
8387         PyObject *py_pReserved2;
8388         if (object->pReserved2 == NULL) {
8389                 py_pReserved2 = Py_None;
8390                 Py_INCREF(py_pReserved2);
8391         } else {
8392                 if (object->pReserved2 == NULL) {
8393                         py_pReserved2 = Py_None;
8394                         Py_INCREF(py_pReserved2);
8395                 } else {
8396                         py_pReserved2 = PyUnicode_Decode(object->pReserved2, strlen(object->pReserved2), "utf-8", "ignore");
8397                 }
8398         }
8399         return py_pReserved2;
8400 }
8401
8402 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved2(PyObject *py_obj, PyObject *value, void *closure)
8403 {
8404         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8405         if (value == Py_None) {
8406                 object->pReserved2 = NULL;
8407         } else {
8408                 object->pReserved2 = NULL;
8409                 if (PyUnicode_Check(value)) {
8410                         object->pReserved2 = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
8411                 } else if (PyString_Check(value)) {
8412                         object->pReserved2 = PyString_AS_STRING(value);
8413                 } else {
8414                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
8415                         return -1;
8416                 }
8417         }
8418         return 0;
8419 }
8420
8421 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved3(PyObject *obj, void *closure)
8422 {
8423         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
8424         PyObject *py_pReserved3;
8425         if (object->pReserved3 == NULL) {
8426                 py_pReserved3 = Py_None;
8427                 Py_INCREF(py_pReserved3);
8428         } else {
8429                 if (object->pReserved3 == NULL) {
8430                         py_pReserved3 = Py_None;
8431                         Py_INCREF(py_pReserved3);
8432                 } else {
8433                         py_pReserved3 = PyUnicode_Decode(object->pReserved3, strlen(object->pReserved3), "utf-8", "ignore");
8434                 }
8435         }
8436         return py_pReserved3;
8437 }
8438
8439 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved3(PyObject *py_obj, PyObject *value, void *closure)
8440 {
8441         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8442         if (value == Py_None) {
8443                 object->pReserved3 = NULL;
8444         } else {
8445                 object->pReserved3 = NULL;
8446                 if (PyUnicode_Check(value)) {
8447                         object->pReserved3 = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
8448                 } else if (PyString_Check(value)) {
8449                         object->pReserved3 = PyString_AS_STRING(value);
8450                 } else {
8451                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
8452                         return -1;
8453                 }
8454         }
8455         return 0;
8456 }
8457
8458 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved4(PyObject *obj, void *closure)
8459 {
8460         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
8461         PyObject *py_pReserved4;
8462         if (object->pReserved4 == NULL) {
8463                 py_pReserved4 = Py_None;
8464                 Py_INCREF(py_pReserved4);
8465         } else {
8466                 if (object->pReserved4 == NULL) {
8467                         py_pReserved4 = Py_None;
8468                         Py_INCREF(py_pReserved4);
8469                 } else {
8470                         py_pReserved4 = PyUnicode_Decode(object->pReserved4, strlen(object->pReserved4), "utf-8", "ignore");
8471                 }
8472         }
8473         return py_pReserved4;
8474 }
8475
8476 static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved4(PyObject *py_obj, PyObject *value, void *closure)
8477 {
8478         struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8479         if (value == Py_None) {
8480                 object->pReserved4 = NULL;
8481         } else {
8482                 object->pReserved4 = NULL;
8483                 if (PyUnicode_Check(value)) {
8484                         object->pReserved4 = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
8485                 } else if (PyString_Check(value)) {
8486                         object->pReserved4 = PyString_AS_STRING(value);
8487                 } else {
8488                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
8489                         return -1;
8490                 }
8491         }
8492         return 0;
8493 }
8494
8495 static PyGetSetDef py_DNS_RPC_ZONE_INFO_DOTNET_getsetters[] = {
8496         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_ZONE_INFO_DOTNET_get_dwRpcStructureVersion, py_DNS_RPC_ZONE_INFO_DOTNET_set_dwRpcStructureVersion },
8497         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved0, py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved0 },
8498         { discard_const_p(char, "pszZoneName"), py_DNS_RPC_ZONE_INFO_DOTNET_get_pszZoneName, py_DNS_RPC_ZONE_INFO_DOTNET_set_pszZoneName },
8499         { discard_const_p(char, "dwZoneType"), py_DNS_RPC_ZONE_INFO_DOTNET_get_dwZoneType, py_DNS_RPC_ZONE_INFO_DOTNET_set_dwZoneType },
8500         { discard_const_p(char, "fReverse"), py_DNS_RPC_ZONE_INFO_DOTNET_get_fReverse, py_DNS_RPC_ZONE_INFO_DOTNET_set_fReverse },
8501         { discard_const_p(char, "fAllowUpdate"), py_DNS_RPC_ZONE_INFO_DOTNET_get_fAllowUpdate, py_DNS_RPC_ZONE_INFO_DOTNET_set_fAllowUpdate },
8502         { discard_const_p(char, "fPaused"), py_DNS_RPC_ZONE_INFO_DOTNET_get_fPaused, py_DNS_RPC_ZONE_INFO_DOTNET_set_fPaused },
8503         { discard_const_p(char, "fShutdown"), py_DNS_RPC_ZONE_INFO_DOTNET_get_fShutdown, py_DNS_RPC_ZONE_INFO_DOTNET_set_fShutdown },
8504         { discard_const_p(char, "fAutoCreated"), py_DNS_RPC_ZONE_INFO_DOTNET_get_fAutoCreated, py_DNS_RPC_ZONE_INFO_DOTNET_set_fAutoCreated },
8505         { discard_const_p(char, "fUseDatabase"), py_DNS_RPC_ZONE_INFO_DOTNET_get_fUseDatabase, py_DNS_RPC_ZONE_INFO_DOTNET_set_fUseDatabase },
8506         { discard_const_p(char, "pszDataFile"), py_DNS_RPC_ZONE_INFO_DOTNET_get_pszDataFile, py_DNS_RPC_ZONE_INFO_DOTNET_set_pszDataFile },
8507         { discard_const_p(char, "aipMasters"), py_DNS_RPC_ZONE_INFO_DOTNET_get_aipMasters, py_DNS_RPC_ZONE_INFO_DOTNET_set_aipMasters },
8508         { discard_const_p(char, "fSecureSecondaries"), py_DNS_RPC_ZONE_INFO_DOTNET_get_fSecureSecondaries, py_DNS_RPC_ZONE_INFO_DOTNET_set_fSecureSecondaries },
8509         { discard_const_p(char, "fNotifyLevel"), py_DNS_RPC_ZONE_INFO_DOTNET_get_fNotifyLevel, py_DNS_RPC_ZONE_INFO_DOTNET_set_fNotifyLevel },
8510         { discard_const_p(char, "aipSecondaries"), py_DNS_RPC_ZONE_INFO_DOTNET_get_aipSecondaries, py_DNS_RPC_ZONE_INFO_DOTNET_set_aipSecondaries },
8511         { discard_const_p(char, "aipNotify"), py_DNS_RPC_ZONE_INFO_DOTNET_get_aipNotify, py_DNS_RPC_ZONE_INFO_DOTNET_set_aipNotify },
8512         { discard_const_p(char, "fUseWins"), py_DNS_RPC_ZONE_INFO_DOTNET_get_fUseWins, py_DNS_RPC_ZONE_INFO_DOTNET_set_fUseWins },
8513         { discard_const_p(char, "fUseNbstat"), py_DNS_RPC_ZONE_INFO_DOTNET_get_fUseNbstat, py_DNS_RPC_ZONE_INFO_DOTNET_set_fUseNbstat },
8514         { discard_const_p(char, "fAging"), py_DNS_RPC_ZONE_INFO_DOTNET_get_fAging, py_DNS_RPC_ZONE_INFO_DOTNET_set_fAging },
8515         { discard_const_p(char, "dwNoRefreshInterval"), py_DNS_RPC_ZONE_INFO_DOTNET_get_dwNoRefreshInterval, py_DNS_RPC_ZONE_INFO_DOTNET_set_dwNoRefreshInterval },
8516         { discard_const_p(char, "dwRefreshInterval"), py_DNS_RPC_ZONE_INFO_DOTNET_get_dwRefreshInterval, py_DNS_RPC_ZONE_INFO_DOTNET_set_dwRefreshInterval },
8517         { discard_const_p(char, "dwAvailForScavengeTime"), py_DNS_RPC_ZONE_INFO_DOTNET_get_dwAvailForScavengeTime, py_DNS_RPC_ZONE_INFO_DOTNET_set_dwAvailForScavengeTime },
8518         { discard_const_p(char, "aipScavengeServers"), py_DNS_RPC_ZONE_INFO_DOTNET_get_aipScavengeServers, py_DNS_RPC_ZONE_INFO_DOTNET_set_aipScavengeServers },
8519         { discard_const_p(char, "dwForwarderTimeout"), py_DNS_RPC_ZONE_INFO_DOTNET_get_dwForwarderTimeout, py_DNS_RPC_ZONE_INFO_DOTNET_set_dwForwarderTimeout },
8520         { discard_const_p(char, "fForwarderSlave"), py_DNS_RPC_ZONE_INFO_DOTNET_get_fForwarderSlave, py_DNS_RPC_ZONE_INFO_DOTNET_set_fForwarderSlave },
8521         { discard_const_p(char, "aipLocalMasters"), py_DNS_RPC_ZONE_INFO_DOTNET_get_aipLocalMasters, py_DNS_RPC_ZONE_INFO_DOTNET_set_aipLocalMasters },
8522         { discard_const_p(char, "dwDpFlags"), py_DNS_RPC_ZONE_INFO_DOTNET_get_dwDpFlags, py_DNS_RPC_ZONE_INFO_DOTNET_set_dwDpFlags },
8523         { discard_const_p(char, "pszDpFqdn"), py_DNS_RPC_ZONE_INFO_DOTNET_get_pszDpFqdn, py_DNS_RPC_ZONE_INFO_DOTNET_set_pszDpFqdn },
8524         { discard_const_p(char, "pwszZoneDn"), py_DNS_RPC_ZONE_INFO_DOTNET_get_pwszZoneDn, py_DNS_RPC_ZONE_INFO_DOTNET_set_pwszZoneDn },
8525         { discard_const_p(char, "dwLastSuccessfulSoaCheck"), py_DNS_RPC_ZONE_INFO_DOTNET_get_dwLastSuccessfulSoaCheck, py_DNS_RPC_ZONE_INFO_DOTNET_set_dwLastSuccessfulSoaCheck },
8526         { discard_const_p(char, "dwLastSuccessfulXfr"), py_DNS_RPC_ZONE_INFO_DOTNET_get_dwLastSuccessfulXfr, py_DNS_RPC_ZONE_INFO_DOTNET_set_dwLastSuccessfulXfr },
8527         { discard_const_p(char, "dwReserved1"), py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved1, py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved1 },
8528         { discard_const_p(char, "dwReserved2"), py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved2, py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved2 },
8529         { discard_const_p(char, "dwReserved3"), py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved3, py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved3 },
8530         { discard_const_p(char, "dwReserved4"), py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved4, py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved4 },
8531         { discard_const_p(char, "dwReserved5"), py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved5, py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved5 },
8532         { discard_const_p(char, "pReserved1"), py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved1, py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved1 },
8533         { discard_const_p(char, "pReserved2"), py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved2, py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved2 },
8534         { discard_const_p(char, "pReserved3"), py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved3, py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved3 },
8535         { discard_const_p(char, "pReserved4"), py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved4, py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved4 },
8536         { NULL }
8537 };
8538
8539 static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
8540 {
8541         return pytalloc_new(struct DNS_RPC_ZONE_INFO_DOTNET, type);
8542 }
8543
8544
8545 static PyTypeObject DNS_RPC_ZONE_INFO_DOTNET_Type = {
8546         PyObject_HEAD_INIT(NULL) 0,
8547         .tp_name = "dnsserver.DNS_RPC_ZONE_INFO_DOTNET",
8548         .tp_getset = py_DNS_RPC_ZONE_INFO_DOTNET_getsetters,
8549         .tp_methods = NULL,
8550         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
8551         .tp_basicsize = sizeof(pytalloc_Object),
8552         .tp_new = py_DNS_RPC_ZONE_INFO_DOTNET_new,
8553 };
8554
8555
8556 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwRpcStructureVersion(PyObject *obj, void *closure)
8557 {
8558         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8559         PyObject *py_dwRpcStructureVersion;
8560         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
8561         return py_dwRpcStructureVersion;
8562 }
8563
8564 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
8565 {
8566         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8567         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8568         object->dwRpcStructureVersion = PyInt_AsLong(value);
8569         return 0;
8570 }
8571
8572 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwReserved0(PyObject *obj, void *closure)
8573 {
8574         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8575         PyObject *py_dwReserved0;
8576         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
8577         return py_dwReserved0;
8578 }
8579
8580 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
8581 {
8582         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8583         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8584         object->dwReserved0 = PyInt_AsLong(value);
8585         return 0;
8586 }
8587
8588 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_pszZoneName(PyObject *obj, void *closure)
8589 {
8590         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8591         PyObject *py_pszZoneName;
8592         if (object->pszZoneName == NULL) {
8593                 py_pszZoneName = Py_None;
8594                 Py_INCREF(py_pszZoneName);
8595         } else {
8596                 if (object->pszZoneName == NULL) {
8597                         py_pszZoneName = Py_None;
8598                         Py_INCREF(py_pszZoneName);
8599                 } else {
8600                         py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
8601                 }
8602         }
8603         return py_pszZoneName;
8604 }
8605
8606 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
8607 {
8608         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8609         if (value == Py_None) {
8610                 object->pszZoneName = NULL;
8611         } else {
8612                 object->pszZoneName = NULL;
8613                 if (PyUnicode_Check(value)) {
8614                         object->pszZoneName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
8615                 } else if (PyString_Check(value)) {
8616                         object->pszZoneName = PyString_AS_STRING(value);
8617                 } else {
8618                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
8619                         return -1;
8620                 }
8621         }
8622         return 0;
8623 }
8624
8625 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwZoneType(PyObject *obj, void *closure)
8626 {
8627         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8628         PyObject *py_dwZoneType;
8629         py_dwZoneType = PyInt_FromLong(object->dwZoneType);
8630         return py_dwZoneType;
8631 }
8632
8633 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwZoneType(PyObject *py_obj, PyObject *value, void *closure)
8634 {
8635         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8636         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8637         object->dwZoneType = PyInt_AsLong(value);
8638         return 0;
8639 }
8640
8641 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fReverse(PyObject *obj, void *closure)
8642 {
8643         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8644         PyObject *py_fReverse;
8645         py_fReverse = PyInt_FromLong(object->fReverse);
8646         return py_fReverse;
8647 }
8648
8649 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fReverse(PyObject *py_obj, PyObject *value, void *closure)
8650 {
8651         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8652         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8653         object->fReverse = PyInt_AsLong(value);
8654         return 0;
8655 }
8656
8657 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fAllowUpdate(PyObject *obj, void *closure)
8658 {
8659         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8660         PyObject *py_fAllowUpdate;
8661         py_fAllowUpdate = PyInt_FromLong(object->fAllowUpdate);
8662         return py_fAllowUpdate;
8663 }
8664
8665 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
8666 {
8667         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8668         if (PyLong_Check(value)) {
8669                 object->fAllowUpdate = PyLong_AsLongLong(value);
8670         } else if (PyInt_Check(value)) {
8671                 object->fAllowUpdate = PyInt_AsLong(value);
8672         } else {
8673                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
8674                   PyInt_Type.tp_name, PyLong_Type.tp_name);
8675                 return -1;
8676         }
8677         return 0;
8678 }
8679
8680 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fPaused(PyObject *obj, void *closure)
8681 {
8682         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8683         PyObject *py_fPaused;
8684         py_fPaused = PyInt_FromLong(object->fPaused);
8685         return py_fPaused;
8686 }
8687
8688 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fPaused(PyObject *py_obj, PyObject *value, void *closure)
8689 {
8690         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8691         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8692         object->fPaused = PyInt_AsLong(value);
8693         return 0;
8694 }
8695
8696 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fShutdown(PyObject *obj, void *closure)
8697 {
8698         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8699         PyObject *py_fShutdown;
8700         py_fShutdown = PyInt_FromLong(object->fShutdown);
8701         return py_fShutdown;
8702 }
8703
8704 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fShutdown(PyObject *py_obj, PyObject *value, void *closure)
8705 {
8706         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8707         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8708         object->fShutdown = PyInt_AsLong(value);
8709         return 0;
8710 }
8711
8712 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fAutoCreated(PyObject *obj, void *closure)
8713 {
8714         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8715         PyObject *py_fAutoCreated;
8716         py_fAutoCreated = PyInt_FromLong(object->fAutoCreated);
8717         return py_fAutoCreated;
8718 }
8719
8720 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fAutoCreated(PyObject *py_obj, PyObject *value, void *closure)
8721 {
8722         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8723         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8724         object->fAutoCreated = PyInt_AsLong(value);
8725         return 0;
8726 }
8727
8728 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fUseDatabase(PyObject *obj, void *closure)
8729 {
8730         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8731         PyObject *py_fUseDatabase;
8732         py_fUseDatabase = PyInt_FromLong(object->fUseDatabase);
8733         return py_fUseDatabase;
8734 }
8735
8736 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fUseDatabase(PyObject *py_obj, PyObject *value, void *closure)
8737 {
8738         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8739         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8740         object->fUseDatabase = PyInt_AsLong(value);
8741         return 0;
8742 }
8743
8744 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_pszDataFile(PyObject *obj, void *closure)
8745 {
8746         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8747         PyObject *py_pszDataFile;
8748         if (object->pszDataFile == NULL) {
8749                 py_pszDataFile = Py_None;
8750                 Py_INCREF(py_pszDataFile);
8751         } else {
8752                 if (object->pszDataFile == NULL) {
8753                         py_pszDataFile = Py_None;
8754                         Py_INCREF(py_pszDataFile);
8755                 } else {
8756                         py_pszDataFile = PyUnicode_Decode(object->pszDataFile, strlen(object->pszDataFile), "utf-8", "ignore");
8757                 }
8758         }
8759         return py_pszDataFile;
8760 }
8761
8762 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_pszDataFile(PyObject *py_obj, PyObject *value, void *closure)
8763 {
8764         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8765         if (value == Py_None) {
8766                 object->pszDataFile = NULL;
8767         } else {
8768                 object->pszDataFile = NULL;
8769                 if (PyUnicode_Check(value)) {
8770                         object->pszDataFile = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
8771                 } else if (PyString_Check(value)) {
8772                         object->pszDataFile = PyString_AS_STRING(value);
8773                 } else {
8774                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
8775                         return -1;
8776                 }
8777         }
8778         return 0;
8779 }
8780
8781 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipMasters(PyObject *obj, void *closure)
8782 {
8783         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8784         PyObject *py_aipMasters;
8785         if (object->aipMasters == NULL) {
8786                 py_aipMasters = Py_None;
8787                 Py_INCREF(py_aipMasters);
8788         } else {
8789                 py_aipMasters = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipMasters, object->aipMasters);
8790         }
8791         return py_aipMasters;
8792 }
8793
8794 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipMasters(PyObject *py_obj, PyObject *value, void *closure)
8795 {
8796         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8797         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipMasters);
8798         if (value == Py_None) {
8799                 object->aipMasters = NULL;
8800         } else {
8801                 object->aipMasters = NULL;
8802                 PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
8803                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
8804                         PyErr_NoMemory();
8805                         return -1;
8806                 }
8807                 object->aipMasters = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
8808         }
8809         return 0;
8810 }
8811
8812 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fSecureSecondaries(PyObject *obj, void *closure)
8813 {
8814         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8815         PyObject *py_fSecureSecondaries;
8816         py_fSecureSecondaries = PyInt_FromLong(object->fSecureSecondaries);
8817         return py_fSecureSecondaries;
8818 }
8819
8820 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
8821 {
8822         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8823         if (PyLong_Check(value)) {
8824                 object->fSecureSecondaries = PyLong_AsLongLong(value);
8825         } else if (PyInt_Check(value)) {
8826                 object->fSecureSecondaries = PyInt_AsLong(value);
8827         } else {
8828                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
8829                   PyInt_Type.tp_name, PyLong_Type.tp_name);
8830                 return -1;
8831         }
8832         return 0;
8833 }
8834
8835 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fNotifyLevel(PyObject *obj, void *closure)
8836 {
8837         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8838         PyObject *py_fNotifyLevel;
8839         py_fNotifyLevel = PyInt_FromLong(object->fNotifyLevel);
8840         return py_fNotifyLevel;
8841 }
8842
8843 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
8844 {
8845         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8846         if (PyLong_Check(value)) {
8847                 object->fNotifyLevel = PyLong_AsLongLong(value);
8848         } else if (PyInt_Check(value)) {
8849                 object->fNotifyLevel = PyInt_AsLong(value);
8850         } else {
8851                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
8852                   PyInt_Type.tp_name, PyLong_Type.tp_name);
8853                 return -1;
8854         }
8855         return 0;
8856 }
8857
8858 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipSecondaries(PyObject *obj, void *closure)
8859 {
8860         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8861         PyObject *py_aipSecondaries;
8862         if (object->aipSecondaries == NULL) {
8863                 py_aipSecondaries = Py_None;
8864                 Py_INCREF(py_aipSecondaries);
8865         } else {
8866                 py_aipSecondaries = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
8867         }
8868         return py_aipSecondaries;
8869 }
8870
8871 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
8872 {
8873         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8874         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipSecondaries);
8875         if (value == Py_None) {
8876                 object->aipSecondaries = NULL;
8877         } else {
8878                 object->aipSecondaries = NULL;
8879                 PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
8880                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
8881                         PyErr_NoMemory();
8882                         return -1;
8883                 }
8884                 object->aipSecondaries = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
8885         }
8886         return 0;
8887 }
8888
8889 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipNotify(PyObject *obj, void *closure)
8890 {
8891         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8892         PyObject *py_aipNotify;
8893         if (object->aipNotify == NULL) {
8894                 py_aipNotify = Py_None;
8895                 Py_INCREF(py_aipNotify);
8896         } else {
8897                 py_aipNotify = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipNotify, object->aipNotify);
8898         }
8899         return py_aipNotify;
8900 }
8901
8902 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipNotify(PyObject *py_obj, PyObject *value, void *closure)
8903 {
8904         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8905         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipNotify);
8906         if (value == Py_None) {
8907                 object->aipNotify = NULL;
8908         } else {
8909                 object->aipNotify = NULL;
8910                 PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
8911                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
8912                         PyErr_NoMemory();
8913                         return -1;
8914                 }
8915                 object->aipNotify = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
8916         }
8917         return 0;
8918 }
8919
8920 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fUseWins(PyObject *obj, void *closure)
8921 {
8922         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8923         PyObject *py_fUseWins;
8924         py_fUseWins = PyInt_FromLong(object->fUseWins);
8925         return py_fUseWins;
8926 }
8927
8928 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fUseWins(PyObject *py_obj, PyObject *value, void *closure)
8929 {
8930         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8931         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8932         object->fUseWins = PyInt_AsLong(value);
8933         return 0;
8934 }
8935
8936 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fUseNbstat(PyObject *obj, void *closure)
8937 {
8938         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8939         PyObject *py_fUseNbstat;
8940         py_fUseNbstat = PyInt_FromLong(object->fUseNbstat);
8941         return py_fUseNbstat;
8942 }
8943
8944 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fUseNbstat(PyObject *py_obj, PyObject *value, void *closure)
8945 {
8946         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8947         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8948         object->fUseNbstat = PyInt_AsLong(value);
8949         return 0;
8950 }
8951
8952 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fAging(PyObject *obj, void *closure)
8953 {
8954         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8955         PyObject *py_fAging;
8956         py_fAging = PyInt_FromLong(object->fAging);
8957         return py_fAging;
8958 }
8959
8960 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fAging(PyObject *py_obj, PyObject *value, void *closure)
8961 {
8962         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8963         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8964         object->fAging = PyInt_AsLong(value);
8965         return 0;
8966 }
8967
8968 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwNoRefreshInterval(PyObject *obj, void *closure)
8969 {
8970         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8971         PyObject *py_dwNoRefreshInterval;
8972         py_dwNoRefreshInterval = PyInt_FromLong(object->dwNoRefreshInterval);
8973         return py_dwNoRefreshInterval;
8974 }
8975
8976 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwNoRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
8977 {
8978         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8979         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8980         object->dwNoRefreshInterval = PyInt_AsLong(value);
8981         return 0;
8982 }
8983
8984 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwRefreshInterval(PyObject *obj, void *closure)
8985 {
8986         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8987         PyObject *py_dwRefreshInterval;
8988         py_dwRefreshInterval = PyInt_FromLong(object->dwRefreshInterval);
8989         return py_dwRefreshInterval;
8990 }
8991
8992 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
8993 {
8994         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8995         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
8996         object->dwRefreshInterval = PyInt_AsLong(value);
8997         return 0;
8998 }
8999
9000 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwAvailForScavengeTime(PyObject *obj, void *closure)
9001 {
9002         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9003         PyObject *py_dwAvailForScavengeTime;
9004         py_dwAvailForScavengeTime = PyInt_FromLong(object->dwAvailForScavengeTime);
9005         return py_dwAvailForScavengeTime;
9006 }
9007
9008 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwAvailForScavengeTime(PyObject *py_obj, PyObject *value, void *closure)
9009 {
9010         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9011         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
9012         object->dwAvailForScavengeTime = PyInt_AsLong(value);
9013         return 0;
9014 }
9015
9016 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipScavengeServers(PyObject *obj, void *closure)
9017 {
9018         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9019         PyObject *py_aipScavengeServers;
9020         if (object->aipScavengeServers == NULL) {
9021                 py_aipScavengeServers = Py_None;
9022                 Py_INCREF(py_aipScavengeServers);
9023         } else {
9024                 py_aipScavengeServers = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipScavengeServers, object->aipScavengeServers);
9025         }
9026         return py_aipScavengeServers;
9027 }
9028
9029 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipScavengeServers(PyObject *py_obj, PyObject *value, void *closure)
9030 {
9031         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9032         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipScavengeServers);
9033         if (value == Py_None) {
9034                 object->aipScavengeServers = NULL;
9035         } else {
9036                 object->aipScavengeServers = NULL;
9037                 PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
9038                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9039                         PyErr_NoMemory();
9040                         return -1;
9041                 }
9042                 object->aipScavengeServers = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
9043         }
9044         return 0;
9045 }
9046
9047 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwForwarderTimeout(PyObject *obj, void *closure)
9048 {
9049         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9050         PyObject *py_dwForwarderTimeout;
9051         py_dwForwarderTimeout = PyInt_FromLong(object->dwForwarderTimeout);
9052         return py_dwForwarderTimeout;
9053 }
9054
9055 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwForwarderTimeout(PyObject *py_obj, PyObject *value, void *closure)
9056 {
9057         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9058         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
9059         object->dwForwarderTimeout = PyInt_AsLong(value);
9060         return 0;
9061 }
9062
9063 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fForwarderSlave(PyObject *obj, void *closure)
9064 {
9065         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9066         PyObject *py_fForwarderSlave;
9067         py_fForwarderSlave = PyInt_FromLong(object->fForwarderSlave);
9068         return py_fForwarderSlave;
9069 }
9070
9071 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fForwarderSlave(PyObject *py_obj, PyObject *value, void *closure)
9072 {
9073         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9074         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
9075         object->fForwarderSlave = PyInt_AsLong(value);
9076         return 0;
9077 }
9078
9079 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipLocalMasters(PyObject *obj, void *closure)
9080 {
9081         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9082         PyObject *py_aipLocalMasters;
9083         if (object->aipLocalMasters == NULL) {
9084                 py_aipLocalMasters = Py_None;
9085                 Py_INCREF(py_aipLocalMasters);
9086         } else {
9087                 py_aipLocalMasters = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipLocalMasters, object->aipLocalMasters);
9088         }
9089         return py_aipLocalMasters;
9090 }
9091
9092 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipLocalMasters(PyObject *py_obj, PyObject *value, void *closure)
9093 {
9094         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9095         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipLocalMasters);
9096         if (value == Py_None) {
9097                 object->aipLocalMasters = NULL;
9098         } else {
9099                 object->aipLocalMasters = NULL;
9100                 PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
9101                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9102                         PyErr_NoMemory();
9103                         return -1;
9104                 }
9105                 object->aipLocalMasters = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
9106         }
9107         return 0;
9108 }
9109
9110 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwDpFlags(PyObject *obj, void *closure)
9111 {
9112         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9113         PyObject *py_dwDpFlags;
9114         py_dwDpFlags = PyInt_FromLong(object->dwDpFlags);
9115         return py_dwDpFlags;
9116 }
9117
9118 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwDpFlags(PyObject *py_obj, PyObject *value, void *closure)
9119 {
9120         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9121         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
9122         object->dwDpFlags = PyInt_AsLong(value);
9123         return 0;
9124 }
9125
9126 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_pszDpFqdn(PyObject *obj, void *closure)
9127 {
9128         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9129         PyObject *py_pszDpFqdn;
9130         if (object->pszDpFqdn == NULL) {
9131                 py_pszDpFqdn = Py_None;
9132                 Py_INCREF(py_pszDpFqdn);
9133         } else {
9134                 if (object->pszDpFqdn == NULL) {
9135                         py_pszDpFqdn = Py_None;
9136                         Py_INCREF(py_pszDpFqdn);
9137                 } else {
9138                         py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
9139                 }
9140         }
9141         return py_pszDpFqdn;
9142 }
9143
9144 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
9145 {
9146         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9147         if (value == Py_None) {
9148                 object->pszDpFqdn = NULL;
9149         } else {
9150                 object->pszDpFqdn = NULL;
9151                 if (PyUnicode_Check(value)) {
9152                         object->pszDpFqdn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
9153                 } else if (PyString_Check(value)) {
9154                         object->pszDpFqdn = PyString_AS_STRING(value);
9155                 } else {
9156                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
9157                         return -1;
9158                 }
9159         }
9160         return 0;
9161 }
9162
9163 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_pwszZoneDn(PyObject *obj, void *closure)
9164 {
9165         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9166         PyObject *py_pwszZoneDn;
9167         if (object->pwszZoneDn == NULL) {
9168                 py_pwszZoneDn = Py_None;
9169                 Py_INCREF(py_pwszZoneDn);
9170         } else {
9171                 if (object->pwszZoneDn == NULL) {
9172                         py_pwszZoneDn = Py_None;
9173                         Py_INCREF(py_pwszZoneDn);
9174                 } else {
9175                         py_pwszZoneDn = PyUnicode_Decode(object->pwszZoneDn, strlen(object->pwszZoneDn), "utf-8", "ignore");
9176                 }
9177         }
9178         return py_pwszZoneDn;
9179 }
9180
9181 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_pwszZoneDn(PyObject *py_obj, PyObject *value, void *closure)
9182 {
9183         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9184         if (value == Py_None) {
9185                 object->pwszZoneDn = NULL;
9186         } else {
9187                 object->pwszZoneDn = NULL;
9188                 if (PyUnicode_Check(value)) {
9189                         object->pwszZoneDn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
9190                 } else if (PyString_Check(value)) {
9191                         object->pwszZoneDn = PyString_AS_STRING(value);
9192                 } else {
9193                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
9194                         return -1;
9195                 }
9196         }
9197         return 0;
9198 }
9199
9200 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastSuccessfulSoaCheck(PyObject *obj, void *closure)
9201 {
9202         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9203         PyObject *py_dwLastSuccessfulSoaCheck;
9204         py_dwLastSuccessfulSoaCheck = PyInt_FromLong(object->dwLastSuccessfulSoaCheck);
9205         return py_dwLastSuccessfulSoaCheck;
9206 }
9207
9208 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastSuccessfulSoaCheck(PyObject *py_obj, PyObject *value, void *closure)
9209 {
9210         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9211         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
9212         object->dwLastSuccessfulSoaCheck = PyInt_AsLong(value);
9213         return 0;
9214 }
9215
9216 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastSuccessfulXfr(PyObject *obj, void *closure)
9217 {
9218         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9219         PyObject *py_dwLastSuccessfulXfr;
9220         py_dwLastSuccessfulXfr = PyInt_FromLong(object->dwLastSuccessfulXfr);
9221         return py_dwLastSuccessfulXfr;
9222 }
9223
9224 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastSuccessfulXfr(PyObject *py_obj, PyObject *value, void *closure)
9225 {
9226         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9227         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
9228         object->dwLastSuccessfulXfr = PyInt_AsLong(value);
9229         return 0;
9230 }
9231
9232 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fQueuedForBackgroundLoad(PyObject *obj, void *closure)
9233 {
9234         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9235         PyObject *py_fQueuedForBackgroundLoad;
9236         py_fQueuedForBackgroundLoad = PyInt_FromLong(object->fQueuedForBackgroundLoad);
9237         return py_fQueuedForBackgroundLoad;
9238 }
9239
9240 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fQueuedForBackgroundLoad(PyObject *py_obj, PyObject *value, void *closure)
9241 {
9242         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9243         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
9244         object->fQueuedForBackgroundLoad = PyInt_AsLong(value);
9245         return 0;
9246 }
9247
9248 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fBackgroundLoadInProgress(PyObject *obj, void *closure)
9249 {
9250         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9251         PyObject *py_fBackgroundLoadInProgress;
9252         py_fBackgroundLoadInProgress = PyInt_FromLong(object->fBackgroundLoadInProgress);
9253         return py_fBackgroundLoadInProgress;
9254 }
9255
9256 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fBackgroundLoadInProgress(PyObject *py_obj, PyObject *value, void *closure)
9257 {
9258         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9259         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
9260         object->fBackgroundLoadInProgress = PyInt_AsLong(value);
9261         return 0;
9262 }
9263
9264 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fReadOnlyZone(PyObject *obj, void *closure)
9265 {
9266         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9267         PyObject *py_fReadOnlyZone;
9268         py_fReadOnlyZone = PyInt_FromLong(object->fReadOnlyZone);
9269         return py_fReadOnlyZone;
9270 }
9271
9272 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fReadOnlyZone(PyObject *py_obj, PyObject *value, void *closure)
9273 {
9274         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9275         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
9276         object->fReadOnlyZone = PyInt_AsLong(value);
9277         return 0;
9278 }
9279
9280 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastXfrAttempt(PyObject *obj, void *closure)
9281 {
9282         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9283         PyObject *py_dwLastXfrAttempt;
9284         py_dwLastXfrAttempt = PyInt_FromLong(object->dwLastXfrAttempt);
9285         return py_dwLastXfrAttempt;
9286 }
9287
9288 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastXfrAttempt(PyObject *py_obj, PyObject *value, void *closure)
9289 {
9290         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9291         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
9292         object->dwLastXfrAttempt = PyInt_AsLong(value);
9293         return 0;
9294 }
9295
9296 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastXfrResult(PyObject *obj, void *closure)
9297 {
9298         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9299         PyObject *py_dwLastXfrResult;
9300         py_dwLastXfrResult = PyInt_FromLong(object->dwLastXfrResult);
9301         return py_dwLastXfrResult;
9302 }
9303
9304 static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastXfrResult(PyObject *py_obj, PyObject *value, void *closure)
9305 {
9306         struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9307         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
9308         object->dwLastXfrResult = PyInt_AsLong(value);
9309         return 0;
9310 }
9311
9312 static PyGetSetDef py_DNS_RPC_ZONE_INFO_LONGHORN_getsetters[] = {
9313         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwRpcStructureVersion, py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwRpcStructureVersion },
9314         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwReserved0, py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwReserved0 },
9315         { discard_const_p(char, "pszZoneName"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_pszZoneName, py_DNS_RPC_ZONE_INFO_LONGHORN_set_pszZoneName },
9316         { discard_const_p(char, "dwZoneType"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwZoneType, py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwZoneType },
9317         { discard_const_p(char, "fReverse"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_fReverse, py_DNS_RPC_ZONE_INFO_LONGHORN_set_fReverse },
9318         { discard_const_p(char, "fAllowUpdate"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_fAllowUpdate, py_DNS_RPC_ZONE_INFO_LONGHORN_set_fAllowUpdate },
9319         { discard_const_p(char, "fPaused"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_fPaused, py_DNS_RPC_ZONE_INFO_LONGHORN_set_fPaused },
9320         { discard_const_p(char, "fShutdown"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_fShutdown, py_DNS_RPC_ZONE_INFO_LONGHORN_set_fShutdown },
9321         { discard_const_p(char, "fAutoCreated"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_fAutoCreated, py_DNS_RPC_ZONE_INFO_LONGHORN_set_fAutoCreated },
9322         { discard_const_p(char, "fUseDatabase"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_fUseDatabase, py_DNS_RPC_ZONE_INFO_LONGHORN_set_fUseDatabase },
9323         { discard_const_p(char, "pszDataFile"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_pszDataFile, py_DNS_RPC_ZONE_INFO_LONGHORN_set_pszDataFile },
9324         { discard_const_p(char, "aipMasters"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipMasters, py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipMasters },
9325         { discard_const_p(char, "fSecureSecondaries"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_fSecureSecondaries, py_DNS_RPC_ZONE_INFO_LONGHORN_set_fSecureSecondaries },
9326         { discard_const_p(char, "fNotifyLevel"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_fNotifyLevel, py_DNS_RPC_ZONE_INFO_LONGHORN_set_fNotifyLevel },
9327         { discard_const_p(char, "aipSecondaries"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipSecondaries, py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipSecondaries },
9328         { discard_const_p(char, "aipNotify"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipNotify, py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipNotify },
9329         { discard_const_p(char, "fUseWins"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_fUseWins, py_DNS_RPC_ZONE_INFO_LONGHORN_set_fUseWins },
9330         { discard_const_p(char, "fUseNbstat"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_fUseNbstat, py_DNS_RPC_ZONE_INFO_LONGHORN_set_fUseNbstat },
9331         { discard_const_p(char, "fAging"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_fAging, py_DNS_RPC_ZONE_INFO_LONGHORN_set_fAging },
9332         { discard_const_p(char, "dwNoRefreshInterval"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwNoRefreshInterval, py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwNoRefreshInterval },
9333         { discard_const_p(char, "dwRefreshInterval"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwRefreshInterval, py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwRefreshInterval },
9334         { discard_const_p(char, "dwAvailForScavengeTime"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwAvailForScavengeTime, py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwAvailForScavengeTime },
9335         { discard_const_p(char, "aipScavengeServers"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipScavengeServers, py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipScavengeServers },
9336         { discard_const_p(char, "dwForwarderTimeout"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwForwarderTimeout, py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwForwarderTimeout },
9337         { discard_const_p(char, "fForwarderSlave"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_fForwarderSlave, py_DNS_RPC_ZONE_INFO_LONGHORN_set_fForwarderSlave },
9338         { discard_const_p(char, "aipLocalMasters"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipLocalMasters, py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipLocalMasters },
9339         { discard_const_p(char, "dwDpFlags"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwDpFlags, py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwDpFlags },
9340         { discard_const_p(char, "pszDpFqdn"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_pszDpFqdn, py_DNS_RPC_ZONE_INFO_LONGHORN_set_pszDpFqdn },
9341         { discard_const_p(char, "pwszZoneDn"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_pwszZoneDn, py_DNS_RPC_ZONE_INFO_LONGHORN_set_pwszZoneDn },
9342         { discard_const_p(char, "dwLastSuccessfulSoaCheck"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastSuccessfulSoaCheck, py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastSuccessfulSoaCheck },
9343         { discard_const_p(char, "dwLastSuccessfulXfr"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastSuccessfulXfr, py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastSuccessfulXfr },
9344         { discard_const_p(char, "fQueuedForBackgroundLoad"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_fQueuedForBackgroundLoad, py_DNS_RPC_ZONE_INFO_LONGHORN_set_fQueuedForBackgroundLoad },
9345         { discard_const_p(char, "fBackgroundLoadInProgress"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_fBackgroundLoadInProgress, py_DNS_RPC_ZONE_INFO_LONGHORN_set_fBackgroundLoadInProgress },
9346         { discard_const_p(char, "fReadOnlyZone"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_fReadOnlyZone, py_DNS_RPC_ZONE_INFO_LONGHORN_set_fReadOnlyZone },
9347         { discard_const_p(char, "dwLastXfrAttempt"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastXfrAttempt, py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastXfrAttempt },
9348         { discard_const_p(char, "dwLastXfrResult"), py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastXfrResult, py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastXfrResult },
9349         { NULL }
9350 };
9351
9352 static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
9353 {
9354         return pytalloc_new(struct DNS_RPC_ZONE_INFO_LONGHORN, type);
9355 }
9356
9357
9358 static PyTypeObject DNS_RPC_ZONE_INFO_LONGHORN_Type = {
9359         PyObject_HEAD_INIT(NULL) 0,
9360         .tp_name = "dnsserver.DNS_RPC_ZONE_INFO_LONGHORN",
9361         .tp_getset = py_DNS_RPC_ZONE_INFO_LONGHORN_getsetters,
9362         .tp_methods = NULL,
9363         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
9364         .tp_basicsize = sizeof(pytalloc_Object),
9365         .tp_new = py_DNS_RPC_ZONE_INFO_LONGHORN_new,
9366 };
9367
9368
9369 static PyObject *py_DNS_RPC_ZONE_SECONDARIES_W2K_get_fSecureSecondaries(PyObject *obj, void *closure)
9370 {
9371         struct DNS_RPC_ZONE_SECONDARIES_W2K *object = (struct DNS_RPC_ZONE_SECONDARIES_W2K *)pytalloc_get_ptr(obj);
9372         PyObject *py_fSecureSecondaries;
9373         py_fSecureSecondaries = PyInt_FromLong(object->fSecureSecondaries);
9374         return py_fSecureSecondaries;
9375 }
9376
9377 static int py_DNS_RPC_ZONE_SECONDARIES_W2K_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
9378 {
9379         struct DNS_RPC_ZONE_SECONDARIES_W2K *object = (struct DNS_RPC_ZONE_SECONDARIES_W2K *)pytalloc_get_ptr(py_obj);
9380         if (PyLong_Check(value)) {
9381                 object->fSecureSecondaries = PyLong_AsLongLong(value);
9382         } else if (PyInt_Check(value)) {
9383                 object->fSecureSecondaries = PyInt_AsLong(value);
9384         } else {
9385                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
9386                   PyInt_Type.tp_name, PyLong_Type.tp_name);
9387                 return -1;
9388         }
9389         return 0;
9390 }
9391
9392 static PyObject *py_DNS_RPC_ZONE_SECONDARIES_W2K_get_fNotifyLevel(PyObject *obj, void *closure)
9393 {
9394         struct DNS_RPC_ZONE_SECONDARIES_W2K *object = (struct DNS_RPC_ZONE_SECONDARIES_W2K *)pytalloc_get_ptr(obj);
9395         PyObject *py_fNotifyLevel;
9396         py_fNotifyLevel = PyInt_FromLong(object->fNotifyLevel);
9397         return py_fNotifyLevel;
9398 }
9399
9400 static int py_DNS_RPC_ZONE_SECONDARIES_W2K_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
9401 {
9402         struct DNS_RPC_ZONE_SECONDARIES_W2K *object = (struct DNS_RPC_ZONE_SECONDARIES_W2K *)pytalloc_get_ptr(py_obj);
9403         if (PyLong_Check(value)) {
9404                 object->fNotifyLevel = PyLong_AsLongLong(value);
9405         } else if (PyInt_Check(value)) {
9406                 object->fNotifyLevel = PyInt_AsLong(value);
9407         } else {
9408                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
9409                   PyInt_Type.tp_name, PyLong_Type.tp_name);
9410                 return -1;
9411         }
9412         return 0;
9413 }
9414
9415 static PyObject *py_DNS_RPC_ZONE_SECONDARIES_W2K_get_aipSecondaries(PyObject *obj, void *closure)
9416 {
9417         struct DNS_RPC_ZONE_SECONDARIES_W2K *object = (struct DNS_RPC_ZONE_SECONDARIES_W2K *)pytalloc_get_ptr(obj);
9418         PyObject *py_aipSecondaries;
9419         if (object->aipSecondaries == NULL) {
9420                 py_aipSecondaries = Py_None;
9421                 Py_INCREF(py_aipSecondaries);
9422         } else {
9423                 py_aipSecondaries = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
9424         }
9425         return py_aipSecondaries;
9426 }
9427
9428 static int py_DNS_RPC_ZONE_SECONDARIES_W2K_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
9429 {
9430         struct DNS_RPC_ZONE_SECONDARIES_W2K *object = (struct DNS_RPC_ZONE_SECONDARIES_W2K *)pytalloc_get_ptr(py_obj);
9431         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipSecondaries);
9432         if (value == Py_None) {
9433                 object->aipSecondaries = NULL;
9434         } else {
9435                 object->aipSecondaries = NULL;
9436                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
9437                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9438                         PyErr_NoMemory();
9439                         return -1;
9440                 }
9441                 object->aipSecondaries = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
9442         }
9443         return 0;
9444 }
9445
9446 static PyObject *py_DNS_RPC_ZONE_SECONDARIES_W2K_get_aipNotify(PyObject *obj, void *closure)
9447 {
9448         struct DNS_RPC_ZONE_SECONDARIES_W2K *object = (struct DNS_RPC_ZONE_SECONDARIES_W2K *)pytalloc_get_ptr(obj);
9449         PyObject *py_aipNotify;
9450         if (object->aipNotify == NULL) {
9451                 py_aipNotify = Py_None;
9452                 Py_INCREF(py_aipNotify);
9453         } else {
9454                 py_aipNotify = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipNotify, object->aipNotify);
9455         }
9456         return py_aipNotify;
9457 }
9458
9459 static int py_DNS_RPC_ZONE_SECONDARIES_W2K_set_aipNotify(PyObject *py_obj, PyObject *value, void *closure)
9460 {
9461         struct DNS_RPC_ZONE_SECONDARIES_W2K *object = (struct DNS_RPC_ZONE_SECONDARIES_W2K *)pytalloc_get_ptr(py_obj);
9462         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipNotify);
9463         if (value == Py_None) {
9464                 object->aipNotify = NULL;
9465         } else {
9466                 object->aipNotify = NULL;
9467                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
9468                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9469                         PyErr_NoMemory();
9470                         return -1;
9471                 }
9472                 object->aipNotify = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
9473         }
9474         return 0;
9475 }
9476
9477 static PyGetSetDef py_DNS_RPC_ZONE_SECONDARIES_W2K_getsetters[] = {
9478         { discard_const_p(char, "fSecureSecondaries"), py_DNS_RPC_ZONE_SECONDARIES_W2K_get_fSecureSecondaries, py_DNS_RPC_ZONE_SECONDARIES_W2K_set_fSecureSecondaries },
9479         { discard_const_p(char, "fNotifyLevel"), py_DNS_RPC_ZONE_SECONDARIES_W2K_get_fNotifyLevel, py_DNS_RPC_ZONE_SECONDARIES_W2K_set_fNotifyLevel },
9480         { discard_const_p(char, "aipSecondaries"), py_DNS_RPC_ZONE_SECONDARIES_W2K_get_aipSecondaries, py_DNS_RPC_ZONE_SECONDARIES_W2K_set_aipSecondaries },
9481         { discard_const_p(char, "aipNotify"), py_DNS_RPC_ZONE_SECONDARIES_W2K_get_aipNotify, py_DNS_RPC_ZONE_SECONDARIES_W2K_set_aipNotify },
9482         { NULL }
9483 };
9484
9485 static PyObject *py_DNS_RPC_ZONE_SECONDARIES_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
9486 {
9487         return pytalloc_new(struct DNS_RPC_ZONE_SECONDARIES_W2K, type);
9488 }
9489
9490
9491 static PyTypeObject DNS_RPC_ZONE_SECONDARIES_W2K_Type = {
9492         PyObject_HEAD_INIT(NULL) 0,
9493         .tp_name = "dnsserver.DNS_RPC_ZONE_SECONDARIES_W2K",
9494         .tp_getset = py_DNS_RPC_ZONE_SECONDARIES_W2K_getsetters,
9495         .tp_methods = NULL,
9496         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
9497         .tp_basicsize = sizeof(pytalloc_Object),
9498         .tp_new = py_DNS_RPC_ZONE_SECONDARIES_W2K_new,
9499 };
9500
9501
9502 static PyObject *py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
9503 {
9504         struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(obj);
9505         PyObject *py_dwRpcStructureVersion;
9506         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
9507         return py_dwRpcStructureVersion;
9508 }
9509
9510 static int py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
9511 {
9512         struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(py_obj);
9513         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
9514         object->dwRpcStructureVersion = PyInt_AsLong(value);
9515         return 0;
9516 }
9517
9518 static PyObject *py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
9519 {
9520         struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(obj);
9521         PyObject *py_dwReserved0;
9522         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
9523         return py_dwReserved0;
9524 }
9525
9526 static int py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
9527 {
9528         struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(py_obj);
9529         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
9530         object->dwReserved0 = PyInt_AsLong(value);
9531         return 0;
9532 }
9533
9534 static PyObject *py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_fSecureSecondaries(PyObject *obj, void *closure)
9535 {
9536         struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(obj);
9537         PyObject *py_fSecureSecondaries;
9538         py_fSecureSecondaries = PyInt_FromLong(object->fSecureSecondaries);
9539         return py_fSecureSecondaries;
9540 }
9541
9542 static int py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
9543 {
9544         struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(py_obj);
9545         if (PyLong_Check(value)) {
9546                 object->fSecureSecondaries = PyLong_AsLongLong(value);
9547         } else if (PyInt_Check(value)) {
9548                 object->fSecureSecondaries = PyInt_AsLong(value);
9549         } else {
9550                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
9551                   PyInt_Type.tp_name, PyLong_Type.tp_name);
9552                 return -1;
9553         }
9554         return 0;
9555 }
9556
9557 static PyObject *py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_fNotifyLevel(PyObject *obj, void *closure)
9558 {
9559         struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(obj);
9560         PyObject *py_fNotifyLevel;
9561         py_fNotifyLevel = PyInt_FromLong(object->fNotifyLevel);
9562         return py_fNotifyLevel;
9563 }
9564
9565 static int py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
9566 {
9567         struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(py_obj);
9568         if (PyLong_Check(value)) {
9569                 object->fNotifyLevel = PyLong_AsLongLong(value);
9570         } else if (PyInt_Check(value)) {
9571                 object->fNotifyLevel = PyInt_AsLong(value);
9572         } else {
9573                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
9574                   PyInt_Type.tp_name, PyLong_Type.tp_name);
9575                 return -1;
9576         }
9577         return 0;
9578 }
9579
9580 static PyObject *py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_aipSecondaries(PyObject *obj, void *closure)
9581 {
9582         struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(obj);
9583         PyObject *py_aipSecondaries;
9584         if (object->aipSecondaries == NULL) {
9585                 py_aipSecondaries = Py_None;
9586                 Py_INCREF(py_aipSecondaries);
9587         } else {
9588                 py_aipSecondaries = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
9589         }
9590         return py_aipSecondaries;
9591 }
9592
9593 static int py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
9594 {
9595         struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(py_obj);
9596         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipSecondaries);
9597         if (value == Py_None) {
9598                 object->aipSecondaries = NULL;
9599         } else {
9600                 object->aipSecondaries = NULL;
9601                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
9602                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9603                         PyErr_NoMemory();
9604                         return -1;
9605                 }
9606                 object->aipSecondaries = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
9607         }
9608         return 0;
9609 }
9610
9611 static PyObject *py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_aipNotify(PyObject *obj, void *closure)
9612 {
9613         struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(obj);
9614         PyObject *py_aipNotify;
9615         if (object->aipNotify == NULL) {
9616                 py_aipNotify = Py_None;
9617                 Py_INCREF(py_aipNotify);
9618         } else {
9619                 py_aipNotify = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipNotify, object->aipNotify);
9620         }
9621         return py_aipNotify;
9622 }
9623
9624 static int py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_aipNotify(PyObject *py_obj, PyObject *value, void *closure)
9625 {
9626         struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(py_obj);
9627         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipNotify);
9628         if (value == Py_None) {
9629                 object->aipNotify = NULL;
9630         } else {
9631                 object->aipNotify = NULL;
9632                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
9633                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9634                         PyErr_NoMemory();
9635                         return -1;
9636                 }
9637                 object->aipNotify = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
9638         }
9639         return 0;
9640 }
9641
9642 static PyGetSetDef py_DNS_RPC_ZONE_SECONDARIES_DOTNET_getsetters[] = {
9643         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_dwRpcStructureVersion, py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_dwRpcStructureVersion },
9644         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_dwReserved0, py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_dwReserved0 },
9645         { discard_const_p(char, "fSecureSecondaries"), py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_fSecureSecondaries, py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_fSecureSecondaries },
9646         { discard_const_p(char, "fNotifyLevel"), py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_fNotifyLevel, py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_fNotifyLevel },
9647         { discard_const_p(char, "aipSecondaries"), py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_aipSecondaries, py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_aipSecondaries },
9648         { discard_const_p(char, "aipNotify"), py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_aipNotify, py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_aipNotify },
9649         { NULL }
9650 };
9651
9652 static PyObject *py_DNS_RPC_ZONE_SECONDARIES_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
9653 {
9654         return pytalloc_new(struct DNS_RPC_ZONE_SECONDARIES_DOTNET, type);
9655 }
9656
9657
9658 static PyTypeObject DNS_RPC_ZONE_SECONDARIES_DOTNET_Type = {
9659         PyObject_HEAD_INIT(NULL) 0,
9660         .tp_name = "dnsserver.DNS_RPC_ZONE_SECONDARIES_DOTNET",
9661         .tp_getset = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_getsetters,
9662         .tp_methods = NULL,
9663         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
9664         .tp_basicsize = sizeof(pytalloc_Object),
9665         .tp_new = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_new,
9666 };
9667
9668
9669 static PyObject *py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_dwRpcStructureVersion(PyObject *obj, void *closure)
9670 {
9671         struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(obj);
9672         PyObject *py_dwRpcStructureVersion;
9673         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
9674         return py_dwRpcStructureVersion;
9675 }
9676
9677 static int py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
9678 {
9679         struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(py_obj);
9680         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
9681         object->dwRpcStructureVersion = PyInt_AsLong(value);
9682         return 0;
9683 }
9684
9685 static PyObject *py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_dwReserved0(PyObject *obj, void *closure)
9686 {
9687         struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(obj);
9688         PyObject *py_dwReserved0;
9689         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
9690         return py_dwReserved0;
9691 }
9692
9693 static int py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
9694 {
9695         struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(py_obj);
9696         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
9697         object->dwReserved0 = PyInt_AsLong(value);
9698         return 0;
9699 }
9700
9701 static PyObject *py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_fSecureSecondaries(PyObject *obj, void *closure)
9702 {
9703         struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(obj);
9704         PyObject *py_fSecureSecondaries;
9705         py_fSecureSecondaries = PyInt_FromLong(object->fSecureSecondaries);
9706         return py_fSecureSecondaries;
9707 }
9708
9709 static int py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
9710 {
9711         struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(py_obj);
9712         if (PyLong_Check(value)) {
9713                 object->fSecureSecondaries = PyLong_AsLongLong(value);
9714         } else if (PyInt_Check(value)) {
9715                 object->fSecureSecondaries = PyInt_AsLong(value);
9716         } else {
9717                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
9718                   PyInt_Type.tp_name, PyLong_Type.tp_name);
9719                 return -1;
9720         }
9721         return 0;
9722 }
9723
9724 static PyObject *py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_fNotifyLevel(PyObject *obj, void *closure)
9725 {
9726         struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(obj);
9727         PyObject *py_fNotifyLevel;
9728         py_fNotifyLevel = PyInt_FromLong(object->fNotifyLevel);
9729         return py_fNotifyLevel;
9730 }
9731
9732 static int py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
9733 {
9734         struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(py_obj);
9735         if (PyLong_Check(value)) {
9736                 object->fNotifyLevel = PyLong_AsLongLong(value);
9737         } else if (PyInt_Check(value)) {
9738                 object->fNotifyLevel = PyInt_AsLong(value);
9739         } else {
9740                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
9741                   PyInt_Type.tp_name, PyLong_Type.tp_name);
9742                 return -1;
9743         }
9744         return 0;
9745 }
9746
9747 static PyObject *py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_aipSecondaries(PyObject *obj, void *closure)
9748 {
9749         struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(obj);
9750         PyObject *py_aipSecondaries;
9751         if (object->aipSecondaries == NULL) {
9752                 py_aipSecondaries = Py_None;
9753                 Py_INCREF(py_aipSecondaries);
9754         } else {
9755                 py_aipSecondaries = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
9756         }
9757         return py_aipSecondaries;
9758 }
9759
9760 static int py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
9761 {
9762         struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(py_obj);
9763         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipSecondaries);
9764         if (value == Py_None) {
9765                 object->aipSecondaries = NULL;
9766         } else {
9767                 object->aipSecondaries = NULL;
9768                 PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
9769                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9770                         PyErr_NoMemory();
9771                         return -1;
9772                 }
9773                 object->aipSecondaries = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
9774         }
9775         return 0;
9776 }
9777
9778 static PyObject *py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_aipNotify(PyObject *obj, void *closure)
9779 {
9780         struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(obj);
9781         PyObject *py_aipNotify;
9782         if (object->aipNotify == NULL) {
9783                 py_aipNotify = Py_None;
9784                 Py_INCREF(py_aipNotify);
9785         } else {
9786                 py_aipNotify = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipNotify, object->aipNotify);
9787         }
9788         return py_aipNotify;
9789 }
9790
9791 static int py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_aipNotify(PyObject *py_obj, PyObject *value, void *closure)
9792 {
9793         struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(py_obj);
9794         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipNotify);
9795         if (value == Py_None) {
9796                 object->aipNotify = NULL;
9797         } else {
9798                 object->aipNotify = NULL;
9799                 PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
9800                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9801                         PyErr_NoMemory();
9802                         return -1;
9803                 }
9804                 object->aipNotify = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
9805         }
9806         return 0;
9807 }
9808
9809 static PyGetSetDef py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_getsetters[] = {
9810         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_dwRpcStructureVersion, py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_dwRpcStructureVersion },
9811         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_dwReserved0, py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_dwReserved0 },
9812         { discard_const_p(char, "fSecureSecondaries"), py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_fSecureSecondaries, py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_fSecureSecondaries },
9813         { discard_const_p(char, "fNotifyLevel"), py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_fNotifyLevel, py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_fNotifyLevel },
9814         { discard_const_p(char, "aipSecondaries"), py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_aipSecondaries, py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_aipSecondaries },
9815         { discard_const_p(char, "aipNotify"), py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_aipNotify, py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_aipNotify },
9816         { NULL }
9817 };
9818
9819 static PyObject *py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
9820 {
9821         return pytalloc_new(struct DNS_RPC_ZONE_SECONDARIES_LONGHORN, type);
9822 }
9823
9824
9825 static PyTypeObject DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type = {
9826         PyObject_HEAD_INIT(NULL) 0,
9827         .tp_name = "dnsserver.DNS_RPC_ZONE_SECONDARIES_LONGHORN",
9828         .tp_getset = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_getsetters,
9829         .tp_methods = NULL,
9830         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
9831         .tp_basicsize = sizeof(pytalloc_Object),
9832         .tp_new = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_new,
9833 };
9834
9835
9836 static PyObject *py_DNS_RPC_ZONE_DATABASE_W2K_get_fDsIntegrated(PyObject *obj, void *closure)
9837 {
9838         struct DNS_RPC_ZONE_DATABASE_W2K *object = (struct DNS_RPC_ZONE_DATABASE_W2K *)pytalloc_get_ptr(obj);
9839         PyObject *py_fDsIntegrated;
9840         py_fDsIntegrated = PyInt_FromLong(object->fDsIntegrated);
9841         return py_fDsIntegrated;
9842 }
9843
9844 static int py_DNS_RPC_ZONE_DATABASE_W2K_set_fDsIntegrated(PyObject *py_obj, PyObject *value, void *closure)
9845 {
9846         struct DNS_RPC_ZONE_DATABASE_W2K *object = (struct DNS_RPC_ZONE_DATABASE_W2K *)pytalloc_get_ptr(py_obj);
9847         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
9848         object->fDsIntegrated = PyInt_AsLong(value);
9849         return 0;
9850 }
9851
9852 static PyObject *py_DNS_RPC_ZONE_DATABASE_W2K_get_pszFileName(PyObject *obj, void *closure)
9853 {
9854         struct DNS_RPC_ZONE_DATABASE_W2K *object = (struct DNS_RPC_ZONE_DATABASE_W2K *)pytalloc_get_ptr(obj);
9855         PyObject *py_pszFileName;
9856         if (object->pszFileName == NULL) {
9857                 py_pszFileName = Py_None;
9858                 Py_INCREF(py_pszFileName);
9859         } else {
9860                 if (object->pszFileName == NULL) {
9861                         py_pszFileName = Py_None;
9862                         Py_INCREF(py_pszFileName);
9863                 } else {
9864                         py_pszFileName = PyUnicode_Decode(object->pszFileName, strlen(object->pszFileName), "utf-8", "ignore");
9865                 }
9866         }
9867         return py_pszFileName;
9868 }
9869
9870 static int py_DNS_RPC_ZONE_DATABASE_W2K_set_pszFileName(PyObject *py_obj, PyObject *value, void *closure)
9871 {
9872         struct DNS_RPC_ZONE_DATABASE_W2K *object = (struct DNS_RPC_ZONE_DATABASE_W2K *)pytalloc_get_ptr(py_obj);
9873         if (value == Py_None) {
9874                 object->pszFileName = NULL;
9875         } else {
9876                 object->pszFileName = NULL;
9877                 if (PyUnicode_Check(value)) {
9878                         object->pszFileName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
9879                 } else if (PyString_Check(value)) {
9880                         object->pszFileName = PyString_AS_STRING(value);
9881                 } else {
9882                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
9883                         return -1;
9884                 }
9885         }
9886         return 0;
9887 }
9888
9889 static PyGetSetDef py_DNS_RPC_ZONE_DATABASE_W2K_getsetters[] = {
9890         { discard_const_p(char, "fDsIntegrated"), py_DNS_RPC_ZONE_DATABASE_W2K_get_fDsIntegrated, py_DNS_RPC_ZONE_DATABASE_W2K_set_fDsIntegrated },
9891         { discard_const_p(char, "pszFileName"), py_DNS_RPC_ZONE_DATABASE_W2K_get_pszFileName, py_DNS_RPC_ZONE_DATABASE_W2K_set_pszFileName },
9892         { NULL }
9893 };
9894
9895 static PyObject *py_DNS_RPC_ZONE_DATABASE_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
9896 {
9897         return pytalloc_new(struct DNS_RPC_ZONE_DATABASE_W2K, type);
9898 }
9899
9900
9901 static PyTypeObject DNS_RPC_ZONE_DATABASE_W2K_Type = {
9902         PyObject_HEAD_INIT(NULL) 0,
9903         .tp_name = "dnsserver.DNS_RPC_ZONE_DATABASE_W2K",
9904         .tp_getset = py_DNS_RPC_ZONE_DATABASE_W2K_getsetters,
9905         .tp_methods = NULL,
9906         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
9907         .tp_basicsize = sizeof(pytalloc_Object),
9908         .tp_new = py_DNS_RPC_ZONE_DATABASE_W2K_new,
9909 };
9910
9911
9912 static PyObject *py_DNS_RPC_ZONE_DATABASE_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
9913 {
9914         struct DNS_RPC_ZONE_DATABASE_DOTNET *object = (struct DNS_RPC_ZONE_DATABASE_DOTNET *)pytalloc_get_ptr(obj);
9915         PyObject *py_dwRpcStructureVersion;
9916         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
9917         return py_dwRpcStructureVersion;
9918 }
9919
9920 static int py_DNS_RPC_ZONE_DATABASE_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
9921 {
9922         struct DNS_RPC_ZONE_DATABASE_DOTNET *object = (struct DNS_RPC_ZONE_DATABASE_DOTNET *)pytalloc_get_ptr(py_obj);
9923         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
9924         object->dwRpcStructureVersion = PyInt_AsLong(value);
9925         return 0;
9926 }
9927
9928 static PyObject *py_DNS_RPC_ZONE_DATABASE_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
9929 {
9930         struct DNS_RPC_ZONE_DATABASE_DOTNET *object = (struct DNS_RPC_ZONE_DATABASE_DOTNET *)pytalloc_get_ptr(obj);
9931         PyObject *py_dwReserved0;
9932         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
9933         return py_dwReserved0;
9934 }
9935
9936 static int py_DNS_RPC_ZONE_DATABASE_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
9937 {
9938         struct DNS_RPC_ZONE_DATABASE_DOTNET *object = (struct DNS_RPC_ZONE_DATABASE_DOTNET *)pytalloc_get_ptr(py_obj);
9939         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
9940         object->dwReserved0 = PyInt_AsLong(value);
9941         return 0;
9942 }
9943
9944 static PyObject *py_DNS_RPC_ZONE_DATABASE_DOTNET_get_fDsIntegrated(PyObject *obj, void *closure)
9945 {
9946         struct DNS_RPC_ZONE_DATABASE_DOTNET *object = (struct DNS_RPC_ZONE_DATABASE_DOTNET *)pytalloc_get_ptr(obj);
9947         PyObject *py_fDsIntegrated;
9948         py_fDsIntegrated = PyInt_FromLong(object->fDsIntegrated);
9949         return py_fDsIntegrated;
9950 }
9951
9952 static int py_DNS_RPC_ZONE_DATABASE_DOTNET_set_fDsIntegrated(PyObject *py_obj, PyObject *value, void *closure)
9953 {
9954         struct DNS_RPC_ZONE_DATABASE_DOTNET *object = (struct DNS_RPC_ZONE_DATABASE_DOTNET *)pytalloc_get_ptr(py_obj);
9955         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
9956         object->fDsIntegrated = PyInt_AsLong(value);
9957         return 0;
9958 }
9959
9960 static PyObject *py_DNS_RPC_ZONE_DATABASE_DOTNET_get_pszFileName(PyObject *obj, void *closure)
9961 {
9962         struct DNS_RPC_ZONE_DATABASE_DOTNET *object = (struct DNS_RPC_ZONE_DATABASE_DOTNET *)pytalloc_get_ptr(obj);
9963         PyObject *py_pszFileName;
9964         if (object->pszFileName == NULL) {
9965                 py_pszFileName = Py_None;
9966                 Py_INCREF(py_pszFileName);
9967         } else {
9968                 if (object->pszFileName == NULL) {
9969                         py_pszFileName = Py_None;
9970                         Py_INCREF(py_pszFileName);
9971                 } else {
9972                         py_pszFileName = PyUnicode_Decode(object->pszFileName, strlen(object->pszFileName), "utf-8", "ignore");
9973                 }
9974         }
9975         return py_pszFileName;
9976 }
9977
9978 static int py_DNS_RPC_ZONE_DATABASE_DOTNET_set_pszFileName(PyObject *py_obj, PyObject *value, void *closure)
9979 {
9980         struct DNS_RPC_ZONE_DATABASE_DOTNET *object = (struct DNS_RPC_ZONE_DATABASE_DOTNET *)pytalloc_get_ptr(py_obj);
9981         if (value == Py_None) {
9982                 object->pszFileName = NULL;
9983         } else {
9984                 object->pszFileName = NULL;
9985                 if (PyUnicode_Check(value)) {
9986                         object->pszFileName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
9987                 } else if (PyString_Check(value)) {
9988                         object->pszFileName = PyString_AS_STRING(value);
9989                 } else {
9990                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
9991                         return -1;
9992                 }
9993         }
9994         return 0;
9995 }
9996
9997 static PyGetSetDef py_DNS_RPC_ZONE_DATABASE_DOTNET_getsetters[] = {
9998         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_ZONE_DATABASE_DOTNET_get_dwRpcStructureVersion, py_DNS_RPC_ZONE_DATABASE_DOTNET_set_dwRpcStructureVersion },
9999         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_ZONE_DATABASE_DOTNET_get_dwReserved0, py_DNS_RPC_ZONE_DATABASE_DOTNET_set_dwReserved0 },
10000         { discard_const_p(char, "fDsIntegrated"), py_DNS_RPC_ZONE_DATABASE_DOTNET_get_fDsIntegrated, py_DNS_RPC_ZONE_DATABASE_DOTNET_set_fDsIntegrated },
10001         { discard_const_p(char, "pszFileName"), py_DNS_RPC_ZONE_DATABASE_DOTNET_get_pszFileName, py_DNS_RPC_ZONE_DATABASE_DOTNET_set_pszFileName },
10002         { NULL }
10003 };
10004
10005 static PyObject *py_DNS_RPC_ZONE_DATABASE_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
10006 {
10007         return pytalloc_new(struct DNS_RPC_ZONE_DATABASE_DOTNET, type);
10008 }
10009
10010
10011 static PyTypeObject DNS_RPC_ZONE_DATABASE_DOTNET_Type = {
10012         PyObject_HEAD_INIT(NULL) 0,
10013         .tp_name = "dnsserver.DNS_RPC_ZONE_DATABASE_DOTNET",
10014         .tp_getset = py_DNS_RPC_ZONE_DATABASE_DOTNET_getsetters,
10015         .tp_methods = NULL,
10016         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
10017         .tp_basicsize = sizeof(pytalloc_Object),
10018         .tp_new = py_DNS_RPC_ZONE_DATABASE_DOTNET_new,
10019 };
10020
10021
10022 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pszZoneName(PyObject *obj, void *closure)
10023 {
10024         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10025         PyObject *py_pszZoneName;
10026         if (object->pszZoneName == NULL) {
10027                 py_pszZoneName = Py_None;
10028                 Py_INCREF(py_pszZoneName);
10029         } else {
10030                 if (object->pszZoneName == NULL) {
10031                         py_pszZoneName = Py_None;
10032                         Py_INCREF(py_pszZoneName);
10033                 } else {
10034                         py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
10035                 }
10036         }
10037         return py_pszZoneName;
10038 }
10039
10040 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
10041 {
10042         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10043         if (value == Py_None) {
10044                 object->pszZoneName = NULL;
10045         } else {
10046                 object->pszZoneName = NULL;
10047                 if (PyUnicode_Check(value)) {
10048                         object->pszZoneName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
10049                 } else if (PyString_Check(value)) {
10050                         object->pszZoneName = PyString_AS_STRING(value);
10051                 } else {
10052                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
10053                         return -1;
10054                 }
10055         }
10056         return 0;
10057 }
10058
10059 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwZoneType(PyObject *obj, void *closure)
10060 {
10061         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10062         PyObject *py_dwZoneType;
10063         py_dwZoneType = PyInt_FromLong(object->dwZoneType);
10064         return py_dwZoneType;
10065 }
10066
10067 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwZoneType(PyObject *py_obj, PyObject *value, void *closure)
10068 {
10069         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10070         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
10071         object->dwZoneType = PyInt_AsLong(value);
10072         return 0;
10073 }
10074
10075 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fAllowUpdate(PyObject *obj, void *closure)
10076 {
10077         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10078         PyObject *py_fAllowUpdate;
10079         py_fAllowUpdate = PyInt_FromLong(object->fAllowUpdate);
10080         return py_fAllowUpdate;
10081 }
10082
10083 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
10084 {
10085         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10086         if (PyLong_Check(value)) {
10087                 object->fAllowUpdate = PyLong_AsLongLong(value);
10088         } else if (PyInt_Check(value)) {
10089                 object->fAllowUpdate = PyInt_AsLong(value);
10090         } else {
10091                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
10092                   PyInt_Type.tp_name, PyLong_Type.tp_name);
10093                 return -1;
10094         }
10095         return 0;
10096 }
10097
10098 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fAging(PyObject *obj, void *closure)
10099 {
10100         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10101         PyObject *py_fAging;
10102         py_fAging = PyInt_FromLong(object->fAging);
10103         return py_fAging;
10104 }
10105
10106 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fAging(PyObject *py_obj, PyObject *value, void *closure)
10107 {
10108         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10109         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
10110         object->fAging = PyInt_AsLong(value);
10111         return 0;
10112 }
10113
10114 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwFlags(PyObject *obj, void *closure)
10115 {
10116         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10117         PyObject *py_dwFlags;
10118         py_dwFlags = PyInt_FromLong(object->dwFlags);
10119         return py_dwFlags;
10120 }
10121
10122 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
10123 {
10124         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10125         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
10126         object->dwFlags = PyInt_AsLong(value);
10127         return 0;
10128 }
10129
10130 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pszDataFile(PyObject *obj, void *closure)
10131 {
10132         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10133         PyObject *py_pszDataFile;
10134         if (object->pszDataFile == NULL) {
10135                 py_pszDataFile = Py_None;
10136                 Py_INCREF(py_pszDataFile);
10137         } else {
10138                 if (object->pszDataFile == NULL) {
10139                         py_pszDataFile = Py_None;
10140                         Py_INCREF(py_pszDataFile);
10141                 } else {
10142                         py_pszDataFile = PyUnicode_Decode(object->pszDataFile, strlen(object->pszDataFile), "utf-8", "ignore");
10143                 }
10144         }
10145         return py_pszDataFile;
10146 }
10147
10148 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pszDataFile(PyObject *py_obj, PyObject *value, void *closure)
10149 {
10150         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10151         if (value == Py_None) {
10152                 object->pszDataFile = NULL;
10153         } else {
10154                 object->pszDataFile = NULL;
10155                 if (PyUnicode_Check(value)) {
10156                         object->pszDataFile = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
10157                 } else if (PyString_Check(value)) {
10158                         object->pszDataFile = PyString_AS_STRING(value);
10159                 } else {
10160                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
10161                         return -1;
10162                 }
10163         }
10164         return 0;
10165 }
10166
10167 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fDsIntegrated(PyObject *obj, void *closure)
10168 {
10169         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10170         PyObject *py_fDsIntegrated;
10171         py_fDsIntegrated = PyInt_FromLong(object->fDsIntegrated);
10172         return py_fDsIntegrated;
10173 }
10174
10175 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fDsIntegrated(PyObject *py_obj, PyObject *value, void *closure)
10176 {
10177         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10178         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
10179         object->fDsIntegrated = PyInt_AsLong(value);
10180         return 0;
10181 }
10182
10183 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fLoadExisting(PyObject *obj, void *closure)
10184 {
10185         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10186         PyObject *py_fLoadExisting;
10187         py_fLoadExisting = PyInt_FromLong(object->fLoadExisting);
10188         return py_fLoadExisting;
10189 }
10190
10191 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fLoadExisting(PyObject *py_obj, PyObject *value, void *closure)
10192 {
10193         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10194         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
10195         object->fLoadExisting = PyInt_AsLong(value);
10196         return 0;
10197 }
10198
10199 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pszAdmin(PyObject *obj, void *closure)
10200 {
10201         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10202         PyObject *py_pszAdmin;
10203         if (object->pszAdmin == NULL) {
10204                 py_pszAdmin = Py_None;
10205                 Py_INCREF(py_pszAdmin);
10206         } else {
10207                 if (object->pszAdmin == NULL) {
10208                         py_pszAdmin = Py_None;
10209                         Py_INCREF(py_pszAdmin);
10210                 } else {
10211                         py_pszAdmin = PyUnicode_Decode(object->pszAdmin, strlen(object->pszAdmin), "utf-8", "ignore");
10212                 }
10213         }
10214         return py_pszAdmin;
10215 }
10216
10217 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pszAdmin(PyObject *py_obj, PyObject *value, void *closure)
10218 {
10219         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10220         if (value == Py_None) {
10221                 object->pszAdmin = NULL;
10222         } else {
10223                 object->pszAdmin = NULL;
10224                 if (PyUnicode_Check(value)) {
10225                         object->pszAdmin = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
10226                 } else if (PyString_Check(value)) {
10227                         object->pszAdmin = PyString_AS_STRING(value);
10228                 } else {
10229                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
10230                         return -1;
10231                 }
10232         }
10233         return 0;
10234 }
10235
10236 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_aipMasters(PyObject *obj, void *closure)
10237 {
10238         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10239         PyObject *py_aipMasters;
10240         if (object->aipMasters == NULL) {
10241                 py_aipMasters = Py_None;
10242                 Py_INCREF(py_aipMasters);
10243         } else {
10244                 py_aipMasters = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipMasters, object->aipMasters);
10245         }
10246         return py_aipMasters;
10247 }
10248
10249 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_aipMasters(PyObject *py_obj, PyObject *value, void *closure)
10250 {
10251         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10252         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipMasters);
10253         if (value == Py_None) {
10254                 object->aipMasters = NULL;
10255         } else {
10256                 object->aipMasters = NULL;
10257                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
10258                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
10259                         PyErr_NoMemory();
10260                         return -1;
10261                 }
10262                 object->aipMasters = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
10263         }
10264         return 0;
10265 }
10266
10267 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_aipSecondaries(PyObject *obj, void *closure)
10268 {
10269         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10270         PyObject *py_aipSecondaries;
10271         if (object->aipSecondaries == NULL) {
10272                 py_aipSecondaries = Py_None;
10273                 Py_INCREF(py_aipSecondaries);
10274         } else {
10275                 py_aipSecondaries = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
10276         }
10277         return py_aipSecondaries;
10278 }
10279
10280 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
10281 {
10282         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10283         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipSecondaries);
10284         if (value == Py_None) {
10285                 object->aipSecondaries = NULL;
10286         } else {
10287                 object->aipSecondaries = NULL;
10288                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
10289                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
10290                         PyErr_NoMemory();
10291                         return -1;
10292                 }
10293                 object->aipSecondaries = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
10294         }
10295         return 0;
10296 }
10297
10298 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fSecureSecondaries(PyObject *obj, void *closure)
10299 {
10300         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10301         PyObject *py_fSecureSecondaries;
10302         py_fSecureSecondaries = PyInt_FromLong(object->fSecureSecondaries);
10303         return py_fSecureSecondaries;
10304 }
10305
10306 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
10307 {
10308         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10309         if (PyLong_Check(value)) {
10310                 object->fSecureSecondaries = PyLong_AsLongLong(value);
10311         } else if (PyInt_Check(value)) {
10312                 object->fSecureSecondaries = PyInt_AsLong(value);
10313         } else {
10314                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
10315                   PyInt_Type.tp_name, PyLong_Type.tp_name);
10316                 return -1;
10317         }
10318         return 0;
10319 }
10320
10321 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fNotifyLevel(PyObject *obj, void *closure)
10322 {
10323         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10324         PyObject *py_fNotifyLevel;
10325         py_fNotifyLevel = PyInt_FromLong(object->fNotifyLevel);
10326         return py_fNotifyLevel;
10327 }
10328
10329 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
10330 {
10331         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10332         if (PyLong_Check(value)) {
10333                 object->fNotifyLevel = PyLong_AsLongLong(value);
10334         } else if (PyInt_Check(value)) {
10335                 object->fNotifyLevel = PyInt_AsLong(value);
10336         } else {
10337                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
10338                   PyInt_Type.tp_name, PyLong_Type.tp_name);
10339                 return -1;
10340         }
10341         return 0;
10342 }
10343
10344 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved1(PyObject *obj, void *closure)
10345 {
10346         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10347         PyObject *py_pvReserved1;
10348         if (object->pvReserved1 == NULL) {
10349                 py_pvReserved1 = Py_None;
10350                 Py_INCREF(py_pvReserved1);
10351         } else {
10352                 if (object->pvReserved1 == NULL) {
10353                         py_pvReserved1 = Py_None;
10354                         Py_INCREF(py_pvReserved1);
10355                 } else {
10356                         py_pvReserved1 = PyUnicode_Decode(object->pvReserved1, strlen(object->pvReserved1), "utf-8", "ignore");
10357                 }
10358         }
10359         return py_pvReserved1;
10360 }
10361
10362 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved1(PyObject *py_obj, PyObject *value, void *closure)
10363 {
10364         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10365         if (value == Py_None) {
10366                 object->pvReserved1 = NULL;
10367         } else {
10368                 object->pvReserved1 = NULL;
10369                 if (PyUnicode_Check(value)) {
10370                         object->pvReserved1 = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
10371                 } else if (PyString_Check(value)) {
10372                         object->pvReserved1 = PyString_AS_STRING(value);
10373                 } else {
10374                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
10375                         return -1;
10376                 }
10377         }
10378         return 0;
10379 }
10380
10381 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved2(PyObject *obj, void *closure)
10382 {
10383         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10384         PyObject *py_pvReserved2;
10385         if (object->pvReserved2 == NULL) {
10386                 py_pvReserved2 = Py_None;
10387                 Py_INCREF(py_pvReserved2);
10388         } else {
10389                 if (object->pvReserved2 == NULL) {
10390                         py_pvReserved2 = Py_None;
10391                         Py_INCREF(py_pvReserved2);
10392                 } else {
10393                         py_pvReserved2 = PyUnicode_Decode(object->pvReserved2, strlen(object->pvReserved2), "utf-8", "ignore");
10394                 }
10395         }
10396         return py_pvReserved2;
10397 }
10398
10399 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved2(PyObject *py_obj, PyObject *value, void *closure)
10400 {
10401         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10402         if (value == Py_None) {
10403                 object->pvReserved2 = NULL;
10404         } else {
10405                 object->pvReserved2 = NULL;
10406                 if (PyUnicode_Check(value)) {
10407                         object->pvReserved2 = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
10408                 } else if (PyString_Check(value)) {
10409                         object->pvReserved2 = PyString_AS_STRING(value);
10410                 } else {
10411                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
10412                         return -1;
10413                 }
10414         }
10415         return 0;
10416 }
10417
10418 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved3(PyObject *obj, void *closure)
10419 {
10420         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10421         PyObject *py_pvReserved3;
10422         if (object->pvReserved3 == NULL) {
10423                 py_pvReserved3 = Py_None;
10424                 Py_INCREF(py_pvReserved3);
10425         } else {
10426                 if (object->pvReserved3 == NULL) {
10427                         py_pvReserved3 = Py_None;
10428                         Py_INCREF(py_pvReserved3);
10429                 } else {
10430                         py_pvReserved3 = PyUnicode_Decode(object->pvReserved3, strlen(object->pvReserved3), "utf-8", "ignore");
10431                 }
10432         }
10433         return py_pvReserved3;
10434 }
10435
10436 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved3(PyObject *py_obj, PyObject *value, void *closure)
10437 {
10438         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10439         if (value == Py_None) {
10440                 object->pvReserved3 = NULL;
10441         } else {
10442                 object->pvReserved3 = NULL;
10443                 if (PyUnicode_Check(value)) {
10444                         object->pvReserved3 = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
10445                 } else if (PyString_Check(value)) {
10446                         object->pvReserved3 = PyString_AS_STRING(value);
10447                 } else {
10448                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
10449                         return -1;
10450                 }
10451         }
10452         return 0;
10453 }
10454
10455 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved4(PyObject *obj, void *closure)
10456 {
10457         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10458         PyObject *py_pvReserved4;
10459         if (object->pvReserved4 == NULL) {
10460                 py_pvReserved4 = Py_None;
10461                 Py_INCREF(py_pvReserved4);
10462         } else {
10463                 if (object->pvReserved4 == NULL) {
10464                         py_pvReserved4 = Py_None;
10465                         Py_INCREF(py_pvReserved4);
10466                 } else {
10467                         py_pvReserved4 = PyUnicode_Decode(object->pvReserved4, strlen(object->pvReserved4), "utf-8", "ignore");
10468                 }
10469         }
10470         return py_pvReserved4;
10471 }
10472
10473 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved4(PyObject *py_obj, PyObject *value, void *closure)
10474 {
10475         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10476         if (value == Py_None) {
10477                 object->pvReserved4 = NULL;
10478         } else {
10479                 object->pvReserved4 = NULL;
10480                 if (PyUnicode_Check(value)) {
10481                         object->pvReserved4 = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
10482                 } else if (PyString_Check(value)) {
10483                         object->pvReserved4 = PyString_AS_STRING(value);
10484                 } else {
10485                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
10486                         return -1;
10487                 }
10488         }
10489         return 0;
10490 }
10491
10492 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved5(PyObject *obj, void *closure)
10493 {
10494         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10495         PyObject *py_pvReserved5;
10496         if (object->pvReserved5 == NULL) {
10497                 py_pvReserved5 = Py_None;
10498                 Py_INCREF(py_pvReserved5);
10499         } else {
10500                 if (object->pvReserved5 == NULL) {
10501                         py_pvReserved5 = Py_None;
10502                         Py_INCREF(py_pvReserved5);
10503                 } else {
10504                         py_pvReserved5 = PyUnicode_Decode(object->pvReserved5, strlen(object->pvReserved5), "utf-8", "ignore");
10505                 }
10506         }
10507         return py_pvReserved5;
10508 }
10509
10510 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved5(PyObject *py_obj, PyObject *value, void *closure)
10511 {
10512         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10513         if (value == Py_None) {
10514                 object->pvReserved5 = NULL;
10515         } else {
10516                 object->pvReserved5 = NULL;
10517                 if (PyUnicode_Check(value)) {
10518                         object->pvReserved5 = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
10519                 } else if (PyString_Check(value)) {
10520                         object->pvReserved5 = PyString_AS_STRING(value);
10521                 } else {
10522                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
10523                         return -1;
10524                 }
10525         }
10526         return 0;
10527 }
10528
10529 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved6(PyObject *obj, void *closure)
10530 {
10531         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10532         PyObject *py_pvReserved6;
10533         if (object->pvReserved6 == NULL) {
10534                 py_pvReserved6 = Py_None;
10535                 Py_INCREF(py_pvReserved6);
10536         } else {
10537                 if (object->pvReserved6 == NULL) {
10538                         py_pvReserved6 = Py_None;
10539                         Py_INCREF(py_pvReserved6);
10540                 } else {
10541                         py_pvReserved6 = PyUnicode_Decode(object->pvReserved6, strlen(object->pvReserved6), "utf-8", "ignore");
10542                 }
10543         }
10544         return py_pvReserved6;
10545 }
10546
10547 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved6(PyObject *py_obj, PyObject *value, void *closure)
10548 {
10549         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10550         if (value == Py_None) {
10551                 object->pvReserved6 = NULL;
10552         } else {
10553                 object->pvReserved6 = NULL;
10554                 if (PyUnicode_Check(value)) {
10555                         object->pvReserved6 = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
10556                 } else if (PyString_Check(value)) {
10557                         object->pvReserved6 = PyString_AS_STRING(value);
10558                 } else {
10559                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
10560                         return -1;
10561                 }
10562         }
10563         return 0;
10564 }
10565
10566 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved7(PyObject *obj, void *closure)
10567 {
10568         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10569         PyObject *py_pvReserved7;
10570         if (object->pvReserved7 == NULL) {
10571                 py_pvReserved7 = Py_None;
10572                 Py_INCREF(py_pvReserved7);
10573         } else {
10574                 if (object->pvReserved7 == NULL) {
10575                         py_pvReserved7 = Py_None;
10576                         Py_INCREF(py_pvReserved7);
10577                 } else {
10578                         py_pvReserved7 = PyUnicode_Decode(object->pvReserved7, strlen(object->pvReserved7), "utf-8", "ignore");
10579                 }
10580         }
10581         return py_pvReserved7;
10582 }
10583
10584 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved7(PyObject *py_obj, PyObject *value, void *closure)
10585 {
10586         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10587         if (value == Py_None) {
10588                 object->pvReserved7 = NULL;
10589         } else {
10590                 object->pvReserved7 = NULL;
10591                 if (PyUnicode_Check(value)) {
10592                         object->pvReserved7 = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
10593                 } else if (PyString_Check(value)) {
10594                         object->pvReserved7 = PyString_AS_STRING(value);
10595                 } else {
10596                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
10597                         return -1;
10598                 }
10599         }
10600         return 0;
10601 }
10602
10603 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved8(PyObject *obj, void *closure)
10604 {
10605         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10606         PyObject *py_pvReserved8;
10607         if (object->pvReserved8 == NULL) {
10608                 py_pvReserved8 = Py_None;
10609                 Py_INCREF(py_pvReserved8);
10610         } else {
10611                 if (object->pvReserved8 == NULL) {
10612                         py_pvReserved8 = Py_None;
10613                         Py_INCREF(py_pvReserved8);
10614                 } else {
10615                         py_pvReserved8 = PyUnicode_Decode(object->pvReserved8, strlen(object->pvReserved8), "utf-8", "ignore");
10616                 }
10617         }
10618         return py_pvReserved8;
10619 }
10620
10621 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved8(PyObject *py_obj, PyObject *value, void *closure)
10622 {
10623         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10624         if (value == Py_None) {
10625                 object->pvReserved8 = NULL;
10626         } else {
10627                 object->pvReserved8 = NULL;
10628                 if (PyUnicode_Check(value)) {
10629                         object->pvReserved8 = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
10630                 } else if (PyString_Check(value)) {
10631                         object->pvReserved8 = PyString_AS_STRING(value);
10632                 } else {
10633                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
10634                         return -1;
10635                 }
10636         }
10637         return 0;
10638 }
10639
10640 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved1(PyObject *obj, void *closure)
10641 {
10642         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10643         PyObject *py_dwReserved1;
10644         py_dwReserved1 = PyInt_FromLong(object->dwReserved1);
10645         return py_dwReserved1;
10646 }
10647
10648 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved1(PyObject *py_obj, PyObject *value, void *closure)
10649 {
10650         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10651         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
10652         object->dwReserved1 = PyInt_AsLong(value);
10653         return 0;
10654 }
10655
10656 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved2(PyObject *obj, void *closure)
10657 {
10658         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10659         PyObject *py_dwReserved2;
10660         py_dwReserved2 = PyInt_FromLong(object->dwReserved2);
10661         return py_dwReserved2;
10662 }
10663
10664 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved2(PyObject *py_obj, PyObject *value, void *closure)
10665 {
10666         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10667         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
10668         object->dwReserved2 = PyInt_AsLong(value);
10669         return 0;
10670 }
10671
10672 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved3(PyObject *obj, void *closure)
10673 {
10674         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10675         PyObject *py_dwReserved3;
10676         py_dwReserved3 = PyInt_FromLong(object->dwReserved3);
10677         return py_dwReserved3;
10678 }
10679
10680 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved3(PyObject *py_obj, PyObject *value, void *closure)
10681 {
10682         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10683         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
10684         object->dwReserved3 = PyInt_AsLong(value);
10685         return 0;
10686 }
10687
10688 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved4(PyObject *obj, void *closure)
10689 {
10690         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10691         PyObject *py_dwReserved4;
10692         py_dwReserved4 = PyInt_FromLong(object->dwReserved4);
10693         return py_dwReserved4;
10694 }
10695
10696 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved4(PyObject *py_obj, PyObject *value, void *closure)
10697 {
10698         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10699         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
10700         object->dwReserved4 = PyInt_AsLong(value);
10701         return 0;
10702 }
10703
10704 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved5(PyObject *obj, void *closure)
10705 {
10706         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10707         PyObject *py_dwReserved5;
10708         py_dwReserved5 = PyInt_FromLong(object->dwReserved5);
10709         return py_dwReserved5;
10710 }
10711
10712 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved5(PyObject *py_obj, PyObject *value, void *closure)
10713 {
10714         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10715         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
10716         object->dwReserved5 = PyInt_AsLong(value);
10717         return 0;
10718 }
10719
10720 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved6(PyObject *obj, void *closure)
10721 {
10722         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10723         PyObject *py_dwReserved6;
10724         py_dwReserved6 = PyInt_FromLong(object->dwReserved6);
10725         return py_dwReserved6;
10726 }
10727
10728 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved6(PyObject *py_obj, PyObject *value, void *closure)
10729 {
10730         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10731         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
10732         object->dwReserved6 = PyInt_AsLong(value);
10733         return 0;
10734 }
10735
10736 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved7(PyObject *obj, void *closure)
10737 {
10738         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10739         PyObject *py_dwReserved7;
10740         py_dwReserved7 = PyInt_FromLong(object->dwReserved7);
10741         return py_dwReserved7;
10742 }
10743
10744 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved7(PyObject *py_obj, PyObject *value, void *closure)
10745 {
10746         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10747         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
10748         object->dwReserved7 = PyInt_AsLong(value);
10749         return 0;
10750 }
10751
10752 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved8(PyObject *obj, void *closure)
10753 {
10754         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
10755         PyObject *py_dwReserved8;
10756         py_dwReserved8 = PyInt_FromLong(object->dwReserved8);
10757         return py_dwReserved8;
10758 }
10759
10760 static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved8(PyObject *py_obj, PyObject *value, void *closure)
10761 {
10762         struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
10763         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
10764         object->dwReserved8 = PyInt_AsLong(value);
10765         return 0;
10766 }
10767
10768 static PyGetSetDef py_DNS_RPC_ZONE_CREATE_INFO_W2K_getsetters[] = {
10769         { discard_const_p(char, "pszZoneName"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pszZoneName, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pszZoneName },
10770         { discard_const_p(char, "dwZoneType"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwZoneType, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwZoneType },
10771         { discard_const_p(char, "fAllowUpdate"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fAllowUpdate, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fAllowUpdate },
10772         { discard_const_p(char, "fAging"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fAging, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fAging },
10773         { discard_const_p(char, "dwFlags"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwFlags, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwFlags },
10774         { discard_const_p(char, "pszDataFile"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pszDataFile, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pszDataFile },
10775         { discard_const_p(char, "fDsIntegrated"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fDsIntegrated, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fDsIntegrated },
10776         { discard_const_p(char, "fLoadExisting"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fLoadExisting, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fLoadExisting },
10777         { discard_const_p(char, "pszAdmin"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pszAdmin, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pszAdmin },
10778         { discard_const_p(char, "aipMasters"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_aipMasters, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_aipMasters },
10779         { discard_const_p(char, "aipSecondaries"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_aipSecondaries, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_aipSecondaries },
10780         { discard_const_p(char, "fSecureSecondaries"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fSecureSecondaries, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fSecureSecondaries },
10781         { discard_const_p(char, "fNotifyLevel"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fNotifyLevel, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fNotifyLevel },
10782         { discard_const_p(char, "pvReserved1"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved1, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved1 },
10783         { discard_const_p(char, "pvReserved2"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved2, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved2 },
10784         { discard_const_p(char, "pvReserved3"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved3, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved3 },
10785         { discard_const_p(char, "pvReserved4"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved4, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved4 },
10786         { discard_const_p(char, "pvReserved5"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved5, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved5 },
10787         { discard_const_p(char, "pvReserved6"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved6, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved6 },
10788         { discard_const_p(char, "pvReserved7"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved7, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved7 },
10789         { discard_const_p(char, "pvReserved8"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved8, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved8 },
10790         { discard_const_p(char, "dwReserved1"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved1, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved1 },
10791         { discard_const_p(char, "dwReserved2"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved2, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved2 },
10792         { discard_const_p(char, "dwReserved3"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved3, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved3 },
10793         { discard_const_p(char, "dwReserved4"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved4, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved4 },
10794         { discard_const_p(char, "dwReserved5"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved5, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved5 },
10795         { discard_const_p(char, "dwReserved6"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved6, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved6 },
10796         { discard_const_p(char, "dwReserved7"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved7, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved7 },
10797         { discard_const_p(char, "dwReserved8"), py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved8, py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved8 },
10798         { NULL }
10799 };
10800
10801 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
10802 {
10803         return pytalloc_new(struct DNS_RPC_ZONE_CREATE_INFO_W2K, type);
10804 }
10805
10806
10807 static PyTypeObject DNS_RPC_ZONE_CREATE_INFO_W2K_Type = {
10808         PyObject_HEAD_INIT(NULL) 0,
10809         .tp_name = "dnsserver.DNS_RPC_ZONE_CREATE_INFO_W2K",
10810         .tp_getset = py_DNS_RPC_ZONE_CREATE_INFO_W2K_getsetters,
10811         .tp_methods = NULL,
10812         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
10813         .tp_basicsize = sizeof(pytalloc_Object),
10814         .tp_new = py_DNS_RPC_ZONE_CREATE_INFO_W2K_new,
10815 };
10816
10817
10818 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
10819 {
10820         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
10821         PyObject *py_dwRpcStructureVersion;
10822         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
10823         return py_dwRpcStructureVersion;
10824 }
10825
10826 static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
10827 {
10828         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
10829         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
10830         object->dwRpcStructureVersion = PyInt_AsLong(value);
10831         return 0;
10832 }
10833
10834 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
10835 {
10836         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
10837         PyObject *py_dwReserved0;
10838         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
10839         return py_dwReserved0;
10840 }
10841
10842 static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
10843 {
10844         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
10845         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
10846         object->dwReserved0 = PyInt_AsLong(value);
10847         return 0;
10848 }
10849
10850 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszZoneName(PyObject *obj, void *closure)
10851 {
10852         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
10853         PyObject *py_pszZoneName;
10854         if (object->pszZoneName == NULL) {
10855                 py_pszZoneName = Py_None;
10856                 Py_INCREF(py_pszZoneName);
10857         } else {
10858                 if (object->pszZoneName == NULL) {
10859                         py_pszZoneName = Py_None;
10860                         Py_INCREF(py_pszZoneName);
10861                 } else {
10862                         py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
10863                 }
10864         }
10865         return py_pszZoneName;
10866 }
10867
10868 static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
10869 {
10870         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
10871         if (value == Py_None) {
10872                 object->pszZoneName = NULL;
10873         } else {
10874                 object->pszZoneName = NULL;
10875                 if (PyUnicode_Check(value)) {
10876                         object->pszZoneName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
10877                 } else if (PyString_Check(value)) {
10878                         object->pszZoneName = PyString_AS_STRING(value);
10879                 } else {
10880                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
10881                         return -1;
10882                 }
10883         }
10884         return 0;
10885 }
10886
10887 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwZoneType(PyObject *obj, void *closure)
10888 {
10889         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
10890         PyObject *py_dwZoneType;
10891         py_dwZoneType = PyInt_FromLong(object->dwZoneType);
10892         return py_dwZoneType;
10893 }
10894
10895 static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwZoneType(PyObject *py_obj, PyObject *value, void *closure)
10896 {
10897         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
10898         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
10899         object->dwZoneType = PyInt_AsLong(value);
10900         return 0;
10901 }
10902
10903 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fAllowUpdate(PyObject *obj, void *closure)
10904 {
10905         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
10906         PyObject *py_fAllowUpdate;
10907         py_fAllowUpdate = PyInt_FromLong(object->fAllowUpdate);
10908         return py_fAllowUpdate;
10909 }
10910
10911 static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
10912 {
10913         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
10914         if (PyLong_Check(value)) {
10915                 object->fAllowUpdate = PyLong_AsLongLong(value);
10916         } else if (PyInt_Check(value)) {
10917                 object->fAllowUpdate = PyInt_AsLong(value);
10918         } else {
10919                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
10920                   PyInt_Type.tp_name, PyLong_Type.tp_name);
10921                 return -1;
10922         }
10923         return 0;
10924 }
10925
10926 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fAging(PyObject *obj, void *closure)
10927 {
10928         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
10929         PyObject *py_fAging;
10930         py_fAging = PyInt_FromLong(object->fAging);
10931         return py_fAging;
10932 }
10933
10934 static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fAging(PyObject *py_obj, PyObject *value, void *closure)
10935 {
10936         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
10937         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
10938         object->fAging = PyInt_AsLong(value);
10939         return 0;
10940 }
10941
10942 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwFlags(PyObject *obj, void *closure)
10943 {
10944         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
10945         PyObject *py_dwFlags;
10946         py_dwFlags = PyInt_FromLong(object->dwFlags);
10947         return py_dwFlags;
10948 }
10949
10950 static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
10951 {
10952         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
10953         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
10954         object->dwFlags = PyInt_AsLong(value);
10955         return 0;
10956 }
10957
10958 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszDataFile(PyObject *obj, void *closure)
10959 {
10960         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
10961         PyObject *py_pszDataFile;
10962         if (object->pszDataFile == NULL) {
10963                 py_pszDataFile = Py_None;
10964                 Py_INCREF(py_pszDataFile);
10965         } else {
10966                 if (object->pszDataFile == NULL) {
10967                         py_pszDataFile = Py_None;
10968                         Py_INCREF(py_pszDataFile);
10969                 } else {
10970                         py_pszDataFile = PyUnicode_Decode(object->pszDataFile, strlen(object->pszDataFile), "utf-8", "ignore");
10971                 }
10972         }
10973         return py_pszDataFile;
10974 }
10975
10976 static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszDataFile(PyObject *py_obj, PyObject *value, void *closure)
10977 {
10978         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
10979         if (value == Py_None) {
10980                 object->pszDataFile = NULL;
10981         } else {
10982                 object->pszDataFile = NULL;
10983                 if (PyUnicode_Check(value)) {
10984                         object->pszDataFile = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
10985                 } else if (PyString_Check(value)) {
10986                         object->pszDataFile = PyString_AS_STRING(value);
10987                 } else {
10988                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
10989                         return -1;
10990                 }
10991         }
10992         return 0;
10993 }
10994
10995 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fDsIntegrated(PyObject *obj, void *closure)
10996 {
10997         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
10998         PyObject *py_fDsIntegrated;
10999         py_fDsIntegrated = PyInt_FromLong(object->fDsIntegrated);
11000         return py_fDsIntegrated;
11001 }
11002
11003 static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fDsIntegrated(PyObject *py_obj, PyObject *value, void *closure)
11004 {
11005         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
11006         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
11007         object->fDsIntegrated = PyInt_AsLong(value);
11008         return 0;
11009 }
11010
11011 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fLoadExisting(PyObject *obj, void *closure)
11012 {
11013         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
11014         PyObject *py_fLoadExisting;
11015         py_fLoadExisting = PyInt_FromLong(object->fLoadExisting);
11016         return py_fLoadExisting;
11017 }
11018
11019 static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fLoadExisting(PyObject *py_obj, PyObject *value, void *closure)
11020 {
11021         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
11022         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
11023         object->fLoadExisting = PyInt_AsLong(value);
11024         return 0;
11025 }
11026
11027 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszAdmin(PyObject *obj, void *closure)
11028 {
11029         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
11030         PyObject *py_pszAdmin;
11031         if (object->pszAdmin == NULL) {
11032                 py_pszAdmin = Py_None;
11033                 Py_INCREF(py_pszAdmin);
11034         } else {
11035                 if (object->pszAdmin == NULL) {
11036                         py_pszAdmin = Py_None;
11037                         Py_INCREF(py_pszAdmin);
11038                 } else {
11039                         py_pszAdmin = PyUnicode_Decode(object->pszAdmin, strlen(object->pszAdmin), "utf-8", "ignore");
11040                 }
11041         }
11042         return py_pszAdmin;
11043 }
11044
11045 static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszAdmin(PyObject *py_obj, PyObject *value, void *closure)
11046 {
11047         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
11048         if (value == Py_None) {
11049                 object->pszAdmin = NULL;
11050         } else {
11051                 object->pszAdmin = NULL;
11052                 if (PyUnicode_Check(value)) {
11053                         object->pszAdmin = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
11054                 } else if (PyString_Check(value)) {
11055                         object->pszAdmin = PyString_AS_STRING(value);
11056                 } else {
11057                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
11058                         return -1;
11059                 }
11060         }
11061         return 0;
11062 }
11063
11064 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_aipMasters(PyObject *obj, void *closure)
11065 {
11066         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
11067         PyObject *py_aipMasters;
11068         if (object->aipMasters == NULL) {
11069                 py_aipMasters = Py_None;
11070                 Py_INCREF(py_aipMasters);
11071         } else {
11072                 py_aipMasters = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipMasters, object->aipMasters);
11073         }
11074         return py_aipMasters;
11075 }
11076
11077 static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_aipMasters(PyObject *py_obj, PyObject *value, void *closure)
11078 {
11079         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
11080         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipMasters);
11081         if (value == Py_None) {
11082                 object->aipMasters = NULL;
11083         } else {
11084                 object->aipMasters = NULL;
11085                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
11086                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
11087                         PyErr_NoMemory();
11088                         return -1;
11089                 }
11090                 object->aipMasters = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
11091         }
11092         return 0;
11093 }
11094
11095 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_aipSecondaries(PyObject *obj, void *closure)
11096 {
11097         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
11098         PyObject *py_aipSecondaries;
11099         if (object->aipSecondaries == NULL) {
11100                 py_aipSecondaries = Py_None;
11101                 Py_INCREF(py_aipSecondaries);
11102         } else {
11103                 py_aipSecondaries = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
11104         }
11105         return py_aipSecondaries;
11106 }
11107
11108 static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
11109 {
11110         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
11111         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipSecondaries);
11112         if (value == Py_None) {
11113                 object->aipSecondaries = NULL;
11114         } else {
11115                 object->aipSecondaries = NULL;
11116                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
11117                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
11118                         PyErr_NoMemory();
11119                         return -1;
11120                 }
11121                 object->aipSecondaries = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
11122         }
11123         return 0;
11124 }
11125
11126 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fSecureSecondaries(PyObject *obj, void *closure)
11127 {
11128         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
11129         PyObject *py_fSecureSecondaries;
11130         py_fSecureSecondaries = PyInt_FromLong(object->fSecureSecondaries);
11131         return py_fSecureSecondaries;
11132 }
11133
11134 static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
11135 {
11136         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
11137         if (PyLong_Check(value)) {
11138                 object->fSecureSecondaries = PyLong_AsLongLong(value);
11139         } else if (PyInt_Check(value)) {
11140                 object->fSecureSecondaries = PyInt_AsLong(value);
11141         } else {
11142                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
11143                   PyInt_Type.tp_name, PyLong_Type.tp_name);
11144                 return -1;
11145         }
11146         return 0;
11147 }
11148
11149 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fNotifyLevel(PyObject *obj, void *closure)
11150 {
11151         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
11152         PyObject *py_fNotifyLevel;
11153         py_fNotifyLevel = PyInt_FromLong(object->fNotifyLevel);
11154         return py_fNotifyLevel;
11155 }
11156
11157 static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
11158 {
11159         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
11160         if (PyLong_Check(value)) {
11161                 object->fNotifyLevel = PyLong_AsLongLong(value);
11162         } else if (PyInt_Check(value)) {
11163                 object->fNotifyLevel = PyInt_AsLong(value);
11164         } else {
11165                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
11166                   PyInt_Type.tp_name, PyLong_Type.tp_name);
11167                 return -1;
11168         }
11169         return 0;
11170 }
11171
11172 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwTimeout(PyObject *obj, void *closure)
11173 {
11174         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
11175         PyObject *py_dwTimeout;
11176         py_dwTimeout = PyInt_FromLong(object->dwTimeout);
11177         return py_dwTimeout;
11178 }
11179
11180 static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwTimeout(PyObject *py_obj, PyObject *value, void *closure)
11181 {
11182         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
11183         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
11184         object->dwTimeout = PyInt_AsLong(value);
11185         return 0;
11186 }
11187
11188 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
11189 {
11190         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
11191         PyObject *py_fRecurseAfterForwarding;
11192         py_fRecurseAfterForwarding = PyInt_FromLong(object->fRecurseAfterForwarding);
11193         return py_fRecurseAfterForwarding;
11194 }
11195
11196 static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
11197 {
11198         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
11199         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
11200         object->fRecurseAfterForwarding = PyInt_AsLong(value);
11201         return 0;
11202 }
11203
11204 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwDpFlags(PyObject *obj, void *closure)
11205 {
11206         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
11207         PyObject *py_dwDpFlags;
11208         py_dwDpFlags = PyInt_FromLong(object->dwDpFlags);
11209         return py_dwDpFlags;
11210 }
11211
11212 static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwDpFlags(PyObject *py_obj, PyObject *value, void *closure)
11213 {
11214         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
11215         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
11216         object->dwDpFlags = PyInt_AsLong(value);
11217         return 0;
11218 }
11219
11220 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszDpFqdn(PyObject *obj, void *closure)
11221 {
11222         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
11223         PyObject *py_pszDpFqdn;
11224         if (object->pszDpFqdn == NULL) {
11225                 py_pszDpFqdn = Py_None;
11226                 Py_INCREF(py_pszDpFqdn);
11227         } else {
11228                 if (object->pszDpFqdn == NULL) {
11229                         py_pszDpFqdn = Py_None;
11230                         Py_INCREF(py_pszDpFqdn);
11231                 } else {
11232                         py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
11233                 }
11234         }
11235         return py_pszDpFqdn;
11236 }
11237
11238 static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
11239 {
11240         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
11241         if (value == Py_None) {
11242                 object->pszDpFqdn = NULL;
11243         } else {
11244                 object->pszDpFqdn = NULL;
11245                 if (PyUnicode_Check(value)) {
11246                         object->pszDpFqdn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
11247                 } else if (PyString_Check(value)) {
11248                         object->pszDpFqdn = PyString_AS_STRING(value);
11249                 } else {
11250                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
11251                         return -1;
11252                 }
11253         }
11254         return 0;
11255 }
11256
11257 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwReserved(PyObject *obj, void *closure)
11258 {
11259         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
11260         PyObject *py_dwReserved;
11261         py_dwReserved = PyList_New(32);
11262         if (py_dwReserved == NULL) {
11263                 return NULL;
11264         }
11265         {
11266                 int dwReserved_cntr_0;
11267                 for (dwReserved_cntr_0 = 0; dwReserved_cntr_0 < 32; dwReserved_cntr_0++) {
11268                         PyObject *py_dwReserved_0;
11269                         py_dwReserved_0 = PyInt_FromLong(object->dwReserved[dwReserved_cntr_0]);
11270                         PyList_SetItem(py_dwReserved, dwReserved_cntr_0, py_dwReserved_0);
11271                 }
11272         }
11273         return py_dwReserved;
11274 }
11275
11276 static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwReserved(PyObject *py_obj, PyObject *value, void *closure)
11277 {
11278         struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
11279         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
11280         {
11281                 int dwReserved_cntr_0;
11282                 for (dwReserved_cntr_0 = 0; dwReserved_cntr_0 < PyList_GET_SIZE(value); dwReserved_cntr_0++) {
11283                         PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, dwReserved_cntr_0), return -1;);
11284                         object->dwReserved[dwReserved_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, dwReserved_cntr_0));
11285                 }
11286         }
11287         return 0;
11288 }
11289
11290 static PyGetSetDef py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_getsetters[] = {
11291         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwRpcStructureVersion, py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwRpcStructureVersion },
11292         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwReserved0, py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwReserved0 },
11293         { discard_const_p(char, "pszZoneName"), py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszZoneName, py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszZoneName },
11294         { discard_const_p(char, "dwZoneType"), py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwZoneType, py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwZoneType },
11295         { discard_const_p(char, "fAllowUpdate"), py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fAllowUpdate, py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fAllowUpdate },
11296         { discard_const_p(char, "fAging"), py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fAging, py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fAging },
11297         { discard_const_p(char, "dwFlags"), py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwFlags, py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwFlags },
11298         { discard_const_p(char, "pszDataFile"), py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszDataFile, py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszDataFile },
11299         { discard_const_p(char, "fDsIntegrated"), py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fDsIntegrated, py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fDsIntegrated },
11300         { discard_const_p(char, "fLoadExisting"), py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fLoadExisting, py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fLoadExisting },
11301         { discard_const_p(char, "pszAdmin"), py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszAdmin, py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszAdmin },
11302         { discard_const_p(char, "aipMasters"), py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_aipMasters, py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_aipMasters },
11303         { discard_const_p(char, "aipSecondaries"), py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_aipSecondaries, py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_aipSecondaries },
11304         { discard_const_p(char, "fSecureSecondaries"), py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fSecureSecondaries, py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fSecureSecondaries },
11305         { discard_const_p(char, "fNotifyLevel"), py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fNotifyLevel, py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fNotifyLevel },
11306         { discard_const_p(char, "dwTimeout"), py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwTimeout, py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwTimeout },
11307         { discard_const_p(char, "fRecurseAfterForwarding"), py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fRecurseAfterForwarding, py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fRecurseAfterForwarding },
11308         { discard_const_p(char, "dwDpFlags"), py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwDpFlags, py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwDpFlags },
11309         { discard_const_p(char, "pszDpFqdn"), py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszDpFqdn, py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszDpFqdn },
11310         { discard_const_p(char, "dwReserved"), py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwReserved, py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwReserved },
11311         { NULL }
11312 };
11313
11314 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
11315 {
11316         return pytalloc_new(struct DNS_RPC_ZONE_CREATE_INFO_DOTNET, type);
11317 }
11318
11319
11320 static PyTypeObject DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type = {
11321         PyObject_HEAD_INIT(NULL) 0,
11322         .tp_name = "dnsserver.DNS_RPC_ZONE_CREATE_INFO_DOTNET",
11323         .tp_getset = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_getsetters,
11324         .tp_methods = NULL,
11325         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
11326         .tp_basicsize = sizeof(pytalloc_Object),
11327         .tp_new = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_new,
11328 };
11329
11330
11331 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwRpcStructureVersion(PyObject *obj, void *closure)
11332 {
11333         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
11334         PyObject *py_dwRpcStructureVersion;
11335         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
11336         return py_dwRpcStructureVersion;
11337 }
11338
11339 static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
11340 {
11341         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11342         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
11343         object->dwRpcStructureVersion = PyInt_AsLong(value);
11344         return 0;
11345 }
11346
11347 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwReserved0(PyObject *obj, void *closure)
11348 {
11349         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
11350         PyObject *py_dwReserved0;
11351         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
11352         return py_dwReserved0;
11353 }
11354
11355 static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
11356 {
11357         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11358         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
11359         object->dwReserved0 = PyInt_AsLong(value);
11360         return 0;
11361 }
11362
11363 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszZoneName(PyObject *obj, void *closure)
11364 {
11365         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
11366         PyObject *py_pszZoneName;
11367         if (object->pszZoneName == NULL) {
11368                 py_pszZoneName = Py_None;
11369                 Py_INCREF(py_pszZoneName);
11370         } else {
11371                 if (object->pszZoneName == NULL) {
11372                         py_pszZoneName = Py_None;
11373                         Py_INCREF(py_pszZoneName);
11374                 } else {
11375                         py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
11376                 }
11377         }
11378         return py_pszZoneName;
11379 }
11380
11381 static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
11382 {
11383         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11384         if (value == Py_None) {
11385                 object->pszZoneName = NULL;
11386         } else {
11387                 object->pszZoneName = NULL;
11388                 if (PyUnicode_Check(value)) {
11389                         object->pszZoneName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
11390                 } else if (PyString_Check(value)) {
11391                         object->pszZoneName = PyString_AS_STRING(value);
11392                 } else {
11393                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
11394                         return -1;
11395                 }
11396         }
11397         return 0;
11398 }
11399
11400 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwZoneType(PyObject *obj, void *closure)
11401 {
11402         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
11403         PyObject *py_dwZoneType;
11404         py_dwZoneType = PyInt_FromLong(object->dwZoneType);
11405         return py_dwZoneType;
11406 }
11407
11408 static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwZoneType(PyObject *py_obj, PyObject *value, void *closure)
11409 {
11410         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11411         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
11412         object->dwZoneType = PyInt_AsLong(value);
11413         return 0;
11414 }
11415
11416 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fAllowUpdate(PyObject *obj, void *closure)
11417 {
11418         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
11419         PyObject *py_fAllowUpdate;
11420         py_fAllowUpdate = PyInt_FromLong(object->fAllowUpdate);
11421         return py_fAllowUpdate;
11422 }
11423
11424 static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
11425 {
11426         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11427         if (PyLong_Check(value)) {
11428                 object->fAllowUpdate = PyLong_AsLongLong(value);
11429         } else if (PyInt_Check(value)) {
11430                 object->fAllowUpdate = PyInt_AsLong(value);
11431         } else {
11432                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
11433                   PyInt_Type.tp_name, PyLong_Type.tp_name);
11434                 return -1;
11435         }
11436         return 0;
11437 }
11438
11439 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fAging(PyObject *obj, void *closure)
11440 {
11441         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
11442         PyObject *py_fAging;
11443         py_fAging = PyInt_FromLong(object->fAging);
11444         return py_fAging;
11445 }
11446
11447 static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fAging(PyObject *py_obj, PyObject *value, void *closure)
11448 {
11449         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11450         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
11451         object->fAging = PyInt_AsLong(value);
11452         return 0;
11453 }
11454
11455 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwFlags(PyObject *obj, void *closure)
11456 {
11457         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
11458         PyObject *py_dwFlags;
11459         py_dwFlags = PyInt_FromLong(object->dwFlags);
11460         return py_dwFlags;
11461 }
11462
11463 static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
11464 {
11465         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11466         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
11467         object->dwFlags = PyInt_AsLong(value);
11468         return 0;
11469 }
11470
11471 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszDataFile(PyObject *obj, void *closure)
11472 {
11473         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
11474         PyObject *py_pszDataFile;
11475         if (object->pszDataFile == NULL) {
11476                 py_pszDataFile = Py_None;
11477                 Py_INCREF(py_pszDataFile);
11478         } else {
11479                 if (object->pszDataFile == NULL) {
11480                         py_pszDataFile = Py_None;
11481                         Py_INCREF(py_pszDataFile);
11482                 } else {
11483                         py_pszDataFile = PyUnicode_Decode(object->pszDataFile, strlen(object->pszDataFile), "utf-8", "ignore");
11484                 }
11485         }
11486         return py_pszDataFile;
11487 }
11488
11489 static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszDataFile(PyObject *py_obj, PyObject *value, void *closure)
11490 {
11491         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11492         if (value == Py_None) {
11493                 object->pszDataFile = NULL;
11494         } else {
11495                 object->pszDataFile = NULL;
11496                 if (PyUnicode_Check(value)) {
11497                         object->pszDataFile = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
11498                 } else if (PyString_Check(value)) {
11499                         object->pszDataFile = PyString_AS_STRING(value);
11500                 } else {
11501                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
11502                         return -1;
11503                 }
11504         }
11505         return 0;
11506 }
11507
11508 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fDsIntegrated(PyObject *obj, void *closure)
11509 {
11510         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
11511         PyObject *py_fDsIntegrated;
11512         py_fDsIntegrated = PyInt_FromLong(object->fDsIntegrated);
11513         return py_fDsIntegrated;
11514 }
11515
11516 static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fDsIntegrated(PyObject *py_obj, PyObject *value, void *closure)
11517 {
11518         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11519         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
11520         object->fDsIntegrated = PyInt_AsLong(value);
11521         return 0;
11522 }
11523
11524 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fLoadExisting(PyObject *obj, void *closure)
11525 {
11526         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
11527         PyObject *py_fLoadExisting;
11528         py_fLoadExisting = PyInt_FromLong(object->fLoadExisting);
11529         return py_fLoadExisting;
11530 }
11531
11532 static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fLoadExisting(PyObject *py_obj, PyObject *value, void *closure)
11533 {
11534         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11535         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
11536         object->fLoadExisting = PyInt_AsLong(value);
11537         return 0;
11538 }
11539
11540 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszAdmin(PyObject *obj, void *closure)
11541 {
11542         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
11543         PyObject *py_pszAdmin;
11544         if (object->pszAdmin == NULL) {
11545                 py_pszAdmin = Py_None;
11546                 Py_INCREF(py_pszAdmin);
11547         } else {
11548                 if (object->pszAdmin == NULL) {
11549                         py_pszAdmin = Py_None;
11550                         Py_INCREF(py_pszAdmin);
11551                 } else {
11552                         py_pszAdmin = PyUnicode_Decode(object->pszAdmin, strlen(object->pszAdmin), "utf-8", "ignore");
11553                 }
11554         }
11555         return py_pszAdmin;
11556 }
11557
11558 static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszAdmin(PyObject *py_obj, PyObject *value, void *closure)
11559 {
11560         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11561         if (value == Py_None) {
11562                 object->pszAdmin = NULL;
11563         } else {
11564                 object->pszAdmin = NULL;
11565                 if (PyUnicode_Check(value)) {
11566                         object->pszAdmin = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
11567                 } else if (PyString_Check(value)) {
11568                         object->pszAdmin = PyString_AS_STRING(value);
11569                 } else {
11570                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
11571                         return -1;
11572                 }
11573         }
11574         return 0;
11575 }
11576
11577 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_aipMasters(PyObject *obj, void *closure)
11578 {
11579         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
11580         PyObject *py_aipMasters;
11581         if (object->aipMasters == NULL) {
11582                 py_aipMasters = Py_None;
11583                 Py_INCREF(py_aipMasters);
11584         } else {
11585                 py_aipMasters = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipMasters, object->aipMasters);
11586         }
11587         return py_aipMasters;
11588 }
11589
11590 static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_aipMasters(PyObject *py_obj, PyObject *value, void *closure)
11591 {
11592         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11593         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipMasters);
11594         if (value == Py_None) {
11595                 object->aipMasters = NULL;
11596         } else {
11597                 object->aipMasters = NULL;
11598                 PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
11599                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
11600                         PyErr_NoMemory();
11601                         return -1;
11602                 }
11603                 object->aipMasters = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
11604         }
11605         return 0;
11606 }
11607
11608 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_aipSecondaries(PyObject *obj, void *closure)
11609 {
11610         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
11611         PyObject *py_aipSecondaries;
11612         if (object->aipSecondaries == NULL) {
11613                 py_aipSecondaries = Py_None;
11614                 Py_INCREF(py_aipSecondaries);
11615         } else {
11616                 py_aipSecondaries = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
11617         }
11618         return py_aipSecondaries;
11619 }
11620
11621 static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
11622 {
11623         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11624         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipSecondaries);
11625         if (value == Py_None) {
11626                 object->aipSecondaries = NULL;
11627         } else {
11628                 object->aipSecondaries = NULL;
11629                 PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
11630                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
11631                         PyErr_NoMemory();
11632                         return -1;
11633                 }
11634                 object->aipSecondaries = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
11635         }
11636         return 0;
11637 }
11638
11639 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fSecureSecondaries(PyObject *obj, void *closure)
11640 {
11641         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
11642         PyObject *py_fSecureSecondaries;
11643         py_fSecureSecondaries = PyInt_FromLong(object->fSecureSecondaries);
11644         return py_fSecureSecondaries;
11645 }
11646
11647 static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
11648 {
11649         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11650         if (PyLong_Check(value)) {
11651                 object->fSecureSecondaries = PyLong_AsLongLong(value);
11652         } else if (PyInt_Check(value)) {
11653                 object->fSecureSecondaries = PyInt_AsLong(value);
11654         } else {
11655                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
11656                   PyInt_Type.tp_name, PyLong_Type.tp_name);
11657                 return -1;
11658         }
11659         return 0;
11660 }
11661
11662 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fNotifyLevel(PyObject *obj, void *closure)
11663 {
11664         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
11665         PyObject *py_fNotifyLevel;
11666         py_fNotifyLevel = PyInt_FromLong(object->fNotifyLevel);
11667         return py_fNotifyLevel;
11668 }
11669
11670 static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
11671 {
11672         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11673         if (PyLong_Check(value)) {
11674                 object->fNotifyLevel = PyLong_AsLongLong(value);
11675         } else if (PyInt_Check(value)) {
11676                 object->fNotifyLevel = PyInt_AsLong(value);
11677         } else {
11678                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
11679                   PyInt_Type.tp_name, PyLong_Type.tp_name);
11680                 return -1;
11681         }
11682         return 0;
11683 }
11684
11685 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwTimeout(PyObject *obj, void *closure)
11686 {
11687         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
11688         PyObject *py_dwTimeout;
11689         py_dwTimeout = PyInt_FromLong(object->dwTimeout);
11690         return py_dwTimeout;
11691 }
11692
11693 static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwTimeout(PyObject *py_obj, PyObject *value, void *closure)
11694 {
11695         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11696         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
11697         object->dwTimeout = PyInt_AsLong(value);
11698         return 0;
11699 }
11700
11701 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
11702 {
11703         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
11704         PyObject *py_fRecurseAfterForwarding;
11705         py_fRecurseAfterForwarding = PyInt_FromLong(object->fRecurseAfterForwarding);
11706         return py_fRecurseAfterForwarding;
11707 }
11708
11709 static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
11710 {
11711         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11712         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
11713         object->fRecurseAfterForwarding = PyInt_AsLong(value);
11714         return 0;
11715 }
11716
11717 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwDpFlags(PyObject *obj, void *closure)
11718 {
11719         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
11720         PyObject *py_dwDpFlags;
11721         py_dwDpFlags = PyInt_FromLong(object->dwDpFlags);
11722         return py_dwDpFlags;
11723 }
11724
11725 static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwDpFlags(PyObject *py_obj, PyObject *value, void *closure)
11726 {
11727         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11728         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
11729         object->dwDpFlags = PyInt_AsLong(value);
11730         return 0;
11731 }
11732
11733 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszDpFqdn(PyObject *obj, void *closure)
11734 {
11735         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
11736         PyObject *py_pszDpFqdn;
11737         if (object->pszDpFqdn == NULL) {
11738                 py_pszDpFqdn = Py_None;
11739                 Py_INCREF(py_pszDpFqdn);
11740         } else {
11741                 if (object->pszDpFqdn == NULL) {
11742                         py_pszDpFqdn = Py_None;
11743                         Py_INCREF(py_pszDpFqdn);
11744                 } else {
11745                         py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
11746                 }
11747         }
11748         return py_pszDpFqdn;
11749 }
11750
11751 static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
11752 {
11753         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11754         if (value == Py_None) {
11755                 object->pszDpFqdn = NULL;
11756         } else {
11757                 object->pszDpFqdn = NULL;
11758                 if (PyUnicode_Check(value)) {
11759                         object->pszDpFqdn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
11760                 } else if (PyString_Check(value)) {
11761                         object->pszDpFqdn = PyString_AS_STRING(value);
11762                 } else {
11763                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
11764                         return -1;
11765                 }
11766         }
11767         return 0;
11768 }
11769
11770 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwReserved(PyObject *obj, void *closure)
11771 {
11772         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
11773         PyObject *py_dwReserved;
11774         py_dwReserved = PyList_New(32);
11775         if (py_dwReserved == NULL) {
11776                 return NULL;
11777         }
11778         {
11779                 int dwReserved_cntr_0;
11780                 for (dwReserved_cntr_0 = 0; dwReserved_cntr_0 < 32; dwReserved_cntr_0++) {
11781                         PyObject *py_dwReserved_0;
11782                         py_dwReserved_0 = PyInt_FromLong(object->dwReserved[dwReserved_cntr_0]);
11783                         PyList_SetItem(py_dwReserved, dwReserved_cntr_0, py_dwReserved_0);
11784                 }
11785         }
11786         return py_dwReserved;
11787 }
11788
11789 static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwReserved(PyObject *py_obj, PyObject *value, void *closure)
11790 {
11791         struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11792         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
11793         {
11794                 int dwReserved_cntr_0;
11795                 for (dwReserved_cntr_0 = 0; dwReserved_cntr_0 < PyList_GET_SIZE(value); dwReserved_cntr_0++) {
11796                         PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, dwReserved_cntr_0), return -1;);
11797                         object->dwReserved[dwReserved_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, dwReserved_cntr_0));
11798                 }
11799         }
11800         return 0;
11801 }
11802
11803 static PyGetSetDef py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_getsetters[] = {
11804         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwRpcStructureVersion, py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwRpcStructureVersion },
11805         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwReserved0, py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwReserved0 },
11806         { discard_const_p(char, "pszZoneName"), py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszZoneName, py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszZoneName },
11807         { discard_const_p(char, "dwZoneType"), py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwZoneType, py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwZoneType },
11808         { discard_const_p(char, "fAllowUpdate"), py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fAllowUpdate, py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fAllowUpdate },
11809         { discard_const_p(char, "fAging"), py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fAging, py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fAging },
11810         { discard_const_p(char, "dwFlags"), py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwFlags, py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwFlags },
11811         { discard_const_p(char, "pszDataFile"), py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszDataFile, py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszDataFile },
11812         { discard_const_p(char, "fDsIntegrated"), py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fDsIntegrated, py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fDsIntegrated },
11813         { discard_const_p(char, "fLoadExisting"), py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fLoadExisting, py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fLoadExisting },
11814         { discard_const_p(char, "pszAdmin"), py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszAdmin, py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszAdmin },
11815         { discard_const_p(char, "aipMasters"), py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_aipMasters, py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_aipMasters },
11816         { discard_const_p(char, "aipSecondaries"), py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_aipSecondaries, py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_aipSecondaries },
11817         { discard_const_p(char, "fSecureSecondaries"), py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fSecureSecondaries, py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fSecureSecondaries },
11818         { discard_const_p(char, "fNotifyLevel"), py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fNotifyLevel, py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fNotifyLevel },
11819         { discard_const_p(char, "dwTimeout"), py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwTimeout, py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwTimeout },
11820         { discard_const_p(char, "fRecurseAfterForwarding"), py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fRecurseAfterForwarding, py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fRecurseAfterForwarding },
11821         { discard_const_p(char, "dwDpFlags"), py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwDpFlags, py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwDpFlags },
11822         { discard_const_p(char, "pszDpFqdn"), py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszDpFqdn, py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszDpFqdn },
11823         { discard_const_p(char, "dwReserved"), py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwReserved, py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwReserved },
11824         { NULL }
11825 };
11826
11827 static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
11828 {
11829         return pytalloc_new(struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN, type);
11830 }
11831
11832
11833 static PyTypeObject DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type = {
11834         PyObject_HEAD_INIT(NULL) 0,
11835         .tp_name = "dnsserver.DNS_RPC_ZONE_CREATE_INFO_LONGHORN",
11836         .tp_getset = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_getsetters,
11837         .tp_methods = NULL,
11838         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
11839         .tp_basicsize = sizeof(pytalloc_Object),
11840         .tp_new = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_new,
11841 };
11842
11843
11844 static PyObject *py_DNS_RPC_ZONE_EXPORT_INFO_get_dwRpcStructureVersion(PyObject *obj, void *closure)
11845 {
11846         struct DNS_RPC_ZONE_EXPORT_INFO *object = (struct DNS_RPC_ZONE_EXPORT_INFO *)pytalloc_get_ptr(obj);
11847         PyObject *py_dwRpcStructureVersion;
11848         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
11849         return py_dwRpcStructureVersion;
11850 }
11851
11852 static int py_DNS_RPC_ZONE_EXPORT_INFO_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
11853 {
11854         struct DNS_RPC_ZONE_EXPORT_INFO *object = (struct DNS_RPC_ZONE_EXPORT_INFO *)pytalloc_get_ptr(py_obj);
11855         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
11856         object->dwRpcStructureVersion = PyInt_AsLong(value);
11857         return 0;
11858 }
11859
11860 static PyObject *py_DNS_RPC_ZONE_EXPORT_INFO_get_dwReserved0(PyObject *obj, void *closure)
11861 {
11862         struct DNS_RPC_ZONE_EXPORT_INFO *object = (struct DNS_RPC_ZONE_EXPORT_INFO *)pytalloc_get_ptr(obj);
11863         PyObject *py_dwReserved0;
11864         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
11865         return py_dwReserved0;
11866 }
11867
11868 static int py_DNS_RPC_ZONE_EXPORT_INFO_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
11869 {
11870         struct DNS_RPC_ZONE_EXPORT_INFO *object = (struct DNS_RPC_ZONE_EXPORT_INFO *)pytalloc_get_ptr(py_obj);
11871         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
11872         object->dwReserved0 = PyInt_AsLong(value);
11873         return 0;
11874 }
11875
11876 static PyObject *py_DNS_RPC_ZONE_EXPORT_INFO_get_pszZoneExportFile(PyObject *obj, void *closure)
11877 {
11878         struct DNS_RPC_ZONE_EXPORT_INFO *object = (struct DNS_RPC_ZONE_EXPORT_INFO *)pytalloc_get_ptr(obj);
11879         PyObject *py_pszZoneExportFile;
11880         if (object->pszZoneExportFile == NULL) {
11881                 py_pszZoneExportFile = Py_None;
11882                 Py_INCREF(py_pszZoneExportFile);
11883         } else {
11884                 if (object->pszZoneExportFile == NULL) {
11885                         py_pszZoneExportFile = Py_None;
11886                         Py_INCREF(py_pszZoneExportFile);
11887                 } else {
11888                         py_pszZoneExportFile = PyUnicode_Decode(object->pszZoneExportFile, strlen(object->pszZoneExportFile), "utf-8", "ignore");
11889                 }
11890         }
11891         return py_pszZoneExportFile;
11892 }
11893
11894 static int py_DNS_RPC_ZONE_EXPORT_INFO_set_pszZoneExportFile(PyObject *py_obj, PyObject *value, void *closure)
11895 {
11896         struct DNS_RPC_ZONE_EXPORT_INFO *object = (struct DNS_RPC_ZONE_EXPORT_INFO *)pytalloc_get_ptr(py_obj);
11897         if (value == Py_None) {
11898                 object->pszZoneExportFile = NULL;
11899         } else {
11900                 object->pszZoneExportFile = NULL;
11901                 if (PyUnicode_Check(value)) {
11902                         object->pszZoneExportFile = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
11903                 } else if (PyString_Check(value)) {
11904                         object->pszZoneExportFile = PyString_AS_STRING(value);
11905                 } else {
11906                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
11907                         return -1;
11908                 }
11909         }
11910         return 0;
11911 }
11912
11913 static PyGetSetDef py_DNS_RPC_ZONE_EXPORT_INFO_getsetters[] = {
11914         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_ZONE_EXPORT_INFO_get_dwRpcStructureVersion, py_DNS_RPC_ZONE_EXPORT_INFO_set_dwRpcStructureVersion },
11915         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_ZONE_EXPORT_INFO_get_dwReserved0, py_DNS_RPC_ZONE_EXPORT_INFO_set_dwReserved0 },
11916         { discard_const_p(char, "pszZoneExportFile"), py_DNS_RPC_ZONE_EXPORT_INFO_get_pszZoneExportFile, py_DNS_RPC_ZONE_EXPORT_INFO_set_pszZoneExportFile },
11917         { NULL }
11918 };
11919
11920 static PyObject *py_DNS_RPC_ZONE_EXPORT_INFO_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
11921 {
11922         return pytalloc_new(struct DNS_RPC_ZONE_EXPORT_INFO, type);
11923 }
11924
11925
11926 static PyTypeObject DNS_RPC_ZONE_EXPORT_INFO_Type = {
11927         PyObject_HEAD_INIT(NULL) 0,
11928         .tp_name = "dnsserver.DNS_RPC_ZONE_EXPORT_INFO",
11929         .tp_getset = py_DNS_RPC_ZONE_EXPORT_INFO_getsetters,
11930         .tp_methods = NULL,
11931         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
11932         .tp_basicsize = sizeof(pytalloc_Object),
11933         .tp_new = py_DNS_RPC_ZONE_EXPORT_INFO_new,
11934 };
11935
11936
11937 static PyObject *py_DNS_RPC_ENUM_ZONES_FILTER_get_dwRpcStructureVersion(PyObject *obj, void *closure)
11938 {
11939         struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(obj);
11940         PyObject *py_dwRpcStructureVersion;
11941         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
11942         return py_dwRpcStructureVersion;
11943 }
11944
11945 static int py_DNS_RPC_ENUM_ZONES_FILTER_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
11946 {
11947         struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(py_obj);
11948         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
11949         object->dwRpcStructureVersion = PyInt_AsLong(value);
11950         return 0;
11951 }
11952
11953 static PyObject *py_DNS_RPC_ENUM_ZONES_FILTER_get_dwReserved0(PyObject *obj, void *closure)
11954 {
11955         struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(obj);
11956         PyObject *py_dwReserved0;
11957         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
11958         return py_dwReserved0;
11959 }
11960
11961 static int py_DNS_RPC_ENUM_ZONES_FILTER_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
11962 {
11963         struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(py_obj);
11964         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
11965         object->dwReserved0 = PyInt_AsLong(value);
11966         return 0;
11967 }
11968
11969 static PyObject *py_DNS_RPC_ENUM_ZONES_FILTER_get_dwFilter(PyObject *obj, void *closure)
11970 {
11971         struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(obj);
11972         PyObject *py_dwFilter;
11973         py_dwFilter = PyInt_FromLong(object->dwFilter);
11974         return py_dwFilter;
11975 }
11976
11977 static int py_DNS_RPC_ENUM_ZONES_FILTER_set_dwFilter(PyObject *py_obj, PyObject *value, void *closure)
11978 {
11979         struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(py_obj);
11980         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
11981         object->dwFilter = PyInt_AsLong(value);
11982         return 0;
11983 }
11984
11985 static PyObject *py_DNS_RPC_ENUM_ZONES_FILTER_get_pszPartitionFqdn(PyObject *obj, void *closure)
11986 {
11987         struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(obj);
11988         PyObject *py_pszPartitionFqdn;
11989         if (object->pszPartitionFqdn == NULL) {
11990                 py_pszPartitionFqdn = Py_None;
11991                 Py_INCREF(py_pszPartitionFqdn);
11992         } else {
11993                 if (object->pszPartitionFqdn == NULL) {
11994                         py_pszPartitionFqdn = Py_None;
11995                         Py_INCREF(py_pszPartitionFqdn);
11996                 } else {
11997                         py_pszPartitionFqdn = PyUnicode_Decode(object->pszPartitionFqdn, strlen(object->pszPartitionFqdn), "utf-8", "ignore");
11998                 }
11999         }
12000         return py_pszPartitionFqdn;
12001 }
12002
12003 static int py_DNS_RPC_ENUM_ZONES_FILTER_set_pszPartitionFqdn(PyObject *py_obj, PyObject *value, void *closure)
12004 {
12005         struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(py_obj);
12006         if (value == Py_None) {
12007                 object->pszPartitionFqdn = NULL;
12008         } else {
12009                 object->pszPartitionFqdn = NULL;
12010                 if (PyUnicode_Check(value)) {
12011                         object->pszPartitionFqdn = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
12012                 } else if (PyString_Check(value)) {
12013                         object->pszPartitionFqdn = PyString_AS_STRING(value);
12014                 } else {
12015                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
12016                         return -1;
12017                 }
12018         }
12019         return 0;
12020 }
12021
12022 static PyObject *py_DNS_RPC_ENUM_ZONES_FILTER_get_pszQueryString(PyObject *obj, void *closure)
12023 {
12024         struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(obj);
12025         PyObject *py_pszQueryString;
12026         if (object->pszQueryString == NULL) {
12027                 py_pszQueryString = Py_None;
12028                 Py_INCREF(py_pszQueryString);
12029         } else {
12030                 if (object->pszQueryString == NULL) {
12031                         py_pszQueryString = Py_None;
12032                         Py_INCREF(py_pszQueryString);
12033                 } else {
12034                         py_pszQueryString = PyUnicode_Decode(object->pszQueryString, strlen(object->pszQueryString), "utf-8", "ignore");
12035                 }
12036         }
12037         return py_pszQueryString;
12038 }
12039
12040 static int py_DNS_RPC_ENUM_ZONES_FILTER_set_pszQueryString(PyObject *py_obj, PyObject *value, void *closure)
12041 {
12042         struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(py_obj);
12043         if (value == Py_None) {
12044                 object->pszQueryString = NULL;
12045         } else {
12046                 object->pszQueryString = NULL;
12047                 if (PyUnicode_Check(value)) {
12048                         object->pszQueryString = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
12049                 } else if (PyString_Check(value)) {
12050                         object->pszQueryString = PyString_AS_STRING(value);
12051                 } else {
12052                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
12053                         return -1;
12054                 }
12055         }
12056         return 0;
12057 }
12058
12059 static PyObject *py_DNS_RPC_ENUM_ZONES_FILTER_get_pszReserved(PyObject *obj, void *closure)
12060 {
12061         struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(obj);
12062         PyObject *py_pszReserved;
12063         py_pszReserved = PyList_New(6);
12064         if (py_pszReserved == NULL) {
12065                 return NULL;
12066         }
12067         {
12068                 int pszReserved_cntr_0;
12069                 for (pszReserved_cntr_0 = 0; pszReserved_cntr_0 < 6; pszReserved_cntr_0++) {
12070                         PyObject *py_pszReserved_0;
12071                         py_pszReserved_0 = pytalloc_reference_ex(&DNS_EXTENSION_Type, object->pszReserved, &object->pszReserved[pszReserved_cntr_0]);
12072                         PyList_SetItem(py_pszReserved, pszReserved_cntr_0, py_pszReserved_0);
12073                 }
12074         }
12075         return py_pszReserved;
12076 }
12077
12078 static int py_DNS_RPC_ENUM_ZONES_FILTER_set_pszReserved(PyObject *py_obj, PyObject *value, void *closure)
12079 {
12080         struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(py_obj);
12081         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
12082         {
12083                 int pszReserved_cntr_0;
12084                 for (pszReserved_cntr_0 = 0; pszReserved_cntr_0 < PyList_GET_SIZE(value); pszReserved_cntr_0++) {
12085                         PY_CHECK_TYPE(&DNS_EXTENSION_Type, PyList_GET_ITEM(value, pszReserved_cntr_0), return -1;);
12086                         if (talloc_reference(object->pszReserved, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, pszReserved_cntr_0))) == NULL) {
12087                                 PyErr_NoMemory();
12088                                 return -1;
12089                         }
12090                         object->pszReserved[pszReserved_cntr_0] = *(struct DNS_EXTENSION *)pytalloc_get_ptr(PyList_GET_ITEM(value, pszReserved_cntr_0));
12091                 }
12092         }
12093         return 0;
12094 }
12095
12096 static PyGetSetDef py_DNS_RPC_ENUM_ZONES_FILTER_getsetters[] = {
12097         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_ENUM_ZONES_FILTER_get_dwRpcStructureVersion, py_DNS_RPC_ENUM_ZONES_FILTER_set_dwRpcStructureVersion },
12098         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_ENUM_ZONES_FILTER_get_dwReserved0, py_DNS_RPC_ENUM_ZONES_FILTER_set_dwReserved0 },
12099         { discard_const_p(char, "dwFilter"), py_DNS_RPC_ENUM_ZONES_FILTER_get_dwFilter, py_DNS_RPC_ENUM_ZONES_FILTER_set_dwFilter },
12100         { discard_const_p(char, "pszPartitionFqdn"), py_DNS_RPC_ENUM_ZONES_FILTER_get_pszPartitionFqdn, py_DNS_RPC_ENUM_ZONES_FILTER_set_pszPartitionFqdn },
12101         { discard_const_p(char, "pszQueryString"), py_DNS_RPC_ENUM_ZONES_FILTER_get_pszQueryString, py_DNS_RPC_ENUM_ZONES_FILTER_set_pszQueryString },
12102         { discard_const_p(char, "pszReserved"), py_DNS_RPC_ENUM_ZONES_FILTER_get_pszReserved, py_DNS_RPC_ENUM_ZONES_FILTER_set_pszReserved },
12103         { NULL }
12104 };
12105
12106 static PyObject *py_DNS_RPC_ENUM_ZONES_FILTER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12107 {
12108         return pytalloc_new(struct DNS_RPC_ENUM_ZONES_FILTER, type);
12109 }
12110
12111
12112 static PyTypeObject DNS_RPC_ENUM_ZONES_FILTER_Type = {
12113         PyObject_HEAD_INIT(NULL) 0,
12114         .tp_name = "dnsserver.DNS_RPC_ENUM_ZONES_FILTER",
12115         .tp_getset = py_DNS_RPC_ENUM_ZONES_FILTER_getsetters,
12116         .tp_methods = NULL,
12117         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12118         .tp_basicsize = sizeof(pytalloc_Object),
12119         .tp_new = py_DNS_RPC_ENUM_ZONES_FILTER_new,
12120 };
12121
12122
12123 static PyObject *py_DNS_RPC_FORWARDERS_W2K_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
12124 {
12125         struct DNS_RPC_FORWARDERS_W2K *object = (struct DNS_RPC_FORWARDERS_W2K *)pytalloc_get_ptr(obj);
12126         PyObject *py_fRecurseAfterForwarding;
12127         py_fRecurseAfterForwarding = PyInt_FromLong(object->fRecurseAfterForwarding);
12128         return py_fRecurseAfterForwarding;
12129 }
12130
12131 static int py_DNS_RPC_FORWARDERS_W2K_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
12132 {
12133         struct DNS_RPC_FORWARDERS_W2K *object = (struct DNS_RPC_FORWARDERS_W2K *)pytalloc_get_ptr(py_obj);
12134         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
12135         object->fRecurseAfterForwarding = PyInt_AsLong(value);
12136         return 0;
12137 }
12138
12139 static PyObject *py_DNS_RPC_FORWARDERS_W2K_get_dwForwardTimeout(PyObject *obj, void *closure)
12140 {
12141         struct DNS_RPC_FORWARDERS_W2K *object = (struct DNS_RPC_FORWARDERS_W2K *)pytalloc_get_ptr(obj);
12142         PyObject *py_dwForwardTimeout;
12143         py_dwForwardTimeout = PyInt_FromLong(object->dwForwardTimeout);
12144         return py_dwForwardTimeout;
12145 }
12146
12147 static int py_DNS_RPC_FORWARDERS_W2K_set_dwForwardTimeout(PyObject *py_obj, PyObject *value, void *closure)
12148 {
12149         struct DNS_RPC_FORWARDERS_W2K *object = (struct DNS_RPC_FORWARDERS_W2K *)pytalloc_get_ptr(py_obj);
12150         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
12151         object->dwForwardTimeout = PyInt_AsLong(value);
12152         return 0;
12153 }
12154
12155 static PyObject *py_DNS_RPC_FORWARDERS_W2K_get_aipForwarders(PyObject *obj, void *closure)
12156 {
12157         struct DNS_RPC_FORWARDERS_W2K *object = (struct DNS_RPC_FORWARDERS_W2K *)pytalloc_get_ptr(obj);
12158         PyObject *py_aipForwarders;
12159         if (object->aipForwarders == NULL) {
12160                 py_aipForwarders = Py_None;
12161                 Py_INCREF(py_aipForwarders);
12162         } else {
12163                 py_aipForwarders = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipForwarders, object->aipForwarders);
12164         }
12165         return py_aipForwarders;
12166 }
12167
12168 static int py_DNS_RPC_FORWARDERS_W2K_set_aipForwarders(PyObject *py_obj, PyObject *value, void *closure)
12169 {
12170         struct DNS_RPC_FORWARDERS_W2K *object = (struct DNS_RPC_FORWARDERS_W2K *)pytalloc_get_ptr(py_obj);
12171         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipForwarders);
12172         if (value == Py_None) {
12173                 object->aipForwarders = NULL;
12174         } else {
12175                 object->aipForwarders = NULL;
12176                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
12177                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
12178                         PyErr_NoMemory();
12179                         return -1;
12180                 }
12181                 object->aipForwarders = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
12182         }
12183         return 0;
12184 }
12185
12186 static PyGetSetDef py_DNS_RPC_FORWARDERS_W2K_getsetters[] = {
12187         { discard_const_p(char, "fRecurseAfterForwarding"), py_DNS_RPC_FORWARDERS_W2K_get_fRecurseAfterForwarding, py_DNS_RPC_FORWARDERS_W2K_set_fRecurseAfterForwarding },
12188         { discard_const_p(char, "dwForwardTimeout"), py_DNS_RPC_FORWARDERS_W2K_get_dwForwardTimeout, py_DNS_RPC_FORWARDERS_W2K_set_dwForwardTimeout },
12189         { discard_const_p(char, "aipForwarders"), py_DNS_RPC_FORWARDERS_W2K_get_aipForwarders, py_DNS_RPC_FORWARDERS_W2K_set_aipForwarders },
12190         { NULL }
12191 };
12192
12193 static PyObject *py_DNS_RPC_FORWARDERS_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12194 {
12195         return pytalloc_new(struct DNS_RPC_FORWARDERS_W2K, type);
12196 }
12197
12198
12199 static PyTypeObject DNS_RPC_FORWARDERS_W2K_Type = {
12200         PyObject_HEAD_INIT(NULL) 0,
12201         .tp_name = "dnsserver.DNS_RPC_FORWARDERS_W2K",
12202         .tp_getset = py_DNS_RPC_FORWARDERS_W2K_getsetters,
12203         .tp_methods = NULL,
12204         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12205         .tp_basicsize = sizeof(pytalloc_Object),
12206         .tp_new = py_DNS_RPC_FORWARDERS_W2K_new,
12207 };
12208
12209
12210 static PyObject *py_DNS_RPC_FORWARDERS_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
12211 {
12212         struct DNS_RPC_FORWARDERS_DOTNET *object = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(obj);
12213         PyObject *py_dwRpcStructureVersion;
12214         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
12215         return py_dwRpcStructureVersion;
12216 }
12217
12218 static int py_DNS_RPC_FORWARDERS_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
12219 {
12220         struct DNS_RPC_FORWARDERS_DOTNET *object = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(py_obj);
12221         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
12222         object->dwRpcStructureVersion = PyInt_AsLong(value);
12223         return 0;
12224 }
12225
12226 static PyObject *py_DNS_RPC_FORWARDERS_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
12227 {
12228         struct DNS_RPC_FORWARDERS_DOTNET *object = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(obj);
12229         PyObject *py_dwReserved0;
12230         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
12231         return py_dwReserved0;
12232 }
12233
12234 static int py_DNS_RPC_FORWARDERS_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
12235 {
12236         struct DNS_RPC_FORWARDERS_DOTNET *object = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(py_obj);
12237         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
12238         object->dwReserved0 = PyInt_AsLong(value);
12239         return 0;
12240 }
12241
12242 static PyObject *py_DNS_RPC_FORWARDERS_DOTNET_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
12243 {
12244         struct DNS_RPC_FORWARDERS_DOTNET *object = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(obj);
12245         PyObject *py_fRecurseAfterForwarding;
12246         py_fRecurseAfterForwarding = PyInt_FromLong(object->fRecurseAfterForwarding);
12247         return py_fRecurseAfterForwarding;
12248 }
12249
12250 static int py_DNS_RPC_FORWARDERS_DOTNET_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
12251 {
12252         struct DNS_RPC_FORWARDERS_DOTNET *object = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(py_obj);
12253         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
12254         object->fRecurseAfterForwarding = PyInt_AsLong(value);
12255         return 0;
12256 }
12257
12258 static PyObject *py_DNS_RPC_FORWARDERS_DOTNET_get_dwForwardTimeout(PyObject *obj, void *closure)
12259 {
12260         struct DNS_RPC_FORWARDERS_DOTNET *object = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(obj);
12261         PyObject *py_dwForwardTimeout;
12262         py_dwForwardTimeout = PyInt_FromLong(object->dwForwardTimeout);
12263         return py_dwForwardTimeout;
12264 }
12265
12266 static int py_DNS_RPC_FORWARDERS_DOTNET_set_dwForwardTimeout(PyObject *py_obj, PyObject *value, void *closure)
12267 {
12268         struct DNS_RPC_FORWARDERS_DOTNET *object = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(py_obj);
12269         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
12270         object->dwForwardTimeout = PyInt_AsLong(value);
12271         return 0;
12272 }
12273
12274 static PyObject *py_DNS_RPC_FORWARDERS_DOTNET_get_aipForwarders(PyObject *obj, void *closure)
12275 {
12276         struct DNS_RPC_FORWARDERS_DOTNET *object = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(obj);
12277         PyObject *py_aipForwarders;
12278         if (object->aipForwarders == NULL) {
12279                 py_aipForwarders = Py_None;
12280                 Py_INCREF(py_aipForwarders);
12281         } else {
12282                 py_aipForwarders = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipForwarders, object->aipForwarders);
12283         }
12284         return py_aipForwarders;
12285 }
12286
12287 static int py_DNS_RPC_FORWARDERS_DOTNET_set_aipForwarders(PyObject *py_obj, PyObject *value, void *closure)
12288 {
12289         struct DNS_RPC_FORWARDERS_DOTNET *object = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(py_obj);
12290         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipForwarders);
12291         if (value == Py_None) {
12292                 object->aipForwarders = NULL;
12293         } else {
12294                 object->aipForwarders = NULL;
12295                 PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
12296                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
12297                         PyErr_NoMemory();
12298                         return -1;
12299                 }
12300                 object->aipForwarders = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
12301         }
12302         return 0;
12303 }
12304
12305 static PyGetSetDef py_DNS_RPC_FORWARDERS_DOTNET_getsetters[] = {
12306         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_FORWARDERS_DOTNET_get_dwRpcStructureVersion, py_DNS_RPC_FORWARDERS_DOTNET_set_dwRpcStructureVersion },
12307         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_FORWARDERS_DOTNET_get_dwReserved0, py_DNS_RPC_FORWARDERS_DOTNET_set_dwReserved0 },
12308         { discard_const_p(char, "fRecurseAfterForwarding"), py_DNS_RPC_FORWARDERS_DOTNET_get_fRecurseAfterForwarding, py_DNS_RPC_FORWARDERS_DOTNET_set_fRecurseAfterForwarding },
12309         { discard_const_p(char, "dwForwardTimeout"), py_DNS_RPC_FORWARDERS_DOTNET_get_dwForwardTimeout, py_DNS_RPC_FORWARDERS_DOTNET_set_dwForwardTimeout },
12310         { discard_const_p(char, "aipForwarders"), py_DNS_RPC_FORWARDERS_DOTNET_get_aipForwarders, py_DNS_RPC_FORWARDERS_DOTNET_set_aipForwarders },
12311         { NULL }
12312 };
12313
12314 static PyObject *py_DNS_RPC_FORWARDERS_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12315 {
12316         return pytalloc_new(struct DNS_RPC_FORWARDERS_DOTNET, type);
12317 }
12318
12319
12320 static PyTypeObject DNS_RPC_FORWARDERS_DOTNET_Type = {
12321         PyObject_HEAD_INIT(NULL) 0,
12322         .tp_name = "dnsserver.DNS_RPC_FORWARDERS_DOTNET",
12323         .tp_getset = py_DNS_RPC_FORWARDERS_DOTNET_getsetters,
12324         .tp_methods = NULL,
12325         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12326         .tp_basicsize = sizeof(pytalloc_Object),
12327         .tp_new = py_DNS_RPC_FORWARDERS_DOTNET_new,
12328 };
12329
12330
12331 static PyObject *py_DNS_RPC_FORWARDERS_LONGHORN_get_dwRpcStructureVersion(PyObject *obj, void *closure)
12332 {
12333         struct DNS_RPC_FORWARDERS_LONGHORN *object = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(obj);
12334         PyObject *py_dwRpcStructureVersion;
12335         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
12336         return py_dwRpcStructureVersion;
12337 }
12338
12339 static int py_DNS_RPC_FORWARDERS_LONGHORN_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
12340 {
12341         struct DNS_RPC_FORWARDERS_LONGHORN *object = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(py_obj);
12342         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
12343         object->dwRpcStructureVersion = PyInt_AsLong(value);
12344         return 0;
12345 }
12346
12347 static PyObject *py_DNS_RPC_FORWARDERS_LONGHORN_get_dwReserved0(PyObject *obj, void *closure)
12348 {
12349         struct DNS_RPC_FORWARDERS_LONGHORN *object = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(obj);
12350         PyObject *py_dwReserved0;
12351         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
12352         return py_dwReserved0;
12353 }
12354
12355 static int py_DNS_RPC_FORWARDERS_LONGHORN_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
12356 {
12357         struct DNS_RPC_FORWARDERS_LONGHORN *object = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(py_obj);
12358         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
12359         object->dwReserved0 = PyInt_AsLong(value);
12360         return 0;
12361 }
12362
12363 static PyObject *py_DNS_RPC_FORWARDERS_LONGHORN_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
12364 {
12365         struct DNS_RPC_FORWARDERS_LONGHORN *object = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(obj);
12366         PyObject *py_fRecurseAfterForwarding;
12367         py_fRecurseAfterForwarding = PyInt_FromLong(object->fRecurseAfterForwarding);
12368         return py_fRecurseAfterForwarding;
12369 }
12370
12371 static int py_DNS_RPC_FORWARDERS_LONGHORN_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
12372 {
12373         struct DNS_RPC_FORWARDERS_LONGHORN *object = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(py_obj);
12374         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
12375         object->fRecurseAfterForwarding = PyInt_AsLong(value);
12376         return 0;
12377 }
12378
12379 static PyObject *py_DNS_RPC_FORWARDERS_LONGHORN_get_dwForwardTimeout(PyObject *obj, void *closure)
12380 {
12381         struct DNS_RPC_FORWARDERS_LONGHORN *object = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(obj);
12382         PyObject *py_dwForwardTimeout;
12383         py_dwForwardTimeout = PyInt_FromLong(object->dwForwardTimeout);
12384         return py_dwForwardTimeout;
12385 }
12386
12387 static int py_DNS_RPC_FORWARDERS_LONGHORN_set_dwForwardTimeout(PyObject *py_obj, PyObject *value, void *closure)
12388 {
12389         struct DNS_RPC_FORWARDERS_LONGHORN *object = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(py_obj);
12390         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
12391         object->dwForwardTimeout = PyInt_AsLong(value);
12392         return 0;
12393 }
12394
12395 static PyObject *py_DNS_RPC_FORWARDERS_LONGHORN_get_aipForwarders(PyObject *obj, void *closure)
12396 {
12397         struct DNS_RPC_FORWARDERS_LONGHORN *object = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(obj);
12398         PyObject *py_aipForwarders;
12399         if (object->aipForwarders == NULL) {
12400                 py_aipForwarders = Py_None;
12401                 Py_INCREF(py_aipForwarders);
12402         } else {
12403                 py_aipForwarders = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipForwarders, object->aipForwarders);
12404         }
12405         return py_aipForwarders;
12406 }
12407
12408 static int py_DNS_RPC_FORWARDERS_LONGHORN_set_aipForwarders(PyObject *py_obj, PyObject *value, void *closure)
12409 {
12410         struct DNS_RPC_FORWARDERS_LONGHORN *object = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(py_obj);
12411         talloc_unlink(pytalloc_get_mem_ctx(py_obj), object->aipForwarders);
12412         if (value == Py_None) {
12413                 object->aipForwarders = NULL;
12414         } else {
12415                 object->aipForwarders = NULL;
12416                 PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
12417                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
12418                         PyErr_NoMemory();
12419                         return -1;
12420                 }
12421                 object->aipForwarders = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
12422         }
12423         return 0;
12424 }
12425
12426 static PyGetSetDef py_DNS_RPC_FORWARDERS_LONGHORN_getsetters[] = {
12427         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_FORWARDERS_LONGHORN_get_dwRpcStructureVersion, py_DNS_RPC_FORWARDERS_LONGHORN_set_dwRpcStructureVersion },
12428         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_FORWARDERS_LONGHORN_get_dwReserved0, py_DNS_RPC_FORWARDERS_LONGHORN_set_dwReserved0 },
12429         { discard_const_p(char, "fRecurseAfterForwarding"), py_DNS_RPC_FORWARDERS_LONGHORN_get_fRecurseAfterForwarding, py_DNS_RPC_FORWARDERS_LONGHORN_set_fRecurseAfterForwarding },
12430         { discard_const_p(char, "dwForwardTimeout"), py_DNS_RPC_FORWARDERS_LONGHORN_get_dwForwardTimeout, py_DNS_RPC_FORWARDERS_LONGHORN_set_dwForwardTimeout },
12431         { discard_const_p(char, "aipForwarders"), py_DNS_RPC_FORWARDERS_LONGHORN_get_aipForwarders, py_DNS_RPC_FORWARDERS_LONGHORN_set_aipForwarders },
12432         { NULL }
12433 };
12434
12435 static PyObject *py_DNS_RPC_FORWARDERS_LONGHORN_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12436 {
12437         return pytalloc_new(struct DNS_RPC_FORWARDERS_LONGHORN, type);
12438 }
12439
12440
12441 static PyTypeObject DNS_RPC_FORWARDERS_LONGHORN_Type = {
12442         PyObject_HEAD_INIT(NULL) 0,
12443         .tp_name = "dnsserver.DNS_RPC_FORWARDERS_LONGHORN",
12444         .tp_getset = py_DNS_RPC_FORWARDERS_LONGHORN_getsetters,
12445         .tp_methods = NULL,
12446         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12447         .tp_basicsize = sizeof(pytalloc_Object),
12448         .tp_new = py_DNS_RPC_FORWARDERS_LONGHORN_new,
12449 };
12450
12451
12452 static PyObject *py_DNS_RPC_AUTOCONFIGURE_get_dwRpcStructureVersion(PyObject *obj, void *closure)
12453 {
12454         struct DNS_RPC_AUTOCONFIGURE *object = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(obj);
12455         PyObject *py_dwRpcStructureVersion;
12456         py_dwRpcStructureVersion = PyInt_FromLong(object->dwRpcStructureVersion);
12457         return py_dwRpcStructureVersion;
12458 }
12459
12460 static int py_DNS_RPC_AUTOCONFIGURE_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
12461 {
12462         struct DNS_RPC_AUTOCONFIGURE *object = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(py_obj);
12463         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
12464         object->dwRpcStructureVersion = PyInt_AsLong(value);
12465         return 0;
12466 }
12467
12468 static PyObject *py_DNS_RPC_AUTOCONFIGURE_get_dwReserved0(PyObject *obj, void *closure)
12469 {
12470         struct DNS_RPC_AUTOCONFIGURE *object = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(obj);
12471         PyObject *py_dwReserved0;
12472         py_dwReserved0 = PyInt_FromLong(object->dwReserved0);
12473         return py_dwReserved0;
12474 }
12475
12476 static int py_DNS_RPC_AUTOCONFIGURE_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
12477 {
12478         struct DNS_RPC_AUTOCONFIGURE *object = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(py_obj);
12479         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
12480         object->dwReserved0 = PyInt_AsLong(value);
12481         return 0;
12482 }
12483
12484 static PyObject *py_DNS_RPC_AUTOCONFIGURE_get_dwAutoConfigFlags(PyObject *obj, void *closure)
12485 {
12486         struct DNS_RPC_AUTOCONFIGURE *object = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(obj);
12487         PyObject *py_dwAutoConfigFlags;
12488         py_dwAutoConfigFlags = PyInt_FromLong(object->dwAutoConfigFlags);
12489         return py_dwAutoConfigFlags;
12490 }
12491
12492 static int py_DNS_RPC_AUTOCONFIGURE_set_dwAutoConfigFlags(PyObject *py_obj, PyObject *value, void *closure)
12493 {
12494         struct DNS_RPC_AUTOCONFIGURE *object = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(py_obj);
12495         if (PyLong_Check(value)) {
12496                 object->dwAutoConfigFlags = PyLong_AsLongLong(value);
12497         } else if (PyInt_Check(value)) {
12498                 object->dwAutoConfigFlags = PyInt_AsLong(value);
12499         } else {
12500                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
12501                   PyInt_Type.tp_name, PyLong_Type.tp_name);
12502                 return -1;
12503         }
12504         return 0;
12505 }
12506
12507 static PyObject *py_DNS_RPC_AUTOCONFIGURE_get_dwReserved1(PyObject *obj, void *closure)
12508 {
12509         struct DNS_RPC_AUTOCONFIGURE *object = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(obj);
12510         PyObject *py_dwReserved1;
12511         py_dwReserved1 = PyInt_FromLong(object->dwReserved1);
12512         return py_dwReserved1;
12513 }
12514
12515 static int py_DNS_RPC_AUTOCONFIGURE_set_dwReserved1(PyObject *py_obj, PyObject *value, void *closure)
12516 {
12517         struct DNS_RPC_AUTOCONFIGURE *object = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(py_obj);
12518         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
12519         object->dwReserved1 = PyInt_AsLong(value);
12520         return 0;
12521 }
12522
12523 static PyObject *py_DNS_RPC_AUTOCONFIGURE_get_pszNewDomainName(PyObject *obj, void *closure)
12524 {
12525         struct DNS_RPC_AUTOCONFIGURE *object = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(obj);
12526         PyObject *py_pszNewDomainName;
12527         if (object->pszNewDomainName == NULL) {
12528                 py_pszNewDomainName = Py_None;
12529                 Py_INCREF(py_pszNewDomainName);
12530         } else {
12531                 if (object->pszNewDomainName == NULL) {
12532                         py_pszNewDomainName = Py_None;
12533                         Py_INCREF(py_pszNewDomainName);
12534                 } else {
12535                         py_pszNewDomainName = PyUnicode_Decode(object->pszNewDomainName, strlen(object->pszNewDomainName), "utf-8", "ignore");
12536                 }
12537         }
12538         return py_pszNewDomainName;
12539 }
12540
12541 static int py_DNS_RPC_AUTOCONFIGURE_set_pszNewDomainName(PyObject *py_obj, PyObject *value, void *closure)
12542 {
12543         struct DNS_RPC_AUTOCONFIGURE *object = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(py_obj);
12544         if (value == Py_None) {
12545                 object->pszNewDomainName = NULL;
12546         } else {
12547                 object->pszNewDomainName = NULL;
12548                 if (PyUnicode_Check(value)) {
12549                         object->pszNewDomainName = PyString_AS_STRING(PyUnicode_AsEncodedString(value, "utf-8", "ignore"));
12550                 } else if (PyString_Check(value)) {
12551                         object->pszNewDomainName = PyString_AS_STRING(value);
12552                 } else {
12553                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
12554                         return -1;
12555                 }
12556         }
12557         return 0;
12558 }
12559
12560 static PyGetSetDef py_DNS_RPC_AUTOCONFIGURE_getsetters[] = {
12561         { discard_const_p(char, "dwRpcStructureVersion"), py_DNS_RPC_AUTOCONFIGURE_get_dwRpcStructureVersion, py_DNS_RPC_AUTOCONFIGURE_set_dwRpcStructureVersion },
12562         { discard_const_p(char, "dwReserved0"), py_DNS_RPC_AUTOCONFIGURE_get_dwReserved0, py_DNS_RPC_AUTOCONFIGURE_set_dwReserved0 },
12563         { discard_const_p(char, "dwAutoConfigFlags"), py_DNS_RPC_AUTOCONFIGURE_get_dwAutoConfigFlags, py_DNS_RPC_AUTOCONFIGURE_set_dwAutoConfigFlags },
12564         { discard_const_p(char, "dwReserved1"), py_DNS_RPC_AUTOCONFIGURE_get_dwReserved1, py_DNS_RPC_AUTOCONFIGURE_set_dwReserved1 },
12565         { discard_const_p(char, "pszNewDomainName"), py_DNS_RPC_AUTOCONFIGURE_get_pszNewDomainName, py_DNS_RPC_AUTOCONFIGURE_set_pszNewDomainName },
12566         { NULL }
12567 };
12568
12569 static PyObject *py_DNS_RPC_AUTOCONFIGURE_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12570 {
12571         return pytalloc_new(struct DNS_RPC_AUTOCONFIGURE, type);
12572 }
12573
12574
12575 static PyTypeObject DNS_RPC_AUTOCONFIGURE_Type = {
12576         PyObject_HEAD_INIT(NULL) 0,
12577         .tp_name = "dnsserver.DNS_RPC_AUTOCONFIGURE",
12578         .tp_getset = py_DNS_RPC_AUTOCONFIGURE_getsetters,
12579         .tp_methods = NULL,
12580         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12581         .tp_basicsize = sizeof(pytalloc_Object),
12582         .tp_new = py_DNS_RPC_AUTOCONFIGURE_new,
12583 };
12584
12585
12586 static PyObject *py_DNSSRV_STAT_HEADER_get_StatId(PyObject *obj, void *closure)
12587 {
12588         struct DNSSRV_STAT_HEADER *object = (struct DNSSRV_STAT_HEADER *)pytalloc_get_ptr(obj);
12589         PyObject *py_StatId;
12590         py_StatId = PyInt_FromLong(object->StatId);
12591         return py_StatId;
12592 }
12593
12594 static int py_DNSSRV_STAT_HEADER_set_StatId(PyObject *py_obj, PyObject *value, void *closure)
12595 {
12596         struct DNSSRV_STAT_HEADER *object = (struct DNSSRV_STAT_HEADER *)pytalloc_get_ptr(py_obj);
12597         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
12598         object->StatId = PyInt_AsLong(value);
12599         return 0;
12600 }
12601
12602 static PyObject *py_DNSSRV_STAT_HEADER_get_wLength(PyObject *obj, void *closure)
12603 {
12604         struct DNSSRV_STAT_HEADER *object = (struct DNSSRV_STAT_HEADER *)pytalloc_get_ptr(obj);
12605         PyObject *py_wLength;
12606         py_wLength = PyInt_FromLong(object->wLength);
12607         return py_wLength;
12608 }
12609
12610 static int py_DNSSRV_STAT_HEADER_set_wLength(PyObject *py_obj, PyObject *value, void *closure)
12611 {
12612         struct DNSSRV_STAT_HEADER *object = (struct DNSSRV_STAT_HEADER *)pytalloc_get_ptr(py_obj);
12613         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
12614         object->wLength = PyInt_AsLong(value);
12615         return 0;
12616 }
12617
12618 static PyObject *py_DNSSRV_STAT_HEADER_get_fClear(PyObject *obj, void *closure)
12619 {
12620         struct DNSSRV_STAT_HEADER *object = (struct DNSSRV_STAT_HEADER *)pytalloc_get_ptr(obj);
12621         PyObject *py_fClear;
12622         py_fClear = PyInt_FromLong(object->fClear);
12623         return py_fClear;
12624 }
12625
12626 static int py_DNSSRV_STAT_HEADER_set_fClear(PyObject *py_obj, PyObject *value, void *closure)
12627 {
12628         struct DNSSRV_STAT_HEADER *object = (struct DNSSRV_STAT_HEADER *)pytalloc_get_ptr(py_obj);
12629         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
12630         object->fClear = PyInt_AsLong(value);
12631         return 0;
12632 }
12633
12634 static PyObject *py_DNSSRV_STAT_HEADER_get_fReserved(PyObject *obj, void *closure)
12635 {
12636         struct DNSSRV_STAT_HEADER *object = (struct DNSSRV_STAT_HEADER *)pytalloc_get_ptr(obj);
12637         PyObject *py_fReserved;
12638         py_fReserved = PyInt_FromLong(object->fReserved);
12639         return py_fReserved;
12640 }
12641
12642 static int py_DNSSRV_STAT_HEADER_set_fReserved(PyObject *py_obj, PyObject *value, void *closure)
12643 {
12644         struct DNSSRV_STAT_HEADER *object = (struct DNSSRV_STAT_HEADER *)pytalloc_get_ptr(py_obj);
12645         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
12646         object->fReserved = PyInt_AsLong(value);
12647         return 0;
12648 }
12649
12650 static PyGetSetDef py_DNSSRV_STAT_HEADER_getsetters[] = {
12651         { discard_const_p(char, "StatId"), py_DNSSRV_STAT_HEADER_get_StatId, py_DNSSRV_STAT_HEADER_set_StatId },
12652         { discard_const_p(char, "wLength"), py_DNSSRV_STAT_HEADER_get_wLength, py_DNSSRV_STAT_HEADER_set_wLength },
12653         { discard_const_p(char, "fClear"), py_DNSSRV_STAT_HEADER_get_fClear, py_DNSSRV_STAT_HEADER_set_fClear },
12654         { discard_const_p(char, "fReserved"), py_DNSSRV_STAT_HEADER_get_fReserved, py_DNSSRV_STAT_HEADER_set_fReserved },
12655         { NULL }
12656 };
12657
12658 static PyObject *py_DNSSRV_STAT_HEADER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12659 {
12660         return pytalloc_new(struct DNSSRV_STAT_HEADER, type);
12661 }
12662
12663
12664 static PyTypeObject DNSSRV_STAT_HEADER_Type = {
12665         PyObject_HEAD_INIT(NULL) 0,
12666         .tp_name = "dnsserver.DNSSRV_STAT_HEADER",
12667         .tp_getset = py_DNSSRV_STAT_HEADER_getsetters,
12668         .tp_methods = NULL,
12669         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12670         .tp_basicsize = sizeof(pytalloc_Object),
12671         .tp_new = py_DNSSRV_STAT_HEADER_new,
12672 };
12673
12674
12675 static PyObject *py_DNSSRV_STAT_get_Header(PyObject *obj, void *closure)
12676 {
12677         struct DNSSRV_STAT *object = (struct DNSSRV_STAT *)pytalloc_get_ptr(obj);
12678         PyObject *py_Header;
12679         py_Header = pytalloc_reference_ex(&DNSSRV_STAT_HEADER_Type, pytalloc_get_mem_ctx(obj), &object->Header);
12680         return py_Header;
12681 }
12682
12683 static int py_DNSSRV_STAT_set_Header(PyObject *py_obj, PyObject *value, void *closure)
12684 {
12685         struct DNSSRV_STAT *object = (struct DNSSRV_STAT *)pytalloc_get_ptr(py_obj);
12686         PY_CHECK_TYPE(&DNSSRV_STAT_HEADER_Type, value, return -1;);
12687         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
12688                 PyErr_NoMemory();
12689                 return -1;
12690         }
12691         object->Header = *(struct DNSSRV_STAT_HEADER *)pytalloc_get_ptr(value);
12692         return 0;
12693 }
12694
12695 static PyObject *py_DNSSRV_STAT_get_Buffer(PyObject *obj, void *closure)
12696 {
12697         struct DNSSRV_STAT *object = (struct DNSSRV_STAT *)pytalloc_get_ptr(obj);
12698         PyObject *py_Buffer;
12699         py_Buffer = PyList_New(1);
12700         if (py_Buffer == NULL) {
12701                 return NULL;
12702         }
12703         {
12704                 int Buffer_cntr_0;
12705                 for (Buffer_cntr_0 = 0; Buffer_cntr_0 < 1; Buffer_cntr_0++) {
12706                         PyObject *py_Buffer_0;
12707                         py_Buffer_0 = PyInt_FromLong(object->Buffer[Buffer_cntr_0]);
12708                         PyList_SetItem(py_Buffer, Buffer_cntr_0, py_Buffer_0);
12709                 }
12710         }
12711         return py_Buffer;
12712 }
12713
12714 static int py_DNSSRV_STAT_set_Buffer(PyObject *py_obj, PyObject *value, void *closure)
12715 {
12716         struct DNSSRV_STAT *object = (struct DNSSRV_STAT *)pytalloc_get_ptr(py_obj);
12717         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
12718         {
12719                 int Buffer_cntr_0;
12720                 for (Buffer_cntr_0 = 0; Buffer_cntr_0 < PyList_GET_SIZE(value); Buffer_cntr_0++) {
12721                         PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, Buffer_cntr_0), return -1;);
12722                         object->Buffer[Buffer_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, Buffer_cntr_0));
12723                 }
12724         }
12725         return 0;
12726 }
12727
12728 static PyGetSetDef py_DNSSRV_STAT_getsetters[] = {
12729         { discard_const_p(char, "Header"), py_DNSSRV_STAT_get_Header, py_DNSSRV_STAT_set_Header },
12730         { discard_const_p(char, "Buffer"), py_DNSSRV_STAT_get_Buffer, py_DNSSRV_STAT_set_Buffer },
12731         { NULL }
12732 };
12733
12734 static PyObject *py_DNSSRV_STAT_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12735 {
12736         return pytalloc_new(struct DNSSRV_STAT, type);
12737 }
12738
12739
12740 static PyTypeObject DNSSRV_STAT_Type = {
12741         PyObject_HEAD_INIT(NULL) 0,
12742         .tp_name = "dnsserver.DNSSRV_STAT",
12743         .tp_getset = py_DNSSRV_STAT_getsetters,
12744         .tp_methods = NULL,
12745         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12746         .tp_basicsize = sizeof(pytalloc_Object),
12747         .tp_new = py_DNSSRV_STAT_new,
12748 };
12749
12750 PyObject *py_import_DNSSRV_RPC_UNION(TALLOC_CTX *mem_ctx, int level, union DNSSRV_RPC_UNION *in)
12751 {
12752         PyObject *ret;
12753
12754         switch (level) {
12755                 case DNSSRV_TYPEID_NULL:
12756                         if (in->Null == NULL) {
12757                                 ret = Py_None;
12758                                 Py_INCREF(ret);
12759                         } else {
12760                                 ret = PyInt_FromLong(*in->Null);
12761                         }
12762                         return ret;
12763
12764                 case DNSSRV_TYPEID_DWORD:
12765                         ret = PyInt_FromLong(in->Dword);
12766                         return ret;
12767
12768                 case DNSSRV_TYPEID_LPSTR:
12769                         if (in->String == NULL) {
12770                                 ret = Py_None;
12771                                 Py_INCREF(ret);
12772                         } else {
12773                                 if (in->String == NULL) {
12774                                         ret = Py_None;
12775                                         Py_INCREF(ret);
12776                                 } else {
12777                                         ret = PyUnicode_Decode(in->String, strlen(in->String), "utf-8", "ignore");
12778                                 }
12779                         }
12780                         return ret;
12781
12782                 case DNSSRV_TYPEID_LPWSTR:
12783                         if (in->WideString == NULL) {
12784                                 ret = Py_None;
12785                                 Py_INCREF(ret);
12786                         } else {
12787                                 if (in->WideString == NULL) {
12788                                         ret = Py_None;
12789                                         Py_INCREF(ret);
12790                                 } else {
12791                                         ret = PyUnicode_Decode(in->WideString, strlen(in->WideString), "utf-8", "ignore");
12792                                 }
12793                         }
12794                         return ret;
12795
12796                 case DNSSRV_TYPEID_IPARRAY:
12797                         if (in->IpArray == NULL) {
12798                                 ret = Py_None;
12799                                 Py_INCREF(ret);
12800                         } else {
12801                                 ret = pytalloc_reference_ex(&IP4_ARRAY_Type, in->IpArray, in->IpArray);
12802                         }
12803                         return ret;
12804
12805                 case DNSSRV_TYPEID_BUFFER:
12806                         if (in->Buffer == NULL) {
12807                                 ret = Py_None;
12808                                 Py_INCREF(ret);
12809                         } else {
12810                                 ret = pytalloc_reference_ex(&DNS_RPC_BUFFER_Type, in->Buffer, in->Buffer);
12811                         }
12812                         return ret;
12813
12814                 case DNSSRV_TYPEID_SERVER_INFO_W2K:
12815                         if (in->ServerInfoW2K == NULL) {
12816                                 ret = Py_None;
12817                                 Py_INCREF(ret);
12818                         } else {
12819                                 ret = pytalloc_reference_ex(&DNS_RPC_SERVER_INFO_W2K_Type, in->ServerInfoW2K, in->ServerInfoW2K);
12820                         }
12821                         return ret;
12822
12823                 case DNSSRV_TYPEID_STATS:
12824                         if (in->Stats == NULL) {
12825                                 ret = Py_None;
12826                                 Py_INCREF(ret);
12827                         } else {
12828                                 ret = pytalloc_reference_ex(&DNSSRV_STAT_Type, in->Stats, in->Stats);
12829                         }
12830                         return ret;
12831
12832                 case DNSSRV_TYPEID_FORWARDERS_W2K:
12833                         if (in->ForwardersW2K == NULL) {
12834                                 ret = Py_None;
12835                                 Py_INCREF(ret);
12836                         } else {
12837                                 ret = pytalloc_reference_ex(&DNS_RPC_FORWARDERS_W2K_Type, in->ForwardersW2K, in->ForwardersW2K);
12838                         }
12839                         return ret;
12840
12841                 case DNSSRV_TYPEID_ZONE_W2K:
12842                         if (in->ZoneW2K == NULL) {
12843                                 ret = Py_None;
12844                                 Py_INCREF(ret);
12845                         } else {
12846                                 ret = pytalloc_reference_ex(&DNS_RPC_ZONE_W2K_Type, in->ZoneW2K, in->ZoneW2K);
12847                         }
12848                         return ret;
12849
12850                 case DNSSRV_TYPEID_ZONE_INFO_W2K:
12851                         if (in->ZoneInfoW2K == NULL) {
12852                                 ret = Py_None;
12853                                 Py_INCREF(ret);
12854                         } else {
12855                                 ret = pytalloc_reference_ex(&DNS_RPC_ZONE_INFO_W2K_Type, in->ZoneInfoW2K, in->ZoneInfoW2K);
12856                         }
12857                         return ret;
12858
12859                 case DNSSRV_TYPEID_ZONE_SECONDARIES_W2K:
12860                         if (in->SecondariesW2K == NULL) {
12861                                 ret = Py_None;
12862                                 Py_INCREF(ret);
12863                         } else {
12864                                 ret = pytalloc_reference_ex(&DNS_RPC_ZONE_SECONDARIES_W2K_Type, in->SecondariesW2K, in->SecondariesW2K);
12865                         }
12866                         return ret;
12867
12868                 case DNSSRV_TYPEID_ZONE_DATABASE_W2K:
12869                         if (in->DatabaseW2K == NULL) {
12870                                 ret = Py_None;
12871                                 Py_INCREF(ret);
12872                         } else {
12873                                 ret = pytalloc_reference_ex(&DNS_RPC_ZONE_DATABASE_W2K_Type, in->DatabaseW2K, in->DatabaseW2K);
12874                         }
12875                         return ret;
12876
12877                 case DNSSRV_TYPEID_ZONE_CREATE_W2K:
12878                         if (in->ZoneCreateW2K == NULL) {
12879                                 ret = Py_None;
12880                                 Py_INCREF(ret);
12881                         } else {
12882                                 ret = pytalloc_reference_ex(&DNS_RPC_ZONE_CREATE_INFO_W2K_Type, in->ZoneCreateW2K, in->ZoneCreateW2K);
12883                         }
12884                         return ret;
12885
12886                 case DNSSRV_TYPEID_NAME_AND_PARAM:
12887                         if (in->NameAndParam == NULL) {
12888                                 ret = Py_None;
12889                                 Py_INCREF(ret);
12890                         } else {
12891                                 ret = pytalloc_reference_ex(&DNS_RPC_NAME_AND_PARAM_Type, in->NameAndParam, in->NameAndParam);
12892                         }
12893                         return ret;
12894
12895                 case DNSSRV_TYPEID_ZONE_LIST_W2K:
12896                         if (in->ZoneListW2K == NULL) {
12897                                 ret = Py_None;
12898                                 Py_INCREF(ret);
12899                         } else {
12900                                 ret = pytalloc_reference_ex(&DNS_RPC_ZONE_LIST_W2K_Type, in->ZoneListW2K, in->ZoneListW2K);
12901                         }
12902                         return ret;
12903
12904                 case DNSSRV_TYPEID_SERVER_INFO_DOTNET:
12905                         if (in->ServerInfoDotNet == NULL) {
12906                                 ret = Py_None;
12907                                 Py_INCREF(ret);
12908                         } else {
12909                                 ret = pytalloc_reference_ex(&DNS_RPC_SERVER_INFO_DOTNET_Type, in->ServerInfoDotNet, in->ServerInfoDotNet);
12910                         }
12911                         return ret;
12912
12913                 case DNSSRV_TYPEID_FORWARDERS_DOTNET:
12914                         if (in->ForwardersDotNet == NULL) {
12915                                 ret = Py_None;
12916                                 Py_INCREF(ret);
12917                         } else {
12918                                 ret = pytalloc_reference_ex(&DNS_RPC_FORWARDERS_DOTNET_Type, in->ForwardersDotNet, in->ForwardersDotNet);
12919                         }
12920                         return ret;
12921
12922                 case DNSSRV_TYPEID_ZONE:
12923                         if (in->Zone == NULL) {
12924                                 ret = Py_None;
12925                                 Py_INCREF(ret);
12926                         } else {
12927                                 ret = pytalloc_reference_ex(&DNS_RPC_ZONE_DOTNET_Type, in->Zone, in->Zone);
12928                         }
12929                         return ret;
12930
12931                 case DNSSRV_TYPEID_ZONE_INFO_DOTNET:
12932                         if (in->ZoneInfoDotNet == NULL) {
12933                                 ret = Py_None;
12934                                 Py_INCREF(ret);
12935                         } else {
12936                                 ret = pytalloc_reference_ex(&DNS_RPC_ZONE_INFO_DOTNET_Type, in->ZoneInfoDotNet, in->ZoneInfoDotNet);
12937                         }
12938                         return ret;
12939
12940                 case DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET:
12941                         if (in->SecondariesDotNet == NULL) {
12942                                 ret = Py_None;
12943                                 Py_INCREF(ret);
12944                         } else {
12945                                 ret = pytalloc_reference_ex(&DNS_RPC_ZONE_SECONDARIES_DOTNET_Type, in->SecondariesDotNet, in->SecondariesDotNet);
12946                         }
12947                         return ret;
12948
12949                 case DNSSRV_TYPEID_ZONE_DATABASE:
12950                         if (in->Database == NULL) {
12951                                 ret = Py_None;
12952                                 Py_INCREF(ret);
12953                         } else {
12954                                 ret = pytalloc_reference_ex(&DNS_RPC_ZONE_DATABASE_DOTNET_Type, in->Database, in->Database);
12955                         }
12956                         return ret;
12957
12958                 case DNSSRV_TYPEID_ZONE_CREATE_DOTNET:
12959                         if (in->ZoneCreateDotNet == NULL) {
12960                                 ret = Py_None;
12961                                 Py_INCREF(ret);
12962                         } else {
12963                                 ret = pytalloc_reference_ex(&DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type, in->ZoneCreateDotNet, in->ZoneCreateDotNet);
12964                         }
12965                         return ret;
12966
12967                 case DNSSRV_TYPEID_ZONE_LIST:
12968                         if (in->ZoneList == NULL) {
12969                                 ret = Py_None;
12970                                 Py_INCREF(ret);
12971                         } else {
12972                                 ret = pytalloc_reference_ex(&DNS_RPC_ZONE_LIST_DOTNET_Type, in->ZoneList, in->ZoneList);
12973                         }
12974                         return ret;
12975
12976                 case DNSSRV_TYPEID_ZONE_EXPORT:
12977                         if (in->ZoneExport == NULL) {
12978                                 ret = Py_None;
12979                                 Py_INCREF(ret);
12980                         } else {
12981                                 ret = pytalloc_reference_ex(&DNS_RPC_ZONE_EXPORT_INFO_Type, in->ZoneExport, in->ZoneExport);
12982                         }
12983                         return ret;
12984
12985                 case DNSSRV_TYPEID_DP_INFO:
12986                         if (in->DirectoryPartition == NULL) {
12987                                 ret = Py_None;
12988                                 Py_INCREF(ret);
12989                         } else {
12990                                 ret = pytalloc_reference_ex(&DNS_RPC_DP_INFO_Type, in->DirectoryPartition, in->DirectoryPartition);
12991                         }
12992                         return ret;
12993
12994                 case DNSSRV_TYPEID_DP_ENUM:
12995                         if (in->DirectoryPartitionEnum == NULL) {
12996                                 ret = Py_None;
12997                                 Py_INCREF(ret);
12998                         } else {
12999                                 ret = pytalloc_reference_ex(&DNS_RPC_DP_ENUM_Type, in->DirectoryPartitionEnum, in->DirectoryPartitionEnum);
13000                         }
13001                         return ret;
13002
13003                 case DNSSRV_TYPEID_DP_LIST:
13004                         if (in->DirectoryPartitionList == NULL) {
13005                                 ret = Py_None;
13006                                 Py_INCREF(ret);
13007                         } else {
13008                                 ret = pytalloc_reference_ex(&DNS_RPC_DP_LIST_Type, in->DirectoryPartitionList, in->DirectoryPartitionList);
13009                         }
13010                         return ret;
13011
13012                 case DNSSRV_TYPEID_ENLIST_DP:
13013                         if (in->EnlistDirectoryPartition == NULL) {
13014                                 ret = Py_None;
13015                                 Py_INCREF(ret);
13016                         } else {
13017                                 ret = pytalloc_reference_ex(&DNS_RPC_ENLIST_DP_Type, in->EnlistDirectoryPartition, in->EnlistDirectoryPartition);
13018                         }
13019                         return ret;
13020
13021                 case DNSSRV_TYPEID_ZONE_CHANGE_DP:
13022                         if (in->ZoneChangeDirectoryPartition == NULL) {
13023                                 ret = Py_None;
13024                                 Py_INCREF(ret);
13025                         } else {
13026                                 ret = pytalloc_reference_ex(&DNS_RPC_ZONE_CHANGE_DP_Type, in->ZoneChangeDirectoryPartition, in->ZoneChangeDirectoryPartition);
13027                         }
13028                         return ret;
13029
13030                 case DNSSRV_TYPEID_ENUM_ZONES_FILTER:
13031                         if (in->EnumZonesFilter == NULL) {
13032                                 ret = Py_None;
13033                                 Py_INCREF(ret);
13034                         } else {
13035                                 ret = pytalloc_reference_ex(&DNS_RPC_ENUM_ZONES_FILTER_Type, in->EnumZonesFilter, in->EnumZonesFilter);
13036                         }
13037                         return ret;
13038
13039                 case DNSSRV_TYPEID_ADDRARRAY:
13040                         if (in->AddrArray == NULL) {
13041                                 ret = Py_None;
13042                                 Py_INCREF(ret);
13043                         } else {
13044                                 ret = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, in->AddrArray, in->AddrArray);
13045                         }
13046                         return ret;
13047
13048                 case DNSSRV_TYPEID_SERVER_INFO:
13049                         if (in->ServerInfo == NULL) {
13050                                 ret = Py_None;
13051                                 Py_INCREF(ret);
13052                         } else {
13053                                 ret = pytalloc_reference_ex(&DNS_RPC_SERVER_INFO_LONGHORN_Type, in->ServerInfo, in->ServerInfo);
13054                         }
13055                         return ret;
13056
13057                 case DNSSRV_TYPEID_ZONE_CREATE:
13058                         if (in->ZoneCreate == NULL) {
13059                                 ret = Py_None;
13060                                 Py_INCREF(ret);
13061                         } else {
13062                                 ret = pytalloc_reference_ex(&DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type, in->ZoneCreate, in->ZoneCreate);
13063                         }
13064                         return ret;
13065
13066                 case DNSSRV_TYPEID_FORWARDERS:
13067                         if (in->Forwarders == NULL) {
13068                                 ret = Py_None;
13069                                 Py_INCREF(ret);
13070                         } else {
13071                                 ret = pytalloc_reference_ex(&DNS_RPC_FORWARDERS_LONGHORN_Type, in->Forwarders, in->Forwarders);
13072                         }
13073                         return ret;
13074
13075                 case DNSSRV_TYPEID_ZONE_SECONDARIES:
13076                         if (in->Secondaries == NULL) {
13077                                 ret = Py_None;
13078                                 Py_INCREF(ret);
13079                         } else {
13080                                 ret = pytalloc_reference_ex(&DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type, in->Secondaries, in->Secondaries);
13081                         }
13082                         return ret;
13083
13084                 case DNSSRV_TYPEID_IP_VALIDATE:
13085                         if (in->IpValidate == NULL) {
13086                                 ret = Py_None;
13087                                 Py_INCREF(ret);
13088                         } else {
13089                                 ret = pytalloc_reference_ex(&DNS_RPC_IP_VALIDATE_Type, in->IpValidate, in->IpValidate);
13090                         }
13091                         return ret;
13092
13093                 case DNSSRV_TYPEID_ZONE_INFO:
13094                         if (in->ZoneInfo == NULL) {
13095                                 ret = Py_None;
13096                                 Py_INCREF(ret);
13097                         } else {
13098                                 ret = pytalloc_reference_ex(&DNS_RPC_ZONE_INFO_LONGHORN_Type, in->ZoneInfo, in->ZoneInfo);
13099                         }
13100                         return ret;
13101
13102                 case DNSSRV_TYPEID_AUTOCONFIGURE:
13103                         if (in->AutoConfigure == NULL) {
13104                                 ret = Py_None;
13105                                 Py_INCREF(ret);
13106                         } else {
13107                                 ret = pytalloc_reference_ex(&DNS_RPC_AUTOCONFIGURE_Type, in->AutoConfigure, in->AutoConfigure);
13108                         }
13109                         return ret;
13110
13111                 case DNSSRV_TYPEID_UTF8_STRING_LIST:
13112                         if (in->Utf8StringList == NULL) {
13113                                 ret = Py_None;
13114                                 Py_INCREF(ret);
13115                         } else {
13116                                 ret = pytalloc_reference_ex(&DNS_RPC_UTF8_STRING_LIST_Type, in->Utf8StringList, in->Utf8StringList);
13117                         }
13118                         return ret;
13119
13120         }
13121         PyErr_SetString(PyExc_TypeError, "unknown union level");
13122         return NULL;
13123 }
13124
13125 union DNSSRV_RPC_UNION *py_export_DNSSRV_RPC_UNION(TALLOC_CTX *mem_ctx, int level, PyObject *in)
13126 {
13127         union DNSSRV_RPC_UNION *ret = talloc_zero(mem_ctx, union DNSSRV_RPC_UNION);
13128         switch (level) {
13129                 case DNSSRV_TYPEID_NULL:
13130                         if (in == Py_None) {
13131                                 ret->Null = NULL;
13132                         } else {
13133                                 ret->Null = talloc_ptrtype(mem_ctx, ret->Null);
13134                                 PY_CHECK_TYPE(&PyInt_Type, in, talloc_free(ret); return NULL;);
13135                                 *ret->Null = PyInt_AsLong(in);
13136                         }
13137                         break;
13138
13139                 case DNSSRV_TYPEID_DWORD:
13140                         PY_CHECK_TYPE(&PyInt_Type, in, talloc_free(ret); return NULL;);
13141                         ret->Dword = PyInt_AsLong(in);
13142                         break;
13143
13144                 case DNSSRV_TYPEID_LPSTR:
13145                         if (in == Py_None) {
13146                                 ret->String = NULL;
13147                         } else {
13148                                 ret->String = NULL;
13149                                 if (PyUnicode_Check(in)) {
13150                                         ret->String = PyString_AS_STRING(PyUnicode_AsEncodedString(in, "utf-8", "ignore"));
13151                                 } else if (PyString_Check(in)) {
13152                                         ret->String = PyString_AS_STRING(in);
13153                                 } else {
13154                                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
13155                                         talloc_free(ret); return NULL;
13156                                 }
13157                         }
13158                         break;
13159
13160                 case DNSSRV_TYPEID_LPWSTR:
13161                         if (in == Py_None) {
13162                                 ret->WideString = NULL;
13163                         } else {
13164                                 ret->WideString = NULL;
13165                                 if (PyUnicode_Check(in)) {
13166                                         ret->WideString = PyString_AS_STRING(PyUnicode_AsEncodedString(in, "utf-8", "ignore"));
13167                                 } else if (PyString_Check(in)) {
13168                                         ret->WideString = PyString_AS_STRING(in);
13169                                 } else {
13170                                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
13171                                         talloc_free(ret); return NULL;
13172                                 }
13173                         }
13174                         break;
13175
13176                 case DNSSRV_TYPEID_IPARRAY:
13177                         if (in == Py_None) {
13178                                 ret->IpArray = NULL;
13179                         } else {
13180                                 ret->IpArray = NULL;
13181                                 PY_CHECK_TYPE(&IP4_ARRAY_Type, in, talloc_free(ret); return NULL;);
13182                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13183                                         PyErr_NoMemory();
13184                                         talloc_free(ret); return NULL;
13185                                 }
13186                                 ret->IpArray = (struct IP4_ARRAY *)pytalloc_get_ptr(in);
13187                         }
13188                         break;
13189
13190                 case DNSSRV_TYPEID_BUFFER:
13191                         if (in == Py_None) {
13192                                 ret->Buffer = NULL;
13193                         } else {
13194                                 ret->Buffer = NULL;
13195                                 PY_CHECK_TYPE(&DNS_RPC_BUFFER_Type, in, talloc_free(ret); return NULL;);
13196                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13197                                         PyErr_NoMemory();
13198                                         talloc_free(ret); return NULL;
13199                                 }
13200                                 ret->Buffer = (struct DNS_RPC_BUFFER *)pytalloc_get_ptr(in);
13201                         }
13202                         break;
13203
13204                 case DNSSRV_TYPEID_SERVER_INFO_W2K:
13205                         if (in == Py_None) {
13206                                 ret->ServerInfoW2K = NULL;
13207                         } else {
13208                                 ret->ServerInfoW2K = NULL;
13209                                 PY_CHECK_TYPE(&DNS_RPC_SERVER_INFO_W2K_Type, in, talloc_free(ret); return NULL;);
13210                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13211                                         PyErr_NoMemory();
13212                                         talloc_free(ret); return NULL;
13213                                 }
13214                                 ret->ServerInfoW2K = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(in);
13215                         }
13216                         break;
13217
13218                 case DNSSRV_TYPEID_STATS:
13219                         if (in == Py_None) {
13220                                 ret->Stats = NULL;
13221                         } else {
13222                                 ret->Stats = NULL;
13223                                 PY_CHECK_TYPE(&DNSSRV_STAT_Type, in, talloc_free(ret); return NULL;);
13224                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13225                                         PyErr_NoMemory();
13226                                         talloc_free(ret); return NULL;
13227                                 }
13228                                 ret->Stats = (struct DNSSRV_STAT *)pytalloc_get_ptr(in);
13229                         }
13230                         break;
13231
13232                 case DNSSRV_TYPEID_FORWARDERS_W2K:
13233                         if (in == Py_None) {
13234                                 ret->ForwardersW2K = NULL;
13235                         } else {
13236                                 ret->ForwardersW2K = NULL;
13237                                 PY_CHECK_TYPE(&DNS_RPC_FORWARDERS_W2K_Type, in, talloc_free(ret); return NULL;);
13238                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13239                                         PyErr_NoMemory();
13240                                         talloc_free(ret); return NULL;
13241                                 }
13242                                 ret->ForwardersW2K = (struct DNS_RPC_FORWARDERS_W2K *)pytalloc_get_ptr(in);
13243                         }
13244                         break;
13245
13246                 case DNSSRV_TYPEID_ZONE_W2K:
13247                         if (in == Py_None) {
13248                                 ret->ZoneW2K = NULL;
13249                         } else {
13250                                 ret->ZoneW2K = NULL;
13251                                 PY_CHECK_TYPE(&DNS_RPC_ZONE_W2K_Type, in, talloc_free(ret); return NULL;);
13252                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13253                                         PyErr_NoMemory();
13254                                         talloc_free(ret); return NULL;
13255                                 }
13256                                 ret->ZoneW2K = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(in);
13257                         }
13258                         break;
13259
13260                 case DNSSRV_TYPEID_ZONE_INFO_W2K:
13261                         if (in == Py_None) {
13262                                 ret->ZoneInfoW2K = NULL;
13263                         } else {
13264                                 ret->ZoneInfoW2K = NULL;
13265                                 PY_CHECK_TYPE(&DNS_RPC_ZONE_INFO_W2K_Type, in, talloc_free(ret); return NULL;);
13266                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13267                                         PyErr_NoMemory();
13268                                         talloc_free(ret); return NULL;
13269                                 }
13270                                 ret->ZoneInfoW2K = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(in);
13271                         }
13272                         break;
13273
13274                 case DNSSRV_TYPEID_ZONE_SECONDARIES_W2K:
13275                         if (in == Py_None) {
13276                                 ret->SecondariesW2K = NULL;
13277                         } else {
13278                                 ret->SecondariesW2K = NULL;
13279                                 PY_CHECK_TYPE(&DNS_RPC_ZONE_SECONDARIES_W2K_Type, in, talloc_free(ret); return NULL;);
13280                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13281                                         PyErr_NoMemory();
13282                                         talloc_free(ret); return NULL;
13283                                 }
13284                                 ret->SecondariesW2K = (struct DNS_RPC_ZONE_SECONDARIES_W2K *)pytalloc_get_ptr(in);
13285                         }
13286                         break;
13287
13288                 case DNSSRV_TYPEID_ZONE_DATABASE_W2K:
13289                         if (in == Py_None) {
13290                                 ret->DatabaseW2K = NULL;
13291                         } else {
13292                                 ret->DatabaseW2K = NULL;
13293                                 PY_CHECK_TYPE(&DNS_RPC_ZONE_DATABASE_W2K_Type, in, talloc_free(ret); return NULL;);
13294                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13295                                         PyErr_NoMemory();
13296                                         talloc_free(ret); return NULL;
13297                                 }
13298                                 ret->DatabaseW2K = (struct DNS_RPC_ZONE_DATABASE_W2K *)pytalloc_get_ptr(in);
13299                         }
13300                         break;
13301
13302                 case DNSSRV_TYPEID_ZONE_CREATE_W2K:
13303                         if (in == Py_None) {
13304                                 ret->ZoneCreateW2K = NULL;
13305                         } else {
13306                                 ret->ZoneCreateW2K = NULL;
13307                                 PY_CHECK_TYPE(&DNS_RPC_ZONE_CREATE_INFO_W2K_Type, in, talloc_free(ret); return NULL;);
13308                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13309                                         PyErr_NoMemory();
13310                                         talloc_free(ret); return NULL;
13311                                 }
13312                                 ret->ZoneCreateW2K = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(in);
13313                         }
13314                         break;
13315
13316                 case DNSSRV_TYPEID_NAME_AND_PARAM:
13317                         if (in == Py_None) {
13318                                 ret->NameAndParam = NULL;
13319                         } else {
13320                                 ret->NameAndParam = NULL;
13321                                 PY_CHECK_TYPE(&DNS_RPC_NAME_AND_PARAM_Type, in, talloc_free(ret); return NULL;);
13322                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13323                                         PyErr_NoMemory();
13324                                         talloc_free(ret); return NULL;
13325                                 }
13326                                 ret->NameAndParam = (struct DNS_RPC_NAME_AND_PARAM *)pytalloc_get_ptr(in);
13327                         }
13328                         break;
13329
13330                 case DNSSRV_TYPEID_ZONE_LIST_W2K:
13331                         if (in == Py_None) {
13332                                 ret->ZoneListW2K = NULL;
13333                         } else {
13334                                 ret->ZoneListW2K = NULL;
13335                                 PY_CHECK_TYPE(&DNS_RPC_ZONE_LIST_W2K_Type, in, talloc_free(ret); return NULL;);
13336                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13337                                         PyErr_NoMemory();
13338                                         talloc_free(ret); return NULL;
13339                                 }
13340                                 ret->ZoneListW2K = (struct DNS_RPC_ZONE_LIST_W2K *)pytalloc_get_ptr(in);
13341                         }
13342                         break;
13343
13344                 case DNSSRV_TYPEID_SERVER_INFO_DOTNET:
13345                         if (in == Py_None) {
13346                                 ret->ServerInfoDotNet = NULL;
13347                         } else {
13348                                 ret->ServerInfoDotNet = NULL;
13349                                 PY_CHECK_TYPE(&DNS_RPC_SERVER_INFO_DOTNET_Type, in, talloc_free(ret); return NULL;);
13350                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13351                                         PyErr_NoMemory();
13352                                         talloc_free(ret); return NULL;
13353                                 }
13354                                 ret->ServerInfoDotNet = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(in);
13355                         }
13356                         break;
13357
13358                 case DNSSRV_TYPEID_FORWARDERS_DOTNET:
13359                         if (in == Py_None) {
13360                                 ret->ForwardersDotNet = NULL;
13361                         } else {
13362                                 ret->ForwardersDotNet = NULL;
13363                                 PY_CHECK_TYPE(&DNS_RPC_FORWARDERS_DOTNET_Type, in, talloc_free(ret); return NULL;);
13364                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13365                                         PyErr_NoMemory();
13366                                         talloc_free(ret); return NULL;
13367                                 }
13368                                 ret->ForwardersDotNet = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(in);
13369                         }
13370                         break;
13371
13372                 case DNSSRV_TYPEID_ZONE:
13373                         if (in == Py_None) {
13374                                 ret->Zone = NULL;
13375                         } else {
13376                                 ret->Zone = NULL;
13377                                 PY_CHECK_TYPE(&DNS_RPC_ZONE_DOTNET_Type, in, talloc_free(ret); return NULL;);
13378                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13379                                         PyErr_NoMemory();
13380                                         talloc_free(ret); return NULL;
13381                                 }
13382                                 ret->Zone = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(in);
13383                         }
13384                         break;
13385
13386                 case DNSSRV_TYPEID_ZONE_INFO_DOTNET:
13387                         if (in == Py_None) {
13388                                 ret->ZoneInfoDotNet = NULL;
13389                         } else {
13390                                 ret->ZoneInfoDotNet = NULL;
13391                                 PY_CHECK_TYPE(&DNS_RPC_ZONE_INFO_DOTNET_Type, in, talloc_free(ret); return NULL;);
13392                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13393                                         PyErr_NoMemory();
13394                                         talloc_free(ret); return NULL;
13395                                 }
13396                                 ret->ZoneInfoDotNet = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(in);
13397                         }
13398                         break;
13399
13400                 case DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET:
13401                         if (in == Py_None) {
13402                                 ret->SecondariesDotNet = NULL;
13403                         } else {
13404                                 ret->SecondariesDotNet = NULL;
13405                                 PY_CHECK_TYPE(&DNS_RPC_ZONE_SECONDARIES_DOTNET_Type, in, talloc_free(ret); return NULL;);
13406                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13407                                         PyErr_NoMemory();
13408                                         talloc_free(ret); return NULL;
13409                                 }
13410                                 ret->SecondariesDotNet = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(in);
13411                         }
13412                         break;
13413
13414                 case DNSSRV_TYPEID_ZONE_DATABASE:
13415                         if (in == Py_None) {
13416                                 ret->Database = NULL;
13417                         } else {
13418                                 ret->Database = NULL;
13419                                 PY_CHECK_TYPE(&DNS_RPC_ZONE_DATABASE_DOTNET_Type, in, talloc_free(ret); return NULL;);
13420                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13421                                         PyErr_NoMemory();
13422                                         talloc_free(ret); return NULL;
13423                                 }
13424                                 ret->Database = (struct DNS_RPC_ZONE_DATABASE_DOTNET *)pytalloc_get_ptr(in);
13425                         }
13426                         break;
13427
13428                 case DNSSRV_TYPEID_ZONE_CREATE_DOTNET:
13429                         if (in == Py_None) {
13430                                 ret->ZoneCreateDotNet = NULL;
13431                         } else {
13432                                 ret->ZoneCreateDotNet = NULL;
13433                                 PY_CHECK_TYPE(&DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type, in, talloc_free(ret); return NULL;);
13434                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13435                                         PyErr_NoMemory();
13436                                         talloc_free(ret); return NULL;
13437                                 }
13438                                 ret->ZoneCreateDotNet = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(in);
13439                         }
13440                         break;
13441
13442                 case DNSSRV_TYPEID_ZONE_LIST:
13443                         if (in == Py_None) {
13444                                 ret->ZoneList = NULL;
13445                         } else {
13446                                 ret->ZoneList = NULL;
13447                                 PY_CHECK_TYPE(&DNS_RPC_ZONE_LIST_DOTNET_Type, in, talloc_free(ret); return NULL;);
13448                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13449                                         PyErr_NoMemory();
13450                                         talloc_free(ret); return NULL;
13451                                 }
13452                                 ret->ZoneList = (struct DNS_RPC_ZONE_LIST_DOTNET *)pytalloc_get_ptr(in);
13453                         }
13454                         break;
13455
13456                 case DNSSRV_TYPEID_ZONE_EXPORT:
13457                         if (in == Py_None) {
13458                                 ret->ZoneExport = NULL;
13459                         } else {
13460                                 ret->ZoneExport = NULL;
13461                                 PY_CHECK_TYPE(&DNS_RPC_ZONE_EXPORT_INFO_Type, in, talloc_free(ret); return NULL;);
13462                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13463                                         PyErr_NoMemory();
13464                                         talloc_free(ret); return NULL;
13465                                 }
13466                                 ret->ZoneExport = (struct DNS_RPC_ZONE_EXPORT_INFO *)pytalloc_get_ptr(in);
13467                         }
13468                         break;
13469
13470                 case DNSSRV_TYPEID_DP_INFO:
13471                         if (in == Py_None) {
13472                                 ret->DirectoryPartition = NULL;
13473                         } else {
13474                                 ret->DirectoryPartition = NULL;
13475                                 PY_CHECK_TYPE(&DNS_RPC_DP_INFO_Type, in, talloc_free(ret); return NULL;);
13476                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13477                                         PyErr_NoMemory();
13478                                         talloc_free(ret); return NULL;
13479                                 }
13480                                 ret->DirectoryPartition = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(in);
13481                         }
13482                         break;
13483
13484                 case DNSSRV_TYPEID_DP_ENUM:
13485                         if (in == Py_None) {
13486                                 ret->DirectoryPartitionEnum = NULL;
13487                         } else {
13488                                 ret->DirectoryPartitionEnum = NULL;
13489                                 PY_CHECK_TYPE(&DNS_RPC_DP_ENUM_Type, in, talloc_free(ret); return NULL;);
13490                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13491                                         PyErr_NoMemory();
13492                                         talloc_free(ret); return NULL;
13493                                 }
13494                                 ret->DirectoryPartitionEnum = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(in);
13495                         }
13496                         break;
13497
13498                 case DNSSRV_TYPEID_DP_LIST:
13499                         if (in == Py_None) {
13500                                 ret->DirectoryPartitionList = NULL;
13501                         } else {
13502                                 ret->DirectoryPartitionList = NULL;
13503                                 PY_CHECK_TYPE(&DNS_RPC_DP_LIST_Type, in, talloc_free(ret); return NULL;);
13504                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13505                                         PyErr_NoMemory();
13506                                         talloc_free(ret); return NULL;
13507                                 }
13508                                 ret->DirectoryPartitionList = (struct DNS_RPC_DP_LIST *)pytalloc_get_ptr(in);
13509                         }
13510                         break;
13511
13512                 case DNSSRV_TYPEID_ENLIST_DP:
13513                         if (in == Py_None) {
13514                                 ret->EnlistDirectoryPartition = NULL;
13515                         } else {
13516                                 ret->EnlistDirectoryPartition = NULL;
13517                                 PY_CHECK_TYPE(&DNS_RPC_ENLIST_DP_Type, in, talloc_free(ret); return NULL;);
13518                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13519                                         PyErr_NoMemory();
13520                                         talloc_free(ret); return NULL;
13521                                 }
13522                                 ret->EnlistDirectoryPartition = (struct DNS_RPC_ENLIST_DP *)pytalloc_get_ptr(in);
13523                         }
13524                         break;
13525
13526                 case DNSSRV_TYPEID_ZONE_CHANGE_DP:
13527                         if (in == Py_None) {
13528                                 ret->ZoneChangeDirectoryPartition = NULL;
13529                         } else {
13530                                 ret->ZoneChangeDirectoryPartition = NULL;
13531                                 PY_CHECK_TYPE(&DNS_RPC_ZONE_CHANGE_DP_Type, in, talloc_free(ret); return NULL;);
13532                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13533                                         PyErr_NoMemory();
13534                                         talloc_free(ret); return NULL;
13535                                 }
13536                                 ret->ZoneChangeDirectoryPartition = (struct DNS_RPC_ZONE_CHANGE_DP *)pytalloc_get_ptr(in);
13537                         }
13538                         break;
13539
13540                 case DNSSRV_TYPEID_ENUM_ZONES_FILTER:
13541                         if (in == Py_None) {
13542                                 ret->EnumZonesFilter = NULL;
13543                         } else {
13544                                 ret->EnumZonesFilter = NULL;
13545                                 PY_CHECK_TYPE(&DNS_RPC_ENUM_ZONES_FILTER_Type, in, talloc_free(ret); return NULL;);
13546                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13547                                         PyErr_NoMemory();
13548                                         talloc_free(ret); return NULL;
13549                                 }
13550                                 ret->EnumZonesFilter = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(in);
13551                         }
13552                         break;
13553
13554                 case DNSSRV_TYPEID_ADDRARRAY:
13555                         if (in == Py_None) {
13556                                 ret->AddrArray = NULL;
13557                         } else {
13558                                 ret->AddrArray = NULL;
13559                                 PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, in, talloc_free(ret); return NULL;);
13560                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13561                                         PyErr_NoMemory();
13562                                         talloc_free(ret); return NULL;
13563                                 }
13564                                 ret->AddrArray = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(in);
13565                         }
13566                         break;
13567
13568                 case DNSSRV_TYPEID_SERVER_INFO:
13569                         if (in == Py_None) {
13570                                 ret->ServerInfo = NULL;
13571                         } else {
13572                                 ret->ServerInfo = NULL;
13573                                 PY_CHECK_TYPE(&DNS_RPC_SERVER_INFO_LONGHORN_Type, in, talloc_free(ret); return NULL;);
13574                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13575                                         PyErr_NoMemory();
13576                                         talloc_free(ret); return NULL;
13577                                 }
13578                                 ret->ServerInfo = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(in);
13579                         }
13580                         break;
13581
13582                 case DNSSRV_TYPEID_ZONE_CREATE:
13583                         if (in == Py_None) {
13584                                 ret->ZoneCreate = NULL;
13585                         } else {
13586                                 ret->ZoneCreate = NULL;
13587                                 PY_CHECK_TYPE(&DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type, in, talloc_free(ret); return NULL;);
13588                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13589                                         PyErr_NoMemory();
13590                                         talloc_free(ret); return NULL;
13591                                 }
13592                                 ret->ZoneCreate = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(in);
13593                         }
13594                         break;
13595
13596                 case DNSSRV_TYPEID_FORWARDERS:
13597                         if (in == Py_None) {
13598                                 ret->Forwarders = NULL;
13599                         } else {
13600                                 ret->Forwarders = NULL;
13601                                 PY_CHECK_TYPE(&DNS_RPC_FORWARDERS_LONGHORN_Type, in, talloc_free(ret); return NULL;);
13602                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13603                                         PyErr_NoMemory();
13604                                         talloc_free(ret); return NULL;
13605                                 }
13606                                 ret->Forwarders = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(in);
13607                         }
13608                         break;
13609
13610                 case DNSSRV_TYPEID_ZONE_SECONDARIES:
13611                         if (in == Py_None) {
13612                                 ret->Secondaries = NULL;
13613                         } else {
13614                                 ret->Secondaries = NULL;
13615                                 PY_CHECK_TYPE(&DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type, in, talloc_free(ret); return NULL;);
13616                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13617                                         PyErr_NoMemory();
13618                                         talloc_free(ret); return NULL;
13619                                 }
13620                                 ret->Secondaries = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(in);
13621                         }
13622                         break;
13623
13624                 case DNSSRV_TYPEID_IP_VALIDATE:
13625                         if (in == Py_None) {
13626                                 ret->IpValidate = NULL;
13627                         } else {
13628                                 ret->IpValidate = NULL;
13629                                 PY_CHECK_TYPE(&DNS_RPC_IP_VALIDATE_Type, in, talloc_free(ret); return NULL;);
13630                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13631                                         PyErr_NoMemory();
13632                                         talloc_free(ret); return NULL;
13633                                 }
13634                                 ret->IpValidate = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(in);
13635                         }
13636                         break;
13637
13638                 case DNSSRV_TYPEID_ZONE_INFO:
13639                         if (in == Py_None) {
13640                                 ret->ZoneInfo = NULL;
13641                         } else {
13642                                 ret->ZoneInfo = NULL;
13643                                 PY_CHECK_TYPE(&DNS_RPC_ZONE_INFO_LONGHORN_Type, in, talloc_free(ret); return NULL;);
13644                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13645                                         PyErr_NoMemory();
13646                                         talloc_free(ret); return NULL;
13647                                 }
13648                                 ret->ZoneInfo = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(in);
13649                         }
13650                         break;
13651
13652                 case DNSSRV_TYPEID_AUTOCONFIGURE:
13653                         if (in == Py_None) {
13654                                 ret->AutoConfigure = NULL;
13655                         } else {
13656                                 ret->AutoConfigure = NULL;
13657                                 PY_CHECK_TYPE(&DNS_RPC_AUTOCONFIGURE_Type, in, talloc_free(ret); return NULL;);
13658                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13659                                         PyErr_NoMemory();
13660                                         talloc_free(ret); return NULL;
13661                                 }
13662                                 ret->AutoConfigure = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(in);
13663                         }
13664                         break;
13665
13666                 case DNSSRV_TYPEID_UTF8_STRING_LIST:
13667                         if (in == Py_None) {
13668                                 ret->Utf8StringList = NULL;
13669                         } else {
13670                                 ret->Utf8StringList = NULL;
13671                                 PY_CHECK_TYPE(&DNS_RPC_UTF8_STRING_LIST_Type, in, talloc_free(ret); return NULL;);
13672                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13673                                         PyErr_NoMemory();
13674                                         talloc_free(ret); return NULL;
13675                                 }
13676                                 ret->Utf8StringList = (struct DNS_RPC_UTF8_STRING_LIST *)pytalloc_get_ptr(in);
13677                         }
13678                         break;
13679
13680                 default:
13681                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
13682                         talloc_free(ret);
13683                         ret = NULL;
13684         }
13685
13686         return ret;
13687 }
13688
13689
13690 static PyObject *py_DNS_RPC_RECORDS_get_wLength(PyObject *obj, void *closure)
13691 {
13692         struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(obj);
13693         PyObject *py_wLength;
13694         py_wLength = PyInt_FromLong(object->wLength);
13695         return py_wLength;
13696 }
13697
13698 static int py_DNS_RPC_RECORDS_set_wLength(PyObject *py_obj, PyObject *value, void *closure)
13699 {
13700         struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(py_obj);
13701         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
13702         object->wLength = PyInt_AsLong(value);
13703         return 0;
13704 }
13705
13706 static PyObject *py_DNS_RPC_RECORDS_get_wRecordCount(PyObject *obj, void *closure)
13707 {
13708         struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(obj);
13709         PyObject *py_wRecordCount;
13710         py_wRecordCount = PyInt_FromLong(object->wRecordCount);
13711         return py_wRecordCount;
13712 }
13713
13714 static int py_DNS_RPC_RECORDS_set_wRecordCount(PyObject *py_obj, PyObject *value, void *closure)
13715 {
13716         struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(py_obj);
13717         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
13718         object->wRecordCount = PyInt_AsLong(value);
13719         return 0;
13720 }
13721
13722 static PyObject *py_DNS_RPC_RECORDS_get_dwFlags(PyObject *obj, void *closure)
13723 {
13724         struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(obj);
13725         PyObject *py_dwFlags;
13726         py_dwFlags = PyInt_FromLong(object->dwFlags);
13727         return py_dwFlags;
13728 }
13729
13730 static int py_DNS_RPC_RECORDS_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
13731 {
13732         struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(py_obj);
13733         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
13734         object->dwFlags = PyInt_AsLong(value);
13735         return 0;
13736 }
13737
13738 static PyObject *py_DNS_RPC_RECORDS_get_dwChildCount(PyObject *obj, void *closure)
13739 {
13740         struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(obj);
13741         PyObject *py_dwChildCount;
13742         py_dwChildCount = PyInt_FromLong(object->dwChildCount);
13743         return py_dwChildCount;
13744 }
13745
13746 static int py_DNS_RPC_RECORDS_set_dwChildCount(PyObject *py_obj, PyObject *value, void *closure)
13747 {
13748         struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(py_obj);
13749         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
13750         object->dwChildCount = PyInt_AsLong(value);
13751         return 0;
13752 }
13753
13754 static PyObject *py_DNS_RPC_RECORDS_get_dnsNodeName(PyObject *obj, void *closure)
13755 {
13756         struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(obj);
13757         PyObject *py_dnsNodeName;
13758         py_dnsNodeName = pytalloc_reference_ex(&DNS_RPC_NAME_Type, pytalloc_get_mem_ctx(obj), &object->dnsNodeName);
13759         return py_dnsNodeName;
13760 }
13761
13762 static int py_DNS_RPC_RECORDS_set_dnsNodeName(PyObject *py_obj, PyObject *value, void *closure)
13763 {
13764         struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(py_obj);
13765         PY_CHECK_TYPE(&DNS_RPC_NAME_Type, value, return -1;);
13766         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
13767                 PyErr_NoMemory();
13768                 return -1;
13769         }
13770         object->dnsNodeName = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(value);
13771         return 0;
13772 }
13773
13774 static PyObject *py_DNS_RPC_RECORDS_get_records(PyObject *obj, void *closure)
13775 {
13776         struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(obj);
13777         PyObject *py_records;
13778         py_records = PyList_New(object->wRecordCount);
13779         if (py_records == NULL) {
13780                 return NULL;
13781         }
13782         {
13783                 int records_cntr_0;
13784                 for (records_cntr_0 = 0; records_cntr_0 < object->wRecordCount; records_cntr_0++) {
13785                         PyObject *py_records_0;
13786                         py_records_0 = pytalloc_reference_ex(&DNS_RPC_RECORD_Type, object->records, &object->records[records_cntr_0]);
13787                         PyList_SetItem(py_records, records_cntr_0, py_records_0);
13788                 }
13789         }
13790         return py_records;
13791 }
13792
13793 static int py_DNS_RPC_RECORDS_set_records(PyObject *py_obj, PyObject *value, void *closure)
13794 {
13795         struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(py_obj);
13796         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
13797         {
13798                 int records_cntr_0;
13799                 object->records = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->records, PyList_GET_SIZE(value));
13800                 if (!object->records) { return -1;; }
13801                 talloc_set_name_const(object->records, "ARRAY: object->records");
13802                 for (records_cntr_0 = 0; records_cntr_0 < PyList_GET_SIZE(value); records_cntr_0++) {
13803                         PY_CHECK_TYPE(&DNS_RPC_RECORD_Type, PyList_GET_ITEM(value, records_cntr_0), return -1;);
13804                         if (talloc_reference(object->records, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, records_cntr_0))) == NULL) {
13805                                 PyErr_NoMemory();
13806                                 return -1;
13807                         }
13808                         object->records[records_cntr_0] = *(struct DNS_RPC_RECORD *)pytalloc_get_ptr(PyList_GET_ITEM(value, records_cntr_0));
13809                 }
13810         }
13811         return 0;
13812 }
13813
13814 static PyGetSetDef py_DNS_RPC_RECORDS_getsetters[] = {
13815         { discard_const_p(char, "wLength"), py_DNS_RPC_RECORDS_get_wLength, py_DNS_RPC_RECORDS_set_wLength },
13816         { discard_const_p(char, "wRecordCount"), py_DNS_RPC_RECORDS_get_wRecordCount, py_DNS_RPC_RECORDS_set_wRecordCount },
13817         { discard_const_p(char, "dwFlags"), py_DNS_RPC_RECORDS_get_dwFlags, py_DNS_RPC_RECORDS_set_dwFlags },
13818         { discard_const_p(char, "dwChildCount"), py_DNS_RPC_RECORDS_get_dwChildCount, py_DNS_RPC_RECORDS_set_dwChildCount },
13819         { discard_const_p(char, "dnsNodeName"), py_DNS_RPC_RECORDS_get_dnsNodeName, py_DNS_RPC_RECORDS_set_dnsNodeName },
13820         { discard_const_p(char, "records"), py_DNS_RPC_RECORDS_get_records, py_DNS_RPC_RECORDS_set_records },
13821         { NULL }
13822 };
13823
13824 static PyObject *py_DNS_RPC_RECORDS_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
13825 {
13826         return pytalloc_new(struct DNS_RPC_RECORDS, type);
13827 }
13828
13829 static PyObject *py_DNS_RPC_RECORDS_ndr_pack(PyObject *py_obj)
13830 {
13831         struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(py_obj);
13832         DATA_BLOB blob;
13833         enum ndr_err_code err;
13834         err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_RECORDS);
13835         if (err != NDR_ERR_SUCCESS) {
13836                 PyErr_SetNdrError(err);
13837                 return NULL;
13838         }
13839
13840         return PyString_FromStringAndSize((char *)blob.data, blob.length);
13841 }
13842
13843 static PyObject *py_DNS_RPC_RECORDS_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
13844 {
13845         struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(py_obj);
13846         DATA_BLOB blob;
13847         int blob_length = 0;
13848         enum ndr_err_code err;
13849         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
13850         PyObject *allow_remaining_obj = NULL;
13851         bool allow_remaining = false;
13852
13853         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
13854                 discard_const_p(char *, kwnames),
13855                 &blob.data, &blob_length,
13856                 &allow_remaining_obj)) {
13857                 return NULL;
13858         }
13859         blob.length = blob_length;
13860
13861         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
13862                 allow_remaining = true;
13863         }
13864
13865         if (allow_remaining) {
13866                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_RECORDS);
13867         } else {
13868                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_RECORDS);
13869         }
13870         if (err != NDR_ERR_SUCCESS) {
13871                 PyErr_SetNdrError(err);
13872                 return NULL;
13873         }
13874
13875         Py_RETURN_NONE;
13876 }
13877
13878 static PyObject *py_DNS_RPC_RECORDS_ndr_print(PyObject *py_obj)
13879 {
13880         struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(py_obj);
13881         PyObject *ret;
13882         char *retstr;
13883
13884         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_DNS_RPC_RECORDS, "DNS_RPC_RECORDS", object);
13885         ret = PyString_FromString(retstr);
13886         talloc_free(retstr);
13887
13888         return ret;
13889 }
13890
13891 static PyMethodDef py_DNS_RPC_RECORDS_methods[] = {
13892         { "__ndr_pack__", (PyCFunction)py_DNS_RPC_RECORDS_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
13893         { "__ndr_unpack__", (PyCFunction)py_DNS_RPC_RECORDS_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
13894         { "__ndr_print__", (PyCFunction)py_DNS_RPC_RECORDS_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
13895         { NULL, NULL, 0, NULL }
13896 };
13897
13898
13899 static PyTypeObject DNS_RPC_RECORDS_Type = {
13900         PyObject_HEAD_INIT(NULL) 0,
13901         .tp_name = "dnsserver.DNS_RPC_RECORDS",
13902         .tp_getset = py_DNS_RPC_RECORDS_getsetters,
13903         .tp_methods = py_DNS_RPC_RECORDS_methods,
13904         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
13905         .tp_basicsize = sizeof(pytalloc_Object),
13906         .tp_new = py_DNS_RPC_RECORDS_new,
13907 };
13908
13909
13910 static PyObject *py_DNS_RPC_RECORDS_ARRAY_get_count(PyObject *obj, void *closure)
13911 {
13912         struct DNS_RPC_RECORDS_ARRAY *object = (struct DNS_RPC_RECORDS_ARRAY *)pytalloc_get_ptr(obj);
13913         PyObject *py_count;
13914         py_count = PyInt_FromLong(object->count);
13915         return py_count;
13916 }
13917
13918 static int py_DNS_RPC_RECORDS_ARRAY_set_count(PyObject *py_obj, PyObject *value, void *closure)
13919 {
13920         struct DNS_RPC_RECORDS_ARRAY *object = (struct DNS_RPC_RECORDS_ARRAY *)pytalloc_get_ptr(py_obj);
13921         PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
13922         object->count = PyInt_AsLong(value);
13923         return 0;
13924 }
13925
13926 static PyObject *py_DNS_RPC_RECORDS_ARRAY_get_rec(PyObject *obj, void *closure)
13927 {
13928         struct DNS_RPC_RECORDS_ARRAY *object = (struct DNS_RPC_RECORDS_ARRAY *)pytalloc_get_ptr(obj);
13929         PyObject *py_rec;
13930         py_rec = PyList_New(object->count);
13931         if (py_rec == NULL) {
13932                 return NULL;
13933         }
13934         {
13935                 int rec_cntr_0;
13936                 for (rec_cntr_0 = 0; rec_cntr_0 < object->count; rec_cntr_0++) {
13937                         PyObject *py_rec_0;
13938                         py_rec_0 = pytalloc_reference_ex(&DNS_RPC_RECORDS_Type, object->rec, &object->rec[rec_cntr_0]);
13939                         PyList_SetItem(py_rec, rec_cntr_0, py_rec_0);
13940                 }
13941         }
13942         return py_rec;
13943 }
13944
13945 static int py_DNS_RPC_RECORDS_ARRAY_set_rec(PyObject *py_obj, PyObject *value, void *closure)
13946 {
13947         struct DNS_RPC_RECORDS_ARRAY *object = (struct DNS_RPC_RECORDS_ARRAY *)pytalloc_get_ptr(py_obj);
13948         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
13949         {
13950                 int rec_cntr_0;
13951                 object->rec = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->rec, PyList_GET_SIZE(value));
13952                 if (!object->rec) { return -1;; }
13953                 talloc_set_name_const(object->rec, "ARRAY: object->rec");
13954                 for (rec_cntr_0 = 0; rec_cntr_0 < PyList_GET_SIZE(value); rec_cntr_0++) {
13955                         PY_CHECK_TYPE(&DNS_RPC_RECORDS_Type, PyList_GET_ITEM(value, rec_cntr_0), return -1;);
13956                         if (talloc_reference(object->rec, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, rec_cntr_0))) == NULL) {
13957                                 PyErr_NoMemory();
13958                                 return -1;
13959                         }
13960                         object->rec[rec_cntr_0] = *(struct DNS_RPC_RECORDS *)pytalloc_get_ptr(PyList_GET_ITEM(value, rec_cntr_0));
13961                 }
13962         }
13963         return 0;
13964 }
13965
13966 static PyGetSetDef py_DNS_RPC_RECORDS_ARRAY_getsetters[] = {
13967         { discard_const_p(char, "count"), py_DNS_RPC_RECORDS_ARRAY_get_count, py_DNS_RPC_RECORDS_ARRAY_set_count },
13968         { discard_const_p(char, "rec"), py_DNS_RPC_RECORDS_ARRAY_get_rec, py_DNS_RPC_RECORDS_ARRAY_set_rec },
13969         { NULL }
13970 };
13971
13972 static PyObject *py_DNS_RPC_RECORDS_ARRAY_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
13973 {
13974         return pytalloc_new(struct DNS_RPC_RECORDS_ARRAY, type);
13975 }
13976
13977 static PyObject *py_DNS_RPC_RECORDS_ARRAY_ndr_pack(PyObject *py_obj)
13978 {
13979         struct DNS_RPC_RECORDS_ARRAY *object = (struct DNS_RPC_RECORDS_ARRAY *)pytalloc_get_ptr(py_obj);
13980         DATA_BLOB blob;
13981         enum ndr_err_code err;
13982         err = ndr_push_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_RECORDS_ARRAY);
13983         if (err != NDR_ERR_SUCCESS) {
13984                 PyErr_SetNdrError(err);
13985                 return NULL;
13986         }
13987
13988         return PyString_FromStringAndSize((char *)blob.data, blob.length);
13989 }
13990
13991 static PyObject *py_DNS_RPC_RECORDS_ARRAY_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
13992 {
13993         struct DNS_RPC_RECORDS_ARRAY *object = (struct DNS_RPC_RECORDS_ARRAY *)pytalloc_get_ptr(py_obj);
13994         DATA_BLOB blob;
13995         int blob_length = 0;
13996         enum ndr_err_code err;
13997         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
13998         PyObject *allow_remaining_obj = NULL;
13999         bool allow_remaining = false;
14000
14001         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O:__ndr_unpack__",
14002                 discard_const_p(char *, kwnames),
14003                 &blob.data, &blob_length,
14004                 &allow_remaining_obj)) {
14005                 return NULL;
14006         }
14007         blob.length = blob_length;
14008
14009         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
14010                 allow_remaining = true;
14011         }
14012
14013         if (allow_remaining) {
14014                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_RECORDS_ARRAY);
14015         } else {
14016                 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);
14017         }
14018         if (err != NDR_ERR_SUCCESS) {
14019                 PyErr_SetNdrError(err);
14020                 return NULL;
14021         }
14022
14023         Py_RETURN_NONE;
14024 }
14025
14026 static PyObject *py_DNS_RPC_RECORDS_ARRAY_ndr_print(PyObject *py_obj)
14027 {
14028         struct DNS_RPC_RECORDS_ARRAY *object = (struct DNS_RPC_RECORDS_ARRAY *)pytalloc_get_ptr(py_obj);
14029         PyObject *ret;
14030         char *retstr;
14031
14032         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);
14033         ret = PyString_FromString(retstr);
14034         talloc_free(retstr);
14035
14036         return ret;
14037 }
14038
14039 static PyMethodDef py_DNS_RPC_RECORDS_ARRAY_methods[] = {
14040         { "__ndr_pack__", (PyCFunction)py_DNS_RPC_RECORDS_ARRAY_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
14041         { "__ndr_unpack__", (PyCFunction)py_DNS_RPC_RECORDS_ARRAY_ndr_unpack, METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
14042         { "__ndr_print__", (PyCFunction)py_DNS_RPC_RECORDS_ARRAY_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
14043         { NULL, NULL, 0, NULL }
14044 };
14045
14046
14047 static PyTypeObject DNS_RPC_RECORDS_ARRAY_Type = {
14048         PyObject_HEAD_INIT(NULL) 0,
14049         .tp_name = "dnsserver.DNS_RPC_RECORDS_ARRAY",
14050         .tp_getset = py_DNS_RPC_RECORDS_ARRAY_getsetters,
14051         .tp_methods = py_DNS_RPC_RECORDS_ARRAY_methods,
14052         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
14053         .tp_basicsize = sizeof(pytalloc_Object),
14054         .tp_new = py_DNS_RPC_RECORDS_ARRAY_new,
14055 };
14056
14057
14058 static bool pack_py_DnssrvOperation_args_in(PyObject *args, PyObject *kwargs, struct DnssrvOperation *r)
14059 {
14060         PyObject *py_pwszServerName;
14061         PyObject *py_pszZone;
14062         PyObject *py_dwContext;
14063         PyObject *py_pszOperation;
14064         PyObject *py_dwTypeId;
14065         PyObject *py_pData;
14066         const char *kwnames[] = {
14067                 "pwszServerName", "pszZone", "dwContext", "pszOperation", "dwTypeId", "pData", NULL
14068         };
14069
14070         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:DnssrvOperation", discard_const_p(char *, kwnames), &py_pwszServerName, &py_pszZone, &py_dwContext, &py_pszOperation, &py_dwTypeId, &py_pData)) {
14071                 return false;
14072         }
14073
14074         if (py_pwszServerName == Py_None) {
14075                 r->in.pwszServerName = NULL;
14076         } else {
14077                 r->in.pwszServerName = NULL;
14078                 if (PyUnicode_Check(py_pwszServerName)) {
14079                         r->in.pwszServerName = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore"));
14080                 } else if (PyString_Check(py_pwszServerName)) {
14081                         r->in.pwszServerName = PyString_AS_STRING(py_pwszServerName);
14082                 } else {
14083                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
14084                         return false;
14085                 }
14086         }
14087         if (py_pszZone == Py_None) {
14088                 r->in.pszZone = NULL;
14089         } else {
14090                 r->in.pszZone = NULL;
14091                 if (PyUnicode_Check(py_pszZone)) {
14092                         r->in.pszZone = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore"));
14093                 } else if (PyString_Check(py_pszZone)) {
14094                         r->in.pszZone = PyString_AS_STRING(py_pszZone);
14095                 } else {
14096                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
14097                         return false;
14098                 }
14099         }
14100         PY_CHECK_TYPE(&PyInt_Type, py_dwContext, return false;);
14101         r->in.dwContext = PyInt_AsLong(py_dwContext);
14102         if (py_pszOperation == Py_None) {
14103                 r->in.pszOperation = NULL;
14104         } else {
14105                 r->in.pszOperation = NULL;
14106                 if (PyUnicode_Check(py_pszOperation)) {
14107                         r->in.pszOperation = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszOperation, "utf-8", "ignore"));
14108                 } else if (PyString_Check(py_pszOperation)) {
14109                         r->in.pszOperation = PyString_AS_STRING(py_pszOperation);
14110                 } else {
14111                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszOperation)->tp_name);
14112                         return false;
14113                 }
14114         }
14115         if (PyLong_Check(py_dwTypeId)) {
14116                 r->in.dwTypeId = PyLong_AsLongLong(py_dwTypeId);
14117         } else if (PyInt_Check(py_dwTypeId)) {
14118                 r->in.dwTypeId = PyInt_AsLong(py_dwTypeId);
14119         } else {
14120                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14121                   PyInt_Type.tp_name, PyLong_Type.tp_name);
14122                 return false;
14123         }
14124         {
14125                 union DNSSRV_RPC_UNION *pData_switch_0;
14126                 pData_switch_0 = py_export_DNSSRV_RPC_UNION(r, r->in.dwTypeId, py_pData);
14127                 if (pData_switch_0 == NULL) {
14128                         return false;
14129                 }
14130                 r->in.pData = *pData_switch_0;
14131         }
14132         return true;
14133 }
14134
14135 static PyObject *unpack_py_DnssrvOperation_args_out(struct DnssrvOperation *r)
14136 {
14137         PyObject *result;
14138         result = Py_None;
14139         Py_INCREF(result);
14140         if (!W_ERROR_IS_OK(r->out.result)) {
14141                 PyErr_SetWERROR(r->out.result);
14142                 return NULL;
14143         }
14144
14145         return result;
14146 }
14147
14148 static bool pack_py_DnssrvQuery_args_in(PyObject *args, PyObject *kwargs, struct DnssrvQuery *r)
14149 {
14150         PyObject *py_pwszServerName;
14151         PyObject *py_pszZone;
14152         PyObject *py_pszOperation;
14153         const char *kwnames[] = {
14154                 "pwszServerName", "pszZone", "pszOperation", NULL
14155         };
14156
14157         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:DnssrvQuery", discard_const_p(char *, kwnames), &py_pwszServerName, &py_pszZone, &py_pszOperation)) {
14158                 return false;
14159         }
14160
14161         if (py_pwszServerName == Py_None) {
14162                 r->in.pwszServerName = NULL;
14163         } else {
14164                 r->in.pwszServerName = NULL;
14165                 if (PyUnicode_Check(py_pwszServerName)) {
14166                         r->in.pwszServerName = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore"));
14167                 } else if (PyString_Check(py_pwszServerName)) {
14168                         r->in.pwszServerName = PyString_AS_STRING(py_pwszServerName);
14169                 } else {
14170                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
14171                         return false;
14172                 }
14173         }
14174         if (py_pszZone == Py_None) {
14175                 r->in.pszZone = NULL;
14176         } else {
14177                 r->in.pszZone = NULL;
14178                 if (PyUnicode_Check(py_pszZone)) {
14179                         r->in.pszZone = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore"));
14180                 } else if (PyString_Check(py_pszZone)) {
14181                         r->in.pszZone = PyString_AS_STRING(py_pszZone);
14182                 } else {
14183                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
14184                         return false;
14185                 }
14186         }
14187         if (py_pszOperation == Py_None) {
14188                 r->in.pszOperation = NULL;
14189         } else {
14190                 r->in.pszOperation = NULL;
14191                 if (PyUnicode_Check(py_pszOperation)) {
14192                         r->in.pszOperation = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszOperation, "utf-8", "ignore"));
14193                 } else if (PyString_Check(py_pszOperation)) {
14194                         r->in.pszOperation = PyString_AS_STRING(py_pszOperation);
14195                 } else {
14196                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszOperation)->tp_name);
14197                         return false;
14198                 }
14199         }
14200         return true;
14201 }
14202
14203 static PyObject *unpack_py_DnssrvQuery_args_out(struct DnssrvQuery *r)
14204 {
14205         PyObject *result;
14206         PyObject *py_pdwTypeId;
14207         PyObject *py_ppData;
14208         result = PyTuple_New(2);
14209         py_pdwTypeId = PyInt_FromLong(*r->out.pdwTypeId);
14210         PyTuple_SetItem(result, 0, py_pdwTypeId);
14211         py_ppData = py_import_DNSSRV_RPC_UNION(r->out.ppData, *r->out.pdwTypeId, r->out.ppData);
14212         if (py_ppData == NULL) {
14213                 return NULL;
14214         }
14215         PyTuple_SetItem(result, 1, py_ppData);
14216         if (!W_ERROR_IS_OK(r->out.result)) {
14217                 PyErr_SetWERROR(r->out.result);
14218                 return NULL;
14219         }
14220
14221         return result;
14222 }
14223
14224 static bool pack_py_DnssrvComplexOperation_args_in(PyObject *args, PyObject *kwargs, struct DnssrvComplexOperation *r)
14225 {
14226         PyObject *py_pwszServerName;
14227         PyObject *py_pszZone;
14228         PyObject *py_pszOperation;
14229         PyObject *py_dwTypeIn;
14230         PyObject *py_pDataIn;
14231         const char *kwnames[] = {
14232                 "pwszServerName", "pszZone", "pszOperation", "dwTypeIn", "pDataIn", NULL
14233         };
14234
14235         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:DnssrvComplexOperation", discard_const_p(char *, kwnames), &py_pwszServerName, &py_pszZone, &py_pszOperation, &py_dwTypeIn, &py_pDataIn)) {
14236                 return false;
14237         }
14238
14239         if (py_pwszServerName == Py_None) {
14240                 r->in.pwszServerName = NULL;
14241         } else {
14242                 r->in.pwszServerName = NULL;
14243                 if (PyUnicode_Check(py_pwszServerName)) {
14244                         r->in.pwszServerName = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore"));
14245                 } else if (PyString_Check(py_pwszServerName)) {
14246                         r->in.pwszServerName = PyString_AS_STRING(py_pwszServerName);
14247                 } else {
14248                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
14249                         return false;
14250                 }
14251         }
14252         if (py_pszZone == Py_None) {
14253                 r->in.pszZone = NULL;
14254         } else {
14255                 r->in.pszZone = NULL;
14256                 if (PyUnicode_Check(py_pszZone)) {
14257                         r->in.pszZone = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore"));
14258                 } else if (PyString_Check(py_pszZone)) {
14259                         r->in.pszZone = PyString_AS_STRING(py_pszZone);
14260                 } else {
14261                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
14262                         return false;
14263                 }
14264         }
14265         if (py_pszOperation == Py_None) {
14266                 r->in.pszOperation = NULL;
14267         } else {
14268                 r->in.pszOperation = NULL;
14269                 if (PyUnicode_Check(py_pszOperation)) {
14270                         r->in.pszOperation = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszOperation, "utf-8", "ignore"));
14271                 } else if (PyString_Check(py_pszOperation)) {
14272                         r->in.pszOperation = PyString_AS_STRING(py_pszOperation);
14273                 } else {
14274                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszOperation)->tp_name);
14275                         return false;
14276                 }
14277         }
14278         if (PyLong_Check(py_dwTypeIn)) {
14279                 r->in.dwTypeIn = PyLong_AsLongLong(py_dwTypeIn);
14280         } else if (PyInt_Check(py_dwTypeIn)) {
14281                 r->in.dwTypeIn = PyInt_AsLong(py_dwTypeIn);
14282         } else {
14283                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14284                   PyInt_Type.tp_name, PyLong_Type.tp_name);
14285                 return false;
14286         }
14287         {
14288                 union DNSSRV_RPC_UNION *pDataIn_switch_0;
14289                 pDataIn_switch_0 = py_export_DNSSRV_RPC_UNION(r, r->in.dwTypeIn, py_pDataIn);
14290                 if (pDataIn_switch_0 == NULL) {
14291                         return false;
14292                 }
14293                 r->in.pDataIn = *pDataIn_switch_0;
14294         }
14295         return true;
14296 }
14297
14298 static PyObject *unpack_py_DnssrvComplexOperation_args_out(struct DnssrvComplexOperation *r)
14299 {
14300         PyObject *result;
14301         PyObject *py_pdwTypeOut;
14302         PyObject *py_ppDataOut;
14303         result = PyTuple_New(2);
14304         py_pdwTypeOut = PyInt_FromLong(*r->out.pdwTypeOut);
14305         PyTuple_SetItem(result, 0, py_pdwTypeOut);
14306         py_ppDataOut = py_import_DNSSRV_RPC_UNION(r->out.ppDataOut, *r->out.pdwTypeOut, r->out.ppDataOut);
14307         if (py_ppDataOut == NULL) {
14308                 return NULL;
14309         }
14310         PyTuple_SetItem(result, 1, py_ppDataOut);
14311         if (!W_ERROR_IS_OK(r->out.result)) {
14312                 PyErr_SetWERROR(r->out.result);
14313                 return NULL;
14314         }
14315
14316         return result;
14317 }
14318
14319 static bool pack_py_DnssrvEnumRecords_args_in(PyObject *args, PyObject *kwargs, struct DnssrvEnumRecords *r)
14320 {
14321         PyObject *py_pwszServerName;
14322         PyObject *py_pszZone;
14323         PyObject *py_pszNodeName;
14324         PyObject *py_pszStartChild;
14325         PyObject *py_wRecordType;
14326         PyObject *py_fSelectFlag;
14327         PyObject *py_pszFilterStart;
14328         PyObject *py_pszFilterStop;
14329         const char *kwnames[] = {
14330                 "pwszServerName", "pszZone", "pszNodeName", "pszStartChild", "wRecordType", "fSelectFlag", "pszFilterStart", "pszFilterStop", NULL
14331         };
14332
14333         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)) {
14334                 return false;
14335         }
14336
14337         if (py_pwszServerName == Py_None) {
14338                 r->in.pwszServerName = NULL;
14339         } else {
14340                 r->in.pwszServerName = NULL;
14341                 if (PyUnicode_Check(py_pwszServerName)) {
14342                         r->in.pwszServerName = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore"));
14343                 } else if (PyString_Check(py_pwszServerName)) {
14344                         r->in.pwszServerName = PyString_AS_STRING(py_pwszServerName);
14345                 } else {
14346                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
14347                         return false;
14348                 }
14349         }
14350         if (py_pszZone == Py_None) {
14351                 r->in.pszZone = NULL;
14352         } else {
14353                 r->in.pszZone = NULL;
14354                 if (PyUnicode_Check(py_pszZone)) {
14355                         r->in.pszZone = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore"));
14356                 } else if (PyString_Check(py_pszZone)) {
14357                         r->in.pszZone = PyString_AS_STRING(py_pszZone);
14358                 } else {
14359                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
14360                         return false;
14361                 }
14362         }
14363         if (py_pszNodeName == Py_None) {
14364                 r->in.pszNodeName = NULL;
14365         } else {
14366                 r->in.pszNodeName = NULL;
14367                 if (PyUnicode_Check(py_pszNodeName)) {
14368                         r->in.pszNodeName = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszNodeName, "utf-8", "ignore"));
14369                 } else if (PyString_Check(py_pszNodeName)) {
14370                         r->in.pszNodeName = PyString_AS_STRING(py_pszNodeName);
14371                 } else {
14372                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszNodeName)->tp_name);
14373                         return false;
14374                 }
14375         }
14376         if (py_pszStartChild == Py_None) {
14377                 r->in.pszStartChild = NULL;
14378         } else {
14379                 r->in.pszStartChild = NULL;
14380                 if (PyUnicode_Check(py_pszStartChild)) {
14381                         r->in.pszStartChild = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszStartChild, "utf-8", "ignore"));
14382                 } else if (PyString_Check(py_pszStartChild)) {
14383                         r->in.pszStartChild = PyString_AS_STRING(py_pszStartChild);
14384                 } else {
14385                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszStartChild)->tp_name);
14386                         return false;
14387                 }
14388         }
14389         if (PyLong_Check(py_wRecordType)) {
14390                 r->in.wRecordType = PyLong_AsLongLong(py_wRecordType);
14391         } else if (PyInt_Check(py_wRecordType)) {
14392                 r->in.wRecordType = PyInt_AsLong(py_wRecordType);
14393         } else {
14394                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14395                   PyInt_Type.tp_name, PyLong_Type.tp_name);
14396                 return false;
14397         }
14398         if (PyLong_Check(py_fSelectFlag)) {
14399                 r->in.fSelectFlag = PyLong_AsLongLong(py_fSelectFlag);
14400         } else if (PyInt_Check(py_fSelectFlag)) {
14401                 r->in.fSelectFlag = PyInt_AsLong(py_fSelectFlag);
14402         } else {
14403                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14404                   PyInt_Type.tp_name, PyLong_Type.tp_name);
14405                 return false;
14406         }
14407         if (py_pszFilterStart == Py_None) {
14408                 r->in.pszFilterStart = NULL;
14409         } else {
14410                 r->in.pszFilterStart = NULL;
14411                 if (PyUnicode_Check(py_pszFilterStart)) {
14412                         r->in.pszFilterStart = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszFilterStart, "utf-8", "ignore"));
14413                 } else if (PyString_Check(py_pszFilterStart)) {
14414                         r->in.pszFilterStart = PyString_AS_STRING(py_pszFilterStart);
14415                 } else {
14416                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszFilterStart)->tp_name);
14417                         return false;
14418                 }
14419         }
14420         if (py_pszFilterStop == Py_None) {
14421                 r->in.pszFilterStop = NULL;
14422         } else {
14423                 r->in.pszFilterStop = NULL;
14424                 if (PyUnicode_Check(py_pszFilterStop)) {
14425                         r->in.pszFilterStop = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszFilterStop, "utf-8", "ignore"));
14426                 } else if (PyString_Check(py_pszFilterStop)) {
14427                         r->in.pszFilterStop = PyString_AS_STRING(py_pszFilterStop);
14428                 } else {
14429                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszFilterStop)->tp_name);
14430                         return false;
14431                 }
14432         }
14433         return true;
14434 }
14435
14436 static PyObject *unpack_py_DnssrvEnumRecords_args_out(struct DnssrvEnumRecords *r)
14437 {
14438         PyObject *result;
14439         PyObject *py_pdwBufferLength;
14440         PyObject *py_pBuffer;
14441         result = PyTuple_New(2);
14442         py_pdwBufferLength = PyInt_FromLong(*r->out.pdwBufferLength);
14443         PyTuple_SetItem(result, 0, py_pdwBufferLength);
14444         if (*r->out.pBuffer == NULL) {
14445                 py_pBuffer = Py_None;
14446                 Py_INCREF(py_pBuffer);
14447         } else {
14448                 py_pBuffer = pytalloc_reference_ex(&DNS_RPC_RECORDS_ARRAY_Type, *r->out.pBuffer, *r->out.pBuffer);
14449         }
14450         PyTuple_SetItem(result, 1, py_pBuffer);
14451         if (!W_ERROR_IS_OK(r->out.result)) {
14452                 PyErr_SetWERROR(r->out.result);
14453                 return NULL;
14454         }
14455
14456         return result;
14457 }
14458
14459 static bool pack_py_DnssrvUpdateRecord_args_in(PyObject *args, PyObject *kwargs, struct DnssrvUpdateRecord *r)
14460 {
14461         PyObject *py_pwszServerName;
14462         PyObject *py_pszZone;
14463         PyObject *py_pszNodeName;
14464         PyObject *py_pAddRecord;
14465         PyObject *py_pDeleteRecord;
14466         const char *kwnames[] = {
14467                 "pwszServerName", "pszZone", "pszNodeName", "pAddRecord", "pDeleteRecord", NULL
14468         };
14469
14470         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:DnssrvUpdateRecord", discard_const_p(char *, kwnames), &py_pwszServerName, &py_pszZone, &py_pszNodeName, &py_pAddRecord, &py_pDeleteRecord)) {
14471                 return false;
14472         }
14473
14474         if (py_pwszServerName == Py_None) {
14475                 r->in.pwszServerName = NULL;
14476         } else {
14477                 r->in.pwszServerName = NULL;
14478                 if (PyUnicode_Check(py_pwszServerName)) {
14479                         r->in.pwszServerName = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore"));
14480                 } else if (PyString_Check(py_pwszServerName)) {
14481                         r->in.pwszServerName = PyString_AS_STRING(py_pwszServerName);
14482                 } else {
14483                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
14484                         return false;
14485                 }
14486         }
14487         if (py_pszZone == Py_None) {
14488                 r->in.pszZone = NULL;
14489         } else {
14490                 r->in.pszZone = NULL;
14491                 if (PyUnicode_Check(py_pszZone)) {
14492                         r->in.pszZone = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore"));
14493                 } else if (PyString_Check(py_pszZone)) {
14494                         r->in.pszZone = PyString_AS_STRING(py_pszZone);
14495                 } else {
14496                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
14497                         return false;
14498                 }
14499         }
14500         if (py_pszNodeName == Py_None) {
14501                 r->in.pszNodeName = NULL;
14502         } else {
14503                 r->in.pszNodeName = NULL;
14504                 if (PyUnicode_Check(py_pszNodeName)) {
14505                         r->in.pszNodeName = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszNodeName, "utf-8", "ignore"));
14506                 } else if (PyString_Check(py_pszNodeName)) {
14507                         r->in.pszNodeName = PyString_AS_STRING(py_pszNodeName);
14508                 } else {
14509                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszNodeName)->tp_name);
14510                         return false;
14511                 }
14512         }
14513         if (py_pAddRecord == Py_None) {
14514                 r->in.pAddRecord = NULL;
14515         } else {
14516                 r->in.pAddRecord = NULL;
14517                 PY_CHECK_TYPE(&DNS_RPC_RECORD_BUF_Type, py_pAddRecord, return false;);
14518                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_pAddRecord)) == NULL) {
14519                         PyErr_NoMemory();
14520                         return false;
14521                 }
14522                 r->in.pAddRecord = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(py_pAddRecord);
14523         }
14524         if (py_pDeleteRecord == Py_None) {
14525                 r->in.pDeleteRecord = NULL;
14526         } else {
14527                 r->in.pDeleteRecord = NULL;
14528                 PY_CHECK_TYPE(&DNS_RPC_RECORD_BUF_Type, py_pDeleteRecord, return false;);
14529                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_pDeleteRecord)) == NULL) {
14530                         PyErr_NoMemory();
14531                         return false;
14532                 }
14533                 r->in.pDeleteRecord = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(py_pDeleteRecord);
14534         }
14535         return true;
14536 }
14537
14538 static PyObject *unpack_py_DnssrvUpdateRecord_args_out(struct DnssrvUpdateRecord *r)
14539 {
14540         PyObject *result;
14541         result = Py_None;
14542         Py_INCREF(result);
14543         if (!W_ERROR_IS_OK(r->out.result)) {
14544                 PyErr_SetWERROR(r->out.result);
14545                 return NULL;
14546         }
14547
14548         return result;
14549 }
14550
14551 static bool pack_py_DnssrvOperation2_args_in(PyObject *args, PyObject *kwargs, struct DnssrvOperation2 *r)
14552 {
14553         PyObject *py_dwClientVersion;
14554         PyObject *py_dwSettingFlags;
14555         PyObject *py_pwszServerName;
14556         PyObject *py_pszZone;
14557         PyObject *py_dwContext;
14558         PyObject *py_pszOperation;
14559         PyObject *py_dwTypeId;
14560         PyObject *py_pData;
14561         const char *kwnames[] = {
14562                 "dwClientVersion", "dwSettingFlags", "pwszServerName", "pszZone", "dwContext", "pszOperation", "dwTypeId", "pData", NULL
14563         };
14564
14565         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)) {
14566                 return false;
14567         }
14568
14569         if (PyLong_Check(py_dwClientVersion)) {
14570                 r->in.dwClientVersion = PyLong_AsLongLong(py_dwClientVersion);
14571         } else if (PyInt_Check(py_dwClientVersion)) {
14572                 r->in.dwClientVersion = PyInt_AsLong(py_dwClientVersion);
14573         } else {
14574                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14575                   PyInt_Type.tp_name, PyLong_Type.tp_name);
14576                 return false;
14577         }
14578         PY_CHECK_TYPE(&PyInt_Type, py_dwSettingFlags, return false;);
14579         r->in.dwSettingFlags = PyInt_AsLong(py_dwSettingFlags);
14580         if (py_pwszServerName == Py_None) {
14581                 r->in.pwszServerName = NULL;
14582         } else {
14583                 r->in.pwszServerName = NULL;
14584                 if (PyUnicode_Check(py_pwszServerName)) {
14585                         r->in.pwszServerName = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore"));
14586                 } else if (PyString_Check(py_pwszServerName)) {
14587                         r->in.pwszServerName = PyString_AS_STRING(py_pwszServerName);
14588                 } else {
14589                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
14590                         return false;
14591                 }
14592         }
14593         if (py_pszZone == Py_None) {
14594                 r->in.pszZone = NULL;
14595         } else {
14596                 r->in.pszZone = NULL;
14597                 if (PyUnicode_Check(py_pszZone)) {
14598                         r->in.pszZone = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore"));
14599                 } else if (PyString_Check(py_pszZone)) {
14600                         r->in.pszZone = PyString_AS_STRING(py_pszZone);
14601                 } else {
14602                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
14603                         return false;
14604                 }
14605         }
14606         PY_CHECK_TYPE(&PyInt_Type, py_dwContext, return false;);
14607         r->in.dwContext = PyInt_AsLong(py_dwContext);
14608         if (py_pszOperation == Py_None) {
14609                 r->in.pszOperation = NULL;
14610         } else {
14611                 r->in.pszOperation = NULL;
14612                 if (PyUnicode_Check(py_pszOperation)) {
14613                         r->in.pszOperation = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszOperation, "utf-8", "ignore"));
14614                 } else if (PyString_Check(py_pszOperation)) {
14615                         r->in.pszOperation = PyString_AS_STRING(py_pszOperation);
14616                 } else {
14617                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszOperation)->tp_name);
14618                         return false;
14619                 }
14620         }
14621         if (PyLong_Check(py_dwTypeId)) {
14622                 r->in.dwTypeId = PyLong_AsLongLong(py_dwTypeId);
14623         } else if (PyInt_Check(py_dwTypeId)) {
14624                 r->in.dwTypeId = PyInt_AsLong(py_dwTypeId);
14625         } else {
14626                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14627                   PyInt_Type.tp_name, PyLong_Type.tp_name);
14628                 return false;
14629         }
14630         {
14631                 union DNSSRV_RPC_UNION *pData_switch_0;
14632                 pData_switch_0 = py_export_DNSSRV_RPC_UNION(r, r->in.dwTypeId, py_pData);
14633                 if (pData_switch_0 == NULL) {
14634                         return false;
14635                 }
14636                 r->in.pData = *pData_switch_0;
14637         }
14638         return true;
14639 }
14640
14641 static PyObject *unpack_py_DnssrvOperation2_args_out(struct DnssrvOperation2 *r)
14642 {
14643         PyObject *result;
14644         result = Py_None;
14645         Py_INCREF(result);
14646         if (!W_ERROR_IS_OK(r->out.result)) {
14647                 PyErr_SetWERROR(r->out.result);
14648                 return NULL;
14649         }
14650
14651         return result;
14652 }
14653
14654 static bool pack_py_DnssrvQuery2_args_in(PyObject *args, PyObject *kwargs, struct DnssrvQuery2 *r)
14655 {
14656         PyObject *py_dwClientVersion;
14657         PyObject *py_dwSettingFlags;
14658         PyObject *py_pwszServerName;
14659         PyObject *py_pszZone;
14660         PyObject *py_pszOperation;
14661         const char *kwnames[] = {
14662                 "dwClientVersion", "dwSettingFlags", "pwszServerName", "pszZone", "pszOperation", NULL
14663         };
14664
14665         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:DnssrvQuery2", discard_const_p(char *, kwnames), &py_dwClientVersion, &py_dwSettingFlags, &py_pwszServerName, &py_pszZone, &py_pszOperation)) {
14666                 return false;
14667         }
14668
14669         if (PyLong_Check(py_dwClientVersion)) {
14670                 r->in.dwClientVersion = PyLong_AsLongLong(py_dwClientVersion);
14671         } else if (PyInt_Check(py_dwClientVersion)) {
14672                 r->in.dwClientVersion = PyInt_AsLong(py_dwClientVersion);
14673         } else {
14674                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14675                   PyInt_Type.tp_name, PyLong_Type.tp_name);
14676                 return false;
14677         }
14678         PY_CHECK_TYPE(&PyInt_Type, py_dwSettingFlags, return false;);
14679         r->in.dwSettingFlags = PyInt_AsLong(py_dwSettingFlags);
14680         if (py_pwszServerName == Py_None) {
14681                 r->in.pwszServerName = NULL;
14682         } else {
14683                 r->in.pwszServerName = NULL;
14684                 if (PyUnicode_Check(py_pwszServerName)) {
14685                         r->in.pwszServerName = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore"));
14686                 } else if (PyString_Check(py_pwszServerName)) {
14687                         r->in.pwszServerName = PyString_AS_STRING(py_pwszServerName);
14688                 } else {
14689                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
14690                         return false;
14691                 }
14692         }
14693         if (py_pszZone == Py_None) {
14694                 r->in.pszZone = NULL;
14695         } else {
14696                 r->in.pszZone = NULL;
14697                 if (PyUnicode_Check(py_pszZone)) {
14698                         r->in.pszZone = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore"));
14699                 } else if (PyString_Check(py_pszZone)) {
14700                         r->in.pszZone = PyString_AS_STRING(py_pszZone);
14701                 } else {
14702                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
14703                         return false;
14704                 }
14705         }
14706         if (py_pszOperation == Py_None) {
14707                 r->in.pszOperation = NULL;
14708         } else {
14709                 r->in.pszOperation = NULL;
14710                 if (PyUnicode_Check(py_pszOperation)) {
14711                         r->in.pszOperation = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszOperation, "utf-8", "ignore"));
14712                 } else if (PyString_Check(py_pszOperation)) {
14713                         r->in.pszOperation = PyString_AS_STRING(py_pszOperation);
14714                 } else {
14715                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszOperation)->tp_name);
14716                         return false;
14717                 }
14718         }
14719         return true;
14720 }
14721
14722 static PyObject *unpack_py_DnssrvQuery2_args_out(struct DnssrvQuery2 *r)
14723 {
14724         PyObject *result;
14725         PyObject *py_pdwTypeId;
14726         PyObject *py_ppData;
14727         result = PyTuple_New(2);
14728         py_pdwTypeId = PyInt_FromLong(*r->out.pdwTypeId);
14729         PyTuple_SetItem(result, 0, py_pdwTypeId);
14730         py_ppData = py_import_DNSSRV_RPC_UNION(r->out.ppData, *r->out.pdwTypeId, r->out.ppData);
14731         if (py_ppData == NULL) {
14732                 return NULL;
14733         }
14734         PyTuple_SetItem(result, 1, py_ppData);
14735         if (!W_ERROR_IS_OK(r->out.result)) {
14736                 PyErr_SetWERROR(r->out.result);
14737                 return NULL;
14738         }
14739
14740         return result;
14741 }
14742
14743 static bool pack_py_DnssrvComplexOperation2_args_in(PyObject *args, PyObject *kwargs, struct DnssrvComplexOperation2 *r)
14744 {
14745         PyObject *py_dwClientVersion;
14746         PyObject *py_dwSettingFlags;
14747         PyObject *py_pwszServerName;
14748         PyObject *py_pszZone;
14749         PyObject *py_pszOperation;
14750         PyObject *py_dwTypeIn;
14751         PyObject *py_pDataIn;
14752         const char *kwnames[] = {
14753                 "dwClientVersion", "dwSettingFlags", "pwszServerName", "pszZone", "pszOperation", "dwTypeIn", "pDataIn", NULL
14754         };
14755
14756         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)) {
14757                 return false;
14758         }
14759
14760         if (PyLong_Check(py_dwClientVersion)) {
14761                 r->in.dwClientVersion = PyLong_AsLongLong(py_dwClientVersion);
14762         } else if (PyInt_Check(py_dwClientVersion)) {
14763                 r->in.dwClientVersion = PyInt_AsLong(py_dwClientVersion);
14764         } else {
14765                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14766                   PyInt_Type.tp_name, PyLong_Type.tp_name);
14767                 return false;
14768         }
14769         PY_CHECK_TYPE(&PyInt_Type, py_dwSettingFlags, return false;);
14770         r->in.dwSettingFlags = PyInt_AsLong(py_dwSettingFlags);
14771         if (py_pwszServerName == Py_None) {
14772                 r->in.pwszServerName = NULL;
14773         } else {
14774                 r->in.pwszServerName = NULL;
14775                 if (PyUnicode_Check(py_pwszServerName)) {
14776                         r->in.pwszServerName = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore"));
14777                 } else if (PyString_Check(py_pwszServerName)) {
14778                         r->in.pwszServerName = PyString_AS_STRING(py_pwszServerName);
14779                 } else {
14780                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
14781                         return false;
14782                 }
14783         }
14784         if (py_pszZone == Py_None) {
14785                 r->in.pszZone = NULL;
14786         } else {
14787                 r->in.pszZone = NULL;
14788                 if (PyUnicode_Check(py_pszZone)) {
14789                         r->in.pszZone = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore"));
14790                 } else if (PyString_Check(py_pszZone)) {
14791                         r->in.pszZone = PyString_AS_STRING(py_pszZone);
14792                 } else {
14793                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
14794                         return false;
14795                 }
14796         }
14797         if (py_pszOperation == Py_None) {
14798                 r->in.pszOperation = NULL;
14799         } else {
14800                 r->in.pszOperation = NULL;
14801                 if (PyUnicode_Check(py_pszOperation)) {
14802                         r->in.pszOperation = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszOperation, "utf-8", "ignore"));
14803                 } else if (PyString_Check(py_pszOperation)) {
14804                         r->in.pszOperation = PyString_AS_STRING(py_pszOperation);
14805                 } else {
14806                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszOperation)->tp_name);
14807                         return false;
14808                 }
14809         }
14810         if (PyLong_Check(py_dwTypeIn)) {
14811                 r->in.dwTypeIn = PyLong_AsLongLong(py_dwTypeIn);
14812         } else if (PyInt_Check(py_dwTypeIn)) {
14813                 r->in.dwTypeIn = PyInt_AsLong(py_dwTypeIn);
14814         } else {
14815                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14816                   PyInt_Type.tp_name, PyLong_Type.tp_name);
14817                 return false;
14818         }
14819         {
14820                 union DNSSRV_RPC_UNION *pDataIn_switch_0;
14821                 pDataIn_switch_0 = py_export_DNSSRV_RPC_UNION(r, r->in.dwTypeIn, py_pDataIn);
14822                 if (pDataIn_switch_0 == NULL) {
14823                         return false;
14824                 }
14825                 r->in.pDataIn = *pDataIn_switch_0;
14826         }
14827         return true;
14828 }
14829
14830 static PyObject *unpack_py_DnssrvComplexOperation2_args_out(struct DnssrvComplexOperation2 *r)
14831 {
14832         PyObject *result;
14833         PyObject *py_pdwTypeOut;
14834         PyObject *py_ppDataOut;
14835         result = PyTuple_New(2);
14836         py_pdwTypeOut = PyInt_FromLong(*r->out.pdwTypeOut);
14837         PyTuple_SetItem(result, 0, py_pdwTypeOut);
14838         py_ppDataOut = py_import_DNSSRV_RPC_UNION(r->out.ppDataOut, *r->out.pdwTypeOut, r->out.ppDataOut);
14839         if (py_ppDataOut == NULL) {
14840                 return NULL;
14841         }
14842         PyTuple_SetItem(result, 1, py_ppDataOut);
14843         if (!W_ERROR_IS_OK(r->out.result)) {
14844                 PyErr_SetWERROR(r->out.result);
14845                 return NULL;
14846         }
14847
14848         return result;
14849 }
14850
14851 static bool pack_py_DnssrvEnumRecords2_args_in(PyObject *args, PyObject *kwargs, struct DnssrvEnumRecords2 *r)
14852 {
14853         PyObject *py_dwClientVersion;
14854         PyObject *py_dwSettingFlags;
14855         PyObject *py_pwszServerName;
14856         PyObject *py_pszZone;
14857         PyObject *py_pszNodeName;
14858         PyObject *py_pszStartChild;
14859         PyObject *py_wRecordType;
14860         PyObject *py_fSelectFlag;
14861         PyObject *py_pszFilterStart;
14862         PyObject *py_pszFilterStop;
14863         const char *kwnames[] = {
14864                 "dwClientVersion", "dwSettingFlags", "pwszServerName", "pszZone", "pszNodeName", "pszStartChild", "wRecordType", "fSelectFlag", "pszFilterStart", "pszFilterStop", NULL
14865         };
14866
14867         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)) {
14868                 return false;
14869         }
14870
14871         if (PyLong_Check(py_dwClientVersion)) {
14872                 r->in.dwClientVersion = PyLong_AsLongLong(py_dwClientVersion);
14873         } else if (PyInt_Check(py_dwClientVersion)) {
14874                 r->in.dwClientVersion = PyInt_AsLong(py_dwClientVersion);
14875         } else {
14876                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14877                   PyInt_Type.tp_name, PyLong_Type.tp_name);
14878                 return false;
14879         }
14880         PY_CHECK_TYPE(&PyInt_Type, py_dwSettingFlags, return false;);
14881         r->in.dwSettingFlags = PyInt_AsLong(py_dwSettingFlags);
14882         if (py_pwszServerName == Py_None) {
14883                 r->in.pwszServerName = NULL;
14884         } else {
14885                 r->in.pwszServerName = NULL;
14886                 if (PyUnicode_Check(py_pwszServerName)) {
14887                         r->in.pwszServerName = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore"));
14888                 } else if (PyString_Check(py_pwszServerName)) {
14889                         r->in.pwszServerName = PyString_AS_STRING(py_pwszServerName);
14890                 } else {
14891                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
14892                         return false;
14893                 }
14894         }
14895         if (py_pszZone == Py_None) {
14896                 r->in.pszZone = NULL;
14897         } else {
14898                 r->in.pszZone = NULL;
14899                 if (PyUnicode_Check(py_pszZone)) {
14900                         r->in.pszZone = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore"));
14901                 } else if (PyString_Check(py_pszZone)) {
14902                         r->in.pszZone = PyString_AS_STRING(py_pszZone);
14903                 } else {
14904                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
14905                         return false;
14906                 }
14907         }
14908         if (py_pszNodeName == Py_None) {
14909                 r->in.pszNodeName = NULL;
14910         } else {
14911                 r->in.pszNodeName = NULL;
14912                 if (PyUnicode_Check(py_pszNodeName)) {
14913                         r->in.pszNodeName = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszNodeName, "utf-8", "ignore"));
14914                 } else if (PyString_Check(py_pszNodeName)) {
14915                         r->in.pszNodeName = PyString_AS_STRING(py_pszNodeName);
14916                 } else {
14917                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszNodeName)->tp_name);
14918                         return false;
14919                 }
14920         }
14921         if (py_pszStartChild == Py_None) {
14922                 r->in.pszStartChild = NULL;
14923         } else {
14924                 r->in.pszStartChild = NULL;
14925                 if (PyUnicode_Check(py_pszStartChild)) {
14926                         r->in.pszStartChild = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszStartChild, "utf-8", "ignore"));
14927                 } else if (PyString_Check(py_pszStartChild)) {
14928                         r->in.pszStartChild = PyString_AS_STRING(py_pszStartChild);
14929                 } else {
14930                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszStartChild)->tp_name);
14931                         return false;
14932                 }
14933         }
14934         if (PyLong_Check(py_wRecordType)) {
14935                 r->in.wRecordType = PyLong_AsLongLong(py_wRecordType);
14936         } else if (PyInt_Check(py_wRecordType)) {
14937                 r->in.wRecordType = PyInt_AsLong(py_wRecordType);
14938         } else {
14939                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14940                   PyInt_Type.tp_name, PyLong_Type.tp_name);
14941                 return false;
14942         }
14943         if (PyLong_Check(py_fSelectFlag)) {
14944                 r->in.fSelectFlag = PyLong_AsLongLong(py_fSelectFlag);
14945         } else if (PyInt_Check(py_fSelectFlag)) {
14946                 r->in.fSelectFlag = PyInt_AsLong(py_fSelectFlag);
14947         } else {
14948                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
14949                   PyInt_Type.tp_name, PyLong_Type.tp_name);
14950                 return false;
14951         }
14952         if (py_pszFilterStart == Py_None) {
14953                 r->in.pszFilterStart = NULL;
14954         } else {
14955                 r->in.pszFilterStart = NULL;
14956                 if (PyUnicode_Check(py_pszFilterStart)) {
14957                         r->in.pszFilterStart = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszFilterStart, "utf-8", "ignore"));
14958                 } else if (PyString_Check(py_pszFilterStart)) {
14959                         r->in.pszFilterStart = PyString_AS_STRING(py_pszFilterStart);
14960                 } else {
14961                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszFilterStart)->tp_name);
14962                         return false;
14963                 }
14964         }
14965         if (py_pszFilterStop == Py_None) {
14966                 r->in.pszFilterStop = NULL;
14967         } else {
14968                 r->in.pszFilterStop = NULL;
14969                 if (PyUnicode_Check(py_pszFilterStop)) {
14970                         r->in.pszFilterStop = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszFilterStop, "utf-8", "ignore"));
14971                 } else if (PyString_Check(py_pszFilterStop)) {
14972                         r->in.pszFilterStop = PyString_AS_STRING(py_pszFilterStop);
14973                 } else {
14974                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszFilterStop)->tp_name);
14975                         return false;
14976                 }
14977         }
14978         return true;
14979 }
14980
14981 static PyObject *unpack_py_DnssrvEnumRecords2_args_out(struct DnssrvEnumRecords2 *r)
14982 {
14983         PyObject *result;
14984         PyObject *py_pdwBufferLength;
14985         PyObject *py_pBuffer;
14986         result = PyTuple_New(2);
14987         py_pdwBufferLength = PyInt_FromLong(*r->out.pdwBufferLength);
14988         PyTuple_SetItem(result, 0, py_pdwBufferLength);
14989         if (*r->out.pBuffer == NULL) {
14990                 py_pBuffer = Py_None;
14991                 Py_INCREF(py_pBuffer);
14992         } else {
14993                 py_pBuffer = pytalloc_reference_ex(&DNS_RPC_RECORDS_ARRAY_Type, *r->out.pBuffer, *r->out.pBuffer);
14994         }
14995         PyTuple_SetItem(result, 1, py_pBuffer);
14996         if (!W_ERROR_IS_OK(r->out.result)) {
14997                 PyErr_SetWERROR(r->out.result);
14998                 return NULL;
14999         }
15000
15001         return result;
15002 }
15003
15004 static bool pack_py_DnssrvUpdateRecord2_args_in(PyObject *args, PyObject *kwargs, struct DnssrvUpdateRecord2 *r)
15005 {
15006         PyObject *py_dwClientVersion;
15007         PyObject *py_dwSettingFlags;
15008         PyObject *py_pwszServerName;
15009         PyObject *py_pszZone;
15010         PyObject *py_pszNodeName;
15011         PyObject *py_pAddRecord;
15012         PyObject *py_pDeleteRecord;
15013         const char *kwnames[] = {
15014                 "dwClientVersion", "dwSettingFlags", "pwszServerName", "pszZone", "pszNodeName", "pAddRecord", "pDeleteRecord", NULL
15015         };
15016
15017         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)) {
15018                 return false;
15019         }
15020
15021         if (PyLong_Check(py_dwClientVersion)) {
15022                 r->in.dwClientVersion = PyLong_AsLongLong(py_dwClientVersion);
15023         } else if (PyInt_Check(py_dwClientVersion)) {
15024                 r->in.dwClientVersion = PyInt_AsLong(py_dwClientVersion);
15025         } else {
15026                 PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
15027                   PyInt_Type.tp_name, PyLong_Type.tp_name);
15028                 return false;
15029         }
15030         PY_CHECK_TYPE(&PyInt_Type, py_dwSettingFlags, return false;);
15031         r->in.dwSettingFlags = PyInt_AsLong(py_dwSettingFlags);
15032         if (py_pwszServerName == Py_None) {
15033                 r->in.pwszServerName = NULL;
15034         } else {
15035                 r->in.pwszServerName = NULL;
15036                 if (PyUnicode_Check(py_pwszServerName)) {
15037                         r->in.pwszServerName = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore"));
15038                 } else if (PyString_Check(py_pwszServerName)) {
15039                         r->in.pwszServerName = PyString_AS_STRING(py_pwszServerName);
15040                 } else {
15041                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
15042                         return false;
15043                 }
15044         }
15045         if (py_pszZone == Py_None) {
15046                 r->in.pszZone = NULL;
15047         } else {
15048                 r->in.pszZone = NULL;
15049                 if (PyUnicode_Check(py_pszZone)) {
15050                         r->in.pszZone = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore"));
15051                 } else if (PyString_Check(py_pszZone)) {
15052                         r->in.pszZone = PyString_AS_STRING(py_pszZone);
15053                 } else {
15054                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
15055                         return false;
15056                 }
15057         }
15058         r->in.pszNodeName = talloc_ptrtype(r, r->in.pszNodeName);
15059         if (PyUnicode_Check(py_pszNodeName)) {
15060                 r->in.pszNodeName = PyString_AS_STRING(PyUnicode_AsEncodedString(py_pszNodeName, "utf-8", "ignore"));
15061         } else if (PyString_Check(py_pszNodeName)) {
15062                 r->in.pszNodeName = PyString_AS_STRING(py_pszNodeName);
15063         } else {
15064                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszNodeName)->tp_name);
15065                 return false;
15066         }
15067         if (py_pAddRecord == Py_None) {
15068                 r->in.pAddRecord = NULL;
15069         } else {
15070                 r->in.pAddRecord = NULL;
15071                 PY_CHECK_TYPE(&DNS_RPC_RECORD_BUF_Type, py_pAddRecord, return false;);
15072                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_pAddRecord)) == NULL) {
15073                         PyErr_NoMemory();
15074                         return false;
15075                 }
15076                 r->in.pAddRecord = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(py_pAddRecord);
15077         }
15078         if (py_pDeleteRecord == Py_None) {
15079                 r->in.pDeleteRecord = NULL;
15080         } else {
15081                 r->in.pDeleteRecord = NULL;
15082                 PY_CHECK_TYPE(&DNS_RPC_RECORD_BUF_Type, py_pDeleteRecord, return false;);
15083                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_pDeleteRecord)) == NULL) {
15084                         PyErr_NoMemory();
15085                         return false;
15086                 }
15087                 r->in.pDeleteRecord = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(py_pDeleteRecord);
15088         }
15089         return true;
15090 }
15091
15092 static PyObject *unpack_py_DnssrvUpdateRecord2_args_out(struct DnssrvUpdateRecord2 *r)
15093 {
15094         PyObject *result;
15095         result = Py_None;
15096         Py_INCREF(result);
15097         if (!W_ERROR_IS_OK(r->out.result)) {
15098                 PyErr_SetWERROR(r->out.result);
15099                 return NULL;
15100         }
15101
15102         return result;
15103 }
15104
15105 const struct PyNdrRpcMethodDef py_ndr_dnsserver_methods[] = {
15106         { "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 },
15107         { "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 },
15108         { "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 },
15109         { "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 },
15110         { "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 },
15111         { "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 },
15112         { "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 },
15113         { "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 },
15114         { "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 },
15115         { "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 },
15116         { NULL }
15117 };
15118
15119 static PyObject *interface_dnsserver_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
15120 {
15121         return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_dnsserver);
15122 }
15123
15124 #define PY_DOC_DNSSERVER "DNS Management Server"
15125 static PyTypeObject dnsserver_InterfaceType = {
15126         PyObject_HEAD_INIT(NULL) 0,
15127         .tp_name = "dnsserver.dnsserver",
15128         .tp_basicsize = sizeof(dcerpc_InterfaceObject),
15129         .tp_doc = "dnsserver(binding, lp_ctx=None, credentials=None) -> connection\n"
15130 "\n"
15131 "binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
15132 "lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
15133 "credentials should be a credentials.Credentials object.\n\n"PY_DOC_DNSSERVER,
15134         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
15135         .tp_new = interface_dnsserver_new,
15136 };
15137
15138 static PyMethodDef dnsserver_methods[] = {
15139         { NULL, NULL, 0, NULL }
15140 };
15141
15142 void initdnsserver(void)
15143 {
15144         PyObject *m;
15145         PyObject *dep_talloc;
15146         PyObject *dep_samba_dcerpc_dnsp;
15147         PyObject *dep_samba_dcerpc_misc;
15148         PyObject *dep_samba_dcerpc_base;
15149
15150         dep_talloc = PyImport_ImportModule("talloc");
15151         if (dep_talloc == NULL)
15152                 return;
15153
15154         dep_samba_dcerpc_dnsp = PyImport_ImportModule("samba.dcerpc.dnsp");
15155         if (dep_samba_dcerpc_dnsp == NULL)
15156                 return;
15157
15158         dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
15159         if (dep_samba_dcerpc_misc == NULL)
15160                 return;
15161
15162         dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
15163         if (dep_samba_dcerpc_base == NULL)
15164                 return;
15165
15166         Object_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "Object");
15167         if (Object_Type == NULL)
15168                 return;
15169
15170         ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
15171         if (ClientConnection_Type == NULL)
15172                 return;
15173
15174         DNS_RPC_BUFFER_Type.tp_base = Object_Type;
15175
15176         DNS_RPC_UTF8_STRING_LIST_Type.tp_base = Object_Type;
15177
15178         DNS_RPC_NAME_AND_PARAM_Type.tp_base = Object_Type;
15179
15180         DNS_RPC_NAME_Type.tp_base = Object_Type;
15181
15182         DNS_RPC_NODE_Type.tp_base = Object_Type;
15183
15184         DNS_RPC_RECORD_SOA_Type.tp_base = Object_Type;
15185
15186         DNS_RPC_RECORD_NAME_PREFERENCE_Type.tp_base = Object_Type;
15187
15188         DNS_RPC_RECORD_STRING_Type.tp_base = Object_Type;
15189
15190         DNS_RPC_RECORD_SRV_Type.tp_base = Object_Type;
15191
15192         DNS_RPC_RECORD_Type.tp_base = Object_Type;
15193
15194         DNS_RPC_RECORD_BUF_Type.tp_base = Object_Type;
15195
15196         IP4_ARRAY_Type.tp_base = Object_Type;
15197
15198         DNS_ADDR_Type.tp_base = Object_Type;
15199
15200         DNS_ADDR_ARRAY_Type.tp_base = Object_Type;
15201
15202         DNS_RPC_IP_VALIDATE_Type.tp_base = Object_Type;
15203
15204         DNS_RPC_SERVER_INFO_W2K_Type.tp_base = Object_Type;
15205
15206         DNS_EXTENSION_Type.tp_base = Object_Type;
15207
15208         DNS_RPC_SERVER_INFO_DOTNET_Type.tp_base = Object_Type;
15209
15210         DNS_RPC_SERVER_INFO_LONGHORN_Type.tp_base = Object_Type;
15211
15212         DNS_RPC_DP_REPLICA_Type.tp_base = Object_Type;
15213
15214         DNS_RPC_DP_INFO_Type.tp_base = Object_Type;
15215
15216         DNS_RPC_DP_ENUM_Type.tp_base = Object_Type;
15217
15218         DNS_RPC_DP_LIST_Type.tp_base = Object_Type;
15219
15220         DNS_RPC_ENLIST_DP_Type.tp_base = Object_Type;
15221
15222         DNS_RPC_ZONE_CHANGE_DP_Type.tp_base = Object_Type;
15223
15224         DNS_RPC_ZONE_W2K_Type.tp_base = Object_Type;
15225
15226         DNS_RPC_ZONE_DOTNET_Type.tp_base = Object_Type;
15227
15228         DNS_RPC_ZONE_LIST_W2K_Type.tp_base = Object_Type;
15229
15230         DNS_RPC_ZONE_LIST_DOTNET_Type.tp_base = Object_Type;
15231
15232         DNS_RPC_ZONE_INFO_W2K_Type.tp_base = Object_Type;
15233
15234         DNS_RPC_ZONE_INFO_DOTNET_Type.tp_base = Object_Type;
15235
15236         DNS_RPC_ZONE_INFO_LONGHORN_Type.tp_base = Object_Type;
15237
15238         DNS_RPC_ZONE_SECONDARIES_W2K_Type.tp_base = Object_Type;
15239
15240         DNS_RPC_ZONE_SECONDARIES_DOTNET_Type.tp_base = Object_Type;
15241
15242         DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type.tp_base = Object_Type;
15243
15244         DNS_RPC_ZONE_DATABASE_W2K_Type.tp_base = Object_Type;
15245
15246         DNS_RPC_ZONE_DATABASE_DOTNET_Type.tp_base = Object_Type;
15247
15248         DNS_RPC_ZONE_CREATE_INFO_W2K_Type.tp_base = Object_Type;
15249
15250         DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type.tp_base = Object_Type;
15251
15252         DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type.tp_base = Object_Type;
15253
15254         DNS_RPC_ZONE_EXPORT_INFO_Type.tp_base = Object_Type;
15255
15256         DNS_RPC_ENUM_ZONES_FILTER_Type.tp_base = Object_Type;
15257
15258         DNS_RPC_FORWARDERS_W2K_Type.tp_base = Object_Type;
15259
15260         DNS_RPC_FORWARDERS_DOTNET_Type.tp_base = Object_Type;
15261
15262         DNS_RPC_FORWARDERS_LONGHORN_Type.tp_base = Object_Type;
15263
15264         DNS_RPC_AUTOCONFIGURE_Type.tp_base = Object_Type;
15265
15266         DNSSRV_STAT_HEADER_Type.tp_base = Object_Type;
15267
15268         DNSSRV_STAT_Type.tp_base = Object_Type;
15269
15270         DNS_RPC_RECORDS_Type.tp_base = Object_Type;
15271
15272         DNS_RPC_RECORDS_ARRAY_Type.tp_base = Object_Type;
15273
15274         dnsserver_InterfaceType.tp_base = ClientConnection_Type;
15275
15276         if (PyType_Ready(&DNS_RPC_BUFFER_Type) < 0)
15277                 return;
15278         if (PyType_Ready(&DNS_RPC_UTF8_STRING_LIST_Type) < 0)
15279                 return;
15280         if (PyType_Ready(&DNS_RPC_NAME_AND_PARAM_Type) < 0)
15281                 return;
15282         if (PyType_Ready(&DNS_RPC_NAME_Type) < 0)
15283                 return;
15284         if (PyType_Ready(&DNS_RPC_NODE_Type) < 0)
15285                 return;
15286         if (PyType_Ready(&DNS_RPC_RECORD_SOA_Type) < 0)
15287                 return;
15288         if (PyType_Ready(&DNS_RPC_RECORD_NAME_PREFERENCE_Type) < 0)
15289                 return;
15290         if (PyType_Ready(&DNS_RPC_RECORD_STRING_Type) < 0)
15291                 return;
15292         if (PyType_Ready(&DNS_RPC_RECORD_SRV_Type) < 0)
15293                 return;
15294         if (PyType_Ready(&DNS_RPC_RECORD_Type) < 0)
15295                 return;
15296         if (PyType_Ready(&DNS_RPC_RECORD_BUF_Type) < 0)
15297                 return;
15298         if (PyType_Ready(&IP4_ARRAY_Type) < 0)
15299                 return;
15300         if (PyType_Ready(&DNS_ADDR_Type) < 0)
15301                 return;
15302         if (PyType_Ready(&DNS_ADDR_ARRAY_Type) < 0)
15303                 return;
15304         if (PyType_Ready(&DNS_RPC_IP_VALIDATE_Type) < 0)
15305                 return;
15306         if (PyType_Ready(&DNS_RPC_SERVER_INFO_W2K_Type) < 0)
15307                 return;
15308         if (PyType_Ready(&DNS_EXTENSION_Type) < 0)
15309                 return;
15310         if (PyType_Ready(&DNS_RPC_SERVER_INFO_DOTNET_Type) < 0)
15311                 return;
15312         if (PyType_Ready(&DNS_RPC_SERVER_INFO_LONGHORN_Type) < 0)
15313                 return;
15314         if (PyType_Ready(&DNS_RPC_DP_REPLICA_Type) < 0)
15315                 return;
15316         if (PyType_Ready(&DNS_RPC_DP_INFO_Type) < 0)
15317                 return;
15318         if (PyType_Ready(&DNS_RPC_DP_ENUM_Type) < 0)
15319                 return;
15320         if (PyType_Ready(&DNS_RPC_DP_LIST_Type) < 0)
15321                 return;
15322         if (PyType_Ready(&DNS_RPC_ENLIST_DP_Type) < 0)
15323                 return;
15324         if (PyType_Ready(&DNS_RPC_ZONE_CHANGE_DP_Type) < 0)
15325                 return;
15326         if (PyType_Ready(&DNS_RPC_ZONE_W2K_Type) < 0)
15327                 return;
15328         if (PyType_Ready(&DNS_RPC_ZONE_DOTNET_Type) < 0)
15329                 return;
15330         if (PyType_Ready(&DNS_RPC_ZONE_LIST_W2K_Type) < 0)
15331                 return;
15332         if (PyType_Ready(&DNS_RPC_ZONE_LIST_DOTNET_Type) < 0)
15333                 return;
15334         if (PyType_Ready(&DNS_RPC_ZONE_INFO_W2K_Type) < 0)
15335                 return;
15336         if (PyType_Ready(&DNS_RPC_ZONE_INFO_DOTNET_Type) < 0)
15337                 return;
15338         if (PyType_Ready(&DNS_RPC_ZONE_INFO_LONGHORN_Type) < 0)
15339                 return;
15340         if (PyType_Ready(&DNS_RPC_ZONE_SECONDARIES_W2K_Type) < 0)
15341                 return;
15342         if (PyType_Ready(&DNS_RPC_ZONE_SECONDARIES_DOTNET_Type) < 0)
15343                 return;
15344         if (PyType_Ready(&DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type) < 0)
15345                 return;
15346         if (PyType_Ready(&DNS_RPC_ZONE_DATABASE_W2K_Type) < 0)
15347                 return;
15348         if (PyType_Ready(&DNS_RPC_ZONE_DATABASE_DOTNET_Type) < 0)
15349                 return;
15350         if (PyType_Ready(&DNS_RPC_ZONE_CREATE_INFO_W2K_Type) < 0)
15351                 return;
15352         if (PyType_Ready(&DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type) < 0)
15353                 return;
15354         if (PyType_Ready(&DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type) < 0)
15355                 return;
15356         if (PyType_Ready(&DNS_RPC_ZONE_EXPORT_INFO_Type) < 0)
15357                 return;
15358         if (PyType_Ready(&DNS_RPC_ENUM_ZONES_FILTER_Type) < 0)
15359                 return;
15360         if (PyType_Ready(&DNS_RPC_FORWARDERS_W2K_Type) < 0)
15361                 return;
15362         if (PyType_Ready(&DNS_RPC_FORWARDERS_DOTNET_Type) < 0)
15363                 return;
15364         if (PyType_Ready(&DNS_RPC_FORWARDERS_LONGHORN_Type) < 0)
15365                 return;
15366         if (PyType_Ready(&DNS_RPC_AUTOCONFIGURE_Type) < 0)
15367                 return;
15368         if (PyType_Ready(&DNSSRV_STAT_HEADER_Type) < 0)
15369                 return;
15370         if (PyType_Ready(&DNSSRV_STAT_Type) < 0)
15371                 return;
15372         if (PyType_Ready(&DNS_RPC_RECORDS_Type) < 0)
15373                 return;
15374         if (PyType_Ready(&DNS_RPC_RECORDS_ARRAY_Type) < 0)
15375                 return;
15376         if (PyType_Ready(&dnsserver_InterfaceType) < 0)
15377                 return;
15378         if (!PyInterface_AddNdrRpcMethods(&dnsserver_InterfaceType, py_ndr_dnsserver_methods))
15379                 return;
15380
15381 #ifdef PY_DNS_RPC_BUFFER_PATCH
15382         PY_DNS_RPC_BUFFER_PATCH(&DNS_RPC_BUFFER_Type);
15383 #endif
15384 #ifdef PY_DNS_RPC_UTF8_STRING_LIST_PATCH
15385         PY_DNS_RPC_UTF8_STRING_LIST_PATCH(&DNS_RPC_UTF8_STRING_LIST_Type);
15386 #endif
15387 #ifdef PY_DNS_RPC_NAME_AND_PARAM_PATCH
15388         PY_DNS_RPC_NAME_AND_PARAM_PATCH(&DNS_RPC_NAME_AND_PARAM_Type);
15389 #endif
15390 #ifdef PY_DNS_RPC_NAME_PATCH
15391         PY_DNS_RPC_NAME_PATCH(&DNS_RPC_NAME_Type);
15392 #endif
15393 #ifdef PY_DNS_RPC_NODE_PATCH
15394         PY_DNS_RPC_NODE_PATCH(&DNS_RPC_NODE_Type);
15395 #endif
15396 #ifdef PY_DNS_RPC_RECORD_SOA_PATCH
15397         PY_DNS_RPC_RECORD_SOA_PATCH(&DNS_RPC_RECORD_SOA_Type);
15398 #endif
15399 #ifdef PY_DNS_RPC_RECORD_NAME_PREFERENCE_PATCH
15400         PY_DNS_RPC_RECORD_NAME_PREFERENCE_PATCH(&DNS_RPC_RECORD_NAME_PREFERENCE_Type);
15401 #endif
15402 #ifdef PY_DNS_RPC_RECORD_STRING_PATCH
15403         PY_DNS_RPC_RECORD_STRING_PATCH(&DNS_RPC_RECORD_STRING_Type);
15404 #endif
15405 #ifdef PY_DNS_RPC_RECORD_SRV_PATCH
15406         PY_DNS_RPC_RECORD_SRV_PATCH(&DNS_RPC_RECORD_SRV_Type);
15407 #endif
15408 #ifdef PY_DNS_RPC_RECORD_PATCH
15409         PY_DNS_RPC_RECORD_PATCH(&DNS_RPC_RECORD_Type);
15410 #endif
15411 #ifdef PY_DNS_RPC_RECORD_BUF_PATCH
15412         PY_DNS_RPC_RECORD_BUF_PATCH(&DNS_RPC_RECORD_BUF_Type);
15413 #endif
15414 #ifdef PY_IP4_ARRAY_PATCH
15415         PY_IP4_ARRAY_PATCH(&IP4_ARRAY_Type);
15416 #endif
15417 #ifdef PY_DNS_ADDR_PATCH
15418         PY_DNS_ADDR_PATCH(&DNS_ADDR_Type);
15419 #endif
15420 #ifdef PY_DNS_ADDR_ARRAY_PATCH
15421         PY_DNS_ADDR_ARRAY_PATCH(&DNS_ADDR_ARRAY_Type);
15422 #endif
15423 #ifdef PY_DNS_RPC_IP_VALIDATE_PATCH
15424         PY_DNS_RPC_IP_VALIDATE_PATCH(&DNS_RPC_IP_VALIDATE_Type);
15425 #endif
15426 #ifdef PY_DNS_RPC_SERVER_INFO_W2K_PATCH
15427         PY_DNS_RPC_SERVER_INFO_W2K_PATCH(&DNS_RPC_SERVER_INFO_W2K_Type);
15428 #endif
15429 #ifdef PY_DNS_EXTENSION_PATCH
15430         PY_DNS_EXTENSION_PATCH(&DNS_EXTENSION_Type);
15431 #endif
15432 #ifdef PY_DNS_RPC_SERVER_INFO_DOTNET_PATCH
15433         PY_DNS_RPC_SERVER_INFO_DOTNET_PATCH(&DNS_RPC_SERVER_INFO_DOTNET_Type);
15434 #endif
15435 #ifdef PY_DNS_RPC_SERVER_INFO_LONGHORN_PATCH
15436         PY_DNS_RPC_SERVER_INFO_LONGHORN_PATCH(&DNS_RPC_SERVER_INFO_LONGHORN_Type);
15437 #endif
15438 #ifdef PY_DNS_RPC_DP_REPLICA_PATCH
15439         PY_DNS_RPC_DP_REPLICA_PATCH(&DNS_RPC_DP_REPLICA_Type);
15440 #endif
15441 #ifdef PY_DNS_RPC_DP_INFO_PATCH
15442         PY_DNS_RPC_DP_INFO_PATCH(&DNS_RPC_DP_INFO_Type);
15443 #endif
15444 #ifdef PY_DNS_RPC_DP_ENUM_PATCH
15445         PY_DNS_RPC_DP_ENUM_PATCH(&DNS_RPC_DP_ENUM_Type);
15446 #endif
15447 #ifdef PY_DNS_RPC_DP_LIST_PATCH
15448         PY_DNS_RPC_DP_LIST_PATCH(&DNS_RPC_DP_LIST_Type);
15449 #endif
15450 #ifdef PY_DNS_RPC_ENLIST_DP_PATCH
15451         PY_DNS_RPC_ENLIST_DP_PATCH(&DNS_RPC_ENLIST_DP_Type);
15452 #endif
15453 #ifdef PY_DNS_RPC_ZONE_CHANGE_DP_PATCH
15454         PY_DNS_RPC_ZONE_CHANGE_DP_PATCH(&DNS_RPC_ZONE_CHANGE_DP_Type);
15455 #endif
15456 #ifdef PY_DNS_RPC_ZONE_W2K_PATCH
15457         PY_DNS_RPC_ZONE_W2K_PATCH(&DNS_RPC_ZONE_W2K_Type);
15458 #endif
15459 #ifdef PY_DNS_RPC_ZONE_DOTNET_PATCH
15460         PY_DNS_RPC_ZONE_DOTNET_PATCH(&DNS_RPC_ZONE_DOTNET_Type);
15461 #endif
15462 #ifdef PY_DNS_RPC_ZONE_LIST_W2K_PATCH
15463         PY_DNS_RPC_ZONE_LIST_W2K_PATCH(&DNS_RPC_ZONE_LIST_W2K_Type);
15464 #endif
15465 #ifdef PY_DNS_RPC_ZONE_LIST_DOTNET_PATCH
15466         PY_DNS_RPC_ZONE_LIST_DOTNET_PATCH(&DNS_RPC_ZONE_LIST_DOTNET_Type);
15467 #endif
15468 #ifdef PY_DNS_RPC_ZONE_INFO_W2K_PATCH
15469         PY_DNS_RPC_ZONE_INFO_W2K_PATCH(&DNS_RPC_ZONE_INFO_W2K_Type);
15470 #endif
15471 #ifdef PY_DNS_RPC_ZONE_INFO_DOTNET_PATCH
15472         PY_DNS_RPC_ZONE_INFO_DOTNET_PATCH(&DNS_RPC_ZONE_INFO_DOTNET_Type);
15473 #endif
15474 #ifdef PY_DNS_RPC_ZONE_INFO_LONGHORN_PATCH
15475         PY_DNS_RPC_ZONE_INFO_LONGHORN_PATCH(&DNS_RPC_ZONE_INFO_LONGHORN_Type);
15476 #endif
15477 #ifdef PY_DNS_RPC_ZONE_SECONDARIES_W2K_PATCH
15478         PY_DNS_RPC_ZONE_SECONDARIES_W2K_PATCH(&DNS_RPC_ZONE_SECONDARIES_W2K_Type);
15479 #endif
15480 #ifdef PY_DNS_RPC_ZONE_SECONDARIES_DOTNET_PATCH
15481         PY_DNS_RPC_ZONE_SECONDARIES_DOTNET_PATCH(&DNS_RPC_ZONE_SECONDARIES_DOTNET_Type);
15482 #endif
15483 #ifdef PY_DNS_RPC_ZONE_SECONDARIES_LONGHORN_PATCH
15484         PY_DNS_RPC_ZONE_SECONDARIES_LONGHORN_PATCH(&DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type);
15485 #endif
15486 #ifdef PY_DNS_RPC_ZONE_DATABASE_W2K_PATCH
15487         PY_DNS_RPC_ZONE_DATABASE_W2K_PATCH(&DNS_RPC_ZONE_DATABASE_W2K_Type);
15488 #endif
15489 #ifdef PY_DNS_RPC_ZONE_DATABASE_DOTNET_PATCH
15490         PY_DNS_RPC_ZONE_DATABASE_DOTNET_PATCH(&DNS_RPC_ZONE_DATABASE_DOTNET_Type);
15491 #endif
15492 #ifdef PY_DNS_RPC_ZONE_CREATE_INFO_W2K_PATCH
15493         PY_DNS_RPC_ZONE_CREATE_INFO_W2K_PATCH(&DNS_RPC_ZONE_CREATE_INFO_W2K_Type);
15494 #endif
15495 #ifdef PY_DNS_RPC_ZONE_CREATE_INFO_DOTNET_PATCH
15496         PY_DNS_RPC_ZONE_CREATE_INFO_DOTNET_PATCH(&DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type);
15497 #endif
15498 #ifdef PY_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_PATCH
15499         PY_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_PATCH(&DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type);
15500 #endif
15501 #ifdef PY_DNS_RPC_ZONE_EXPORT_INFO_PATCH
15502         PY_DNS_RPC_ZONE_EXPORT_INFO_PATCH(&DNS_RPC_ZONE_EXPORT_INFO_Type);
15503 #endif
15504 #ifdef PY_DNS_RPC_ENUM_ZONES_FILTER_PATCH
15505         PY_DNS_RPC_ENUM_ZONES_FILTER_PATCH(&DNS_RPC_ENUM_ZONES_FILTER_Type);
15506 #endif
15507 #ifdef PY_DNS_RPC_FORWARDERS_W2K_PATCH
15508         PY_DNS_RPC_FORWARDERS_W2K_PATCH(&DNS_RPC_FORWARDERS_W2K_Type);
15509 #endif
15510 #ifdef PY_DNS_RPC_FORWARDERS_DOTNET_PATCH
15511         PY_DNS_RPC_FORWARDERS_DOTNET_PATCH(&DNS_RPC_FORWARDERS_DOTNET_Type);
15512 #endif
15513 #ifdef PY_DNS_RPC_FORWARDERS_LONGHORN_PATCH
15514         PY_DNS_RPC_FORWARDERS_LONGHORN_PATCH(&DNS_RPC_FORWARDERS_LONGHORN_Type);
15515 #endif
15516 #ifdef PY_DNS_RPC_AUTOCONFIGURE_PATCH
15517         PY_DNS_RPC_AUTOCONFIGURE_PATCH(&DNS_RPC_AUTOCONFIGURE_Type);
15518 #endif
15519 #ifdef PY_DNSSRV_STAT_HEADER_PATCH
15520         PY_DNSSRV_STAT_HEADER_PATCH(&DNSSRV_STAT_HEADER_Type);
15521 #endif
15522 #ifdef PY_DNSSRV_STAT_PATCH
15523         PY_DNSSRV_STAT_PATCH(&DNSSRV_STAT_Type);
15524 #endif
15525 #ifdef PY_DNS_RPC_RECORDS_PATCH
15526         PY_DNS_RPC_RECORDS_PATCH(&DNS_RPC_RECORDS_Type);
15527 #endif
15528 #ifdef PY_DNS_RPC_RECORDS_ARRAY_PATCH
15529         PY_DNS_RPC_RECORDS_ARRAY_PATCH(&DNS_RPC_RECORDS_ARRAY_Type);
15530 #endif
15531 #ifdef PY_DNSSERVER_PATCH
15532         PY_DNSSERVER_PATCH(&dnsserver_InterfaceType);
15533 #endif
15534
15535         m = Py_InitModule3("dnsserver", dnsserver_methods, "dnsserver DCE/RPC");
15536         if (m == NULL)
15537                 return;
15538
15539         PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_INTERNAL_RETURN_ERROR", PyInt_FromLong(DNS_RPC_AUTOCONFIG_INTERNAL_RETURN_ERROR));
15540         PyModule_AddObject(m, "DNS_RPC_ZONE_READONLY", PyInt_FromLong(DNS_RPC_ZONE_READONLY));
15541         PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET", PyInt_FromLong(DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET));
15542         PyModule_AddObject(m, "DNS_DP_OKAY", PyInt_FromLong(DNS_DP_OKAY));
15543         PyModule_AddObject(m, "DNS_DP_DELETED", PyInt_FromLong(DNS_DP_DELETED));
15544         PyModule_AddObject(m, "DNS_EVENT_LOG_WARNING_TYPE", PyInt_FromLong(DNS_EVENT_LOG_WARNING_TYPE));
15545         PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_INTERNAL_ROOTHINTS", PyInt_FromLong(DNS_RPC_AUTOCONFIG_INTERNAL_ROOTHINTS));
15546         PyModule_AddObject(m, "DNS_IPVAL_DNS_DELEGATIONS", PyInt_FromLong(DNS_IPVAL_DNS_DELEGATIONS));
15547         PyModule_AddObject(m, "DNS_RPC_VIEW_CACHE_DATA", PyInt_FromLong(DNS_RPC_VIEW_CACHE_DATA));
15548         PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_CHANGE_DP", PyInt_FromLong(DNSSRV_TYPEID_ZONE_CHANGE_DP));
15549         PyModule_AddObject(m, "DNS_IPVAL_DNS_FORWARDERS", PyInt_FromLong(DNS_IPVAL_DNS_FORWARDERS));
15550         PyModule_AddObject(m, "DNSSRV_TYPEID_FORWARDERS_W2K", PyInt_FromLong(DNSSRV_TYPEID_FORWARDERS_W2K));
15551         PyModule_AddObject(m, "DNSSRV_TYPEID_DP_INFO", PyInt_FromLong(DNSSRV_TYPEID_DP_INFO));
15552         PyModule_AddObject(m, "DNSSRV_TYPEID_LPWSTR", PyInt_FromLong(DNSSRV_TYPEID_LPWSTR));
15553         PyModule_AddObject(m, "DNSSRV_TYPEID_ENUM_ZONES_FILTER", PyInt_FromLong(DNSSRV_TYPEID_ENUM_ZONES_FILTER));
15554         PyModule_AddObject(m, "DNSSRV_TYPEID_SERVER_INFO_W2K", PyInt_FromLong(DNSSRV_TYPEID_SERVER_INFO_W2K));
15555         PyModule_AddObject(m, "DNS_ZONE_REQUEST_STUB", PyInt_FromLong(DNS_ZONE_REQUEST_STUB));
15556         PyModule_AddObject(m, "DNSSRV_TYPEID_STATS", PyInt_FromLong(DNSSRV_TYPEID_STATS));
15557         PyModule_AddObject(m, "DNS_ALLOW_RFC_NAMES_ONLY", PyInt_FromLong(DNS_ALLOW_RFC_NAMES_ONLY));
15558         PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_EXPORT", PyInt_FromLong(DNSSRV_TYPEID_ZONE_EXPORT));
15559         PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_SECONDARIES", PyInt_FromLong(DNSSRV_TYPEID_ZONE_SECONDARIES));
15560         PyModule_AddObject(m, "DNSSRV_TYPEID_DWORD", PyInt_FromLong(DNSSRV_TYPEID_DWORD));
15561         PyModule_AddObject(m, "DNS_ZONE_REQUEST_FORWARD", PyInt_FromLong(DNS_ZONE_REQUEST_FORWARD));
15562         PyModule_AddObject(m, "DNS_RPC_USE_ALL_PROTOCOLS", PyInt_FromLong(DNS_RPC_USE_ALL_PROTOCOLS));
15563         PyModule_AddObject(m, "DNS_DP_ENLISTED", PyInt_FromLong(DNS_DP_ENLISTED));
15564         PyModule_AddObject(m, "DNS_IPVAL_NO_TCP", PyInt_FromLong(DNS_IPVAL_NO_TCP));
15565         PyModule_AddObject(m, "DNS_ZONE_NOTIFY_ALL_SECONDARIES", PyInt_FromLong(DNS_ZONE_NOTIFY_ALL_SECONDARIES));
15566         PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE", PyInt_FromLong(DNSSRV_TYPEID_ZONE));
15567         PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_LIST", PyInt_FromLong(DNSSRV_TYPEID_ZONE_LIST));
15568         PyModule_AddObject(m, "DNS_ALLOW_ALL_NAMES", PyInt_FromLong(DNS_ALLOW_ALL_NAMES));
15569         PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_ALL", PyInt_FromLong(DNS_RPC_AUTOCONFIG_ALL));
15570         PyModule_AddObject(m, "DNS_RPC_ZONE_UPDATE_SECURE", PyInt_FromLong(DNS_RPC_ZONE_UPDATE_SECURE));
15571         PyModule_AddObject(m, "DNS_BOOT_METHOD_FILE", PyInt_FromLong(DNS_BOOT_METHOD_FILE));
15572         PyModule_AddObject(m, "DNS_ZONE_SECSECURE_LIST_ONLY", PyInt_FromLong(DNS_ZONE_SECSECURE_LIST_ONLY));
15573         PyModule_AddObject(m, "DNS_DP_DOMAIN_DEFAULT", PyInt_FromLong(DNS_DP_DOMAIN_DEFAULT));
15574         PyModule_AddObject(m, "DNS_ZONE_REQUEST_FORWARDER", PyInt_FromLong(DNS_ZONE_REQUEST_FORWARDER));
15575         PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_CREATE", PyInt_FromLong(DNSSRV_TYPEID_ZONE_CREATE));
15576         PyModule_AddObject(m, "DNS_EVENT_LOG_INFORMATION_TYPE", PyInt_FromLong(DNS_EVENT_LOG_INFORMATION_TYPE));
15577         PyModule_AddObject(m, "DNS_RPC_VIEW_ROOT_HINT_DATA", PyInt_FromLong(DNS_RPC_VIEW_ROOT_HINT_DATA));
15578         PyModule_AddObject(m, "DNSSRV_TYPEID_IP_VALIDATE", PyInt_FromLong(DNSSRV_TYPEID_IP_VALIDATE));
15579         PyModule_AddObject(m, "DNS_IPVAL_NO_RESPONSE", PyInt_FromLong(DNS_IPVAL_NO_RESPONSE));
15580         PyModule_AddObject(m, "DNS_ZONE_REQUEST_DOMAIN_DP", PyInt_FromLong(DNS_ZONE_REQUEST_DOMAIN_DP));
15581         PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_LIST_W2K", PyInt_FromLong(DNSSRV_TYPEID_ZONE_LIST_W2K));
15582         PyModule_AddObject(m, "DNSSRV_TYPEID_ENLIST_DP", PyInt_FromLong(DNSSRV_TYPEID_ENLIST_DP));
15583         PyModule_AddObject(m, "DNS_IPVAL_UNREACHABLE", PyInt_FromLong(DNS_IPVAL_UNREACHABLE));
15584         PyModule_AddObject(m, "DNS_DP_AUTOCREATED", PyInt_FromLong(DNS_DP_AUTOCREATED));
15585         PyModule_AddObject(m, "DNS_ZONE_REQUEST_FOREST_DP", PyInt_FromLong(DNS_ZONE_REQUEST_FOREST_DP));
15586         PyModule_AddObject(m, "DNS_CLIENT_VERSION_DOTNET", PyInt_FromLong(DNS_CLIENT_VERSION_DOTNET));
15587         PyModule_AddObject(m, "DNS_RPC_ZONE_SHUTDOWN", PyInt_FromLong(DNS_RPC_ZONE_SHUTDOWN));
15588         PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_APPEND", PyInt_FromLong(DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_APPEND));
15589         PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_TYPE_RESET", PyInt_FromLong(DNSSRV_TYPEID_ZONE_TYPE_RESET));
15590         PyModule_AddObject(m, "DNSSRV_TYPEID_ADDRARRAY", PyInt_FromLong(DNSSRV_TYPEID_ADDRARRAY));
15591         PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_PREPEND", PyInt_FromLong(DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_PREPEND));
15592         PyModule_AddObject(m, "DNSSRV_TYPEID_DP_ENUM", PyInt_FromLong(DNSSRV_TYPEID_DP_ENUM));
15593         PyModule_AddObject(m, "DNS_ZONE_NOTIFY_LIST_ONLY", PyInt_FromLong(DNS_ZONE_NOTIFY_LIST_ONLY));
15594         PyModule_AddObject(m, "DNS_IPVAL_INVALID_ADDR", PyInt_FromLong(DNS_IPVAL_INVALID_ADDR));
15595         PyModule_AddObject(m, "DNS_RPC_ZONE_AGING", PyInt_FromLong(DNS_RPC_ZONE_AGING));
15596         PyModule_AddObject(m, "DNSSRV_TYPEID_LPSTR", PyInt_FromLong(DNSSRV_TYPEID_LPSTR));
15597         PyModule_AddObject(m, "DNS_IPVAL_DNS_ZONE_MASTERS", PyInt_FromLong(DNS_IPVAL_DNS_ZONE_MASTERS));
15598         PyModule_AddObject(m, "DNS_RPC_USE_LPC", PyInt_FromLong(DNS_RPC_USE_LPC));
15599         PyModule_AddObject(m, "DNS_RPC_USE_NAMED_PIPE", PyInt_FromLong(DNS_RPC_USE_NAMED_PIPE));
15600         PyModule_AddObject(m, "DNS_RPC_ZONE_REVERSE", PyInt_FromLong(DNS_RPC_ZONE_REVERSE));
15601         PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_CREATE_W2K", PyInt_FromLong(DNSSRV_TYPEID_ZONE_CREATE_W2K));
15602         PyModule_AddObject(m, "DNS_CLIENT_VERSION_W2K", PyInt_FromLong(DNS_CLIENT_VERSION_W2K));
15603         PyModule_AddObject(m, "DNS_RPC_VIEW_NO_CHILDREN", PyInt_FromLong(DNS_RPC_VIEW_NO_CHILDREN));
15604         PyModule_AddObject(m, "DNS_IPVAL_DNS_ROOTHINTS", PyInt_FromLong(DNS_IPVAL_DNS_ROOTHINTS));
15605         PyModule_AddObject(m, "DNS_DP_STATE_UNKNOWN", PyInt_FromLong(DNS_DP_STATE_UNKNOWN));
15606         PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_DATABASE", PyInt_FromLong(DNSSRV_TYPEID_ZONE_DATABASE));
15607         PyModule_AddObject(m, "DNS_RPC_ZONE_AUTOCREATED", PyInt_FromLong(DNS_RPC_ZONE_AUTOCREATED));
15608         PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_INFO", PyInt_FromLong(DNSSRV_TYPEID_ZONE_INFO));
15609         PyModule_AddObject(m, "DNS_RPC_VIEW_GLUE_DATA", PyInt_FromLong(DNS_RPC_VIEW_GLUE_DATA));
15610         PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_INTERNAL_FORWARDERS", PyInt_FromLong(DNS_RPC_AUTOCONFIG_INTERNAL_FORWARDERS));
15611         PyModule_AddObject(m, "DNS_ZONE_REQUEST_CACHE", PyInt_FromLong(DNS_ZONE_REQUEST_CACHE));
15612         PyModule_AddObject(m, "DNSSRV_TYPEID_UTF8_STRING_LIST", PyInt_FromLong(DNSSRV_TYPEID_UTF8_STRING_LIST));
15613         PyModule_AddObject(m, "DNSSRV_TYPEID_IPARRAY", PyInt_FromLong(DNSSRV_TYPEID_IPARRAY));
15614         PyModule_AddObject(m, "DNS_RPC_VIEW_ADDITIONAL_DATA", PyInt_FromLong(DNS_RPC_VIEW_ADDITIONAL_DATA));
15615         PyModule_AddObject(m, "DNS_RPC_USE_TCPIP", PyInt_FromLong(DNS_RPC_USE_TCPIP));
15616         PyModule_AddObject(m, "DNS_ALLOW_NONRFC_NAMES", PyInt_FromLong(DNS_ALLOW_NONRFC_NAMES));
15617         PyModule_AddObject(m, "DNSSRV_TYPEID_AUTOCONFIGURE", PyInt_FromLong(DNSSRV_TYPEID_AUTOCONFIGURE));
15618         PyModule_AddObject(m, "DNS_EVENT_LOG_ERROR_TYPE", PyInt_FromLong(DNS_EVENT_LOG_ERROR_TYPE));
15619         PyModule_AddObject(m, "DNSSRV_TYPEID_NAME_AND_PARAM", PyInt_FromLong(DNSSRV_TYPEID_NAME_AND_PARAM));
15620         PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_CREATE_DOTNET", PyInt_FromLong(DNSSRV_TYPEID_ZONE_CREATE_DOTNET));
15621         PyModule_AddObject(m, "DNS_DP_FOREST_DEFAULT", PyInt_FromLong(DNS_DP_FOREST_DEFAULT));
15622         PyModule_AddObject(m, "DNSSRV_TYPEID_BUFFER", PyInt_FromLong(DNSSRV_TYPEID_BUFFER));
15623         PyModule_AddObject(m, "DNS_ZONE_REQUEST_AUTO", PyInt_FromLong(DNS_ZONE_REQUEST_AUTO));
15624         PyModule_AddObject(m, "DNS_ZONE_REQUEST_CUSTOM_DP", PyInt_FromLong(DNS_ZONE_REQUEST_CUSTOM_DP));
15625         PyModule_AddObject(m, "DNSSRV_TYPEID_NULL", PyInt_FromLong(DNSSRV_TYPEID_NULL));
15626         PyModule_AddObject(m, "DNS_ZONE_NOTIFY_OFF", PyInt_FromLong(DNS_ZONE_NOTIFY_OFF));
15627         PyModule_AddObject(m, "DNS_DP_STATE_REPL_INCOMING", PyInt_FromLong(DNS_DP_STATE_REPL_INCOMING));
15628         PyModule_AddObject(m, "DNS_EVENT_LOG_SUCCESS", PyInt_FromLong(DNS_EVENT_LOG_SUCCESS));
15629         PyModule_AddObject(m, "DNS_ZONE_SECSECURE_NO_XFER", PyInt_FromLong(DNS_ZONE_SECSECURE_NO_XFER));
15630         PyModule_AddObject(m, "DNS_ZONE_REQUEST_REVERSE", PyInt_FromLong(DNS_ZONE_REQUEST_REVERSE));
15631         PyModule_AddObject(m, "DNS_IPVAL_DNS_SERVERS", PyInt_FromLong(DNS_IPVAL_DNS_SERVERS));
15632         PyModule_AddObject(m, "DNS_ZONE_SECSECURE_NO_SECURITY", PyInt_FromLong(DNS_ZONE_SECSECURE_NO_SECURITY));
15633         PyModule_AddObject(m, "DNSSRV_TYPEID_DP_LIST", PyInt_FromLong(DNSSRV_TYPEID_DP_LIST));
15634         PyModule_AddObject(m, "DNSSRV_TYPEID_FORWARDERS_DOTNET", PyInt_FromLong(DNSSRV_TYPEID_FORWARDERS_DOTNET));
15635         PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_RENAME", PyInt_FromLong(DNSSRV_TYPEID_ZONE_RENAME));
15636         PyModule_AddObject(m, "DNS_ZONE_REQUEST_NON_DS", PyInt_FromLong(DNS_ZONE_REQUEST_NON_DS));
15637         PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT", PyInt_FromLong(DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT));
15638         PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_SECONDARIES_W2K", PyInt_FromLong(DNSSRV_TYPEID_ZONE_SECONDARIES_W2K));
15639         PyModule_AddObject(m, "DNS_RPC_ZONE_PAUSED", PyInt_FromLong(DNS_RPC_ZONE_PAUSED));
15640         PyModule_AddObject(m, "DNS_CLIENT_VERSION_LONGHORN", PyInt_FromLong(DNS_CLIENT_VERSION_LONGHORN));
15641         PyModule_AddObject(m, "DNS_ZONE_SECSECURE_NS_ONLY", PyInt_FromLong(DNS_ZONE_SECSECURE_NS_ONLY));
15642         PyModule_AddObject(m, "DNS_ZONE_REQUEST_PRIMARY", PyInt_FromLong(DNS_ZONE_REQUEST_PRIMARY));
15643         PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_INTERNAL_ZONES", PyInt_FromLong(DNS_RPC_AUTOCONFIG_INTERNAL_ZONES));
15644         PyModule_AddObject(m, "DNS_RPC_ZONE_DSINTEGRATED", PyInt_FromLong(DNS_RPC_ZONE_DSINTEGRATED));
15645         PyModule_AddObject(m, "DNS_BOOT_METHOD_REGISTRY", PyInt_FromLong(DNS_BOOT_METHOD_REGISTRY));
15646         PyModule_AddObject(m, "DNS_DP_LEGACY", PyInt_FromLong(DNS_DP_LEGACY));
15647         PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_W2K", PyInt_FromLong(DNSSRV_TYPEID_ZONE_W2K));
15648         PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_INFO_W2K", PyInt_FromLong(DNSSRV_TYPEID_ZONE_INFO_W2K));
15649         PyModule_AddObject(m, "DNS_DP_STATE_REPL_OUTGOING", PyInt_FromLong(DNS_DP_STATE_REPL_OUTGOING));
15650         PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_TYPE_RESET_W2K", PyInt_FromLong(DNSSRV_TYPEID_ZONE_TYPE_RESET_W2K));
15651         PyModule_AddObject(m, "DNSSRV_TYPEID_SERVER_INFO_DOTNET", PyInt_FromLong(DNSSRV_TYPEID_SERVER_INFO_DOTNET));
15652         PyModule_AddObject(m, "DNS_RPC_ZONE_UPDATE_UNSECURE", PyInt_FromLong(DNS_RPC_ZONE_UPDATE_UNSECURE));
15653         PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_DATABASE_W2K", PyInt_FromLong(DNSSRV_TYPEID_ZONE_DATABASE_W2K));
15654         PyModule_AddObject(m, "DNSSRV_TYPEID_SERVER_INFO", PyInt_FromLong(DNSSRV_TYPEID_SERVER_INFO));
15655         PyModule_AddObject(m, "DNS_IPVAL_UNKNOWN_ERROR", PyInt_FromLong(DNS_IPVAL_UNKNOWN_ERROR));
15656         PyModule_AddObject(m, "DNS_ZONE_REQUEST_SECONDARY", PyInt_FromLong(DNS_ZONE_REQUEST_SECONDARY));
15657         PyModule_AddObject(m, "DNS_ALLOW_MULTIBYTE_NAMES", PyInt_FromLong(DNS_ALLOW_MULTIBYTE_NAMES));
15658         PyModule_AddObject(m, "DNSSRV_TYPEID_UNICODE_STRING_LIST", PyInt_FromLong(DNSSRV_TYPEID_UNICODE_STRING_LIST));
15659         PyModule_AddObject(m, "DNS_ZONE_REQUEST_LEGACY_DP", PyInt_FromLong(DNS_ZONE_REQUEST_LEGACY_DP));
15660         PyModule_AddObject(m, "DNS_BOOT_METHOD_UNINITIALIZED", PyInt_FromLong(DNS_BOOT_METHOD_UNINITIALIZED));
15661         PyModule_AddObject(m, "DNS_RPC_VIEW_AUTHORITY_DATA", PyInt_FromLong(DNS_RPC_VIEW_AUTHORITY_DATA));
15662         PyModule_AddObject(m, "DNSSRV_TYPEID_FORWARDERS", PyInt_FromLong(DNSSRV_TYPEID_FORWARDERS));
15663         PyModule_AddObject(m, "DNS_BOOT_METHOD_DIRECTORY", PyInt_FromLong(DNS_BOOT_METHOD_DIRECTORY));
15664         PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_TYPE_RESET_DOTNET", PyInt_FromLong(DNSSRV_TYPEID_ZONE_TYPE_RESET_DOTNET));
15665         PyModule_AddObject(m, "DNS_ZONE_REQUEST_DS", PyInt_FromLong(DNS_ZONE_REQUEST_DS));
15666         PyModule_AddObject(m, "DNS_IPVAL_NOT_AUTH_FOR_ZONE", PyInt_FromLong(DNS_IPVAL_NOT_AUTH_FOR_ZONE));
15667         PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_INFO_DOTNET", PyInt_FromLong(DNSSRV_TYPEID_ZONE_INFO_DOTNET));
15668         PyModule_AddObject(m, "ERROR_SUCCESS", PyInt_FromLong(ERROR_SUCCESS));
15669         PyModule_AddObject(m, "DNS_RPC_VIEW_ONLY_CHILDREN", PyInt_FromLong(DNS_RPC_VIEW_ONLY_CHILDREN));
15670         Py_INCREF((PyObject *)(void *)&DNS_RPC_BUFFER_Type);
15671         PyModule_AddObject(m, "DNS_RPC_BUFFER", (PyObject *)(void *)&DNS_RPC_BUFFER_Type);
15672         Py_INCREF((PyObject *)(void *)&DNS_RPC_UTF8_STRING_LIST_Type);
15673         PyModule_AddObject(m, "DNS_RPC_UTF8_STRING_LIST", (PyObject *)(void *)&DNS_RPC_UTF8_STRING_LIST_Type);
15674         Py_INCREF((PyObject *)(void *)&DNS_RPC_NAME_AND_PARAM_Type);
15675         PyModule_AddObject(m, "DNS_RPC_NAME_AND_PARAM", (PyObject *)(void *)&DNS_RPC_NAME_AND_PARAM_Type);
15676         Py_INCREF((PyObject *)(void *)&DNS_RPC_NAME_Type);
15677         PyModule_AddObject(m, "DNS_RPC_NAME", (PyObject *)(void *)&DNS_RPC_NAME_Type);
15678         Py_INCREF((PyObject *)(void *)&DNS_RPC_NODE_Type);
15679         PyModule_AddObject(m, "DNS_RPC_NODE", (PyObject *)(void *)&DNS_RPC_NODE_Type);
15680         Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORD_SOA_Type);
15681         PyModule_AddObject(m, "DNS_RPC_RECORD_SOA", (PyObject *)(void *)&DNS_RPC_RECORD_SOA_Type);
15682         Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORD_NAME_PREFERENCE_Type);
15683         PyModule_AddObject(m, "DNS_RPC_RECORD_NAME_PREFERENCE", (PyObject *)(void *)&DNS_RPC_RECORD_NAME_PREFERENCE_Type);
15684         Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORD_STRING_Type);
15685         PyModule_AddObject(m, "DNS_RPC_RECORD_STRING", (PyObject *)(void *)&DNS_RPC_RECORD_STRING_Type);
15686         Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORD_SRV_Type);
15687         PyModule_AddObject(m, "DNS_RPC_RECORD_SRV", (PyObject *)(void *)&DNS_RPC_RECORD_SRV_Type);
15688         Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORD_Type);
15689         PyModule_AddObject(m, "DNS_RPC_RECORD", (PyObject *)(void *)&DNS_RPC_RECORD_Type);
15690         Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORD_BUF_Type);
15691         PyModule_AddObject(m, "DNS_RPC_RECORD_BUF", (PyObject *)(void *)&DNS_RPC_RECORD_BUF_Type);
15692         Py_INCREF((PyObject *)(void *)&IP4_ARRAY_Type);
15693         PyModule_AddObject(m, "IP4_ARRAY", (PyObject *)(void *)&IP4_ARRAY_Type);
15694         Py_INCREF((PyObject *)(void *)&DNS_ADDR_Type);
15695         PyModule_AddObject(m, "DNS_ADDR", (PyObject *)(void *)&DNS_ADDR_Type);
15696         Py_INCREF((PyObject *)(void *)&DNS_ADDR_ARRAY_Type);
15697         PyModule_AddObject(m, "DNS_ADDR_ARRAY", (PyObject *)(void *)&DNS_ADDR_ARRAY_Type);
15698         Py_INCREF((PyObject *)(void *)&DNS_RPC_IP_VALIDATE_Type);
15699         PyModule_AddObject(m, "DNS_RPC_IP_VALIDATE", (PyObject *)(void *)&DNS_RPC_IP_VALIDATE_Type);
15700         Py_INCREF((PyObject *)(void *)&DNS_RPC_SERVER_INFO_W2K_Type);
15701         PyModule_AddObject(m, "DNS_RPC_SERVER_INFO_W2K", (PyObject *)(void *)&DNS_RPC_SERVER_INFO_W2K_Type);
15702         Py_INCREF((PyObject *)(void *)&DNS_EXTENSION_Type);
15703         PyModule_AddObject(m, "DNS_EXTENSION", (PyObject *)(void *)&DNS_EXTENSION_Type);
15704         Py_INCREF((PyObject *)(void *)&DNS_RPC_SERVER_INFO_DOTNET_Type);
15705         PyModule_AddObject(m, "DNS_RPC_SERVER_INFO_DOTNET", (PyObject *)(void *)&DNS_RPC_SERVER_INFO_DOTNET_Type);
15706         Py_INCREF((PyObject *)(void *)&DNS_RPC_SERVER_INFO_LONGHORN_Type);
15707         PyModule_AddObject(m, "DNS_RPC_SERVER_INFO_LONGHORN", (PyObject *)(void *)&DNS_RPC_SERVER_INFO_LONGHORN_Type);
15708         Py_INCREF((PyObject *)(void *)&DNS_RPC_DP_REPLICA_Type);
15709         PyModule_AddObject(m, "DNS_RPC_DP_REPLICA", (PyObject *)(void *)&DNS_RPC_DP_REPLICA_Type);
15710         Py_INCREF((PyObject *)(void *)&DNS_RPC_DP_INFO_Type);
15711         PyModule_AddObject(m, "DNS_RPC_DP_INFO", (PyObject *)(void *)&DNS_RPC_DP_INFO_Type);
15712         Py_INCREF((PyObject *)(void *)&DNS_RPC_DP_ENUM_Type);
15713         PyModule_AddObject(m, "DNS_RPC_DP_ENUM", (PyObject *)(void *)&DNS_RPC_DP_ENUM_Type);
15714         Py_INCREF((PyObject *)(void *)&DNS_RPC_DP_LIST_Type);
15715         PyModule_AddObject(m, "DNS_RPC_DP_LIST", (PyObject *)(void *)&DNS_RPC_DP_LIST_Type);
15716         Py_INCREF((PyObject *)(void *)&DNS_RPC_ENLIST_DP_Type);
15717         PyModule_AddObject(m, "DNS_RPC_ENLIST_DP", (PyObject *)(void *)&DNS_RPC_ENLIST_DP_Type);
15718         Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_CHANGE_DP_Type);
15719         PyModule_AddObject(m, "DNS_RPC_ZONE_CHANGE_DP", (PyObject *)(void *)&DNS_RPC_ZONE_CHANGE_DP_Type);
15720         Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_W2K_Type);
15721         PyModule_AddObject(m, "DNS_RPC_ZONE_W2K", (PyObject *)(void *)&DNS_RPC_ZONE_W2K_Type);
15722         Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_DOTNET_Type);
15723         PyModule_AddObject(m, "DNS_RPC_ZONE_DOTNET", (PyObject *)(void *)&DNS_RPC_ZONE_DOTNET_Type);
15724         Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_LIST_W2K_Type);
15725         PyModule_AddObject(m, "DNS_RPC_ZONE_LIST_W2K", (PyObject *)(void *)&DNS_RPC_ZONE_LIST_W2K_Type);
15726         Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_LIST_DOTNET_Type);
15727         PyModule_AddObject(m, "DNS_RPC_ZONE_LIST_DOTNET", (PyObject *)(void *)&DNS_RPC_ZONE_LIST_DOTNET_Type);
15728         Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_INFO_W2K_Type);
15729         PyModule_AddObject(m, "DNS_RPC_ZONE_INFO_W2K", (PyObject *)(void *)&DNS_RPC_ZONE_INFO_W2K_Type);
15730         Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_INFO_DOTNET_Type);
15731         PyModule_AddObject(m, "DNS_RPC_ZONE_INFO_DOTNET", (PyObject *)(void *)&DNS_RPC_ZONE_INFO_DOTNET_Type);
15732         Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_INFO_LONGHORN_Type);
15733         PyModule_AddObject(m, "DNS_RPC_ZONE_INFO_LONGHORN", (PyObject *)(void *)&DNS_RPC_ZONE_INFO_LONGHORN_Type);
15734         Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_SECONDARIES_W2K_Type);
15735         PyModule_AddObject(m, "DNS_RPC_ZONE_SECONDARIES_W2K", (PyObject *)(void *)&DNS_RPC_ZONE_SECONDARIES_W2K_Type);
15736         Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_SECONDARIES_DOTNET_Type);
15737         PyModule_AddObject(m, "DNS_RPC_ZONE_SECONDARIES_DOTNET", (PyObject *)(void *)&DNS_RPC_ZONE_SECONDARIES_DOTNET_Type);
15738         Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type);
15739         PyModule_AddObject(m, "DNS_RPC_ZONE_SECONDARIES_LONGHORN", (PyObject *)(void *)&DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type);
15740         Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_DATABASE_W2K_Type);
15741         PyModule_AddObject(m, "DNS_RPC_ZONE_DATABASE_W2K", (PyObject *)(void *)&DNS_RPC_ZONE_DATABASE_W2K_Type);
15742         Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_DATABASE_DOTNET_Type);
15743         PyModule_AddObject(m, "DNS_RPC_ZONE_DATABASE_DOTNET", (PyObject *)(void *)&DNS_RPC_ZONE_DATABASE_DOTNET_Type);
15744         Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_CREATE_INFO_W2K_Type);
15745         PyModule_AddObject(m, "DNS_RPC_ZONE_CREATE_INFO_W2K", (PyObject *)(void *)&DNS_RPC_ZONE_CREATE_INFO_W2K_Type);
15746         Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type);
15747         PyModule_AddObject(m, "DNS_RPC_ZONE_CREATE_INFO_DOTNET", (PyObject *)(void *)&DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type);
15748         Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type);
15749         PyModule_AddObject(m, "DNS_RPC_ZONE_CREATE_INFO_LONGHORN", (PyObject *)(void *)&DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type);
15750         Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_EXPORT_INFO_Type);
15751         PyModule_AddObject(m, "DNS_RPC_ZONE_EXPORT_INFO", (PyObject *)(void *)&DNS_RPC_ZONE_EXPORT_INFO_Type);
15752         Py_INCREF((PyObject *)(void *)&DNS_RPC_ENUM_ZONES_FILTER_Type);
15753         PyModule_AddObject(m, "DNS_RPC_ENUM_ZONES_FILTER", (PyObject *)(void *)&DNS_RPC_ENUM_ZONES_FILTER_Type);
15754         Py_INCREF((PyObject *)(void *)&DNS_RPC_FORWARDERS_W2K_Type);
15755         PyModule_AddObject(m, "DNS_RPC_FORWARDERS_W2K", (PyObject *)(void *)&DNS_RPC_FORWARDERS_W2K_Type);
15756         Py_INCREF((PyObject *)(void *)&DNS_RPC_FORWARDERS_DOTNET_Type);
15757         PyModule_AddObject(m, "DNS_RPC_FORWARDERS_DOTNET", (PyObject *)(void *)&DNS_RPC_FORWARDERS_DOTNET_Type);
15758         Py_INCREF((PyObject *)(void *)&DNS_RPC_FORWARDERS_LONGHORN_Type);
15759         PyModule_AddObject(m, "DNS_RPC_FORWARDERS_LONGHORN", (PyObject *)(void *)&DNS_RPC_FORWARDERS_LONGHORN_Type);
15760         Py_INCREF((PyObject *)(void *)&DNS_RPC_AUTOCONFIGURE_Type);
15761         PyModule_AddObject(m, "DNS_RPC_AUTOCONFIGURE", (PyObject *)(void *)&DNS_RPC_AUTOCONFIGURE_Type);
15762         Py_INCREF((PyObject *)(void *)&DNSSRV_STAT_HEADER_Type);
15763         PyModule_AddObject(m, "DNSSRV_STAT_HEADER", (PyObject *)(void *)&DNSSRV_STAT_HEADER_Type);
15764         Py_INCREF((PyObject *)(void *)&DNSSRV_STAT_Type);
15765         PyModule_AddObject(m, "DNSSRV_STAT", (PyObject *)(void *)&DNSSRV_STAT_Type);
15766         Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORDS_Type);
15767         PyModule_AddObject(m, "DNS_RPC_RECORDS", (PyObject *)(void *)&DNS_RPC_RECORDS_Type);
15768         Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORDS_ARRAY_Type);
15769         PyModule_AddObject(m, "DNS_RPC_RECORDS_ARRAY", (PyObject *)(void *)&DNS_RPC_RECORDS_ARRAY_Type);
15770         Py_INCREF((PyObject *)(void *)&dnsserver_InterfaceType);
15771         PyModule_AddObject(m, "dnsserver", (PyObject *)(void *)&dnsserver_InterfaceType);
15772 #ifdef PY_MOD_DNSSERVER_PATCH
15773         PY_MOD_DNSSERVER_PATCH(m);
15774 #endif
15775
15776 }