1#
2# Autogenerated by Thrift
3#
4# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5#  @generated
6#
7
8
9import folly.iobuf as _fbthrift_iobuf
10
11from thrift.py3.reflection cimport (
12    NumberType as __NumberType,
13    StructType as __StructType,
14    Qualifier as __Qualifier,
15)
16
17
18cimport module.types as _module_types
19
20from thrift.py3.types cimport (
21    constant_shared_ptr,
22    default_inst,
23)
24
25
26cdef __StructSpec get_reflection__SimpleException():
27    cdef _module_types.SimpleException defaults = _module_types.SimpleException._fbthrift_create(
28        constant_shared_ptr[_module_types.cSimpleException](
29            default_inst[_module_types.cSimpleException]()
30        )
31    )
32    cdef __StructSpec spec = __StructSpec._fbthrift_create(
33        name="SimpleException",
34        kind=__StructType.EXCEPTION,
35        annotations={
36        },
37    )
38    spec.add_field(
39        __FieldSpec._fbthrift_create(
40            id=1,
41            name="err_code",
42            type=int,
43            kind=__NumberType.I16,
44            qualifier=__Qualifier.UNQUALIFIED,
45            default=None,
46            annotations={
47            },
48        ),
49    )
50    return spec
51cdef __StructSpec get_reflection__OptionalRefStruct():
52    cdef _module_types.OptionalRefStruct defaults = _module_types.OptionalRefStruct._fbthrift_create(
53        constant_shared_ptr[_module_types.cOptionalRefStruct](
54            default_inst[_module_types.cOptionalRefStruct]()
55        )
56    )
57    cdef __StructSpec spec = __StructSpec._fbthrift_create(
58        name="OptionalRefStruct",
59        kind=__StructType.STRUCT,
60        annotations={
61        },
62    )
63    spec.add_field(
64        __FieldSpec._fbthrift_create(
65            id=1,
66            name="optional_blob",
67            type=_fbthrift_iobuf.IOBuf,
68            kind=__NumberType.NOT_A_NUMBER,
69            qualifier=__Qualifier.OPTIONAL,
70            default=None,
71            annotations={
72            },
73        ),
74    )
75    return spec
76cdef __StructSpec get_reflection__SimpleStruct():
77    cdef _module_types.SimpleStruct defaults = _module_types.SimpleStruct._fbthrift_create(
78        constant_shared_ptr[_module_types.cSimpleStruct](
79            default_inst[_module_types.cSimpleStruct]()
80        )
81    )
82    cdef __StructSpec spec = __StructSpec._fbthrift_create(
83        name="SimpleStruct",
84        kind=__StructType.STRUCT,
85        annotations={
86        },
87    )
88    spec.add_field(
89        __FieldSpec._fbthrift_create(
90            id=1,
91            name="is_on",
92            type=bool,
93            kind=__NumberType.NOT_A_NUMBER,
94            qualifier=__Qualifier.UNQUALIFIED,
95            default=None,
96            annotations={
97            },
98        ),
99    )
100    spec.add_field(
101        __FieldSpec._fbthrift_create(
102            id=2,
103            name="tiny_int",
104            type=int,
105            kind=__NumberType.BYTE,
106            qualifier=__Qualifier.UNQUALIFIED,
107            default=None,
108            annotations={
109            },
110        ),
111    )
112    spec.add_field(
113        __FieldSpec._fbthrift_create(
114            id=3,
115            name="small_int",
116            type=int,
117            kind=__NumberType.I16,
118            qualifier=__Qualifier.UNQUALIFIED,
119            default=None,
120            annotations={
121            },
122        ),
123    )
124    spec.add_field(
125        __FieldSpec._fbthrift_create(
126            id=4,
127            name="nice_sized_int",
128            type=int,
129            kind=__NumberType.I32,
130            qualifier=__Qualifier.UNQUALIFIED,
131            default=None,
132            annotations={
133            },
134        ),
135    )
136    spec.add_field(
137        __FieldSpec._fbthrift_create(
138            id=5,
139            name="big_int",
140            type=int,
141            kind=__NumberType.I64,
142            qualifier=__Qualifier.UNQUALIFIED,
143            default=None,
144            annotations={
145            },
146        ),
147    )
148    spec.add_field(
149        __FieldSpec._fbthrift_create(
150            id=6,
151            name="real",
152            type=float,
153            kind=__NumberType.DOUBLE,
154            qualifier=__Qualifier.UNQUALIFIED,
155            default=None,
156            annotations={
157            },
158        ),
159    )
160    spec.add_field(
161        __FieldSpec._fbthrift_create(
162            id=7,
163            name="smaller_real",
164            type=float,
165            kind=__NumberType.FLOAT,
166            qualifier=__Qualifier.UNQUALIFIED,
167            default=None,
168            annotations={
169            },
170        ),
171    )
172    return spec
173cdef __StructSpec get_reflection__ComplexStruct():
174    cdef _module_types.ComplexStruct defaults = _module_types.ComplexStruct._fbthrift_create(
175        constant_shared_ptr[_module_types.cComplexStruct](
176            default_inst[_module_types.cComplexStruct]()
177        )
178    )
179    cdef __StructSpec spec = __StructSpec._fbthrift_create(
180        name="ComplexStruct",
181        kind=__StructType.STRUCT,
182        annotations={
183        },
184    )
185    spec.add_field(
186        __FieldSpec._fbthrift_create(
187            id=1,
188            name="structOne",
189            type=_module_types.SimpleStruct,
190            kind=__NumberType.NOT_A_NUMBER,
191            qualifier=__Qualifier.UNQUALIFIED,
192            default=None,
193            annotations={
194            },
195        ),
196    )
197    spec.add_field(
198        __FieldSpec._fbthrift_create(
199            id=2,
200            name="structTwo",
201            type=_module_types.SimpleStruct,
202            kind=__NumberType.NOT_A_NUMBER,
203            qualifier=__Qualifier.UNQUALIFIED,
204            default=None,
205            annotations={
206            },
207        ),
208    )
209    spec.add_field(
210        __FieldSpec._fbthrift_create(
211            id=3,
212            name="an_integer",
213            type=int,
214            kind=__NumberType.I32,
215            qualifier=__Qualifier.UNQUALIFIED,
216            default=None,
217            annotations={
218            },
219        ),
220    )
221    spec.add_field(
222        __FieldSpec._fbthrift_create(
223            id=4,
224            name="name",
225            type=str,
226            kind=__NumberType.NOT_A_NUMBER,
227            qualifier=__Qualifier.UNQUALIFIED,
228            default=None,
229            annotations={
230            },
231        ),
232    )
233    spec.add_field(
234        __FieldSpec._fbthrift_create(
235            id=5,
236            name="an_enum",
237            type=_module_types.AnEnum,
238            kind=__NumberType.NOT_A_NUMBER,
239            qualifier=__Qualifier.UNQUALIFIED,
240            default=None,
241            annotations={
242            },
243        ),
244    )
245    spec.add_field(
246        __FieldSpec._fbthrift_create(
247            id=6,
248            name="some_bytes",
249            type=bytes,
250            kind=__NumberType.NOT_A_NUMBER,
251            qualifier=__Qualifier.UNQUALIFIED,
252            default=None,
253            annotations={
254            },
255        ),
256    )
257    spec.add_field(
258        __FieldSpec._fbthrift_create(
259            id=7,
260            name="from",
261            type=str,
262            kind=__NumberType.NOT_A_NUMBER,
263            qualifier=__Qualifier.UNQUALIFIED,
264            default=None,
265            annotations={
266                """py3.name""": """sender""",            },
267        ),
268    )
269    spec.add_field(
270        __FieldSpec._fbthrift_create(
271            id=8,
272            name="cdef",
273            type=str,
274            kind=__NumberType.NOT_A_NUMBER,
275            qualifier=__Qualifier.UNQUALIFIED,
276            default=None,
277            annotations={
278            },
279        ),
280    )
281    spec.add_field(
282        __FieldSpec._fbthrift_create(
283            id=9,
284            name="bytes_with_cpp_type",
285            type=bytes,
286            kind=__NumberType.NOT_A_NUMBER,
287            qualifier=__Qualifier.UNQUALIFIED,
288            default=None,
289            annotations={
290            },
291        ),
292    )
293    return spec
294cdef __StructSpec get_reflection__BinaryUnion():
295    cdef __StructSpec spec = __StructSpec._fbthrift_create(
296        name="BinaryUnion",
297        kind=__StructType.UNION,
298        annotations={
299            """cpp.noncomparable""": """1""",        },
300    )
301    spec.add_field(
302        __FieldSpec._fbthrift_create(
303            id=1,
304            name="iobuf_val",
305            type=_fbthrift_iobuf.IOBuf,
306            kind=__NumberType.NOT_A_NUMBER,
307            qualifier=__Qualifier.UNQUALIFIED,
308            default=None,
309            annotations={
310            },
311        ),
312    )
313    return spec
314cdef __StructSpec get_reflection__BinaryUnionStruct():
315    cdef _module_types.BinaryUnionStruct defaults = _module_types.BinaryUnionStruct._fbthrift_create(
316        constant_shared_ptr[_module_types.cBinaryUnionStruct](
317            default_inst[_module_types.cBinaryUnionStruct]()
318        )
319    )
320    cdef __StructSpec spec = __StructSpec._fbthrift_create(
321        name="BinaryUnionStruct",
322        kind=__StructType.STRUCT,
323        annotations={
324            """cpp.noncomparable""": """1""",        },
325    )
326    spec.add_field(
327        __FieldSpec._fbthrift_create(
328            id=1,
329            name="u",
330            type=_module_types.BinaryUnion,
331            kind=__NumberType.NOT_A_NUMBER,
332            qualifier=__Qualifier.UNQUALIFIED,
333            default=None,
334            annotations={
335            },
336        ),
337    )
338    return spec
339cdef __ListSpec get_reflection__List__i16():
340    return __ListSpec._fbthrift_create(
341        value=int,
342        kind=__NumberType.I16,
343    )
344
345cdef __ListSpec get_reflection__List__i32():
346    return __ListSpec._fbthrift_create(
347        value=int,
348        kind=__NumberType.I32,
349    )
350
351cdef __ListSpec get_reflection__List__i64():
352    return __ListSpec._fbthrift_create(
353        value=int,
354        kind=__NumberType.I64,
355    )
356
357cdef __ListSpec get_reflection__List__string():
358    return __ListSpec._fbthrift_create(
359        value=str,
360        kind=__NumberType.NOT_A_NUMBER,
361    )
362
363cdef __ListSpec get_reflection__List__SimpleStruct():
364    return __ListSpec._fbthrift_create(
365        value=_module_types.SimpleStruct,
366        kind=__NumberType.NOT_A_NUMBER,
367    )
368
369cdef __SetSpec get_reflection__Set__i32():
370    return __SetSpec._fbthrift_create(
371        value=int,
372        kind=__NumberType.I32,
373     )
374
375cdef __SetSpec get_reflection__Set__string():
376    return __SetSpec._fbthrift_create(
377        value=str,
378        kind=__NumberType.NOT_A_NUMBER,
379     )
380
381cdef __MapSpec get_reflection__Map__string_string():
382    return __MapSpec._fbthrift_create(
383        key=str,
384        key_kind=__NumberType.NOT_A_NUMBER,
385        value=str,
386        value_kind=__NumberType.NOT_A_NUMBER,
387    )
388
389cdef __MapSpec get_reflection__Map__string_SimpleStruct():
390    return __MapSpec._fbthrift_create(
391        key=str,
392        key_kind=__NumberType.NOT_A_NUMBER,
393        value=_module_types.SimpleStruct,
394        value_kind=__NumberType.NOT_A_NUMBER,
395    )
396
397cdef __MapSpec get_reflection__Map__string_i16():
398    return __MapSpec._fbthrift_create(
399        key=str,
400        key_kind=__NumberType.NOT_A_NUMBER,
401        value=int,
402        value_kind=__NumberType.I16,
403    )
404
405cdef __ListSpec get_reflection__List__List__i32():
406    return __ListSpec._fbthrift_create(
407        value=_module_types.List__i32,
408        kind=__NumberType.NOT_A_NUMBER,
409    )
410
411cdef __MapSpec get_reflection__Map__string_i32():
412    return __MapSpec._fbthrift_create(
413        key=str,
414        key_kind=__NumberType.NOT_A_NUMBER,
415        value=int,
416        value_kind=__NumberType.I32,
417    )
418
419cdef __MapSpec get_reflection__Map__string_Map__string_i32():
420    return __MapSpec._fbthrift_create(
421        key=str,
422        key_kind=__NumberType.NOT_A_NUMBER,
423        value=_module_types.Map__string_i32,
424        value_kind=__NumberType.NOT_A_NUMBER,
425    )
426
427cdef __ListSpec get_reflection__List__Set__string():
428    return __ListSpec._fbthrift_create(
429        value=_module_types.Set__string,
430        kind=__NumberType.NOT_A_NUMBER,
431    )
432
433cdef __MapSpec get_reflection__Map__string_List__SimpleStruct():
434    return __MapSpec._fbthrift_create(
435        key=str,
436        key_kind=__NumberType.NOT_A_NUMBER,
437        value=_module_types.List__SimpleStruct,
438        value_kind=__NumberType.NOT_A_NUMBER,
439    )
440
441cdef __ListSpec get_reflection__List__List__string():
442    return __ListSpec._fbthrift_create(
443        value=_module_types.List__string,
444        kind=__NumberType.NOT_A_NUMBER,
445    )
446
447cdef __ListSpec get_reflection__List__Set__i32():
448    return __ListSpec._fbthrift_create(
449        value=_module_types.Set__i32,
450        kind=__NumberType.NOT_A_NUMBER,
451    )
452
453cdef __ListSpec get_reflection__List__Map__string_string():
454    return __ListSpec._fbthrift_create(
455        value=_module_types.Map__string_string,
456        kind=__NumberType.NOT_A_NUMBER,
457    )
458
459cdef __ListSpec get_reflection__List__binary():
460    return __ListSpec._fbthrift_create(
461        value=bytes,
462        kind=__NumberType.NOT_A_NUMBER,
463    )
464
465cdef __SetSpec get_reflection__Set__binary():
466    return __SetSpec._fbthrift_create(
467        value=bytes,
468        kind=__NumberType.NOT_A_NUMBER,
469     )
470
471cdef __ListSpec get_reflection__List__AnEnum():
472    return __ListSpec._fbthrift_create(
473        value=_module_types.AnEnum,
474        kind=__NumberType.NOT_A_NUMBER,
475    )
476
477cdef __MapSpec get_reflection__Map__i32_double():
478    return __MapSpec._fbthrift_create(
479        key=int,
480        key_kind=__NumberType.I32,
481        value=float,
482        value_kind=__NumberType.DOUBLE,
483    )
484
485cdef __ListSpec get_reflection__List__Map__i32_double():
486    return __ListSpec._fbthrift_create(
487        value=_module_types.Map__i32_double,
488        kind=__NumberType.NOT_A_NUMBER,
489    )
490
491