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 recycleplus df22b230 Lines: 106 1214 8.7 %
Date: 2024-02-14 10:14:15 Functions: 1 89 1.1 %

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

Generated by: LCOV version 1.14