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
156object q_obj_StatusList-wrapper
157    member data: StatusList optional=False
158enum UserDefListUnionKind
159    member integer
160    member s8
161    member s16
162    member s32
163    member s64
164    member u8
165    member u16
166    member u32
167    member u64
168    member number
169    member boolean
170    member string
171    member sizes
172    member any
173    member user
174object UserDefListUnion
175    member type: UserDefListUnionKind optional=False
176    tag type
177    case integer: q_obj_intList-wrapper
178    case s8: q_obj_int8List-wrapper
179    case s16: q_obj_int16List-wrapper
180    case s32: q_obj_int32List-wrapper
181    case s64: q_obj_int64List-wrapper
182    case u8: q_obj_uint8List-wrapper
183    case u16: q_obj_uint16List-wrapper
184    case u32: q_obj_uint32List-wrapper
185    case u64: q_obj_uint64List-wrapper
186    case number: q_obj_numberList-wrapper
187    case boolean: q_obj_boolList-wrapper
188    case string: q_obj_strList-wrapper
189    case sizes: q_obj_sizeList-wrapper
190    case any: q_obj_anyList-wrapper
191    case user: q_obj_StatusList-wrapper
192include include/sub-module.json
193command user_def_cmd None -> None
194    gen=True success_response=True boxed=False oob=False preconfig=False
195object q_obj_user_def_cmd1-arg
196    member ud1a: UserDefOne optional=False
197command user_def_cmd1 q_obj_user_def_cmd1-arg -> None
198    gen=True success_response=True boxed=False oob=False preconfig=False
199object q_obj_user_def_cmd2-arg
200    member ud1a: UserDefOne optional=False
201    member ud1b: UserDefOne optional=True
202command user_def_cmd2 q_obj_user_def_cmd2-arg -> UserDefTwo
203    gen=True success_response=True boxed=False oob=False preconfig=False
204command cmd-success-response None -> None
205    gen=True success_response=False boxed=False oob=False preconfig=False
206command coroutine-cmd None -> None
207    gen=True success_response=True boxed=False oob=False preconfig=False coroutine=True
208object q_obj_guest-get-time-arg
209    member a: int optional=False
210    member b: int optional=True
211command guest-get-time q_obj_guest-get-time-arg -> int
212    gen=True success_response=True boxed=False oob=False preconfig=False
213object q_obj_guest-sync-arg
214    member arg: any optional=False
215command guest-sync q_obj_guest-sync-arg -> any
216    gen=True success_response=True boxed=False oob=False preconfig=False
217command boxed-struct UserDefZero -> None
218    gen=True success_response=True boxed=True oob=False preconfig=False
219command boxed-union UserDefListUnion -> None
220    gen=True success_response=True boxed=True oob=False preconfig=False
221command boxed-empty Empty1 -> None
222    gen=True success_response=True boxed=True oob=False preconfig=False
223command test-flags-command None -> None
224    gen=True success_response=True boxed=False oob=True preconfig=True
225object UserDefOptions
226    member i64: intList optional=True
227    member u64: uint64List optional=True
228    member u16: uint16List optional=True
229    member i64x: int optional=True
230    member u64x: uint64 optional=True
231object EventStructOne
232    member struct1: UserDefOne optional=False
233    member string: str optional=False
234    member enum2: EnumOne optional=True
235event EVENT_A None
236    boxed=False
237event EVENT_B None
238    boxed=False
239object q_obj_EVENT_C-arg
240    member a: int optional=True
241    member b: UserDefOne optional=True
242    member c: str optional=False
243event EVENT_C q_obj_EVENT_C-arg
244    boxed=False
245object q_obj_EVENT_D-arg
246    member a: EventStructOne optional=False
247    member b: str optional=False
248    member c: str optional=True
249    member enum3: EnumOne optional=True
250event EVENT_D q_obj_EVENT_D-arg
251    boxed=False
252event EVENT_E UserDefZero
253    boxed=True
254event EVENT_F UserDefFlatUnion
255    boxed=True
256event EVENT_G Empty1
257    boxed=True
258enum __org.qemu_x-Enum
259    member __org.qemu_x-value
260object __org.qemu_x-Base
261    member __org.qemu_x-member1: __org.qemu_x-Enum optional=False
262object __org.qemu_x-Struct
263    base __org.qemu_x-Base
264    member __org.qemu_x-member2: str optional=False
265    member wchar-t: int optional=True
266object q_obj_str-wrapper
267    member data: str optional=False
268enum __org.qemu_x-Union1Kind
269    member __org.qemu_x-branch
270object __org.qemu_x-Union1
271    member type: __org.qemu_x-Union1Kind optional=False
272    tag type
273    case __org.qemu_x-branch: q_obj_str-wrapper
274alternate __org.qemu_x-Alt1
275    tag type
276    case __org.qemu_x-branch: str
277array __org.qemu_x-Union1List __org.qemu_x-Union1
278object __org.qemu_x-Struct2
279    member array: __org.qemu_x-Union1List optional=False
280object __org.qemu_x-Union2
281    base __org.qemu_x-Base
282    tag __org.qemu_x-member1
283    case __org.qemu_x-value: __org.qemu_x-Struct2
284alternate __org.qemu_x-Alt
285    tag type
286    case __org.qemu_x-branch: __org.qemu_x-Base
287event __ORG.QEMU_X-EVENT __org.qemu_x-Struct
288    boxed=False
289array __org.qemu_x-EnumList __org.qemu_x-Enum
290array __org.qemu_x-StructList __org.qemu_x-Struct
291object q_obj___org.qemu_x-command-arg
292    member a: __org.qemu_x-EnumList optional=False
293    member b: __org.qemu_x-StructList optional=False
294    member c: __org.qemu_x-Union2 optional=False
295    member d: __org.qemu_x-Alt optional=False
296command __org.qemu_x-command q_obj___org.qemu_x-command-arg -> __org.qemu_x-Union1
297    gen=True success_response=True boxed=False oob=False preconfig=False
298object TestIfStruct
299    member foo: int optional=False
300    member bar: int optional=False
301        if ['defined(TEST_IF_STRUCT_BAR)']
302    if ['defined(TEST_IF_STRUCT)']
303enum TestIfEnum
304    member foo
305    member bar
306        if ['defined(TEST_IF_ENUM_BAR)']
307    if ['defined(TEST_IF_ENUM)']
308object q_obj_TestStruct-wrapper
309    member data: TestStruct optional=False
310enum TestIfUnionKind
311    member foo
312    member union_bar
313        if ['defined(TEST_IF_UNION_BAR)']
314    if ['defined(TEST_IF_UNION) && defined(TEST_IF_STRUCT)']
315object TestIfUnion
316    member type: TestIfUnionKind optional=False
317    tag type
318    case foo: q_obj_TestStruct-wrapper
319    case union_bar: q_obj_str-wrapper
320        if ['defined(TEST_IF_UNION_BAR)']
321    if ['defined(TEST_IF_UNION) && defined(TEST_IF_STRUCT)']
322object q_obj_TestIfUnionCmd-arg
323    member union_cmd_arg: TestIfUnion optional=False
324    if ['defined(TEST_IF_UNION)']
325command TestIfUnionCmd q_obj_TestIfUnionCmd-arg -> None
326    gen=True success_response=True boxed=False oob=False preconfig=False
327    if ['defined(TEST_IF_UNION)']
328alternate TestIfAlternate
329    tag type
330    case foo: int
331    case bar: TestStruct
332        if ['defined(TEST_IF_ALT_BAR)']
333    if ['defined(TEST_IF_ALT) && defined(TEST_IF_STRUCT)']
334object q_obj_TestIfAlternateCmd-arg
335    member alt_cmd_arg: TestIfAlternate optional=False
336    if ['defined(TEST_IF_ALT)']
337command TestIfAlternateCmd q_obj_TestIfAlternateCmd-arg -> None
338    gen=True success_response=True boxed=False oob=False preconfig=False
339    if ['defined(TEST_IF_ALT)']
340object q_obj_TestIfCmd-arg
341    member foo: TestIfStruct optional=False
342    member bar: TestIfEnum optional=False
343        if ['defined(TEST_IF_CMD_BAR)']
344    if ['defined(TEST_IF_CMD)', 'defined(TEST_IF_STRUCT)']
345command TestIfCmd q_obj_TestIfCmd-arg -> UserDefThree
346    gen=True success_response=True boxed=False oob=False preconfig=False
347    if ['defined(TEST_IF_CMD)', 'defined(TEST_IF_STRUCT)']
348command TestCmdReturnDefThree None -> UserDefThree
349    gen=True success_response=True boxed=False oob=False preconfig=False
350array TestIfEnumList TestIfEnum
351    if ['defined(TEST_IF_ENUM)']
352object q_obj_TestIfEvent-arg
353    member foo: TestIfStruct optional=False
354    member bar: TestIfEnumList optional=False
355        if ['defined(TEST_IF_EVT_BAR)']
356    if ['defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT)']
357event TestIfEvent q_obj_TestIfEvent-arg
358    boxed=False
359    if ['defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT)']
360object FeatureStruct0
361    member foo: int optional=False
362object FeatureStruct1
363    member foo: int optional=False
364        feature deprecated
365    feature feature1
366object FeatureStruct2
367    member foo: int optional=False
368    feature feature1
369object FeatureStruct3
370    member foo: int optional=False
371    feature feature1
372    feature feature2
373object FeatureStruct4
374    member namespace-test: int optional=False
375    feature namespace-test
376    feature int
377    feature name
378    feature if
379object CondFeatureStruct1
380    member foo: int optional=False
381    feature feature1
382        if ['defined(TEST_IF_FEATURE_1)']
383object CondFeatureStruct2
384    member foo: int optional=False
385    feature feature1
386        if ['defined(TEST_IF_FEATURE_1)']
387    feature feature2
388        if ['defined(TEST_IF_FEATURE_2)']
389object CondFeatureStruct3
390    member foo: int optional=False
391    feature feature1
392        if ['defined(TEST_IF_COND_1)', 'defined(TEST_IF_COND_2)']
393enum FeatureEnum1
394    member eins
395    member zwei
396    member drei
397    feature feature1
398object q_obj_FeatureUnion1-base
399    member tag: FeatureEnum1 optional=False
400object FeatureUnion1
401    base q_obj_FeatureUnion1-base
402    tag tag
403    case eins: FeatureStruct1
404    case zwei: q_empty
405    case drei: q_empty
406    feature feature1
407alternate FeatureAlternate1
408    tag type
409    case eins: FeatureStruct1
410    feature feature1
411object q_obj_test-features0-arg
412    member fs0: FeatureStruct0 optional=False
413    member fs1: FeatureStruct1 optional=False
414    member fs2: FeatureStruct2 optional=False
415    member fs3: FeatureStruct3 optional=False
416    member fs4: FeatureStruct4 optional=False
417    member cfs1: CondFeatureStruct1 optional=False
418    member cfs2: CondFeatureStruct2 optional=False
419    member cfs3: CondFeatureStruct3 optional=False
420command test-features0 q_obj_test-features0-arg -> None
421    gen=True success_response=True boxed=False oob=False preconfig=False
422command test-command-features1 None -> None
423    gen=True success_response=True boxed=False oob=False preconfig=False
424    feature deprecated
425command test-command-features3 None -> None
426    gen=True success_response=True boxed=False oob=False preconfig=False
427    feature feature1
428    feature feature2
429command test-command-cond-features1 None -> None
430    gen=True success_response=True boxed=False oob=False preconfig=False
431    feature feature1
432        if ['defined(TEST_IF_FEATURE_1)']
433command test-command-cond-features2 None -> None
434    gen=True success_response=True boxed=False oob=False preconfig=False
435    feature feature1
436        if ['defined(TEST_IF_FEATURE_1)']
437    feature feature2
438        if ['defined(TEST_IF_FEATURE_2)']
439command test-command-cond-features3 None -> None
440    gen=True success_response=True boxed=False oob=False preconfig=False
441    feature feature1
442        if ['defined(TEST_IF_COND_1)', 'defined(TEST_IF_COND_2)']
443event TEST-EVENT-FEATURES1 None
444    boxed=False
445    feature deprecated
446module include/sub-module.json
447include sub-sub-module.json
448object SecondArrayRef
449    member s: StatusList optional=False
450module sub-sub-module.json
451array StatusList Status
452enum Status
453    member good
454    member bad
455    member ugly
456