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
206object q_obj_guest-get-time-arg
207    member a: int optional=False
208    member b: int optional=True
209command guest-get-time q_obj_guest-get-time-arg -> int
210    gen=True success_response=True boxed=False oob=False preconfig=False
211object q_obj_guest-sync-arg
212    member arg: any optional=False
213command guest-sync q_obj_guest-sync-arg -> any
214    gen=True success_response=True boxed=False oob=False preconfig=False
215command boxed-struct UserDefZero -> None
216    gen=True success_response=True boxed=True oob=False preconfig=False
217command boxed-union UserDefListUnion -> None
218    gen=True success_response=True boxed=True oob=False preconfig=False
219command boxed-empty Empty1 -> None
220    gen=True success_response=True boxed=True oob=False preconfig=False
221command test-flags-command None -> None
222    gen=True success_response=True boxed=False oob=True preconfig=True
223object UserDefOptions
224    member i64: intList optional=True
225    member u64: uint64List optional=True
226    member u16: uint16List optional=True
227    member i64x: int optional=True
228    member u64x: uint64 optional=True
229object EventStructOne
230    member struct1: UserDefOne optional=False
231    member string: str optional=False
232    member enum2: EnumOne optional=True
233event EVENT_A None
234    boxed=False
235event EVENT_B None
236    boxed=False
237object q_obj_EVENT_C-arg
238    member a: int optional=True
239    member b: UserDefOne optional=True
240    member c: str optional=False
241event EVENT_C q_obj_EVENT_C-arg
242    boxed=False
243object q_obj_EVENT_D-arg
244    member a: EventStructOne optional=False
245    member b: str optional=False
246    member c: str optional=True
247    member enum3: EnumOne optional=True
248event EVENT_D q_obj_EVENT_D-arg
249    boxed=False
250event EVENT_E UserDefZero
251    boxed=True
252event EVENT_F UserDefFlatUnion
253    boxed=True
254event EVENT_G Empty1
255    boxed=True
256enum __org.qemu_x-Enum
257    member __org.qemu_x-value
258object __org.qemu_x-Base
259    member __org.qemu_x-member1: __org.qemu_x-Enum optional=False
260object __org.qemu_x-Struct
261    base __org.qemu_x-Base
262    member __org.qemu_x-member2: str optional=False
263    member wchar-t: int optional=True
264object q_obj_str-wrapper
265    member data: str optional=False
266enum __org.qemu_x-Union1Kind
267    member __org.qemu_x-branch
268object __org.qemu_x-Union1
269    member type: __org.qemu_x-Union1Kind optional=False
270    tag type
271    case __org.qemu_x-branch: q_obj_str-wrapper
272alternate __org.qemu_x-Alt1
273    tag type
274    case __org.qemu_x-branch: str
275array __org.qemu_x-Union1List __org.qemu_x-Union1
276object __org.qemu_x-Struct2
277    member array: __org.qemu_x-Union1List optional=False
278object __org.qemu_x-Union2
279    base __org.qemu_x-Base
280    tag __org.qemu_x-member1
281    case __org.qemu_x-value: __org.qemu_x-Struct2
282alternate __org.qemu_x-Alt
283    tag type
284    case __org.qemu_x-branch: __org.qemu_x-Base
285event __ORG.QEMU_X-EVENT __org.qemu_x-Struct
286    boxed=False
287array __org.qemu_x-EnumList __org.qemu_x-Enum
288array __org.qemu_x-StructList __org.qemu_x-Struct
289object q_obj___org.qemu_x-command-arg
290    member a: __org.qemu_x-EnumList optional=False
291    member b: __org.qemu_x-StructList optional=False
292    member c: __org.qemu_x-Union2 optional=False
293    member d: __org.qemu_x-Alt optional=False
294command __org.qemu_x-command q_obj___org.qemu_x-command-arg -> __org.qemu_x-Union1
295    gen=True success_response=True boxed=False oob=False preconfig=False
296object TestIfStruct
297    member foo: int optional=False
298    member bar: int optional=False
299        if ['defined(TEST_IF_STRUCT_BAR)']
300    if ['defined(TEST_IF_STRUCT)']
301enum TestIfEnum
302    member foo
303    member bar
304        if ['defined(TEST_IF_ENUM_BAR)']
305    if ['defined(TEST_IF_ENUM)']
306object q_obj_TestStruct-wrapper
307    member data: TestStruct optional=False
308enum TestIfUnionKind
309    member foo
310    member union_bar
311        if ['defined(TEST_IF_UNION_BAR)']
312    if ['defined(TEST_IF_UNION) && defined(TEST_IF_STRUCT)']
313object TestIfUnion
314    member type: TestIfUnionKind optional=False
315    tag type
316    case foo: q_obj_TestStruct-wrapper
317    case union_bar: q_obj_str-wrapper
318        if ['defined(TEST_IF_UNION_BAR)']
319    if ['defined(TEST_IF_UNION) && defined(TEST_IF_STRUCT)']
320object q_obj_TestIfUnionCmd-arg
321    member union_cmd_arg: TestIfUnion optional=False
322    if ['defined(TEST_IF_UNION)']
323command TestIfUnionCmd q_obj_TestIfUnionCmd-arg -> None
324    gen=True success_response=True boxed=False oob=False preconfig=False
325    if ['defined(TEST_IF_UNION)']
326alternate TestIfAlternate
327    tag type
328    case foo: int
329    case bar: TestStruct
330        if ['defined(TEST_IF_ALT_BAR)']
331    if ['defined(TEST_IF_ALT) && defined(TEST_IF_STRUCT)']
332object q_obj_TestIfAlternateCmd-arg
333    member alt_cmd_arg: TestIfAlternate optional=False
334    if ['defined(TEST_IF_ALT)']
335command TestIfAlternateCmd q_obj_TestIfAlternateCmd-arg -> None
336    gen=True success_response=True boxed=False oob=False preconfig=False
337    if ['defined(TEST_IF_ALT)']
338object q_obj_TestIfCmd-arg
339    member foo: TestIfStruct optional=False
340    member bar: TestIfEnum optional=False
341        if ['defined(TEST_IF_CMD_BAR)']
342    if ['defined(TEST_IF_CMD)', 'defined(TEST_IF_STRUCT)']
343command TestIfCmd q_obj_TestIfCmd-arg -> UserDefThree
344    gen=True success_response=True boxed=False oob=False preconfig=False
345    if ['defined(TEST_IF_CMD)', 'defined(TEST_IF_STRUCT)']
346command TestCmdReturnDefThree None -> UserDefThree
347    gen=True success_response=True boxed=False oob=False preconfig=False
348array TestIfEnumList TestIfEnum
349    if ['defined(TEST_IF_ENUM)']
350object q_obj_TestIfEvent-arg
351    member foo: TestIfStruct optional=False
352    member bar: TestIfEnumList optional=False
353        if ['defined(TEST_IF_EVT_BAR)']
354    if ['defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT)']
355event TestIfEvent q_obj_TestIfEvent-arg
356    boxed=False
357    if ['defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT)']
358object FeatureStruct0
359    member foo: int optional=False
360object FeatureStruct1
361    member foo: int optional=False
362    feature feature1
363object FeatureStruct2
364    member foo: int optional=False
365    feature feature1
366object FeatureStruct3
367    member foo: int optional=False
368    feature feature1
369    feature feature2
370object FeatureStruct4
371    member namespace-test: int optional=False
372    feature namespace-test
373    feature int
374    feature name
375    feature if
376object CondFeatureStruct1
377    member foo: int optional=False
378    feature feature1
379        if ['defined(TEST_IF_FEATURE_1)']
380object CondFeatureStruct2
381    member foo: int optional=False
382    feature feature1
383        if ['defined(TEST_IF_FEATURE_1)']
384    feature feature2
385        if ['defined(TEST_IF_FEATURE_2)']
386object CondFeatureStruct3
387    member foo: int optional=False
388    feature feature1
389        if ['defined(TEST_IF_COND_1)', 'defined(TEST_IF_COND_2)']
390object q_obj_test-features-arg
391    member fs0: FeatureStruct0 optional=False
392    member fs1: FeatureStruct1 optional=False
393    member fs2: FeatureStruct2 optional=False
394    member fs3: FeatureStruct3 optional=False
395    member fs4: FeatureStruct4 optional=False
396    member cfs1: CondFeatureStruct1 optional=False
397    member cfs2: CondFeatureStruct2 optional=False
398    member cfs3: CondFeatureStruct3 optional=False
399command test-features q_obj_test-features-arg -> None
400    gen=True success_response=True boxed=False oob=False preconfig=False
401command test-command-features0 None -> None
402    gen=True success_response=True boxed=False oob=False preconfig=False
403command test-command-features1 None -> None
404    gen=True success_response=True boxed=False oob=False preconfig=False
405    feature feature1
406command test-command-features3 None -> None
407    gen=True success_response=True boxed=False oob=False preconfig=False
408    feature feature1
409    feature feature2
410command test-command-cond-features1 None -> None
411    gen=True success_response=True boxed=False oob=False preconfig=False
412    feature feature1
413        if ['defined(TEST_IF_FEATURE_1)']
414command test-command-cond-features2 None -> None
415    gen=True success_response=True boxed=False oob=False preconfig=False
416    feature feature1
417        if ['defined(TEST_IF_FEATURE_1)']
418    feature feature2
419        if ['defined(TEST_IF_FEATURE_2)']
420command test-command-cond-features3 None -> None
421    gen=True success_response=True boxed=False oob=False preconfig=False
422    feature feature1
423        if ['defined(TEST_IF_COND_1)', 'defined(TEST_IF_COND_2)']
424module include/sub-module.json
425include sub-sub-module.json
426object SecondArrayRef
427    member s: StatusList optional=False
428module sub-sub-module.json
429array StatusList Status
430enum Status
431    member good
432    member bad
433    member ugly
434