Merge "Added export of augmentation schemas to Binding Context"
[yangtools.git] / code-generator / binding-java-api-generator / src / test / resources / compilation / typedef / foo.yang
1 module foo {
2     yang-version 1;
3     namespace "urn:opendaylight.foo";
4     prefix "foo";
5
6     revision "2013-10-08" {
7     }
8
9     typedef int32-ext0 {
10         type int32;
11     }
12
13     typedef int32-ext1 {
14         type int32 {
15             range "2..2147483647";
16         }
17     }
18
19     typedef int32-ext2 {
20         type int32-ext1 {
21             range "3..9|11..max";
22         }
23         units "mile";
24         default "11";
25     }
26
27     typedef string-ext1 {
28         type string {
29             pattern "[a-k]*";
30             length "5..11";
31         }
32     }
33
34     typedef string-ext2 {
35         type string-ext1 {
36             length "6..10";
37         }
38     }
39
40     typedef string-ext3 {
41         type string-ext2 {
42             pattern "[b-u]*";
43         }
44     }
45
46     typedef my-decimal-type {
47         type decimal64 {
48             fraction-digits 6;
49         }
50     }
51
52     typedef union-ext1 {
53         type union {
54             type int16 {
55                 range "1..100";
56             }
57             type int32;
58         }
59     }
60
61     typedef union-ext2 {
62         type union-ext1;
63     }
64
65     typedef union-ext3 {
66         type union {
67             type union-ext2;
68             type string;
69         }
70         units "object id";
71     }
72
73     typedef union-ext4 {
74         type union {
75             type union-ext3;
76             type int32-ext2;
77             type empty;
78             type my-decimal-type;
79         }
80     }
81
82     typedef b1 {
83         type binary;
84     }
85
86     typedef b2 {
87         type b1;
88     }
89
90     typedef b3 {
91         type b2 {
92             length 1..10;
93         }
94     }
95
96     container c1 {
97         leaf id {
98             type b3;
99         }
100     }
101
102
103     typedef a {
104         type int8;
105     }
106
107     typedef b {
108         type int16;
109     }
110
111     typedef c {
112         type int32;
113     }
114
115     typedef d {
116         type int64 {
117             range 0..max;
118         }
119     }
120
121     typedef e {
122         type uint8;
123     }
124
125     typedef f {
126         type uint16;
127     }
128
129     typedef g {
130         type uint32;
131     }
132
133     typedef h {
134         type uint64;
135     }
136
137 }