LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - py_claims.c (source / functions) Hit Total Coverage
Test: coverage report for master 2f515e9b Lines: 660 1281 51.5 %
Date: 2024-04-21 15:09:00 Functions: 64 89 71.9 %

          Line data    Source code
       1             : 
       2             : /* Python wrapper functions auto-generated by pidl */
       3             : #define PY_SSIZE_T_CLEAN 1 /* We use Py_ssize_t for PyArg_ParseTupleAndKeywords */
       4             : #include "lib/replace/system/python.h"
       5             : #include "python/py3compat.h"
       6             : #include "includes.h"
       7             : #include "python/modules.h"
       8             : #include <pytalloc.h>
       9             : #include "librpc/rpc/pyrpc.h"
      10             : #include "librpc/rpc/pyrpc_util.h"
      11             : #include "bin/default/librpc/gen_ndr/ndr_claims.h"
      12             : 
      13             : 
      14             : /*
      15             :  * Suppress compiler warnings if the generated code does not call these
      16             :  * functions
      17             :  */
      18             : #ifndef _MAYBE_UNUSED_
      19             : #ifdef __has_attribute
      20             : #if __has_attribute(unused)
      21             : #define _MAYBE_UNUSED_ __attribute__ ((unused))
      22             : #else
      23             : #define _MAYBE_UNUSED_
      24             : #endif
      25             : #endif
      26             : #endif
      27             : /*
      28             :  * These functions are here to ensure they can be optimized out by
      29             :  * the compiler based on the constant input values
      30             :  */
      31             : 
      32      202524 : static inline unsigned long long ndr_sizeof2uintmax(size_t var_size)
      33             : {
      34      202524 :         switch (var_size) {
      35      200120 :         case 8:
      36      200120 :                 return UINT64_MAX;
      37        2404 :         case 4:
      38        2404 :                 return UINT32_MAX;
      39           0 :         case 2:
      40           0 :                 return UINT16_MAX;
      41           0 :         case 1:
      42           0 :                 return UINT8_MAX;
      43             :         }
      44             : 
      45           0 :         return 0;
      46             : }
      47             : 
      48          26 : static inline _MAYBE_UNUSED_ long long ndr_sizeof2intmax(size_t var_size)
      49             : {
      50          26 :         switch (var_size) {
      51          26 :         case 8:
      52          26 :                 return INT64_MAX;
      53           0 :         case 4:
      54           0 :                 return INT32_MAX;
      55           0 :         case 2:
      56           0 :                 return INT16_MAX;
      57           0 :         case 1:
      58           0 :                 return INT8_MAX;
      59             :         }
      60             : 
      61           0 :         return 0;
      62             : }
      63             : 
      64             : static PyTypeObject CLAIM_INT64_Type;
      65             : static PyTypeObject CLAIM_UINT64_Type;
      66             : static PyTypeObject CLAIM_STRING_Type;
      67             : static PyTypeObject CLAIM_ENTRY_VALUES_Type;
      68             : static PyTypeObject CLAIM_ENTRY_Type;
      69             : static PyTypeObject CLAIMS_ARRAY_Type;
      70             : static PyTypeObject CLAIMS_SET_METADATA_CTR_Type;
      71             : static PyTypeObject CLAIMS_SET_CTR_Type;
      72             : static PyTypeObject CLAIMS_SET_Type;
      73             : static PyTypeObject CLAIMS_SET_NDR_Type;
      74             : static PyTypeObject CLAIMS_SET_METADATA_NDR_Type;
      75             : static PyTypeObject CLAIMS_SET_METADATA_Type;
      76             : static PyTypeObject claims_InterfaceType;
      77             : 
      78             : static PyTypeObject *BaseObject_Type;
      79             : static PyTypeObject *ClientConnection_Type;
      80             : static PyTypeObject *ndr_syntax_id_Type;
      81             : 
      82           9 : static PyObject *py_CLAIM_INT64_get_value_count(PyObject *obj, void *closure)
      83             : {
      84           9 :         struct CLAIM_INT64 *object = pytalloc_get_ptr(obj);
      85           0 :         PyObject *py_value_count;
      86           9 :         py_value_count = PyLong_FromUnsignedLongLong((uint32_t)(object->value_count));
      87           9 :         return py_value_count;
      88             : }
      89             : 
      90          18 : static int py_CLAIM_INT64_set_value_count(PyObject *py_obj, PyObject *value, void *closure)
      91             : {
      92          18 :         struct CLAIM_INT64 *object = pytalloc_get_ptr(py_obj);
      93          18 :         if (value == NULL) {
      94           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->value_count");
      95           0 :                 return -1;
      96             :         }
      97             :         {
      98          18 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->value_count));
      99          18 :                 if (PyLong_Check(value)) {
     100           0 :                         unsigned long long test_var;
     101          18 :                         test_var = PyLong_AsUnsignedLongLong(value);
     102          18 :                         if (PyErr_Occurred() != NULL) {
     103           0 :                                 return -1;
     104             :                         }
     105          18 :                         if (test_var > uint_max) {
     106           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     107             :                                   PyLong_Type.tp_name, uint_max, test_var);
     108           0 :                                 return -1;
     109             :                         }
     110          18 :                         object->value_count = test_var;
     111             :                 } else {
     112           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     113             :                           PyLong_Type.tp_name);
     114           0 :                         return -1;
     115             :                 }
     116             :         }
     117          18 :         return 0;
     118             : }
     119             : 
     120          37 : static PyObject *py_CLAIM_INT64_get_values(PyObject *obj, void *closure)
     121             : {
     122          37 :         struct CLAIM_INT64 *object = pytalloc_get_ptr(obj);
     123           1 :         PyObject *py_values;
     124          37 :         if (object->values == NULL) {
     125           0 :                 Py_RETURN_NONE;
     126             :         }
     127          37 :         if (object->values == NULL) {
     128           0 :                 py_values = Py_None;
     129           0 :                 Py_INCREF(py_values);
     130             :         } else {
     131          37 :                 py_values = PyList_New(object->value_count);
     132          37 :                 if (py_values == NULL) {
     133           0 :                         return NULL;
     134             :                 }
     135             :                 {
     136             :                         int values_cntr_1;
     137         222 :                         for (values_cntr_1 = 0; values_cntr_1 < (object->value_count); values_cntr_1++) {
     138           5 :                                 PyObject *py_values_1;
     139         185 :                                 py_values_1 = PyLong_FromLongLong((object->values)[values_cntr_1]);
     140         185 :                                 PyList_SetItem(py_values, values_cntr_1, py_values_1);
     141             :                         }
     142             :                 }
     143             :         }
     144          36 :         return py_values;
     145             : }
     146             : 
     147          18 : static int py_CLAIM_INT64_set_values(PyObject *py_obj, PyObject *value, void *closure)
     148             : {
     149          18 :         struct CLAIM_INT64 *object = pytalloc_get_ptr(py_obj);
     150          18 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->values));
     151          18 :         if (value == NULL) {
     152           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->values");
     153           0 :                 return -1;
     154             :         }
     155          18 :         if (value == Py_None) {
     156           0 :                 object->values = NULL;
     157             :         } else {
     158          18 :                 object->values = NULL;
     159          18 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
     160             :                 {
     161           0 :                         int values_cntr_1;
     162          18 :                         object->values = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->values, PyList_GET_SIZE(value));
     163          18 :                         if (!object->values) { return -1; }
     164          18 :                         talloc_set_name_const(object->values, "ARRAY: object->values");
     165          44 :                         for (values_cntr_1 = 0; values_cntr_1 < PyList_GET_SIZE(value); values_cntr_1++) {
     166          26 :                                 if (PyList_GET_ITEM(value, values_cntr_1) == NULL) {
     167           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->values)[values_cntr_1]");
     168           0 :                                         return -1;
     169             :                                 }
     170             :                                 {
     171          26 :                                         const long long int_max = ndr_sizeof2intmax(sizeof((object->values)[values_cntr_1]));
     172          26 :                                         const long long int_min = -int_max - 1;
     173          26 :                                         if (PyLong_Check(PyList_GET_ITEM(value, values_cntr_1))) {
     174           0 :                                                 long long test_var;
     175          26 :                                                 test_var = PyLong_AsLongLong(PyList_GET_ITEM(value, values_cntr_1));
     176          26 :                                                 if (PyErr_Occurred() != NULL) {
     177           0 :                                                         return -1;
     178             :                                                 }
     179          26 :                                                 if (test_var < int_min || test_var > int_max) {
     180           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",
     181             :                                                           PyLong_Type.tp_name, int_min, int_max, test_var);
     182           0 :                                                         return -1;
     183             :                                                 }
     184          26 :                                                 (object->values)[values_cntr_1] = test_var;
     185             :                                         } else {
     186           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
     187             :                                                   PyLong_Type.tp_name);
     188           0 :                                                 return -1;
     189             :                                         }
     190             :                                 }
     191             :                         }
     192             :                 }
     193             :         }
     194          18 :         return 0;
     195             : }
     196             : 
     197             : static PyGetSetDef py_CLAIM_INT64_getsetters[] = {
     198             :         {
     199             :                 .name = discard_const_p(char, "value_count"),
     200             :                 .get = py_CLAIM_INT64_get_value_count,
     201             :                 .set = py_CLAIM_INT64_set_value_count,
     202             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     203             :         },
     204             :         {
     205             :                 .name = discard_const_p(char, "values"),
     206             :                 .get = py_CLAIM_INT64_get_values,
     207             :                 .set = py_CLAIM_INT64_set_values,
     208             :                 .doc = discard_const_p(char, "PIDL-generated element of base type int64")
     209             :         },
     210             :         { .name = NULL }
     211             : };
     212             : 
     213          18 : static PyObject *py_CLAIM_INT64_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     214             : {
     215          18 :         return pytalloc_new(struct CLAIM_INT64, type);
     216             : }
     217             : 
     218             : 
     219             : static PyTypeObject CLAIM_INT64_Type = {
     220             :         PyVarObject_HEAD_INIT(NULL, 0)
     221             :         .tp_name = "claims.CLAIM_INT64",
     222             :         .tp_getset = py_CLAIM_INT64_getsetters,
     223             :         .tp_methods = NULL,
     224             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     225             :         .tp_new = py_CLAIM_INT64_new,
     226             : };
     227             : 
     228             : 
     229          31 : static PyObject *py_CLAIM_UINT64_get_value_count(PyObject *obj, void *closure)
     230             : {
     231          31 :         struct CLAIM_UINT64 *object = pytalloc_get_ptr(obj);
     232          16 :         PyObject *py_value_count;
     233          31 :         py_value_count = PyLong_FromUnsignedLongLong((uint32_t)(object->value_count));
     234          31 :         return py_value_count;
     235             : }
     236             : 
     237         104 : static int py_CLAIM_UINT64_set_value_count(PyObject *py_obj, PyObject *value, void *closure)
     238             : {
     239         104 :         struct CLAIM_UINT64 *object = pytalloc_get_ptr(py_obj);
     240         104 :         if (value == NULL) {
     241           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->value_count");
     242           0 :                 return -1;
     243             :         }
     244             :         {
     245         104 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->value_count));
     246         104 :                 if (PyLong_Check(value)) {
     247           0 :                         unsigned long long test_var;
     248         104 :                         test_var = PyLong_AsUnsignedLongLong(value);
     249         104 :                         if (PyErr_Occurred() != NULL) {
     250           0 :                                 return -1;
     251             :                         }
     252         104 :                         if (test_var > uint_max) {
     253           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     254             :                                   PyLong_Type.tp_name, uint_max, test_var);
     255           0 :                                 return -1;
     256             :                         }
     257         104 :                         object->value_count = test_var;
     258             :                 } else {
     259           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     260             :                           PyLong_Type.tp_name);
     261           0 :                         return -1;
     262             :                 }
     263             :         }
     264         104 :         return 0;
     265             : }
     266             : 
     267         100 : static PyObject *py_CLAIM_UINT64_get_values(PyObject *obj, void *closure)
     268             : {
     269         100 :         struct CLAIM_UINT64 *object = pytalloc_get_ptr(obj);
     270          40 :         PyObject *py_values;
     271         100 :         if (object->values == NULL) {
     272           0 :                 Py_RETURN_NONE;
     273             :         }
     274         100 :         if (object->values == NULL) {
     275           0 :                 py_values = Py_None;
     276           0 :                 Py_INCREF(py_values);
     277             :         } else {
     278         100 :                 py_values = PyList_New(object->value_count);
     279         100 :                 if (py_values == NULL) {
     280           0 :                         return NULL;
     281             :                 }
     282             :                 {
     283             :                         int values_cntr_1;
     284         380 :                         for (values_cntr_1 = 0; values_cntr_1 < (object->value_count); values_cntr_1++) {
     285         136 :                                 PyObject *py_values_1;
     286         280 :                                 py_values_1 = PyLong_FromUnsignedLongLong((object->values)[values_cntr_1]);
     287         280 :                                 PyList_SetItem(py_values, values_cntr_1, py_values_1);
     288             :                         }
     289             :                 }
     290             :         }
     291          60 :         return py_values;
     292             : }
     293             : 
     294         104 : static int py_CLAIM_UINT64_set_values(PyObject *py_obj, PyObject *value, void *closure)
     295             : {
     296         104 :         struct CLAIM_UINT64 *object = pytalloc_get_ptr(py_obj);
     297         104 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->values));
     298         104 :         if (value == NULL) {
     299           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->values");
     300           0 :                 return -1;
     301             :         }
     302         104 :         if (value == Py_None) {
     303           0 :                 object->values = NULL;
     304             :         } else {
     305         104 :                 object->values = NULL;
     306         104 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
     307             :                 {
     308           0 :                         int values_cntr_1;
     309         104 :                         object->values = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->values, PyList_GET_SIZE(value));
     310         104 :                         if (!object->values) { return -1; }
     311         104 :                         talloc_set_name_const(object->values, "ARRAY: object->values");
     312      200224 :                         for (values_cntr_1 = 0; values_cntr_1 < PyList_GET_SIZE(value); values_cntr_1++) {
     313      200120 :                                 if (PyList_GET_ITEM(value, values_cntr_1) == NULL) {
     314           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->values)[values_cntr_1]");
     315           0 :                                         return -1;
     316             :                                 }
     317             :                                 {
     318      200120 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->values)[values_cntr_1]));
     319      200120 :                                         if (PyLong_Check(PyList_GET_ITEM(value, values_cntr_1))) {
     320           0 :                                                 unsigned long long test_var;
     321      200120 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, values_cntr_1));
     322      200120 :                                                 if (PyErr_Occurred() != NULL) {
     323           0 :                                                         return -1;
     324             :                                                 }
     325      200120 :                                                 if (test_var > uint_max) {
     326           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     327             :                                                           PyLong_Type.tp_name, uint_max, test_var);
     328           0 :                                                         return -1;
     329             :                                                 }
     330      200120 :                                                 (object->values)[values_cntr_1] = test_var;
     331             :                                         } else {
     332           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
     333             :                                                   PyLong_Type.tp_name);
     334           0 :                                                 return -1;
     335             :                                         }
     336             :                                 }
     337             :                         }
     338             :                 }
     339             :         }
     340         104 :         return 0;
     341             : }
     342             : 
     343             : static PyGetSetDef py_CLAIM_UINT64_getsetters[] = {
     344             :         {
     345             :                 .name = discard_const_p(char, "value_count"),
     346             :                 .get = py_CLAIM_UINT64_get_value_count,
     347             :                 .set = py_CLAIM_UINT64_set_value_count,
     348             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     349             :         },
     350             :         {
     351             :                 .name = discard_const_p(char, "values"),
     352             :                 .get = py_CLAIM_UINT64_get_values,
     353             :                 .set = py_CLAIM_UINT64_set_values,
     354             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
     355             :         },
     356             :         { .name = NULL }
     357             : };
     358             : 
     359         104 : static PyObject *py_CLAIM_UINT64_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     360             : {
     361         104 :         return pytalloc_new(struct CLAIM_UINT64, type);
     362             : }
     363             : 
     364             : 
     365             : static PyTypeObject CLAIM_UINT64_Type = {
     366             :         PyVarObject_HEAD_INIT(NULL, 0)
     367             :         .tp_name = "claims.CLAIM_UINT64",
     368             :         .tp_getset = py_CLAIM_UINT64_getsetters,
     369             :         .tp_methods = NULL,
     370             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     371             :         .tp_new = py_CLAIM_UINT64_new,
     372             : };
     373             : 
     374             : 
     375         302 : static PyObject *py_CLAIM_STRING_get_value_count(PyObject *obj, void *closure)
     376             : {
     377         302 :         struct CLAIM_STRING *object = pytalloc_get_ptr(obj);
     378          12 :         PyObject *py_value_count;
     379         302 :         py_value_count = PyLong_FromUnsignedLongLong((uint32_t)(object->value_count));
     380         302 :         return py_value_count;
     381             : }
     382             : 
     383         310 : static int py_CLAIM_STRING_set_value_count(PyObject *py_obj, PyObject *value, void *closure)
     384             : {
     385         310 :         struct CLAIM_STRING *object = pytalloc_get_ptr(py_obj);
     386         310 :         if (value == NULL) {
     387           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->value_count");
     388           0 :                 return -1;
     389             :         }
     390             :         {
     391         310 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->value_count));
     392         310 :                 if (PyLong_Check(value)) {
     393           0 :                         unsigned long long test_var;
     394         310 :                         test_var = PyLong_AsUnsignedLongLong(value);
     395         310 :                         if (PyErr_Occurred() != NULL) {
     396           0 :                                 return -1;
     397             :                         }
     398         310 :                         if (test_var > uint_max) {
     399           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     400             :                                   PyLong_Type.tp_name, uint_max, test_var);
     401           0 :                                 return -1;
     402             :                         }
     403         310 :                         object->value_count = test_var;
     404             :                 } else {
     405           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     406             :                           PyLong_Type.tp_name);
     407           0 :                         return -1;
     408             :                 }
     409             :         }
     410         310 :         return 0;
     411             : }
     412             : 
     413        1196 : static PyObject *py_CLAIM_STRING_get_values(PyObject *obj, void *closure)
     414             : {
     415        1196 :         struct CLAIM_STRING *object = pytalloc_get_ptr(obj);
     416          36 :         PyObject *py_values;
     417        1196 :         if (object->values == NULL) {
     418           0 :                 Py_RETURN_NONE;
     419             :         }
     420        1196 :         if (object->values == NULL) {
     421           0 :                 py_values = Py_None;
     422           0 :                 Py_INCREF(py_values);
     423             :         } else {
     424        1196 :                 py_values = PyList_New(object->value_count);
     425        1196 :                 if (py_values == NULL) {
     426           0 :                         return NULL;
     427             :                 }
     428             :                 {
     429             :                         int values_cntr_1;
     430        2716 :                         for (values_cntr_1 = 0; values_cntr_1 < (object->value_count); values_cntr_1++) {
     431         120 :                                 PyObject *py_values_1;
     432        1520 :                                 if ((object->values)[values_cntr_1] == NULL) {
     433           0 :                                         py_values_1 = Py_None;
     434           0 :                                         Py_INCREF(py_values_1);
     435             :                                 } else {
     436        1520 :                                         if ((object->values)[values_cntr_1] == NULL) {
     437           0 :                                                 py_values_1 = Py_None;
     438           0 :                                                 Py_INCREF(py_values_1);
     439             :                                         } else {
     440        1520 :                                                 py_values_1 = PyUnicode_Decode((object->values)[values_cntr_1], strlen((object->values)[values_cntr_1]), "utf-8", "ignore");
     441             :                                         }
     442             :                                 }
     443        1520 :                                 PyList_SetItem(py_values, values_cntr_1, py_values_1);
     444             :                         }
     445             :                 }
     446             :         }
     447        1160 :         return py_values;
     448             : }
     449             : 
     450         310 : static int py_CLAIM_STRING_set_values(PyObject *py_obj, PyObject *value, void *closure)
     451             : {
     452         310 :         struct CLAIM_STRING *object = pytalloc_get_ptr(py_obj);
     453         310 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->values));
     454         310 :         if (value == NULL) {
     455           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->values");
     456           0 :                 return -1;
     457             :         }
     458         310 :         if (value == Py_None) {
     459           0 :                 object->values = NULL;
     460             :         } else {
     461         310 :                 object->values = NULL;
     462         310 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
     463             :                 {
     464           0 :                         int values_cntr_1;
     465         310 :                         object->values = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->values, PyList_GET_SIZE(value));
     466         310 :                         if (!object->values) { return -1; }
     467         310 :                         talloc_set_name_const(object->values, "ARRAY: object->values");
     468         628 :                         for (values_cntr_1 = 0; values_cntr_1 < PyList_GET_SIZE(value); values_cntr_1++) {
     469         318 :                                 if (PyList_GET_ITEM(value, values_cntr_1) == NULL) {
     470           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->values)[values_cntr_1]");
     471           0 :                                         return -1;
     472             :                                 }
     473         318 :                                 if (PyList_GET_ITEM(value, values_cntr_1) == Py_None) {
     474           0 :                                         (object->values)[values_cntr_1] = NULL;
     475             :                                 } else {
     476         318 :                                         (object->values)[values_cntr_1] = NULL;
     477             :                                         {
     478           0 :                                                 const char *test_str;
     479           0 :                                                 const char *talloc_str;
     480         318 :                                                 PyObject *unicode = NULL;
     481         318 :                                                 if (PyUnicode_Check(PyList_GET_ITEM(value, values_cntr_1))) {
     482         318 :                                                         unicode = PyUnicode_AsEncodedString(PyList_GET_ITEM(value, values_cntr_1), "utf-8", "ignore");
     483         318 :                                                         if (unicode == NULL) {
     484           0 :                                                                 return -1;
     485             :                                                         }
     486         318 :                                                         test_str = PyBytes_AS_STRING(unicode);
     487           0 :                                                 } else if (PyBytes_Check(PyList_GET_ITEM(value, values_cntr_1))) {
     488           0 :                                                         test_str = PyBytes_AS_STRING(PyList_GET_ITEM(value, values_cntr_1));
     489             :                                                 } else {
     490           0 :                                                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(PyList_GET_ITEM(value, values_cntr_1))->tp_name);
     491           0 :                                                         return -1;
     492             :                                                 }
     493         318 :                                                 talloc_str = talloc_strdup(object->values, test_str);
     494         318 :                                                 if (unicode != NULL) {
     495         159 :                                                         Py_DECREF(unicode);
     496             :                                                 }
     497         318 :                                                 if (talloc_str == NULL) {
     498           0 :                                                         PyErr_NoMemory();
     499           0 :                                                         return -1;
     500             :                                                 }
     501         318 :                                                 (object->values)[values_cntr_1] = talloc_str;
     502             :                                         }
     503             :                                 }
     504             :                         }
     505             :                 }
     506             :         }
     507         310 :         return 0;
     508             : }
     509             : 
     510             : static PyGetSetDef py_CLAIM_STRING_getsetters[] = {
     511             :         {
     512             :                 .name = discard_const_p(char, "value_count"),
     513             :                 .get = py_CLAIM_STRING_get_value_count,
     514             :                 .set = py_CLAIM_STRING_set_value_count,
     515             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     516             :         },
     517             :         {
     518             :                 .name = discard_const_p(char, "values"),
     519             :                 .get = py_CLAIM_STRING_get_values,
     520             :                 .set = py_CLAIM_STRING_set_values,
     521             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
     522             :         },
     523             :         { .name = NULL }
     524             : };
     525             : 
     526         310 : static PyObject *py_CLAIM_STRING_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     527             : {
     528         310 :         return pytalloc_new(struct CLAIM_STRING, type);
     529             : }
     530             : 
     531             : 
     532             : static PyTypeObject CLAIM_STRING_Type = {
     533             :         PyVarObject_HEAD_INIT(NULL, 0)
     534             :         .tp_name = "claims.CLAIM_STRING",
     535             :         .tp_getset = py_CLAIM_STRING_getsetters,
     536             :         .tp_methods = NULL,
     537             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     538             :         .tp_new = py_CLAIM_STRING_new,
     539             : };
     540             : 
     541        1675 : static PyObject *py_import_CLAIM_ENTRY_VALUES(TALLOC_CTX *mem_ctx, int level, union CLAIM_ENTRY_VALUES *in)
     542             : {
     543         105 :         PyObject *ret;
     544             : 
     545        1675 :         switch (level) {
     546          46 :                 case CLAIM_TYPE_INT64:
     547          46 :                         ret = pytalloc_reference_ex(&CLAIM_INT64_Type, mem_ctx, &in->claim_int64);
     548          46 :                         return ret;
     549             : 
     550          70 :                 case CLAIM_TYPE_UINT64:
     551          70 :                         ret = pytalloc_reference_ex(&CLAIM_UINT64_Type, mem_ctx, &in->claim_uint64);
     552          70 :                         return ret;
     553             : 
     554        1498 :                 case CLAIM_TYPE_STRING:
     555        1498 :                         ret = pytalloc_reference_ex(&CLAIM_STRING_Type, mem_ctx, &in->claim_string);
     556        1498 :                         return ret;
     557             : 
     558          61 :                 case CLAIM_TYPE_BOOLEAN:
     559          61 :                         ret = pytalloc_reference_ex(&CLAIM_UINT64_Type, mem_ctx, &in->claim_boolean);
     560          61 :                         return ret;
     561             : 
     562           0 :                 default:
     563           0 :                         ret = Py_None;
     564           0 :                         Py_INCREF(ret);
     565           0 :                         return ret;
     566             : 
     567             :         }
     568             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
     569             :         return NULL;
     570             : }
     571             : 
     572         432 : static union CLAIM_ENTRY_VALUES *py_export_CLAIM_ENTRY_VALUES(TALLOC_CTX *mem_ctx, int level, PyObject *in)
     573             : {
     574         432 :         union CLAIM_ENTRY_VALUES *ret = talloc_zero(mem_ctx, union CLAIM_ENTRY_VALUES);
     575         432 :         switch (level) {
     576          18 :                 case CLAIM_TYPE_INT64:
     577          18 :                         if (in == NULL) {
     578           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->claim_int64");
     579           0 :                                 talloc_free(ret); return NULL;
     580             :                         }
     581          18 :                         PY_CHECK_TYPE(&CLAIM_INT64_Type, in, talloc_free(ret); return NULL;);
     582          18 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
     583           0 :                                 PyErr_NoMemory();
     584           0 :                                 talloc_free(ret); return NULL;
     585             :                         }
     586          18 :                         ret->claim_int64 = *(struct CLAIM_INT64 *)pytalloc_get_ptr(in);
     587          18 :                         break;
     588             : 
     589          30 :                 case CLAIM_TYPE_UINT64:
     590          30 :                         if (in == NULL) {
     591           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->claim_uint64");
     592           0 :                                 talloc_free(ret); return NULL;
     593             :                         }
     594          30 :                         PY_CHECK_TYPE(&CLAIM_UINT64_Type, in, talloc_free(ret); return NULL;);
     595          30 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
     596           0 :                                 PyErr_NoMemory();
     597           0 :                                 talloc_free(ret); return NULL;
     598             :                         }
     599          30 :                         ret->claim_uint64 = *(struct CLAIM_UINT64 *)pytalloc_get_ptr(in);
     600          30 :                         break;
     601             : 
     602         306 :                 case CLAIM_TYPE_STRING:
     603         306 :                         if (in == NULL) {
     604           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->claim_string");
     605           0 :                                 talloc_free(ret); return NULL;
     606             :                         }
     607         306 :                         PY_CHECK_TYPE(&CLAIM_STRING_Type, in, talloc_free(ret); return NULL;);
     608         306 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
     609           0 :                                 PyErr_NoMemory();
     610           0 :                                 talloc_free(ret); return NULL;
     611             :                         }
     612         306 :                         ret->claim_string = *(struct CLAIM_STRING *)pytalloc_get_ptr(in);
     613         306 :                         break;
     614             : 
     615          74 :                 case CLAIM_TYPE_BOOLEAN:
     616          74 :                         if (in == NULL) {
     617           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: ret->claim_boolean");
     618           0 :                                 talloc_free(ret); return NULL;
     619             :                         }
     620          74 :                         PY_CHECK_TYPE(&CLAIM_UINT64_Type, in, talloc_free(ret); return NULL;);
     621          74 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
     622           0 :                                 PyErr_NoMemory();
     623           0 :                                 talloc_free(ret); return NULL;
     624             :                         }
     625          74 :                         ret->claim_boolean = *(struct CLAIM_UINT64 *)pytalloc_get_ptr(in);
     626          74 :                         break;
     627             : 
     628           4 :                 default:
     629           4 :                         break;
     630             : 
     631             :         }
     632             : 
     633         432 :         return ret;
     634             : }
     635             : 
     636        1675 : static PyObject *py_CLAIM_ENTRY_VALUES_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     637             : {
     638        1675 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
     639        1675 :         PyObject *mem_ctx_obj = NULL;
     640        1675 :         TALLOC_CTX *mem_ctx = NULL;
     641        1675 :         int level = 0;
     642        1675 :         PyObject *in_obj = NULL;
     643        1675 :         union CLAIM_ENTRY_VALUES *in = NULL;
     644             : 
     645        1675 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
     646             :                 discard_const_p(char *, kwnames),
     647             :                 &mem_ctx_obj,
     648             :                 &level,
     649             :                 &in_obj)) {
     650           0 :                 return NULL;
     651             :         }
     652        1675 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
     653        1675 :         if (mem_ctx == NULL) {
     654           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
     655           0 :                 return NULL;
     656             :         }
     657        1675 :         in = (union CLAIM_ENTRY_VALUES *)pytalloc_get_ptr(in_obj);
     658        1675 :         if (in == NULL) {
     659           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union CLAIM_ENTRY_VALUES!");
     660           0 :                 return NULL;
     661             :         }
     662             : 
     663        1675 :         return py_import_CLAIM_ENTRY_VALUES(mem_ctx, level, in);
     664             : }
     665             : 
     666         432 : static PyObject *py_CLAIM_ENTRY_VALUES_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     667             : {
     668         432 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
     669         432 :         PyObject *mem_ctx_obj = NULL;
     670         432 :         TALLOC_CTX *mem_ctx = NULL;
     671         432 :         int level = 0;
     672         432 :         PyObject *in = NULL;
     673         432 :         union CLAIM_ENTRY_VALUES *out = NULL;
     674             : 
     675         432 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
     676             :                 discard_const_p(char *, kwnames),
     677             :                 &mem_ctx_obj,
     678             :                 &level,
     679             :                 &in)) {
     680           0 :                 return NULL;
     681             :         }
     682         432 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
     683         432 :         if (mem_ctx == NULL) {
     684           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
     685           0 :                 return NULL;
     686             :         }
     687             : 
     688         432 :         out = py_export_CLAIM_ENTRY_VALUES(mem_ctx, level, in);
     689         432 :         if (out == NULL) {
     690           0 :                 return NULL;
     691             :         }
     692             : 
     693         432 :         return pytalloc_GenericObject_reference(out);
     694             : }
     695             : 
     696             : static PyMethodDef py_CLAIM_ENTRY_VALUES_methods[] = {
     697             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_CLAIM_ENTRY_VALUES_import),
     698             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
     699             :                 "T.__import__(mem_ctx, level, in) => ret." },
     700             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_CLAIM_ENTRY_VALUES_export),
     701             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
     702             :                 "T.__export__(mem_ctx, level, in) => ret." },
     703             :         { NULL, NULL, 0, NULL }
     704             : };
     705             : 
     706           0 : static PyObject *py_CLAIM_ENTRY_VALUES_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     707             : {
     708           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
     709           0 :         return NULL;
     710             : }
     711             : 
     712             : 
     713             : static PyTypeObject CLAIM_ENTRY_VALUES_Type = {
     714             :         PyVarObject_HEAD_INIT(NULL, 0)
     715             :         .tp_name = "claims.CLAIM_ENTRY_VALUES",
     716             :         .tp_getset = NULL,
     717             :         .tp_methods = py_CLAIM_ENTRY_VALUES_methods,
     718             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     719             :         .tp_new = py_CLAIM_ENTRY_VALUES_new,
     720             : };
     721             : 
     722             : 
     723        2180 : static PyObject *py_CLAIM_ENTRY_get_id(PyObject *obj, void *closure)
     724             : {
     725        2180 :         struct CLAIM_ENTRY *object = pytalloc_get_ptr(obj);
     726          29 :         PyObject *py_id;
     727        2180 :         if (object->id == NULL) {
     728           0 :                 Py_RETURN_NONE;
     729             :         }
     730        2180 :         if (object->id == NULL) {
     731           0 :                 py_id = Py_None;
     732           0 :                 Py_INCREF(py_id);
     733             :         } else {
     734        2180 :                 if (object->id == NULL) {
     735           0 :                         py_id = Py_None;
     736           0 :                         Py_INCREF(py_id);
     737             :                 } else {
     738        2180 :                         py_id = PyUnicode_Decode(object->id, strlen(object->id), "utf-8", "ignore");
     739             :                 }
     740             :         }
     741        2180 :         return py_id;
     742             : }
     743             : 
     744         432 : static int py_CLAIM_ENTRY_set_id(PyObject *py_obj, PyObject *value, void *closure)
     745             : {
     746         432 :         struct CLAIM_ENTRY *object = pytalloc_get_ptr(py_obj);
     747         432 :         if (value == NULL) {
     748           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->id");
     749           0 :                 return -1;
     750             :         }
     751         432 :         if (value == Py_None) {
     752           0 :                 object->id = NULL;
     753             :         } else {
     754         432 :                 object->id = NULL;
     755             :                 {
     756           0 :                         const char *test_str;
     757           0 :                         const char *talloc_str;
     758         432 :                         PyObject *unicode = NULL;
     759         432 :                         if (PyUnicode_Check(value)) {
     760         432 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     761         432 :                                 if (unicode == NULL) {
     762           0 :                                         return -1;
     763             :                                 }
     764         432 :                                 test_str = PyBytes_AS_STRING(unicode);
     765           0 :                         } else if (PyBytes_Check(value)) {
     766           0 :                                 test_str = PyBytes_AS_STRING(value);
     767             :                         } else {
     768           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     769           0 :                                 return -1;
     770             :                         }
     771         432 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     772         432 :                         if (unicode != NULL) {
     773         216 :                                 Py_DECREF(unicode);
     774             :                         }
     775         432 :                         if (talloc_str == NULL) {
     776           0 :                                 PyErr_NoMemory();
     777           0 :                                 return -1;
     778             :                         }
     779         432 :                         object->id = talloc_str;
     780             :                 }
     781             :         }
     782         432 :         return 0;
     783             : }
     784             : 
     785         343 : static PyObject *py_CLAIM_ENTRY_get_type(PyObject *obj, void *closure)
     786             : {
     787         343 :         struct CLAIM_ENTRY *object = pytalloc_get_ptr(obj);
     788          29 :         PyObject *py_type;
     789         343 :         py_type = PyLong_FromLong((uint16_t)(object->type));
     790         343 :         return py_type;
     791             : }
     792             : 
     793         432 : static int py_CLAIM_ENTRY_set_type(PyObject *py_obj, PyObject *value, void *closure)
     794             : {
     795         432 :         struct CLAIM_ENTRY *object = pytalloc_get_ptr(py_obj);
     796         432 :         if (value == NULL) {
     797           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->type");
     798           0 :                 return -1;
     799             :         }
     800             :         {
     801         432 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
     802         432 :                 if (PyLong_Check(value)) {
     803           0 :                         unsigned long long test_var;
     804         432 :                         test_var = PyLong_AsUnsignedLongLong(value);
     805         432 :                         if (PyErr_Occurred() != NULL) {
     806           0 :                                 return -1;
     807             :                         }
     808         432 :                         if (test_var > uint_max) {
     809           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     810             :                                   PyLong_Type.tp_name, uint_max, test_var);
     811           0 :                                 return -1;
     812             :                         }
     813         432 :                         object->type = test_var;
     814             :                 } else {
     815           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     816             :                           PyLong_Type.tp_name);
     817           0 :                         return -1;
     818             :                 }
     819             :         }
     820         432 :         return 0;
     821             : }
     822             : 
     823        1675 : static PyObject *py_CLAIM_ENTRY_get_values(PyObject *obj, void *closure)
     824             : {
     825        1675 :         struct CLAIM_ENTRY *object = pytalloc_get_ptr(obj);
     826         105 :         PyObject *py_values;
     827        1675 :         py_values = pyrpc_import_union(&CLAIM_ENTRY_VALUES_Type, pytalloc_get_mem_ctx(obj), object->type, &object->values, "union CLAIM_ENTRY_VALUES");
     828        1675 :         if (py_values == NULL) {
     829           0 :                 return NULL;
     830             :         }
     831        1570 :         return py_values;
     832             : }
     833             : 
     834         432 : static int py_CLAIM_ENTRY_set_values(PyObject *py_obj, PyObject *value, void *closure)
     835             : {
     836         432 :         struct CLAIM_ENTRY *object = pytalloc_get_ptr(py_obj);
     837         432 :         if (value == NULL) {
     838           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->values");
     839           0 :                 return -1;
     840             :         }
     841             :         {
     842           0 :                 union CLAIM_ENTRY_VALUES *values_switch_0;
     843         432 :                 values_switch_0 = (union CLAIM_ENTRY_VALUES *)pyrpc_export_union(&CLAIM_ENTRY_VALUES_Type, pytalloc_get_mem_ctx(py_obj), object->type, value, "union CLAIM_ENTRY_VALUES");
     844         432 :                 if (values_switch_0 == NULL) {
     845           0 :                         return -1;
     846             :                 }
     847         432 :                 object->values = *values_switch_0;
     848             :         }
     849         432 :         return 0;
     850             : }
     851             : 
     852             : static PyGetSetDef py_CLAIM_ENTRY_getsetters[] = {
     853             :         {
     854             :                 .name = discard_const_p(char, "id"),
     855             :                 .get = py_CLAIM_ENTRY_get_id,
     856             :                 .set = py_CLAIM_ENTRY_set_id,
     857             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
     858             :         },
     859             :         {
     860             :                 .name = discard_const_p(char, "type"),
     861             :                 .get = py_CLAIM_ENTRY_get_type,
     862             :                 .set = py_CLAIM_ENTRY_set_type,
     863             :                 .doc = discard_const_p(char, "PIDL-generated element of base type CLAIM_TYPE")
     864             :         },
     865             :         {
     866             :                 .name = discard_const_p(char, "values"),
     867             :                 .get = py_CLAIM_ENTRY_get_values,
     868             :                 .set = py_CLAIM_ENTRY_set_values,
     869             :                 .doc = discard_const_p(char, "PIDL-generated element of base type CLAIM_ENTRY_VALUES")
     870             :         },
     871             :         { .name = NULL }
     872             : };
     873             : 
     874         432 : static PyObject *py_CLAIM_ENTRY_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     875             : {
     876         432 :         return pytalloc_new(struct CLAIM_ENTRY, type);
     877             : }
     878             : 
     879             : 
     880             : static PyTypeObject CLAIM_ENTRY_Type = {
     881             :         PyVarObject_HEAD_INIT(NULL, 0)
     882             :         .tp_name = "claims.CLAIM_ENTRY",
     883             :         .tp_getset = py_CLAIM_ENTRY_getsetters,
     884             :         .tp_methods = NULL,
     885             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
     886             :         .tp_new = py_CLAIM_ENTRY_new,
     887             : };
     888             : 
     889             : 
     890         323 : static PyObject *py_CLAIMS_ARRAY_get_claims_source_type(PyObject *obj, void *closure)
     891             : {
     892         323 :         struct CLAIMS_ARRAY *object = pytalloc_get_ptr(obj);
     893           9 :         PyObject *py_claims_source_type;
     894         323 :         py_claims_source_type = PyLong_FromLong((uint16_t)(object->claims_source_type));
     895         323 :         return py_claims_source_type;
     896             : }
     897             : 
     898         390 : static int py_CLAIMS_ARRAY_set_claims_source_type(PyObject *py_obj, PyObject *value, void *closure)
     899             : {
     900         390 :         struct CLAIMS_ARRAY *object = pytalloc_get_ptr(py_obj);
     901         390 :         if (value == NULL) {
     902           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->claims_source_type");
     903           0 :                 return -1;
     904             :         }
     905             :         {
     906         390 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->claims_source_type));
     907         390 :                 if (PyLong_Check(value)) {
     908           0 :                         unsigned long long test_var;
     909         390 :                         test_var = PyLong_AsUnsignedLongLong(value);
     910         390 :                         if (PyErr_Occurred() != NULL) {
     911           0 :                                 return -1;
     912             :                         }
     913         390 :                         if (test_var > uint_max) {
     914           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     915             :                                   PyLong_Type.tp_name, uint_max, test_var);
     916           0 :                                 return -1;
     917             :                         }
     918         390 :                         object->claims_source_type = test_var;
     919             :                 } else {
     920           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     921             :                           PyLong_Type.tp_name);
     922           0 :                         return -1;
     923             :                 }
     924             :         }
     925         390 :         return 0;
     926             : }
     927             : 
     928         324 : static PyObject *py_CLAIMS_ARRAY_get_claims_count(PyObject *obj, void *closure)
     929             : {
     930         324 :         struct CLAIMS_ARRAY *object = pytalloc_get_ptr(obj);
     931           9 :         PyObject *py_claims_count;
     932         324 :         py_claims_count = PyLong_FromUnsignedLongLong((uint32_t)(object->claims_count));
     933         324 :         return py_claims_count;
     934             : }
     935             : 
     936         390 : static int py_CLAIMS_ARRAY_set_claims_count(PyObject *py_obj, PyObject *value, void *closure)
     937             : {
     938         390 :         struct CLAIMS_ARRAY *object = pytalloc_get_ptr(py_obj);
     939         390 :         if (value == NULL) {
     940           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->claims_count");
     941           0 :                 return -1;
     942             :         }
     943             :         {
     944         390 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->claims_count));
     945         390 :                 if (PyLong_Check(value)) {
     946           0 :                         unsigned long long test_var;
     947         390 :                         test_var = PyLong_AsUnsignedLongLong(value);
     948         390 :                         if (PyErr_Occurred() != NULL) {
     949           0 :                                 return -1;
     950             :                         }
     951         390 :                         if (test_var > uint_max) {
     952           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
     953             :                                   PyLong_Type.tp_name, uint_max, test_var);
     954           0 :                                 return -1;
     955             :                         }
     956         390 :                         object->claims_count = test_var;
     957             :                 } else {
     958           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
     959             :                           PyLong_Type.tp_name);
     960           0 :                         return -1;
     961             :                 }
     962             :         }
     963         390 :         return 0;
     964             : }
     965             : 
     966         324 : static PyObject *py_CLAIMS_ARRAY_get_claim_entries(PyObject *obj, void *closure)
     967             : {
     968         324 :         struct CLAIMS_ARRAY *object = pytalloc_get_ptr(obj);
     969           9 :         PyObject *py_claim_entries;
     970         324 :         if (object->claim_entries == NULL) {
     971           0 :                 Py_RETURN_NONE;
     972             :         }
     973         324 :         if (object->claim_entries == NULL) {
     974           0 :                 py_claim_entries = Py_None;
     975           0 :                 Py_INCREF(py_claim_entries);
     976             :         } else {
     977         324 :                 py_claim_entries = PyList_New(object->claims_count);
     978         324 :                 if (py_claim_entries == NULL) {
     979           0 :                         return NULL;
     980             :                 }
     981             :                 {
     982             :                         int claim_entries_cntr_1;
     983        1883 :                         for (claim_entries_cntr_1 = 0; claim_entries_cntr_1 < (object->claims_count); claim_entries_cntr_1++) {
     984          33 :                                 PyObject *py_claim_entries_1;
     985        1559 :                                 py_claim_entries_1 = pytalloc_reference_ex(&CLAIM_ENTRY_Type, object->claim_entries, &(object->claim_entries)[claim_entries_cntr_1]);
     986        1559 :                                 PyList_SetItem(py_claim_entries, claim_entries_cntr_1, py_claim_entries_1);
     987             :                         }
     988             :                 }
     989             :         }
     990         315 :         return py_claim_entries;
     991             : }
     992             : 
     993         390 : static int py_CLAIMS_ARRAY_set_claim_entries(PyObject *py_obj, PyObject *value, void *closure)
     994             : {
     995         390 :         struct CLAIMS_ARRAY *object = pytalloc_get_ptr(py_obj);
     996         390 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->claim_entries));
     997         390 :         if (value == NULL) {
     998           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->claim_entries");
     999           0 :                 return -1;
    1000             :         }
    1001         390 :         if (value == Py_None) {
    1002           0 :                 object->claim_entries = NULL;
    1003             :         } else {
    1004         390 :                 object->claim_entries = NULL;
    1005         390 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1006             :                 {
    1007           0 :                         int claim_entries_cntr_1;
    1008         390 :                         object->claim_entries = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->claim_entries, PyList_GET_SIZE(value));
    1009         390 :                         if (!object->claim_entries) { return -1; }
    1010         390 :                         talloc_set_name_const(object->claim_entries, "ARRAY: object->claim_entries");
    1011         822 :                         for (claim_entries_cntr_1 = 0; claim_entries_cntr_1 < PyList_GET_SIZE(value); claim_entries_cntr_1++) {
    1012         432 :                                 if (PyList_GET_ITEM(value, claim_entries_cntr_1) == NULL) {
    1013           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->claim_entries)[claim_entries_cntr_1]");
    1014           0 :                                         return -1;
    1015             :                                 }
    1016         432 :                                 PY_CHECK_TYPE(&CLAIM_ENTRY_Type, PyList_GET_ITEM(value, claim_entries_cntr_1), return -1;);
    1017         432 :                                 if (talloc_reference(object->claim_entries, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, claim_entries_cntr_1))) == NULL) {
    1018           0 :                                         PyErr_NoMemory();
    1019           0 :                                         return -1;
    1020             :                                 }
    1021         432 :                                 (object->claim_entries)[claim_entries_cntr_1] = *(struct CLAIM_ENTRY *)pytalloc_get_ptr(PyList_GET_ITEM(value, claim_entries_cntr_1));
    1022             :                         }
    1023             :                 }
    1024             :         }
    1025         390 :         return 0;
    1026             : }
    1027             : 
    1028             : static PyGetSetDef py_CLAIMS_ARRAY_getsetters[] = {
    1029             :         {
    1030             :                 .name = discard_const_p(char, "claims_source_type"),
    1031             :                 .get = py_CLAIMS_ARRAY_get_claims_source_type,
    1032             :                 .set = py_CLAIMS_ARRAY_set_claims_source_type,
    1033             :                 .doc = discard_const_p(char, "PIDL-generated element of base type CLAIMS_SOURCE_TYPE")
    1034             :         },
    1035             :         {
    1036             :                 .name = discard_const_p(char, "claims_count"),
    1037             :                 .get = py_CLAIMS_ARRAY_get_claims_count,
    1038             :                 .set = py_CLAIMS_ARRAY_set_claims_count,
    1039             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1040             :         },
    1041             :         {
    1042             :                 .name = discard_const_p(char, "claim_entries"),
    1043             :                 .get = py_CLAIMS_ARRAY_get_claim_entries,
    1044             :                 .set = py_CLAIMS_ARRAY_set_claim_entries,
    1045             :                 .doc = discard_const_p(char, "PIDL-generated element of base type CLAIM_ENTRY")
    1046             :         },
    1047             :         { .name = NULL }
    1048             : };
    1049             : 
    1050         390 : static PyObject *py_CLAIMS_ARRAY_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1051             : {
    1052         390 :         return pytalloc_new(struct CLAIMS_ARRAY, type);
    1053             : }
    1054             : 
    1055             : 
    1056             : static PyTypeObject CLAIMS_ARRAY_Type = {
    1057             :         PyVarObject_HEAD_INIT(NULL, 0)
    1058             :         .tp_name = "claims.CLAIMS_ARRAY",
    1059             :         .tp_getset = py_CLAIMS_ARRAY_getsetters,
    1060             :         .tp_methods = NULL,
    1061             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1062             :         .tp_new = py_CLAIMS_ARRAY_new,
    1063             : };
    1064             : 
    1065             : 
    1066         344 : static PyObject *py_CLAIMS_SET_METADATA_CTR_get_metadata(PyObject *obj, void *closure)
    1067             : {
    1068         344 :         struct CLAIMS_SET_METADATA_CTR *object = pytalloc_get_ptr(obj);
    1069          29 :         PyObject *py_metadata;
    1070         344 :         if (object->metadata == NULL) {
    1071           0 :                 Py_RETURN_NONE;
    1072             :         }
    1073         344 :         if (object->metadata == NULL) {
    1074           0 :                 py_metadata = Py_None;
    1075           0 :                 Py_INCREF(py_metadata);
    1076             :         } else {
    1077         344 :                 py_metadata = pytalloc_reference_ex(&CLAIMS_SET_METADATA_Type, object->metadata, object->metadata);
    1078             :         }
    1079         344 :         return py_metadata;
    1080             : }
    1081             : 
    1082         380 : static int py_CLAIMS_SET_METADATA_CTR_set_metadata(PyObject *py_obj, PyObject *value, void *closure)
    1083             : {
    1084         380 :         struct CLAIMS_SET_METADATA_CTR *object = pytalloc_get_ptr(py_obj);
    1085         380 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->metadata));
    1086         380 :         if (value == NULL) {
    1087           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->metadata");
    1088           0 :                 return -1;
    1089             :         }
    1090         380 :         if (value == Py_None) {
    1091           0 :                 object->metadata = NULL;
    1092             :         } else {
    1093         380 :                 object->metadata = NULL;
    1094         380 :                 PY_CHECK_TYPE(&CLAIMS_SET_METADATA_Type, value, return -1;);
    1095         380 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1096           0 :                         PyErr_NoMemory();
    1097           0 :                         return -1;
    1098             :                 }
    1099         380 :                 object->metadata = (struct CLAIMS_SET_METADATA *)pytalloc_get_ptr(value);
    1100             :         }
    1101         380 :         return 0;
    1102             : }
    1103             : 
    1104             : static PyGetSetDef py_CLAIMS_SET_METADATA_CTR_getsetters[] = {
    1105             :         {
    1106             :                 .name = discard_const_p(char, "metadata"),
    1107             :                 .get = py_CLAIMS_SET_METADATA_CTR_get_metadata,
    1108             :                 .set = py_CLAIMS_SET_METADATA_CTR_set_metadata,
    1109             :                 .doc = discard_const_p(char, "PIDL-generated element of base type CLAIMS_SET_METADATA")
    1110             :         },
    1111             :         { .name = NULL }
    1112             : };
    1113             : 
    1114         380 : static PyObject *py_CLAIMS_SET_METADATA_CTR_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1115             : {
    1116         380 :         return pytalloc_new(struct CLAIMS_SET_METADATA_CTR, type);
    1117             : }
    1118             : 
    1119             : 
    1120             : static PyTypeObject CLAIMS_SET_METADATA_CTR_Type = {
    1121             :         PyVarObject_HEAD_INIT(NULL, 0)
    1122             :         .tp_name = "claims.CLAIMS_SET_METADATA_CTR",
    1123             :         .tp_getset = py_CLAIMS_SET_METADATA_CTR_getsetters,
    1124             :         .tp_methods = NULL,
    1125             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1126             :         .tp_new = py_CLAIMS_SET_METADATA_CTR_new,
    1127             : };
    1128             : 
    1129             : 
    1130         324 : static PyObject *py_CLAIMS_SET_CTR_get_claims(PyObject *obj, void *closure)
    1131             : {
    1132         324 :         struct CLAIMS_SET_CTR *object = pytalloc_get_ptr(obj);
    1133           9 :         PyObject *py_claims;
    1134         324 :         if (object->claims == NULL) {
    1135           0 :                 Py_RETURN_NONE;
    1136             :         }
    1137         324 :         if (object->claims == NULL) {
    1138           0 :                 py_claims = Py_None;
    1139           0 :                 Py_INCREF(py_claims);
    1140             :         } else {
    1141         324 :                 py_claims = pytalloc_reference_ex(&CLAIMS_SET_Type, object->claims, object->claims);
    1142             :         }
    1143         324 :         return py_claims;
    1144             : }
    1145             : 
    1146         380 : static int py_CLAIMS_SET_CTR_set_claims(PyObject *py_obj, PyObject *value, void *closure)
    1147             : {
    1148         380 :         struct CLAIMS_SET_CTR *object = pytalloc_get_ptr(py_obj);
    1149         380 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->claims));
    1150         380 :         if (value == NULL) {
    1151           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->claims");
    1152           0 :                 return -1;
    1153             :         }
    1154         380 :         if (value == Py_None) {
    1155           0 :                 object->claims = NULL;
    1156             :         } else {
    1157         380 :                 object->claims = NULL;
    1158         380 :                 PY_CHECK_TYPE(&CLAIMS_SET_Type, value, return -1;);
    1159         380 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1160           0 :                         PyErr_NoMemory();
    1161           0 :                         return -1;
    1162             :                 }
    1163         380 :                 object->claims = (struct CLAIMS_SET *)pytalloc_get_ptr(value);
    1164             :         }
    1165         380 :         return 0;
    1166             : }
    1167             : 
    1168             : static PyGetSetDef py_CLAIMS_SET_CTR_getsetters[] = {
    1169             :         {
    1170             :                 .name = discard_const_p(char, "claims"),
    1171             :                 .get = py_CLAIMS_SET_CTR_get_claims,
    1172             :                 .set = py_CLAIMS_SET_CTR_set_claims,
    1173             :                 .doc = discard_const_p(char, "PIDL-generated element of base type CLAIMS_SET")
    1174             :         },
    1175             :         { .name = NULL }
    1176             : };
    1177             : 
    1178         380 : static PyObject *py_CLAIMS_SET_CTR_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1179             : {
    1180         380 :         return pytalloc_new(struct CLAIMS_SET_CTR, type);
    1181             : }
    1182             : 
    1183             : 
    1184             : static PyTypeObject CLAIMS_SET_CTR_Type = {
    1185             :         PyVarObject_HEAD_INIT(NULL, 0)
    1186             :         .tp_name = "claims.CLAIMS_SET_CTR",
    1187             :         .tp_getset = py_CLAIMS_SET_CTR_getsetters,
    1188             :         .tp_methods = NULL,
    1189             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1190             :         .tp_new = py_CLAIMS_SET_CTR_new,
    1191             : };
    1192             : 
    1193             : 
    1194         324 : static PyObject *py_CLAIMS_SET_get_claims_array_count(PyObject *obj, void *closure)
    1195             : {
    1196         324 :         struct CLAIMS_SET *object = pytalloc_get_ptr(obj);
    1197           9 :         PyObject *py_claims_array_count;
    1198         324 :         py_claims_array_count = PyLong_FromUnsignedLongLong((uint32_t)(object->claims_array_count));
    1199         324 :         return py_claims_array_count;
    1200             : }
    1201             : 
    1202         380 : static int py_CLAIMS_SET_set_claims_array_count(PyObject *py_obj, PyObject *value, void *closure)
    1203             : {
    1204         380 :         struct CLAIMS_SET *object = pytalloc_get_ptr(py_obj);
    1205         380 :         if (value == NULL) {
    1206           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->claims_array_count");
    1207           0 :                 return -1;
    1208             :         }
    1209             :         {
    1210         380 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->claims_array_count));
    1211         380 :                 if (PyLong_Check(value)) {
    1212           0 :                         unsigned long long test_var;
    1213         380 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1214         380 :                         if (PyErr_Occurred() != NULL) {
    1215           0 :                                 return -1;
    1216             :                         }
    1217         380 :                         if (test_var > uint_max) {
    1218           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1219             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1220           0 :                                 return -1;
    1221             :                         }
    1222         380 :                         object->claims_array_count = test_var;
    1223             :                 } else {
    1224           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1225             :                           PyLong_Type.tp_name);
    1226           0 :                         return -1;
    1227             :                 }
    1228             :         }
    1229         380 :         return 0;
    1230             : }
    1231             : 
    1232         324 : static PyObject *py_CLAIMS_SET_get_claims_arrays(PyObject *obj, void *closure)
    1233             : {
    1234         324 :         struct CLAIMS_SET *object = pytalloc_get_ptr(obj);
    1235           9 :         PyObject *py_claims_arrays;
    1236         324 :         if (object->claims_arrays == NULL) {
    1237           0 :                 Py_RETURN_NONE;
    1238             :         }
    1239         324 :         if (object->claims_arrays == NULL) {
    1240           0 :                 py_claims_arrays = Py_None;
    1241           0 :                 Py_INCREF(py_claims_arrays);
    1242             :         } else {
    1243         324 :                 py_claims_arrays = PyList_New(object->claims_array_count);
    1244         324 :                 if (py_claims_arrays == NULL) {
    1245           0 :                         return NULL;
    1246             :                 }
    1247             :                 {
    1248             :                         int claims_arrays_cntr_1;
    1249         648 :                         for (claims_arrays_cntr_1 = 0; claims_arrays_cntr_1 < (object->claims_array_count); claims_arrays_cntr_1++) {
    1250           9 :                                 PyObject *py_claims_arrays_1;
    1251         324 :                                 py_claims_arrays_1 = pytalloc_reference_ex(&CLAIMS_ARRAY_Type, object->claims_arrays, &(object->claims_arrays)[claims_arrays_cntr_1]);
    1252         324 :                                 PyList_SetItem(py_claims_arrays, claims_arrays_cntr_1, py_claims_arrays_1);
    1253             :                         }
    1254             :                 }
    1255             :         }
    1256         315 :         return py_claims_arrays;
    1257             : }
    1258             : 
    1259         380 : static int py_CLAIMS_SET_set_claims_arrays(PyObject *py_obj, PyObject *value, void *closure)
    1260             : {
    1261         380 :         struct CLAIMS_SET *object = pytalloc_get_ptr(py_obj);
    1262         380 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->claims_arrays));
    1263         380 :         if (value == NULL) {
    1264           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->claims_arrays");
    1265           0 :                 return -1;
    1266             :         }
    1267         380 :         if (value == Py_None) {
    1268           0 :                 object->claims_arrays = NULL;
    1269             :         } else {
    1270         380 :                 object->claims_arrays = NULL;
    1271         380 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1272             :                 {
    1273           0 :                         int claims_arrays_cntr_1;
    1274         380 :                         object->claims_arrays = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->claims_arrays, PyList_GET_SIZE(value));
    1275         380 :                         if (!object->claims_arrays) { return -1; }
    1276         380 :                         talloc_set_name_const(object->claims_arrays, "ARRAY: object->claims_arrays");
    1277         770 :                         for (claims_arrays_cntr_1 = 0; claims_arrays_cntr_1 < PyList_GET_SIZE(value); claims_arrays_cntr_1++) {
    1278         390 :                                 if (PyList_GET_ITEM(value, claims_arrays_cntr_1) == NULL) {
    1279           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->claims_arrays)[claims_arrays_cntr_1]");
    1280           0 :                                         return -1;
    1281             :                                 }
    1282         390 :                                 PY_CHECK_TYPE(&CLAIMS_ARRAY_Type, PyList_GET_ITEM(value, claims_arrays_cntr_1), return -1;);
    1283         390 :                                 if (talloc_reference(object->claims_arrays, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, claims_arrays_cntr_1))) == NULL) {
    1284           0 :                                         PyErr_NoMemory();
    1285           0 :                                         return -1;
    1286             :                                 }
    1287         390 :                                 (object->claims_arrays)[claims_arrays_cntr_1] = *(struct CLAIMS_ARRAY *)pytalloc_get_ptr(PyList_GET_ITEM(value, claims_arrays_cntr_1));
    1288             :                         }
    1289             :                 }
    1290             :         }
    1291         380 :         return 0;
    1292             : }
    1293             : 
    1294           0 : static PyObject *py_CLAIMS_SET_get_reserved_type(PyObject *obj, void *closure)
    1295             : {
    1296           0 :         struct CLAIMS_SET *object = pytalloc_get_ptr(obj);
    1297           0 :         PyObject *py_reserved_type;
    1298           0 :         py_reserved_type = PyLong_FromLong((uint16_t)(object->reserved_type));
    1299           0 :         return py_reserved_type;
    1300             : }
    1301             : 
    1302           0 : static int py_CLAIMS_SET_set_reserved_type(PyObject *py_obj, PyObject *value, void *closure)
    1303             : {
    1304           0 :         struct CLAIMS_SET *object = pytalloc_get_ptr(py_obj);
    1305           0 :         if (value == NULL) {
    1306           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->reserved_type");
    1307           0 :                 return -1;
    1308             :         }
    1309             :         {
    1310           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved_type));
    1311           0 :                 if (PyLong_Check(value)) {
    1312           0 :                         unsigned long long test_var;
    1313           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1314           0 :                         if (PyErr_Occurred() != NULL) {
    1315           0 :                                 return -1;
    1316             :                         }
    1317           0 :                         if (test_var > uint_max) {
    1318           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1319             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1320           0 :                                 return -1;
    1321             :                         }
    1322           0 :                         object->reserved_type = test_var;
    1323             :                 } else {
    1324           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1325             :                           PyLong_Type.tp_name);
    1326           0 :                         return -1;
    1327             :                 }
    1328             :         }
    1329           0 :         return 0;
    1330             : }
    1331             : 
    1332           0 : static PyObject *py_CLAIMS_SET_get_reserved_field_size(PyObject *obj, void *closure)
    1333             : {
    1334           0 :         struct CLAIMS_SET *object = pytalloc_get_ptr(obj);
    1335           0 :         PyObject *py_reserved_field_size;
    1336           0 :         py_reserved_field_size = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved_field_size));
    1337           0 :         return py_reserved_field_size;
    1338             : }
    1339             : 
    1340           0 : static int py_CLAIMS_SET_set_reserved_field_size(PyObject *py_obj, PyObject *value, void *closure)
    1341             : {
    1342           0 :         struct CLAIMS_SET *object = pytalloc_get_ptr(py_obj);
    1343           0 :         if (value == NULL) {
    1344           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->reserved_field_size");
    1345           0 :                 return -1;
    1346             :         }
    1347             :         {
    1348           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved_field_size));
    1349           0 :                 if (PyLong_Check(value)) {
    1350           0 :                         unsigned long long test_var;
    1351           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1352           0 :                         if (PyErr_Occurred() != NULL) {
    1353           0 :                                 return -1;
    1354             :                         }
    1355           0 :                         if (test_var > uint_max) {
    1356           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1357             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1358           0 :                                 return -1;
    1359             :                         }
    1360           0 :                         object->reserved_field_size = test_var;
    1361             :                 } else {
    1362           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1363             :                           PyLong_Type.tp_name);
    1364           0 :                         return -1;
    1365             :                 }
    1366             :         }
    1367           0 :         return 0;
    1368             : }
    1369             : 
    1370           0 : static PyObject *py_CLAIMS_SET_get_reserved_field(PyObject *obj, void *closure)
    1371             : {
    1372           0 :         struct CLAIMS_SET *object = pytalloc_get_ptr(obj);
    1373           0 :         PyObject *py_reserved_field;
    1374           0 :         if (object->reserved_field == NULL) {
    1375           0 :                 Py_RETURN_NONE;
    1376             :         }
    1377           0 :         if (object->reserved_field == NULL) {
    1378           0 :                 py_reserved_field = Py_None;
    1379           0 :                 Py_INCREF(py_reserved_field);
    1380             :         } else {
    1381           0 :                 py_reserved_field = PyList_New(object->reserved_field_size);
    1382           0 :                 if (py_reserved_field == NULL) {
    1383           0 :                         return NULL;
    1384             :                 }
    1385             :                 {
    1386             :                         int reserved_field_cntr_1;
    1387           0 :                         for (reserved_field_cntr_1 = 0; reserved_field_cntr_1 < (object->reserved_field_size); reserved_field_cntr_1++) {
    1388           0 :                                 PyObject *py_reserved_field_1;
    1389           0 :                                 py_reserved_field_1 = PyLong_FromLong((uint16_t)((object->reserved_field)[reserved_field_cntr_1]));
    1390           0 :                                 PyList_SetItem(py_reserved_field, reserved_field_cntr_1, py_reserved_field_1);
    1391             :                         }
    1392             :                 }
    1393             :         }
    1394           0 :         return py_reserved_field;
    1395             : }
    1396             : 
    1397           0 : static int py_CLAIMS_SET_set_reserved_field(PyObject *py_obj, PyObject *value, void *closure)
    1398             : {
    1399           0 :         struct CLAIMS_SET *object = pytalloc_get_ptr(py_obj);
    1400           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->reserved_field));
    1401           0 :         if (value == NULL) {
    1402           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->reserved_field");
    1403           0 :                 return -1;
    1404             :         }
    1405           0 :         if (value == Py_None) {
    1406           0 :                 object->reserved_field = NULL;
    1407             :         } else {
    1408           0 :                 object->reserved_field = NULL;
    1409           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1410             :                 {
    1411           0 :                         int reserved_field_cntr_1;
    1412           0 :                         object->reserved_field = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->reserved_field, PyList_GET_SIZE(value));
    1413           0 :                         if (!object->reserved_field) { return -1; }
    1414           0 :                         talloc_set_name_const(object->reserved_field, "ARRAY: object->reserved_field");
    1415           0 :                         for (reserved_field_cntr_1 = 0; reserved_field_cntr_1 < PyList_GET_SIZE(value); reserved_field_cntr_1++) {
    1416           0 :                                 if (PyList_GET_ITEM(value, reserved_field_cntr_1) == NULL) {
    1417           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->reserved_field)[reserved_field_cntr_1]");
    1418           0 :                                         return -1;
    1419             :                                 }
    1420             :                                 {
    1421           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->reserved_field)[reserved_field_cntr_1]));
    1422           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, reserved_field_cntr_1))) {
    1423           0 :                                                 unsigned long long test_var;
    1424           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, reserved_field_cntr_1));
    1425           0 :                                                 if (PyErr_Occurred() != NULL) {
    1426           0 :                                                         return -1;
    1427             :                                                 }
    1428           0 :                                                 if (test_var > uint_max) {
    1429           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1430             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    1431           0 :                                                         return -1;
    1432             :                                                 }
    1433           0 :                                                 (object->reserved_field)[reserved_field_cntr_1] = test_var;
    1434             :                                         } else {
    1435           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
    1436             :                                                   PyLong_Type.tp_name);
    1437           0 :                                                 return -1;
    1438             :                                         }
    1439             :                                 }
    1440             :                         }
    1441             :                 }
    1442             :         }
    1443           0 :         return 0;
    1444             : }
    1445             : 
    1446             : static PyGetSetDef py_CLAIMS_SET_getsetters[] = {
    1447             :         {
    1448             :                 .name = discard_const_p(char, "claims_array_count"),
    1449             :                 .get = py_CLAIMS_SET_get_claims_array_count,
    1450             :                 .set = py_CLAIMS_SET_set_claims_array_count,
    1451             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1452             :         },
    1453             :         {
    1454             :                 .name = discard_const_p(char, "claims_arrays"),
    1455             :                 .get = py_CLAIMS_SET_get_claims_arrays,
    1456             :                 .set = py_CLAIMS_SET_set_claims_arrays,
    1457             :                 .doc = discard_const_p(char, "PIDL-generated element of base type CLAIMS_ARRAY")
    1458             :         },
    1459             :         {
    1460             :                 .name = discard_const_p(char, "reserved_type"),
    1461             :                 .get = py_CLAIMS_SET_get_reserved_type,
    1462             :                 .set = py_CLAIMS_SET_set_reserved_type,
    1463             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1464             :         },
    1465             :         {
    1466             :                 .name = discard_const_p(char, "reserved_field_size"),
    1467             :                 .get = py_CLAIMS_SET_get_reserved_field_size,
    1468             :                 .set = py_CLAIMS_SET_set_reserved_field_size,
    1469             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1470             :         },
    1471             :         {
    1472             :                 .name = discard_const_p(char, "reserved_field"),
    1473             :                 .get = py_CLAIMS_SET_get_reserved_field,
    1474             :                 .set = py_CLAIMS_SET_set_reserved_field,
    1475             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    1476             :         },
    1477             :         { .name = NULL }
    1478             : };
    1479             : 
    1480         380 : static PyObject *py_CLAIMS_SET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1481             : {
    1482         380 :         return pytalloc_new(struct CLAIMS_SET, type);
    1483             : }
    1484             : 
    1485           0 : static PyObject *py_CLAIMS_SET_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    1486             : {
    1487           0 :         struct CLAIMS_SET *object = pytalloc_get_ptr(py_obj);
    1488           0 :         PyObject *ret = NULL;
    1489           0 :         DATA_BLOB blob;
    1490           0 :         enum ndr_err_code err;
    1491           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    1492           0 :         if (tmp_ctx == NULL) {
    1493           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    1494           0 :                 return NULL;
    1495             :         }
    1496           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_CLAIMS_SET);
    1497           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1498           0 :                 TALLOC_FREE(tmp_ctx);
    1499           0 :                 PyErr_SetNdrError(err);
    1500           0 :                 return NULL;
    1501             :         }
    1502             : 
    1503           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    1504           0 :         TALLOC_FREE(tmp_ctx);
    1505           0 :         return ret;
    1506             : }
    1507             : 
    1508           0 : static PyObject *py_CLAIMS_SET_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    1509             : {
    1510           0 :         struct CLAIMS_SET *object = pytalloc_get_ptr(py_obj);
    1511           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1512           0 :         Py_ssize_t blob_length = 0;
    1513           0 :         enum ndr_err_code err;
    1514           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    1515           0 :         PyObject *allow_remaining_obj = NULL;
    1516           0 :         bool allow_remaining = false;
    1517             : 
    1518           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    1519             :                 discard_const_p(char *, kwnames),
    1520             :                 &blob.data, &blob_length,
    1521             :                 &allow_remaining_obj)) {
    1522           0 :                 return NULL;
    1523             :         }
    1524           0 :         blob.length = blob_length;
    1525             : 
    1526           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    1527           0 :                 allow_remaining = true;
    1528             :         }
    1529             : 
    1530           0 :         if (allow_remaining) {
    1531           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_CLAIMS_SET);
    1532             :         } else {
    1533           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_CLAIMS_SET);
    1534             :         }
    1535           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1536           0 :                 PyErr_SetNdrError(err);
    1537           0 :                 return NULL;
    1538             :         }
    1539             : 
    1540           0 :         Py_RETURN_NONE;
    1541             : }
    1542             : 
    1543           0 : static PyObject *py_CLAIMS_SET_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    1544             : {
    1545           0 :         struct CLAIMS_SET *object = pytalloc_get_ptr(py_obj);
    1546           0 :         PyObject *ret;
    1547           0 :         char *retstr;
    1548             : 
    1549           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_CLAIMS_SET, "CLAIMS_SET", object);
    1550           0 :         ret = PyUnicode_FromString(retstr);
    1551           0 :         talloc_free(retstr);
    1552             : 
    1553           0 :         return ret;
    1554             : }
    1555             : 
    1556             : static PyMethodDef py_CLAIMS_SET_methods[] = {
    1557             :         { "__ndr_pack__", (PyCFunction)py_CLAIMS_SET_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    1558             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_CLAIMS_SET_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    1559             :         { "__ndr_print__", (PyCFunction)py_CLAIMS_SET_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    1560             :         { NULL, NULL, 0, NULL }
    1561             : };
    1562             : 
    1563             : 
    1564             : static PyTypeObject CLAIMS_SET_Type = {
    1565             :         PyVarObject_HEAD_INIT(NULL, 0)
    1566             :         .tp_name = "claims.CLAIMS_SET",
    1567             :         .tp_getset = py_CLAIMS_SET_getsetters,
    1568             :         .tp_methods = py_CLAIMS_SET_methods,
    1569             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1570             :         .tp_new = py_CLAIMS_SET_new,
    1571             : };
    1572             : 
    1573             : 
    1574         324 : static PyObject *py_CLAIMS_SET_NDR_get_claims(PyObject *obj, void *closure)
    1575             : {
    1576         324 :         struct CLAIMS_SET_NDR *object = pytalloc_get_ptr(obj);
    1577           9 :         PyObject *py_claims;
    1578         324 :         py_claims = pytalloc_reference_ex(&CLAIMS_SET_CTR_Type, pytalloc_get_mem_ctx(obj), &object->claims);
    1579         324 :         return py_claims;
    1580             : }
    1581             : 
    1582         380 : static int py_CLAIMS_SET_NDR_set_claims(PyObject *py_obj, PyObject *value, void *closure)
    1583             : {
    1584         380 :         struct CLAIMS_SET_NDR *object = pytalloc_get_ptr(py_obj);
    1585         380 :         if (value == NULL) {
    1586           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->claims");
    1587           0 :                 return -1;
    1588             :         }
    1589         380 :         PY_CHECK_TYPE(&CLAIMS_SET_CTR_Type, value, return -1;);
    1590         380 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1591           0 :                 PyErr_NoMemory();
    1592           0 :                 return -1;
    1593             :         }
    1594         380 :         object->claims = *(struct CLAIMS_SET_CTR *)pytalloc_get_ptr(value);
    1595         380 :         return 0;
    1596             : }
    1597             : 
    1598             : static PyGetSetDef py_CLAIMS_SET_NDR_getsetters[] = {
    1599             :         {
    1600             :                 .name = discard_const_p(char, "claims"),
    1601             :                 .get = py_CLAIMS_SET_NDR_get_claims,
    1602             :                 .set = py_CLAIMS_SET_NDR_set_claims,
    1603             :                 .doc = discard_const_p(char, "PIDL-generated element of base type CLAIMS_SET_CTR")
    1604             :         },
    1605             :         { .name = NULL }
    1606             : };
    1607             : 
    1608         380 : static PyObject *py_CLAIMS_SET_NDR_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1609             : {
    1610         380 :         return pytalloc_new(struct CLAIMS_SET_NDR, type);
    1611             : }
    1612             : 
    1613           0 : static PyObject *py_CLAIMS_SET_NDR_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    1614             : {
    1615           0 :         struct CLAIMS_SET_NDR *object = pytalloc_get_ptr(py_obj);
    1616           0 :         PyObject *ret = NULL;
    1617           0 :         DATA_BLOB blob;
    1618           0 :         enum ndr_err_code err;
    1619           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    1620           0 :         if (tmp_ctx == NULL) {
    1621           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    1622           0 :                 return NULL;
    1623             :         }
    1624           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_CLAIMS_SET_NDR);
    1625           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1626           0 :                 TALLOC_FREE(tmp_ctx);
    1627           0 :                 PyErr_SetNdrError(err);
    1628           0 :                 return NULL;
    1629             :         }
    1630             : 
    1631           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    1632           0 :         TALLOC_FREE(tmp_ctx);
    1633           0 :         return ret;
    1634             : }
    1635             : 
    1636           0 : static PyObject *py_CLAIMS_SET_NDR_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    1637             : {
    1638           0 :         struct CLAIMS_SET_NDR *object = pytalloc_get_ptr(py_obj);
    1639           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1640           0 :         Py_ssize_t blob_length = 0;
    1641           0 :         enum ndr_err_code err;
    1642           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    1643           0 :         PyObject *allow_remaining_obj = NULL;
    1644           0 :         bool allow_remaining = false;
    1645             : 
    1646           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    1647             :                 discard_const_p(char *, kwnames),
    1648             :                 &blob.data, &blob_length,
    1649             :                 &allow_remaining_obj)) {
    1650           0 :                 return NULL;
    1651             :         }
    1652           0 :         blob.length = blob_length;
    1653             : 
    1654           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    1655           0 :                 allow_remaining = true;
    1656             :         }
    1657             : 
    1658           0 :         if (allow_remaining) {
    1659           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_CLAIMS_SET_NDR);
    1660             :         } else {
    1661           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_CLAIMS_SET_NDR);
    1662             :         }
    1663           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1664           0 :                 PyErr_SetNdrError(err);
    1665           0 :                 return NULL;
    1666             :         }
    1667             : 
    1668           0 :         Py_RETURN_NONE;
    1669             : }
    1670             : 
    1671           0 : static PyObject *py_CLAIMS_SET_NDR_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    1672             : {
    1673           0 :         struct CLAIMS_SET_NDR *object = pytalloc_get_ptr(py_obj);
    1674           0 :         PyObject *ret;
    1675           0 :         char *retstr;
    1676             : 
    1677           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_CLAIMS_SET_NDR, "CLAIMS_SET_NDR", object);
    1678           0 :         ret = PyUnicode_FromString(retstr);
    1679           0 :         talloc_free(retstr);
    1680             : 
    1681           0 :         return ret;
    1682             : }
    1683             : 
    1684             : static PyMethodDef py_CLAIMS_SET_NDR_methods[] = {
    1685             :         { "__ndr_pack__", (PyCFunction)py_CLAIMS_SET_NDR_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    1686             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_CLAIMS_SET_NDR_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    1687             :         { "__ndr_print__", (PyCFunction)py_CLAIMS_SET_NDR_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    1688             :         { NULL, NULL, 0, NULL }
    1689             : };
    1690             : 
    1691             : 
    1692             : static PyTypeObject CLAIMS_SET_NDR_Type = {
    1693             :         PyVarObject_HEAD_INIT(NULL, 0)
    1694             :         .tp_name = "claims.CLAIMS_SET_NDR",
    1695             :         .tp_getset = py_CLAIMS_SET_NDR_getsetters,
    1696             :         .tp_methods = py_CLAIMS_SET_NDR_methods,
    1697             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1698             :         .tp_new = py_CLAIMS_SET_NDR_new,
    1699             : };
    1700             : 
    1701             : 
    1702         344 : static PyObject *py_CLAIMS_SET_METADATA_NDR_get_claims(PyObject *obj, void *closure)
    1703             : {
    1704         344 :         struct CLAIMS_SET_METADATA_NDR *object = pytalloc_get_ptr(obj);
    1705          29 :         PyObject *py_claims;
    1706         344 :         py_claims = pytalloc_reference_ex(&CLAIMS_SET_METADATA_CTR_Type, pytalloc_get_mem_ctx(obj), &object->claims);
    1707         344 :         return py_claims;
    1708             : }
    1709             : 
    1710         380 : static int py_CLAIMS_SET_METADATA_NDR_set_claims(PyObject *py_obj, PyObject *value, void *closure)
    1711             : {
    1712         380 :         struct CLAIMS_SET_METADATA_NDR *object = pytalloc_get_ptr(py_obj);
    1713         380 :         if (value == NULL) {
    1714           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->claims");
    1715           0 :                 return -1;
    1716             :         }
    1717         380 :         PY_CHECK_TYPE(&CLAIMS_SET_METADATA_CTR_Type, value, return -1;);
    1718         380 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1719           0 :                 PyErr_NoMemory();
    1720           0 :                 return -1;
    1721             :         }
    1722         380 :         object->claims = *(struct CLAIMS_SET_METADATA_CTR *)pytalloc_get_ptr(value);
    1723         380 :         return 0;
    1724             : }
    1725             : 
    1726             : static PyGetSetDef py_CLAIMS_SET_METADATA_NDR_getsetters[] = {
    1727             :         {
    1728             :                 .name = discard_const_p(char, "claims"),
    1729             :                 .get = py_CLAIMS_SET_METADATA_NDR_get_claims,
    1730             :                 .set = py_CLAIMS_SET_METADATA_NDR_set_claims,
    1731             :                 .doc = discard_const_p(char, "PIDL-generated element of base type CLAIMS_SET_METADATA_CTR")
    1732             :         },
    1733             :         { .name = NULL }
    1734             : };
    1735             : 
    1736         710 : static PyObject *py_CLAIMS_SET_METADATA_NDR_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1737             : {
    1738         710 :         return pytalloc_new(struct CLAIMS_SET_METADATA_NDR, type);
    1739             : }
    1740             : 
    1741         393 : static PyObject *py_CLAIMS_SET_METADATA_NDR_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    1742             : {
    1743         393 :         struct CLAIMS_SET_METADATA_NDR *object = pytalloc_get_ptr(py_obj);
    1744         393 :         PyObject *ret = NULL;
    1745          13 :         DATA_BLOB blob;
    1746          13 :         enum ndr_err_code err;
    1747         393 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    1748         393 :         if (tmp_ctx == NULL) {
    1749           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    1750           0 :                 return NULL;
    1751             :         }
    1752         393 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_CLAIMS_SET_METADATA_NDR);
    1753         393 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1754           0 :                 TALLOC_FREE(tmp_ctx);
    1755           0 :                 PyErr_SetNdrError(err);
    1756           0 :                 return NULL;
    1757             :         }
    1758             : 
    1759         393 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    1760         393 :         TALLOC_FREE(tmp_ctx);
    1761         393 :         return ret;
    1762             : }
    1763             : 
    1764         330 : static PyObject *py_CLAIMS_SET_METADATA_NDR_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    1765             : {
    1766         330 :         struct CLAIMS_SET_METADATA_NDR *object = pytalloc_get_ptr(py_obj);
    1767         330 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1768         330 :         Py_ssize_t blob_length = 0;
    1769          15 :         enum ndr_err_code err;
    1770         330 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    1771         330 :         PyObject *allow_remaining_obj = NULL;
    1772         330 :         bool allow_remaining = false;
    1773             : 
    1774         330 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    1775             :                 discard_const_p(char *, kwnames),
    1776             :                 &blob.data, &blob_length,
    1777             :                 &allow_remaining_obj)) {
    1778           0 :                 return NULL;
    1779             :         }
    1780         330 :         blob.length = blob_length;
    1781             : 
    1782         330 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    1783           0 :                 allow_remaining = true;
    1784             :         }
    1785             : 
    1786         315 :         if (allow_remaining) {
    1787           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_CLAIMS_SET_METADATA_NDR);
    1788             :         } else {
    1789         330 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_CLAIMS_SET_METADATA_NDR);
    1790             :         }
    1791         330 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1792           0 :                 PyErr_SetNdrError(err);
    1793           0 :                 return NULL;
    1794             :         }
    1795             : 
    1796         330 :         Py_RETURN_NONE;
    1797             : }
    1798             : 
    1799           0 : static PyObject *py_CLAIMS_SET_METADATA_NDR_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    1800             : {
    1801           0 :         struct CLAIMS_SET_METADATA_NDR *object = pytalloc_get_ptr(py_obj);
    1802           0 :         PyObject *ret;
    1803           0 :         char *retstr;
    1804             : 
    1805           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_CLAIMS_SET_METADATA_NDR, "CLAIMS_SET_METADATA_NDR", object);
    1806           0 :         ret = PyUnicode_FromString(retstr);
    1807           0 :         talloc_free(retstr);
    1808             : 
    1809           0 :         return ret;
    1810             : }
    1811             : 
    1812             : static PyMethodDef py_CLAIMS_SET_METADATA_NDR_methods[] = {
    1813             :         { "__ndr_pack__", (PyCFunction)py_CLAIMS_SET_METADATA_NDR_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    1814             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_CLAIMS_SET_METADATA_NDR_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    1815             :         { "__ndr_print__", (PyCFunction)py_CLAIMS_SET_METADATA_NDR_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    1816             :         { NULL, NULL, 0, NULL }
    1817             : };
    1818             : 
    1819             : 
    1820             : static PyTypeObject CLAIMS_SET_METADATA_NDR_Type = {
    1821             :         PyVarObject_HEAD_INIT(NULL, 0)
    1822             :         .tp_name = "claims.CLAIMS_SET_METADATA_NDR",
    1823             :         .tp_getset = py_CLAIMS_SET_METADATA_NDR_getsetters,
    1824             :         .tp_methods = py_CLAIMS_SET_METADATA_NDR_methods,
    1825             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1826             :         .tp_new = py_CLAIMS_SET_METADATA_NDR_new,
    1827             : };
    1828             : 
    1829             : 
    1830           6 : static PyObject *py_CLAIMS_SET_METADATA_get_claims_set_size(PyObject *obj, void *closure)
    1831             : {
    1832           6 :         struct CLAIMS_SET_METADATA *object = pytalloc_get_ptr(obj);
    1833           6 :         PyObject *py_claims_set_size;
    1834           6 :         py_claims_set_size = PyLong_FromUnsignedLongLong((uint32_t)(object->claims_set_size));
    1835           6 :         return py_claims_set_size;
    1836             : }
    1837             : 
    1838           2 : static int py_CLAIMS_SET_METADATA_set_claims_set_size(PyObject *py_obj, PyObject *value, void *closure)
    1839             : {
    1840           2 :         struct CLAIMS_SET_METADATA *object = pytalloc_get_ptr(py_obj);
    1841           2 :         if (value == NULL) {
    1842           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->claims_set_size");
    1843           0 :                 return -1;
    1844             :         }
    1845             :         {
    1846           2 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->claims_set_size));
    1847           2 :                 if (PyLong_Check(value)) {
    1848           2 :                         unsigned long long test_var;
    1849           2 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1850           2 :                         if (PyErr_Occurred() != NULL) {
    1851           0 :                                 return -1;
    1852             :                         }
    1853           2 :                         if (test_var > uint_max) {
    1854           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1855             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1856           0 :                                 return -1;
    1857             :                         }
    1858           2 :                         object->claims_set_size = test_var;
    1859             :                 } else {
    1860           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1861             :                           PyLong_Type.tp_name);
    1862           0 :                         return -1;
    1863             :                 }
    1864             :         }
    1865           2 :         return 0;
    1866             : }
    1867             : 
    1868         639 : static PyObject *py_CLAIMS_SET_METADATA_get_claims_set(PyObject *obj, void *closure)
    1869             : {
    1870         639 :         struct CLAIMS_SET_METADATA *object = pytalloc_get_ptr(obj);
    1871           9 :         PyObject *py_claims_set;
    1872         639 :         if (object->claims_set == NULL) {
    1873           0 :                 Py_RETURN_NONE;
    1874             :         }
    1875         639 :         if (object->claims_set == NULL) {
    1876           0 :                 py_claims_set = Py_None;
    1877           0 :                 Py_INCREF(py_claims_set);
    1878             :         } else {
    1879         639 :                 py_claims_set = pytalloc_reference_ex(&CLAIMS_SET_NDR_Type, object->claims_set, object->claims_set);
    1880             :         }
    1881         639 :         return py_claims_set;
    1882             : }
    1883             : 
    1884         380 : static int py_CLAIMS_SET_METADATA_set_claims_set(PyObject *py_obj, PyObject *value, void *closure)
    1885             : {
    1886         380 :         struct CLAIMS_SET_METADATA *object = pytalloc_get_ptr(py_obj);
    1887         380 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->claims_set));
    1888         380 :         if (value == NULL) {
    1889           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->claims_set");
    1890           0 :                 return -1;
    1891             :         }
    1892         380 :         if (value == Py_None) {
    1893           0 :                 object->claims_set = NULL;
    1894             :         } else {
    1895         380 :                 object->claims_set = NULL;
    1896         380 :                 PY_CHECK_TYPE(&CLAIMS_SET_NDR_Type, value, return -1;);
    1897         380 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1898           0 :                         PyErr_NoMemory();
    1899           0 :                         return -1;
    1900             :                 }
    1901         380 :                 object->claims_set = (struct CLAIMS_SET_NDR *)pytalloc_get_ptr(value);
    1902             :         }
    1903         380 :         return 0;
    1904             : }
    1905             : 
    1906         323 : static PyObject *py_CLAIMS_SET_METADATA_get_compression_format(PyObject *obj, void *closure)
    1907             : {
    1908         323 :         struct CLAIMS_SET_METADATA *object = pytalloc_get_ptr(obj);
    1909           8 :         PyObject *py_compression_format;
    1910         323 :         py_compression_format = PyLong_FromLong((uint16_t)(object->compression_format));
    1911         323 :         return py_compression_format;
    1912             : }
    1913             : 
    1914         384 : static int py_CLAIMS_SET_METADATA_set_compression_format(PyObject *py_obj, PyObject *value, void *closure)
    1915             : {
    1916         384 :         struct CLAIMS_SET_METADATA *object = pytalloc_get_ptr(py_obj);
    1917         384 :         if (value == NULL) {
    1918           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->compression_format");
    1919           0 :                 return -1;
    1920             :         }
    1921             :         {
    1922         384 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->compression_format));
    1923         384 :                 if (PyLong_Check(value)) {
    1924           4 :                         unsigned long long test_var;
    1925         384 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1926         384 :                         if (PyErr_Occurred() != NULL) {
    1927           0 :                                 return -1;
    1928             :                         }
    1929         384 :                         if (test_var > uint_max) {
    1930           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1931             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1932           0 :                                 return -1;
    1933             :                         }
    1934         384 :                         object->compression_format = test_var;
    1935             :                 } else {
    1936           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1937             :                           PyLong_Type.tp_name);
    1938           0 :                         return -1;
    1939             :                 }
    1940             :         }
    1941         384 :         return 0;
    1942             : }
    1943             : 
    1944         327 : static PyObject *py_CLAIMS_SET_METADATA_get_uncompressed_claims_set_size(PyObject *obj, void *closure)
    1945             : {
    1946         327 :         struct CLAIMS_SET_METADATA *object = pytalloc_get_ptr(obj);
    1947          12 :         PyObject *py_uncompressed_claims_set_size;
    1948         327 :         py_uncompressed_claims_set_size = PyLong_FromUnsignedLongLong((uint32_t)(object->uncompressed_claims_set_size));
    1949         327 :         return py_uncompressed_claims_set_size;
    1950             : }
    1951             : 
    1952           2 : static int py_CLAIMS_SET_METADATA_set_uncompressed_claims_set_size(PyObject *py_obj, PyObject *value, void *closure)
    1953             : {
    1954           2 :         struct CLAIMS_SET_METADATA *object = pytalloc_get_ptr(py_obj);
    1955           2 :         if (value == NULL) {
    1956           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->uncompressed_claims_set_size");
    1957           0 :                 return -1;
    1958             :         }
    1959             :         {
    1960           2 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->uncompressed_claims_set_size));
    1961           2 :                 if (PyLong_Check(value)) {
    1962           2 :                         unsigned long long test_var;
    1963           2 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1964           2 :                         if (PyErr_Occurred() != NULL) {
    1965           0 :                                 return -1;
    1966             :                         }
    1967           2 :                         if (test_var > uint_max) {
    1968           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    1969             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1970           0 :                                 return -1;
    1971             :                         }
    1972           2 :                         object->uncompressed_claims_set_size = test_var;
    1973             :                 } else {
    1974           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    1975             :                           PyLong_Type.tp_name);
    1976           0 :                         return -1;
    1977             :                 }
    1978             :         }
    1979           2 :         return 0;
    1980             : }
    1981             : 
    1982           0 : static PyObject *py_CLAIMS_SET_METADATA_get_reserved_type(PyObject *obj, void *closure)
    1983             : {
    1984           0 :         struct CLAIMS_SET_METADATA *object = pytalloc_get_ptr(obj);
    1985           0 :         PyObject *py_reserved_type;
    1986           0 :         py_reserved_type = PyLong_FromLong((uint16_t)(object->reserved_type));
    1987           0 :         return py_reserved_type;
    1988             : }
    1989             : 
    1990           0 : static int py_CLAIMS_SET_METADATA_set_reserved_type(PyObject *py_obj, PyObject *value, void *closure)
    1991             : {
    1992           0 :         struct CLAIMS_SET_METADATA *object = pytalloc_get_ptr(py_obj);
    1993           0 :         if (value == NULL) {
    1994           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->reserved_type");
    1995           0 :                 return -1;
    1996             :         }
    1997             :         {
    1998           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved_type));
    1999           0 :                 if (PyLong_Check(value)) {
    2000           0 :                         unsigned long long test_var;
    2001           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2002           0 :                         if (PyErr_Occurred() != NULL) {
    2003           0 :                                 return -1;
    2004             :                         }
    2005           0 :                         if (test_var > uint_max) {
    2006           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2007             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2008           0 :                                 return -1;
    2009             :                         }
    2010           0 :                         object->reserved_type = test_var;
    2011             :                 } else {
    2012           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2013             :                           PyLong_Type.tp_name);
    2014           0 :                         return -1;
    2015             :                 }
    2016             :         }
    2017           0 :         return 0;
    2018             : }
    2019             : 
    2020           0 : static PyObject *py_CLAIMS_SET_METADATA_get_reserved_field_size(PyObject *obj, void *closure)
    2021             : {
    2022           0 :         struct CLAIMS_SET_METADATA *object = pytalloc_get_ptr(obj);
    2023           0 :         PyObject *py_reserved_field_size;
    2024           0 :         py_reserved_field_size = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved_field_size));
    2025           0 :         return py_reserved_field_size;
    2026             : }
    2027             : 
    2028           0 : static int py_CLAIMS_SET_METADATA_set_reserved_field_size(PyObject *py_obj, PyObject *value, void *closure)
    2029             : {
    2030           0 :         struct CLAIMS_SET_METADATA *object = pytalloc_get_ptr(py_obj);
    2031           0 :         if (value == NULL) {
    2032           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->reserved_field_size");
    2033           0 :                 return -1;
    2034             :         }
    2035             :         {
    2036           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved_field_size));
    2037           0 :                 if (PyLong_Check(value)) {
    2038           0 :                         unsigned long long test_var;
    2039           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2040           0 :                         if (PyErr_Occurred() != NULL) {
    2041           0 :                                 return -1;
    2042             :                         }
    2043           0 :                         if (test_var > uint_max) {
    2044           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2045             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2046           0 :                                 return -1;
    2047             :                         }
    2048           0 :                         object->reserved_field_size = test_var;
    2049             :                 } else {
    2050           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2051             :                           PyLong_Type.tp_name);
    2052           0 :                         return -1;
    2053             :                 }
    2054             :         }
    2055           0 :         return 0;
    2056             : }
    2057             : 
    2058           0 : static PyObject *py_CLAIMS_SET_METADATA_get_reserved_field(PyObject *obj, void *closure)
    2059             : {
    2060           0 :         struct CLAIMS_SET_METADATA *object = pytalloc_get_ptr(obj);
    2061           0 :         PyObject *py_reserved_field;
    2062           0 :         if (object->reserved_field == NULL) {
    2063           0 :                 Py_RETURN_NONE;
    2064             :         }
    2065           0 :         if (object->reserved_field == NULL) {
    2066           0 :                 py_reserved_field = Py_None;
    2067           0 :                 Py_INCREF(py_reserved_field);
    2068             :         } else {
    2069           0 :                 py_reserved_field = PyList_New(object->reserved_field_size);
    2070           0 :                 if (py_reserved_field == NULL) {
    2071           0 :                         return NULL;
    2072             :                 }
    2073             :                 {
    2074             :                         int reserved_field_cntr_1;
    2075           0 :                         for (reserved_field_cntr_1 = 0; reserved_field_cntr_1 < (object->reserved_field_size); reserved_field_cntr_1++) {
    2076           0 :                                 PyObject *py_reserved_field_1;
    2077           0 :                                 py_reserved_field_1 = PyLong_FromLong((uint16_t)((object->reserved_field)[reserved_field_cntr_1]));
    2078           0 :                                 PyList_SetItem(py_reserved_field, reserved_field_cntr_1, py_reserved_field_1);
    2079             :                         }
    2080             :                 }
    2081             :         }
    2082           0 :         return py_reserved_field;
    2083             : }
    2084             : 
    2085           0 : static int py_CLAIMS_SET_METADATA_set_reserved_field(PyObject *py_obj, PyObject *value, void *closure)
    2086             : {
    2087           0 :         struct CLAIMS_SET_METADATA *object = pytalloc_get_ptr(py_obj);
    2088           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->reserved_field));
    2089           0 :         if (value == NULL) {
    2090           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: object->reserved_field");
    2091           0 :                 return -1;
    2092             :         }
    2093           0 :         if (value == Py_None) {
    2094           0 :                 object->reserved_field = NULL;
    2095             :         } else {
    2096           0 :                 object->reserved_field = NULL;
    2097           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    2098             :                 {
    2099           0 :                         int reserved_field_cntr_1;
    2100           0 :                         object->reserved_field = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->reserved_field, PyList_GET_SIZE(value));
    2101           0 :                         if (!object->reserved_field) { return -1; }
    2102           0 :                         talloc_set_name_const(object->reserved_field, "ARRAY: object->reserved_field");
    2103           0 :                         for (reserved_field_cntr_1 = 0; reserved_field_cntr_1 < PyList_GET_SIZE(value); reserved_field_cntr_1++) {
    2104           0 :                                 if (PyList_GET_ITEM(value, reserved_field_cntr_1) == NULL) {
    2105           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: (object->reserved_field)[reserved_field_cntr_1]");
    2106           0 :                                         return -1;
    2107             :                                 }
    2108             :                                 {
    2109           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->reserved_field)[reserved_field_cntr_1]));
    2110           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, reserved_field_cntr_1))) {
    2111           0 :                                                 unsigned long long test_var;
    2112           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, reserved_field_cntr_1));
    2113           0 :                                                 if (PyErr_Occurred() != NULL) {
    2114           0 :                                                         return -1;
    2115             :                                                 }
    2116           0 :                                                 if (test_var > uint_max) {
    2117           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2118             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    2119           0 :                                                         return -1;
    2120             :                                                 }
    2121           0 :                                                 (object->reserved_field)[reserved_field_cntr_1] = test_var;
    2122             :                                         } else {
    2123           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
    2124             :                                                   PyLong_Type.tp_name);
    2125           0 :                                                 return -1;
    2126             :                                         }
    2127             :                                 }
    2128             :                         }
    2129             :                 }
    2130             :         }
    2131           0 :         return 0;
    2132             : }
    2133             : 
    2134             : static PyGetSetDef py_CLAIMS_SET_METADATA_getsetters[] = {
    2135             :         {
    2136             :                 .name = discard_const_p(char, "claims_set_size"),
    2137             :                 .get = py_CLAIMS_SET_METADATA_get_claims_set_size,
    2138             :                 .set = py_CLAIMS_SET_METADATA_set_claims_set_size,
    2139             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2140             :         },
    2141             :         {
    2142             :                 .name = discard_const_p(char, "claims_set"),
    2143             :                 .get = py_CLAIMS_SET_METADATA_get_claims_set,
    2144             :                 .set = py_CLAIMS_SET_METADATA_set_claims_set,
    2145             :                 .doc = discard_const_p(char, "PIDL-generated element of base type CLAIMS_SET_NDR")
    2146             :         },
    2147             :         {
    2148             :                 .name = discard_const_p(char, "compression_format"),
    2149             :                 .get = py_CLAIMS_SET_METADATA_get_compression_format,
    2150             :                 .set = py_CLAIMS_SET_METADATA_set_compression_format,
    2151             :                 .doc = discard_const_p(char, "PIDL-generated element of base type CLAIMS_COMPRESSION_FORMAT")
    2152             :         },
    2153             :         {
    2154             :                 .name = discard_const_p(char, "uncompressed_claims_set_size"),
    2155             :                 .get = py_CLAIMS_SET_METADATA_get_uncompressed_claims_set_size,
    2156             :                 .set = py_CLAIMS_SET_METADATA_set_uncompressed_claims_set_size,
    2157             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2158             :         },
    2159             :         {
    2160             :                 .name = discard_const_p(char, "reserved_type"),
    2161             :                 .get = py_CLAIMS_SET_METADATA_get_reserved_type,
    2162             :                 .set = py_CLAIMS_SET_METADATA_set_reserved_type,
    2163             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    2164             :         },
    2165             :         {
    2166             :                 .name = discard_const_p(char, "reserved_field_size"),
    2167             :                 .get = py_CLAIMS_SET_METADATA_get_reserved_field_size,
    2168             :                 .set = py_CLAIMS_SET_METADATA_set_reserved_field_size,
    2169             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2170             :         },
    2171             :         {
    2172             :                 .name = discard_const_p(char, "reserved_field"),
    2173             :                 .get = py_CLAIMS_SET_METADATA_get_reserved_field,
    2174             :                 .set = py_CLAIMS_SET_METADATA_set_reserved_field,
    2175             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2176             :         },
    2177             :         { .name = NULL }
    2178             : };
    2179             : 
    2180         380 : static PyObject *py_CLAIMS_SET_METADATA_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2181             : {
    2182         380 :         return pytalloc_new(struct CLAIMS_SET_METADATA, type);
    2183             : }
    2184             : 
    2185           0 : static PyObject *py_CLAIMS_SET_METADATA_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2186             : {
    2187           0 :         struct CLAIMS_SET_METADATA *object = pytalloc_get_ptr(py_obj);
    2188           0 :         PyObject *ret = NULL;
    2189           0 :         DATA_BLOB blob;
    2190           0 :         enum ndr_err_code err;
    2191           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2192           0 :         if (tmp_ctx == NULL) {
    2193           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2194           0 :                 return NULL;
    2195             :         }
    2196           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_CLAIMS_SET_METADATA);
    2197           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2198           0 :                 TALLOC_FREE(tmp_ctx);
    2199           0 :                 PyErr_SetNdrError(err);
    2200           0 :                 return NULL;
    2201             :         }
    2202             : 
    2203           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2204           0 :         TALLOC_FREE(tmp_ctx);
    2205           0 :         return ret;
    2206             : }
    2207             : 
    2208           0 : static PyObject *py_CLAIMS_SET_METADATA_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2209             : {
    2210           0 :         struct CLAIMS_SET_METADATA *object = pytalloc_get_ptr(py_obj);
    2211           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2212           0 :         Py_ssize_t blob_length = 0;
    2213           0 :         enum ndr_err_code err;
    2214           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2215           0 :         PyObject *allow_remaining_obj = NULL;
    2216           0 :         bool allow_remaining = false;
    2217             : 
    2218           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    2219             :                 discard_const_p(char *, kwnames),
    2220             :                 &blob.data, &blob_length,
    2221             :                 &allow_remaining_obj)) {
    2222           0 :                 return NULL;
    2223             :         }
    2224           0 :         blob.length = blob_length;
    2225             : 
    2226           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    2227           0 :                 allow_remaining = true;
    2228             :         }
    2229             : 
    2230           0 :         if (allow_remaining) {
    2231           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_CLAIMS_SET_METADATA);
    2232             :         } else {
    2233           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_CLAIMS_SET_METADATA);
    2234             :         }
    2235           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2236           0 :                 PyErr_SetNdrError(err);
    2237           0 :                 return NULL;
    2238             :         }
    2239             : 
    2240           0 :         Py_RETURN_NONE;
    2241             : }
    2242             : 
    2243           0 : static PyObject *py_CLAIMS_SET_METADATA_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    2244             : {
    2245           0 :         struct CLAIMS_SET_METADATA *object = pytalloc_get_ptr(py_obj);
    2246           0 :         PyObject *ret;
    2247           0 :         char *retstr;
    2248             : 
    2249           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_CLAIMS_SET_METADATA, "CLAIMS_SET_METADATA", object);
    2250           0 :         ret = PyUnicode_FromString(retstr);
    2251           0 :         talloc_free(retstr);
    2252             : 
    2253           0 :         return ret;
    2254             : }
    2255             : 
    2256             : static PyMethodDef py_CLAIMS_SET_METADATA_methods[] = {
    2257             :         { "__ndr_pack__", (PyCFunction)py_CLAIMS_SET_METADATA_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    2258             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_CLAIMS_SET_METADATA_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    2259             :         { "__ndr_print__", (PyCFunction)py_CLAIMS_SET_METADATA_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    2260             :         { NULL, NULL, 0, NULL }
    2261             : };
    2262             : 
    2263             : 
    2264             : static PyTypeObject CLAIMS_SET_METADATA_Type = {
    2265             :         PyVarObject_HEAD_INIT(NULL, 0)
    2266             :         .tp_name = "claims.CLAIMS_SET_METADATA",
    2267             :         .tp_getset = py_CLAIMS_SET_METADATA_getsetters,
    2268             :         .tp_methods = py_CLAIMS_SET_METADATA_methods,
    2269             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2270             :         .tp_new = py_CLAIMS_SET_METADATA_new,
    2271             : };
    2272             : 
    2273             : 
    2274             : const struct PyNdrRpcMethodDef py_ndr_claims_methods[] = {
    2275             :         {0}
    2276             : };
    2277             : 
    2278           0 : static PyObject *interface_claims_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2279             : {
    2280           0 :         return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_claims);
    2281             : }
    2282             : 
    2283             : #define PY_DOC_CLAIMS "Active Directory Claims"
    2284             : static PyTypeObject claims_InterfaceType = {
    2285             :         PyVarObject_HEAD_INIT(NULL, 0)
    2286             :         .tp_name = "claims.claims",
    2287             :         .tp_basicsize = sizeof(dcerpc_InterfaceObject),
    2288             :         .tp_doc = "claims(binding, lp_ctx=None, credentials=None) -> connection\n"
    2289             : "\n"
    2290             : "binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
    2291             : "lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
    2292             : "credentials should be a credentials.Credentials object.\n\n"PY_DOC_CLAIMS,
    2293             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2294             :         .tp_new = interface_claims_new,
    2295             : };
    2296             : 
    2297           0 : static PyObject *syntax_claims_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2298             : {
    2299           0 :         return py_dcerpc_syntax_init_helper(type, args, kwargs, &ndr_table_claims.syntax_id);
    2300             : }
    2301             : 
    2302             : #define PY_DOC_CLAIMS_SYNTAX "Active Directory Claims"
    2303             : static PyTypeObject claims_SyntaxType = {
    2304             :         PyVarObject_HEAD_INIT(NULL, 0)
    2305             :         .tp_name = "claims.claims_abstract_syntax",
    2306             :         .tp_doc = "claims_abstract_syntax()\n"PY_DOC_CLAIMS_SYNTAX,
    2307             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2308             :         .tp_new = syntax_claims_new,
    2309             : };
    2310             : 
    2311             : static PyMethodDef claims_methods[] = {
    2312             :         { NULL, NULL, 0, NULL }
    2313             : };
    2314             : 
    2315             : static struct PyModuleDef moduledef = {
    2316             :         PyModuleDef_HEAD_INIT,
    2317             :         .m_name = "claims",
    2318             :         .m_doc = "claims DCE/RPC",
    2319             :         .m_size = -1,
    2320             :         .m_methods = claims_methods,
    2321             : };
    2322          74 : MODULE_INIT_FUNC(claims)
    2323             : {
    2324          74 :         PyObject *m = NULL;
    2325          74 :         PyObject *dep_talloc = NULL;
    2326          74 :         PyObject *dep_samba_dcerpc_base = NULL;
    2327          74 :         PyObject *dep_samba_dcerpc_misc = NULL;
    2328             : 
    2329          74 :         dep_talloc = PyImport_ImportModule("talloc");
    2330          74 :         if (dep_talloc == NULL)
    2331           0 :                 goto out;
    2332             : 
    2333          74 :         dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
    2334          74 :         if (dep_samba_dcerpc_base == NULL)
    2335           0 :                 goto out;
    2336             : 
    2337          74 :         dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
    2338          74 :         if (dep_samba_dcerpc_misc == NULL)
    2339           0 :                 goto out;
    2340             : 
    2341          74 :         BaseObject_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "BaseObject");
    2342          74 :         if (BaseObject_Type == NULL)
    2343           0 :                 goto out;
    2344             : 
    2345          74 :         ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
    2346          74 :         if (ClientConnection_Type == NULL)
    2347           0 :                 goto out;
    2348             : 
    2349          74 :         ndr_syntax_id_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "ndr_syntax_id");
    2350          74 :         if (ndr_syntax_id_Type == NULL)
    2351           0 :                 goto out;
    2352             : 
    2353          74 :         CLAIM_INT64_Type.tp_base = BaseObject_Type;
    2354          74 :         CLAIM_INT64_Type.tp_basicsize = pytalloc_BaseObject_size();
    2355             : 
    2356          74 :         CLAIM_UINT64_Type.tp_base = BaseObject_Type;
    2357          74 :         CLAIM_UINT64_Type.tp_basicsize = pytalloc_BaseObject_size();
    2358             : 
    2359          74 :         CLAIM_STRING_Type.tp_base = BaseObject_Type;
    2360          74 :         CLAIM_STRING_Type.tp_basicsize = pytalloc_BaseObject_size();
    2361             : 
    2362          74 :         CLAIM_ENTRY_VALUES_Type.tp_base = BaseObject_Type;
    2363          74 :         CLAIM_ENTRY_VALUES_Type.tp_basicsize = pytalloc_BaseObject_size();
    2364             : 
    2365          74 :         CLAIM_ENTRY_Type.tp_base = BaseObject_Type;
    2366          74 :         CLAIM_ENTRY_Type.tp_basicsize = pytalloc_BaseObject_size();
    2367             : 
    2368          74 :         CLAIMS_ARRAY_Type.tp_base = BaseObject_Type;
    2369          74 :         CLAIMS_ARRAY_Type.tp_basicsize = pytalloc_BaseObject_size();
    2370             : 
    2371          74 :         CLAIMS_SET_METADATA_CTR_Type.tp_base = BaseObject_Type;
    2372          74 :         CLAIMS_SET_METADATA_CTR_Type.tp_basicsize = pytalloc_BaseObject_size();
    2373             : 
    2374          74 :         CLAIMS_SET_CTR_Type.tp_base = BaseObject_Type;
    2375          74 :         CLAIMS_SET_CTR_Type.tp_basicsize = pytalloc_BaseObject_size();
    2376             : 
    2377          74 :         CLAIMS_SET_Type.tp_base = BaseObject_Type;
    2378          74 :         CLAIMS_SET_Type.tp_basicsize = pytalloc_BaseObject_size();
    2379             : 
    2380          74 :         CLAIMS_SET_NDR_Type.tp_base = BaseObject_Type;
    2381          74 :         CLAIMS_SET_NDR_Type.tp_basicsize = pytalloc_BaseObject_size();
    2382             : 
    2383          74 :         CLAIMS_SET_METADATA_NDR_Type.tp_base = BaseObject_Type;
    2384          74 :         CLAIMS_SET_METADATA_NDR_Type.tp_basicsize = pytalloc_BaseObject_size();
    2385             : 
    2386          74 :         CLAIMS_SET_METADATA_Type.tp_base = BaseObject_Type;
    2387          74 :         CLAIMS_SET_METADATA_Type.tp_basicsize = pytalloc_BaseObject_size();
    2388             : 
    2389          74 :         claims_InterfaceType.tp_base = ClientConnection_Type;
    2390             : 
    2391          74 :         claims_SyntaxType.tp_base = ndr_syntax_id_Type;
    2392          74 :         claims_SyntaxType.tp_basicsize = pytalloc_BaseObject_size();
    2393             : 
    2394          74 :         if (PyType_Ready(&CLAIM_INT64_Type) < 0)
    2395           0 :                 goto out;
    2396          74 :         if (PyType_Ready(&CLAIM_UINT64_Type) < 0)
    2397           0 :                 goto out;
    2398          74 :         if (PyType_Ready(&CLAIM_STRING_Type) < 0)
    2399           0 :                 goto out;
    2400          74 :         if (PyType_Ready(&CLAIM_ENTRY_VALUES_Type) < 0)
    2401           0 :                 goto out;
    2402          74 :         if (PyType_Ready(&CLAIM_ENTRY_Type) < 0)
    2403           0 :                 goto out;
    2404          74 :         if (PyType_Ready(&CLAIMS_ARRAY_Type) < 0)
    2405           0 :                 goto out;
    2406          74 :         if (PyType_Ready(&CLAIMS_SET_METADATA_CTR_Type) < 0)
    2407           0 :                 goto out;
    2408          74 :         if (PyType_Ready(&CLAIMS_SET_CTR_Type) < 0)
    2409           0 :                 goto out;
    2410          74 :         if (PyType_Ready(&CLAIMS_SET_Type) < 0)
    2411           0 :                 goto out;
    2412          74 :         if (PyType_Ready(&CLAIMS_SET_NDR_Type) < 0)
    2413           0 :                 goto out;
    2414          74 :         if (PyType_Ready(&CLAIMS_SET_METADATA_NDR_Type) < 0)
    2415           0 :                 goto out;
    2416          74 :         if (PyType_Ready(&CLAIMS_SET_METADATA_Type) < 0)
    2417           0 :                 goto out;
    2418          74 :         if (PyType_Ready(&claims_InterfaceType) < 0)
    2419           0 :                 goto out;
    2420          74 :         if (PyType_Ready(&claims_SyntaxType) < 0)
    2421           0 :                 goto out;
    2422          74 :         if (!PyInterface_AddNdrRpcMethods(&claims_InterfaceType, py_ndr_claims_methods))
    2423           0 :                 return NULL;
    2424             : 
    2425             : #ifdef PY_CLAIM_INT64_PATCH
    2426             :         PY_CLAIM_INT64_PATCH(&CLAIM_INT64_Type);
    2427             : #endif
    2428             : #ifdef PY_CLAIM_UINT64_PATCH
    2429             :         PY_CLAIM_UINT64_PATCH(&CLAIM_UINT64_Type);
    2430             : #endif
    2431             : #ifdef PY_CLAIM_STRING_PATCH
    2432             :         PY_CLAIM_STRING_PATCH(&CLAIM_STRING_Type);
    2433             : #endif
    2434             : #ifdef PY_CLAIM_ENTRY_VALUES_PATCH
    2435             :         PY_CLAIM_ENTRY_VALUES_PATCH(&CLAIM_ENTRY_VALUES_Type);
    2436             : #endif
    2437             : #ifdef PY_CLAIM_ENTRY_PATCH
    2438             :         PY_CLAIM_ENTRY_PATCH(&CLAIM_ENTRY_Type);
    2439             : #endif
    2440             : #ifdef PY_CLAIMS_ARRAY_PATCH
    2441             :         PY_CLAIMS_ARRAY_PATCH(&CLAIMS_ARRAY_Type);
    2442             : #endif
    2443             : #ifdef PY_CLAIMS_SET_METADATA_CTR_PATCH
    2444             :         PY_CLAIMS_SET_METADATA_CTR_PATCH(&CLAIMS_SET_METADATA_CTR_Type);
    2445             : #endif
    2446             : #ifdef PY_CLAIMS_SET_CTR_PATCH
    2447             :         PY_CLAIMS_SET_CTR_PATCH(&CLAIMS_SET_CTR_Type);
    2448             : #endif
    2449             : #ifdef PY_CLAIMS_SET_PATCH
    2450             :         PY_CLAIMS_SET_PATCH(&CLAIMS_SET_Type);
    2451             : #endif
    2452             : #ifdef PY_CLAIMS_SET_NDR_PATCH
    2453             :         PY_CLAIMS_SET_NDR_PATCH(&CLAIMS_SET_NDR_Type);
    2454             : #endif
    2455             : #ifdef PY_CLAIMS_SET_METADATA_NDR_PATCH
    2456             :         PY_CLAIMS_SET_METADATA_NDR_PATCH(&CLAIMS_SET_METADATA_NDR_Type);
    2457             : #endif
    2458             : #ifdef PY_CLAIMS_SET_METADATA_PATCH
    2459             :         PY_CLAIMS_SET_METADATA_PATCH(&CLAIMS_SET_METADATA_Type);
    2460             : #endif
    2461             : #ifdef PY_CLAIMS_PATCH
    2462             :         PY_CLAIMS_PATCH(&claims_InterfaceType);
    2463             : #endif
    2464             : #ifdef PY_CLAIMS_ABSTRACT_SYNTAX_PATCH
    2465             :         PY_CLAIMS_ABSTRACT_SYNTAX_PATCH(&claims_SyntaxType);
    2466             : #endif
    2467             : #ifdef PY_ABSTRACT_SYNTAX_PATCH
    2468             :         PY_ABSTRACT_SYNTAX_PATCH(&claims_SyntaxType);
    2469             : #endif
    2470             : 
    2471          74 :         m = PyModule_Create(&moduledef);
    2472          74 :         if (m == NULL)
    2473           0 :                 goto out;
    2474             : 
    2475          74 :         PyModule_AddObject(m, "CLAIM_LOWER_COMPRESSION_THRESHOLD", PyLong_FromUnsignedLongLong(368));
    2476          74 :         PyModule_AddObject(m, "CLAIM_UPPER_COMPRESSION_THRESHOLD", PyLong_FromUnsignedLongLong(384));
    2477          74 :         PyModule_AddObject(m, "CLAIM_TYPE_INT64", PyLong_FromLong((uint16_t)(CLAIM_TYPE_INT64)));
    2478          74 :         PyModule_AddObject(m, "CLAIM_TYPE_UINT64", PyLong_FromLong((uint16_t)(CLAIM_TYPE_UINT64)));
    2479          74 :         PyModule_AddObject(m, "CLAIM_TYPE_STRING", PyLong_FromLong((uint16_t)(CLAIM_TYPE_STRING)));
    2480          74 :         PyModule_AddObject(m, "CLAIM_TYPE_BOOLEAN", PyLong_FromLong((uint16_t)(CLAIM_TYPE_BOOLEAN)));
    2481          74 :         PyModule_AddObject(m, "CLAIMS_SOURCE_TYPE_AD", PyLong_FromLong((uint16_t)(CLAIMS_SOURCE_TYPE_AD)));
    2482          74 :         PyModule_AddObject(m, "CLAIMS_SOURCE_TYPE_CERTIFICATE", PyLong_FromLong((uint16_t)(CLAIMS_SOURCE_TYPE_CERTIFICATE)));
    2483          74 :         PyModule_AddObject(m, "CLAIMS_COMPRESSION_FORMAT_NONE", PyLong_FromLong((uint16_t)(CLAIMS_COMPRESSION_FORMAT_NONE)));
    2484          74 :         PyModule_AddObject(m, "CLAIMS_COMPRESSION_FORMAT_LZNT1", PyLong_FromLong((uint16_t)(CLAIMS_COMPRESSION_FORMAT_LZNT1)));
    2485          74 :         PyModule_AddObject(m, "CLAIMS_COMPRESSION_FORMAT_XPRESS", PyLong_FromLong((uint16_t)(CLAIMS_COMPRESSION_FORMAT_XPRESS)));
    2486          74 :         PyModule_AddObject(m, "CLAIMS_COMPRESSION_FORMAT_XPRESS_HUFF", PyLong_FromLong((uint16_t)(CLAIMS_COMPRESSION_FORMAT_XPRESS_HUFF)));
    2487          41 :         Py_INCREF((PyObject *)(void *)&CLAIM_INT64_Type);
    2488          74 :         PyModule_AddObject(m, "CLAIM_INT64", (PyObject *)(void *)&CLAIM_INT64_Type);
    2489          41 :         Py_INCREF((PyObject *)(void *)&CLAIM_UINT64_Type);
    2490          74 :         PyModule_AddObject(m, "CLAIM_UINT64", (PyObject *)(void *)&CLAIM_UINT64_Type);
    2491          41 :         Py_INCREF((PyObject *)(void *)&CLAIM_STRING_Type);
    2492          74 :         PyModule_AddObject(m, "CLAIM_STRING", (PyObject *)(void *)&CLAIM_STRING_Type);
    2493          41 :         Py_INCREF((PyObject *)(void *)&CLAIM_ENTRY_VALUES_Type);
    2494          74 :         PyModule_AddObject(m, "CLAIM_ENTRY_VALUES", (PyObject *)(void *)&CLAIM_ENTRY_VALUES_Type);
    2495          41 :         Py_INCREF((PyObject *)(void *)&CLAIM_ENTRY_Type);
    2496          74 :         PyModule_AddObject(m, "CLAIM_ENTRY", (PyObject *)(void *)&CLAIM_ENTRY_Type);
    2497          41 :         Py_INCREF((PyObject *)(void *)&CLAIMS_ARRAY_Type);
    2498          74 :         PyModule_AddObject(m, "CLAIMS_ARRAY", (PyObject *)(void *)&CLAIMS_ARRAY_Type);
    2499          41 :         Py_INCREF((PyObject *)(void *)&CLAIMS_SET_METADATA_CTR_Type);
    2500          74 :         PyModule_AddObject(m, "CLAIMS_SET_METADATA_CTR", (PyObject *)(void *)&CLAIMS_SET_METADATA_CTR_Type);
    2501          41 :         Py_INCREF((PyObject *)(void *)&CLAIMS_SET_CTR_Type);
    2502          74 :         PyModule_AddObject(m, "CLAIMS_SET_CTR", (PyObject *)(void *)&CLAIMS_SET_CTR_Type);
    2503          41 :         Py_INCREF((PyObject *)(void *)&CLAIMS_SET_Type);
    2504          74 :         PyModule_AddObject(m, "CLAIMS_SET", (PyObject *)(void *)&CLAIMS_SET_Type);
    2505          41 :         Py_INCREF((PyObject *)(void *)&CLAIMS_SET_NDR_Type);
    2506          74 :         PyModule_AddObject(m, "CLAIMS_SET_NDR", (PyObject *)(void *)&CLAIMS_SET_NDR_Type);
    2507          41 :         Py_INCREF((PyObject *)(void *)&CLAIMS_SET_METADATA_NDR_Type);
    2508          74 :         PyModule_AddObject(m, "CLAIMS_SET_METADATA_NDR", (PyObject *)(void *)&CLAIMS_SET_METADATA_NDR_Type);
    2509          41 :         Py_INCREF((PyObject *)(void *)&CLAIMS_SET_METADATA_Type);
    2510          74 :         PyModule_AddObject(m, "CLAIMS_SET_METADATA", (PyObject *)(void *)&CLAIMS_SET_METADATA_Type);
    2511          41 :         Py_INCREF((PyObject *)(void *)&claims_InterfaceType);
    2512          74 :         PyModule_AddObject(m, "claims", (PyObject *)(void *)&claims_InterfaceType);
    2513          41 :         Py_INCREF((PyObject *)(void *)&claims_SyntaxType);
    2514          74 :         PyModule_AddObject(m, "claims_abstract_syntax", (PyObject *)(void *)&claims_SyntaxType);
    2515          41 :         Py_INCREF((PyObject *)(void *)&claims_SyntaxType);
    2516          74 :         PyModule_AddObject(m, "abstract_syntax", (PyObject *)(void *)&claims_SyntaxType);
    2517             : #ifdef PY_MOD_CLAIMS_PATCH
    2518             :         PY_MOD_CLAIMS_PATCH(m);
    2519             : #endif
    2520          74 :         out:
    2521          74 :         Py_XDECREF(dep_talloc);
    2522          74 :         Py_XDECREF(dep_samba_dcerpc_base);
    2523          74 :         Py_XDECREF(dep_samba_dcerpc_misc);
    2524          73 :         return m;
    2525             : 
    2526             : }

Generated by: LCOV version 1.14