1module None
2object q_empty
3enum QType
4    prefix QTYPE
5    member none
6    member qnull
7    member qnum
8    member qstring
9    member qdict
10    member qlist
11    member qbool
12module qapi-schema-test.json
13object TestStruct
14    member integer: int optional=False
15    member boolean: bool optional=False
16    member string: str optional=False
17object NestedEnumsOne
18    member enum1: EnumOne optional=False
19    member enum2: EnumOne optional=True
20    member enum3: EnumOne optional=False
21    member enum4: EnumOne optional=True
22enum MyEnum
23object Empty1
24object Empty2
25    base Empty1
26object q_obj_Union-base
27    member type: EnumOne optional=False
28object Union
29    base q_obj_Union-base
30    tag type
31    case value1: q_empty
32    case value2: q_empty
33    case value3: q_empty
34    case value4: q_empty
35command user_def_cmd0 Empty2 -> Empty2
36    gen=True success_response=True boxed=False oob=False preconfig=False
37enum QEnumTwo
38    prefix QENUM_TWO
39    member value1
40    member value2
41object UserDefOne
42    base UserDefZero
43    member string: str optional=False
44    member enum1: EnumOne optional=True
45enum EnumOne
46    member value1
47    member value2
48    member value3
49    member value4
50object UserDefZero
51    member integer: int optional=False
52object UserDefTwoDictDict
53    member userdef: UserDefOne optional=False
54    member string: str optional=False
55object UserDefTwoDict
56    member string1: str optional=False
57    member dict2: UserDefTwoDictDict optional=False
58    member dict3: UserDefTwoDictDict optional=True
59object UserDefTwo
60    member string0: str optional=False
61    member dict1: UserDefTwoDict optional=False
62object UserDefThree
63    member string0: str optional=False
64array UserDefOneList UserDefOne
65array UserDefTwoList UserDefTwo
66array TestStructList TestStruct
67object ForceArrays
68    member unused1: UserDefOneList optional=False
69    member unused2: UserDefTwoList optional=False
70    member unused3: TestStructList optional=False
71object UserDefA
72    member boolean: bool optional=False
73    member a_b: int optional=True
74object UserDefB
75    member intb: int optional=False
76    member a-b: bool optional=True
77object UserDefFlatUnion
78    base UserDefUnionBase
79    tag enum1
80    case value1: UserDefA
81    case value2: UserDefB
82    case value3: UserDefB
83    case value4: q_empty
84object UserDefUnionBase
85    base UserDefZero
86    member string: str optional=False
87    member enum1: EnumOne optional=False
88object q_obj_UserDefFlatUnion2-base
89    member integer: int optional=True
90    member string: str optional=False
91    member enum1: QEnumTwo optional=False
92object UserDefFlatUnion2
93    base q_obj_UserDefFlatUnion2-base
94    tag enum1
95    case value1: UserDefC
96    case value2: UserDefB
97object WrapAlternate
98    member alt: UserDefAlternate optional=False
99alternate UserDefAlternate
100    tag type
101    case udfu: UserDefFlatUnion
102    case e: EnumOne
103    case i: int
104    case n: null
105object UserDefC
106    member string1: str optional=False
107    member string2: str optional=False
108alternate AltEnumBool
109    tag type
110    case e: EnumOne
111    case b: bool
112alternate AltEnumNum
113    tag type
114    case e: EnumOne
115    case n: number
116alternate AltNumEnum
117    tag type
118    case n: number
119    case e: EnumOne
120alternate AltEnumInt
121    tag type
122    case e: EnumOne
123    case i: int
124alternate AltStrObj
125    tag type
126    case s: str
127    case o: TestStruct
128object q_obj_intList-wrapper
129    member data: intList optional=False
130object q_obj_int8List-wrapper
131    member data: int8List optional=False
132object q_obj_int16List-wrapper
133    member data: int16List optional=False
134object q_obj_int32List-wrapper
135    member data: int32List optional=False
136object q_obj_int64List-wrapper
137    member data: int64List optional=False
138object q_obj_uint8List-wrapper
139    member data: uint8List optional=False
140object q_obj_uint16List-wrapper
141    member data: uint16List optional=False
142object q_obj_uint32List-wrapper
143    member data: uint32List optional=False
144object q_obj_uint64List-wrapper
145    member data: uint64List optional=False
146object q_obj_numberList-wrapper
147    member data: numberList optional=False
148object q_obj_boolList-wrapper
149    member data: boolList optional=False
150object q_obj_strList-wrapper
151    member data: strList optional=False
152object q_obj_sizeList-wrapper
153    member data: sizeList optional=False
154object q_obj_anyList-wrapper
155    member data: anyList optional=False
156module sub-sub-module.json
157array StatusList Status
158module qapi-schema-test.json
159object q_obj_StatusList-wrapper
160    member data: StatusList optional=False
161enum UserDefListUnionKind
162    member integer
163    member s8
164    member s16
165    member s32
166    member s64
167    member u8
168    member u16
169    member u32
170    member u64
171    member number
172    member boolean
173    member string
174    member sizes
175    member any
176    member user
177object UserDefListUnion
178    member type: UserDefListUnionKind optional=False
179    tag type
180    case integer: q_obj_intList-wrapper
181    case s8: q_obj_int8List-wrapper
182    case s16: q_obj_int16List-wrapper
183    case s32: q_obj_int32List-wrapper
184    case s64: q_obj_int64List-wrapper
185    case u8: q_obj_uint8List-wrapper
186    case u16: q_obj_uint16List-wrapper
187    case u32: q_obj_uint32List-wrapper
188    case u64: q_obj_uint64List-wrapper
189    case number: q_obj_numberList-wrapper
190    case boolean: q_obj_boolList-wrapper
191    case string: q_obj_strList-wrapper
192    case sizes: q_obj_sizeList-wrapper
193    case any: q_obj_anyList-wrapper
194    case user: q_obj_StatusList-wrapper
195include include/sub-module.json
196module include/sub-module.json
197include sub-sub-module.json
198module sub-sub-module.json
199enum Status
200    member good
201    member bad
202    member ugly
203module include/sub-module.json
204object SecondArrayRef
205    member s: StatusList optional=False
206module qapi-schema-test.json
207command user_def_cmd None -> None
208    gen=True success_response=True boxed=False oob=False preconfig=False
209object q_obj_user_def_cmd1-arg
210    member ud1a: UserDefOne optional=False
211command user_def_cmd1 q_obj_user_def_cmd1-arg -> None
212    gen=True success_response=True boxed=False oob=False preconfig=False
213object q_obj_user_def_cmd2-arg
214    member ud1a: UserDefOne optional=False
215    member ud1b: UserDefOne optional=True
216command user_def_cmd2 q_obj_user_def_cmd2-arg -> UserDefTwo
217    gen=True success_response=True boxed=False oob=False preconfig=False
218command cmd-success-response None -> None
219    gen=True success_response=False boxed=False oob=False preconfig=False
220object q_obj_guest-get-time-arg
221    member a: int optional=False
222    member b: int optional=True
223command guest-get-time q_obj_guest-get-time-arg -> int
224    gen=True success_response=True boxed=False oob=False preconfig=False
225object q_obj_guest-sync-arg
226    member arg: any optional=False
227command guest-sync q_obj_guest-sync-arg -> any
228    gen=True success_response=True boxed=False oob=False preconfig=False
229command boxed-struct UserDefZero -> None
230    gen=True success_response=True boxed=True oob=False preconfig=False
231command boxed-union UserDefListUnion -> None
232    gen=True success_response=True boxed=True oob=False preconfig=False
233command boxed-empty Empty1 -> None
234    gen=True success_response=True boxed=True oob=False preconfig=False
235command test-flags-command None -> None
236    gen=True success_response=True boxed=False oob=True preconfig=True
237object UserDefOptions
238    member i64: intList optional=True
239    member u64: uint64List optional=True
240    member u16: uint16List optional=True
241    member i64x: int optional=True
242    member u64x: uint64 optional=True
243object EventStructOne
244    member struct1: UserDefOne optional=False
245    member string: str optional=False
246    member enum2: EnumOne optional=True
247event EVENT_A None
248    boxed=False
249event EVENT_B None
250    boxed=False
251object q_obj_EVENT_C-arg
252    member a: int optional=True
253    member b: UserDefOne optional=True
254    member c: str optional=False
255event EVENT_C q_obj_EVENT_C-arg
256    boxed=False
257object q_obj_EVENT_D-arg
258    member a: EventStructOne optional=False
259    member b: str optional=False
260    member c: str optional=True
261    member enum3: EnumOne optional=True
262event EVENT_D q_obj_EVENT_D-arg
263    boxed=False
264event EVENT_E UserDefZero
265    boxed=True
266event EVENT_F UserDefFlatUnion
267    boxed=True
268event EVENT_G Empty1
269    boxed=True
270enum __org.qemu_x-Enum
271    member __org.qemu_x-value
272object __org.qemu_x-Base
273    member __org.qemu_x-member1: __org.qemu_x-Enum optional=False
274object __org.qemu_x-Struct
275    base __org.qemu_x-Base
276    member __org.qemu_x-member2: str optional=False
277    member wchar-t: int optional=True
278object q_obj_str-wrapper
279    member data: str optional=False
280enum __org.qemu_x-Union1Kind
281    member __org.qemu_x-branch
282object __org.qemu_x-Union1
283    member type: __org.qemu_x-Union1Kind optional=False
284    tag type
285    case __org.qemu_x-branch: q_obj_str-wrapper
286alternate __org.qemu_x-Alt1
287    tag type
288    case __org.qemu_x-branch: str
289array __org.qemu_x-Union1List __org.qemu_x-Union1
290object __org.qemu_x-Struct2
291    member array: __org.qemu_x-Union1List optional=False
292object __org.qemu_x-Union2
293    base __org.qemu_x-Base
294    tag __org.qemu_x-member1
295    case __org.qemu_x-value: __org.qemu_x-Struct2
296alternate __org.qemu_x-Alt
297    tag type
298    case __org.qemu_x-branch: __org.qemu_x-Base
299event __ORG.QEMU_X-EVENT __org.qemu_x-Struct
300    boxed=False
301array __org.qemu_x-EnumList __org.qemu_x-Enum
302array __org.qemu_x-StructList __org.qemu_x-Struct
303object q_obj___org.qemu_x-command-arg
304    member a: __org.qemu_x-EnumList optional=False
305    member b: __org.qemu_x-StructList optional=False
306    member c: __org.qemu_x-Union2 optional=False
307    member d: __org.qemu_x-Alt optional=False
308command __org.qemu_x-command q_obj___org.qemu_x-command-arg -> __org.qemu_x-Union1
309    gen=True success_response=True boxed=False oob=False preconfig=False
310object TestIfStruct
311    member foo: int optional=False
312    member bar: int optional=False
313        if ['defined(TEST_IF_STRUCT_BAR)']
314    if ['defined(TEST_IF_STRUCT)']
315enum TestIfEnum
316    member foo
317    member bar
318        if ['defined(TEST_IF_ENUM_BAR)']
319    if ['defined(TEST_IF_ENUM)']
320object q_obj_TestStruct-wrapper
321    member data: TestStruct optional=False
322enum TestIfUnionKind
323    member foo
324    member union_bar
325        if ['defined(TEST_IF_UNION_BAR)']
326    if ['defined(TEST_IF_UNION) && defined(TEST_IF_STRUCT)']
327object TestIfUnion
328    member type: TestIfUnionKind optional=False
329    tag type
330    case foo: q_obj_TestStruct-wrapper
331    case union_bar: q_obj_str-wrapper
332        if ['defined(TEST_IF_UNION_BAR)']
333    if ['defined(TEST_IF_UNION) && defined(TEST_IF_STRUCT)']
334object q_obj_TestIfUnionCmd-arg
335    member union_cmd_arg: TestIfUnion optional=False
336    if ['defined(TEST_IF_UNION)']
337command TestIfUnionCmd q_obj_TestIfUnionCmd-arg -> None
338    gen=True success_response=True boxed=False oob=False preconfig=False
339    if ['defined(TEST_IF_UNION)']
340alternate TestIfAlternate
341    tag type
342    case foo: int
343    case bar: TestStruct
344        if ['defined(TEST_IF_ALT_BAR)']
345    if ['defined(TEST_IF_ALT) && defined(TEST_IF_STRUCT)']
346object q_obj_TestIfAlternateCmd-arg
347    member alt_cmd_arg: TestIfAlternate optional=False
348    if ['defined(TEST_IF_ALT)']
349command TestIfAlternateCmd q_obj_TestIfAlternateCmd-arg -> None
350    gen=True success_response=True boxed=False oob=False preconfig=False
351    if ['defined(TEST_IF_ALT)']
352object q_obj_TestIfCmd-arg
353    member foo: TestIfStruct optional=False
354    member bar: TestIfEnum optional=False
355        if ['defined(TEST_IF_CMD_BAR)']
356    if ['defined(TEST_IF_CMD)', 'defined(TEST_IF_STRUCT)']
357command TestIfCmd q_obj_TestIfCmd-arg -> UserDefThree
358    gen=True success_response=True boxed=False oob=False preconfig=False
359    if ['defined(TEST_IF_CMD)', 'defined(TEST_IF_STRUCT)']
360command TestCmdReturnDefThree None -> UserDefThree
361    gen=True success_response=True boxed=False oob=False preconfig=False
362array TestIfEnumList TestIfEnum
363    if ['defined(TEST_IF_ENUM)']
364object q_obj_TestIfEvent-arg
365    member foo: TestIfStruct optional=False
366    member bar: TestIfEnumList optional=False
367        if ['defined(TEST_IF_EVT_BAR)']
368    if ['defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT)']
369event TestIfEvent q_obj_TestIfEvent-arg
370    boxed=False
371    if ['defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT)']
372object FeatureStruct0
373    member foo: int optional=False
374object FeatureStruct1
375    member foo: int optional=False
376    feature feature1
377object FeatureStruct2
378    member foo: int optional=False
379    feature feature1
380object FeatureStruct3
381    member foo: int optional=False
382    feature feature1
383    feature feature2
384object FeatureStruct4
385    member namespace-test: int optional=False
386    feature namespace-test
387    feature int
388    feature name
389    feature if
390object CondFeatureStruct1
391    member foo: int optional=False
392    feature feature1
393        if ['defined(TEST_IF_FEATURE_1)']
394object CondFeatureStruct2
395    member foo: int optional=False
396    feature feature1
397        if ['defined(TEST_IF_FEATURE_1)']
398    feature feature2
399        if ['defined(TEST_IF_FEATURE_2)']
400object CondFeatureStruct3
401    member foo: int optional=False
402    feature feature1
403        if ['defined(TEST_IF_COND_1)', 'defined(TEST_IF_COND_2)']
404object q_obj_test-features-arg
405    member fs0: FeatureStruct0 optional=False
406    member fs1: FeatureStruct1 optional=False
407    member fs2: FeatureStruct2 optional=False
408    member fs3: FeatureStruct3 optional=False
409    member fs4: FeatureStruct4 optional=False
410    member cfs1: CondFeatureStruct1 optional=False
411    member cfs2: CondFeatureStruct2 optional=False
412    member cfs3: CondFeatureStruct3 optional=False
413command test-features q_obj_test-features-arg -> None
414    gen=True success_response=True boxed=False oob=False preconfig=False
415command test-command-features0 None -> None
416    gen=True success_response=True boxed=False oob=False preconfig=False
417command test-command-features1 None -> None
418    gen=True success_response=True boxed=False oob=False preconfig=False
419    feature feature1
420command test-command-features3 None -> None
421    gen=True success_response=True boxed=False oob=False preconfig=False
422    feature feature1
423    feature feature2
424command test-command-cond-features1 None -> None
425    gen=True success_response=True boxed=False oob=False preconfig=False
426    feature feature1
427        if ['defined(TEST_IF_FEATURE_1)']
428command test-command-cond-features2 None -> None
429    gen=True success_response=True boxed=False oob=False preconfig=False
430    feature feature1
431        if ['defined(TEST_IF_FEATURE_1)']
432    feature feature2
433        if ['defined(TEST_IF_FEATURE_2)']
434command test-command-cond-features3 None -> None
435    gen=True success_response=True boxed=False oob=False preconfig=False
436    feature feature1
437        if ['defined(TEST_IF_COND_1)', 'defined(TEST_IF_COND_2)']
438