Merge branch 'master' of ../controller
[yangtools.git] / yang / yang-data-codec-gson / src / test / resources / complexjson / yang / complexjson.yang
1 module complexjson {
2     namespace "ns:complex:json";
3     prefix cj;
4
5     revision "2014-08-11" {
6     }
7
8     typedef wrapped-instance-identifier {
9         description "Wrapped instance Identifier";
10         type instance-identifier;
11     }
12
13     identity ident;
14
15     container cont1 {
16
17         leaf empty {
18             type empty;
19         }
20
21         anyxml lf12-any;
22         anyxml lf13-any;
23         anyxml lf14-any;
24
25         leaf lf11 {
26             type int32;
27         }
28
29         leaf-list lflst11 {
30             type string;
31         }
32
33         list lst11 {
34             key "key111 lf111";
35             leaf key111 {
36                 type string;
37             }
38             leaf lf111 {
39                 type string;
40             }
41             leaf lf112 {
42                 type wrapped-instance-identifier;
43             }
44             leaf lf113 {
45                 type string;
46             }
47         }
48
49         list lst12 {
50             leaf lf121 {
51                 type string;
52             }
53             leaf lf122 {
54                 type string;
55             }
56         }
57
58
59         choice choc11 {
60             case c11A {
61                 leaf lf13 {
62                     type string;
63                 }
64             }
65             leaf lf16 {
66                 type string;
67             }
68         }
69
70         choice choc12 {
71             case c12A {
72             }
73         }
74     }
75
76     container cont2 {
77         presence "presence container";
78     }
79
80     augment "/cont1/choc12" {
81         case c12B {
82             leaf lf17 {
83                 type string;
84             }
85         }
86     }
87
88     augment "/cont1" {
89         container cont11 {
90             leaf lf111 {
91                 type string;
92             }
93         }
94     }
95
96     augment "/cont1" {
97         leaf lf12_1 {
98             type string;
99         }
100         leaf lf12_2 {
101             type string;
102         }
103     }
104
105     augment "/cont1" {
106         leaf lf12_3 {
107             type string;
108         }
109     }
110
111     augment "/cont1/choc11" {
112         case c11B {
113             leaf lf14_1  {
114                 type string;
115             }
116         }
117     }
118
119     augment "/cont1/choc11" {
120         case c11C {
121             leaf lf14_2  {
122                 type string;
123             }
124         }
125     }
126
127     augment "/cont1/choc11/c11A" {
128         leaf lf15_11  {
129             type bits {
130                 bit one;
131                 bit two;
132                 bit three;
133             }
134         }
135         leaf lf15_12  {
136             type identityref {
137                 base ident;
138             }
139         }
140
141     }
142
143     augment "/cont1/choc11/c11A" {
144         leaf lf15_21 {
145             type string;
146         }
147     }
148
149     augment "/cont1" {
150         /*ext:augment-identifier top-choice-augment1;*/
151         choice augment-choice1 {
152             case case1 {
153                 container case1-container {
154                     leaf case1-leaf {
155                         type string;
156                     }
157                 }
158             }
159
160             case case2 {
161                 container case2-container {
162                     leaf case2-leaf {
163                         type string;
164                     }
165                 }
166             }
167         }
168     }
169
170     augment "/cont1/augment-choice1/case1" {
171         /*ext:augment-identifier top-choice-augment2;*/
172         choice augment-choice2 {
173             case case11 {
174                 container case11-choice-case-container {
175                     leaf case11-choice-case-leaf {
176                         type string;
177                     }
178                 }
179             }
180         }
181     }
182
183 }