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-ext1 {
10         type int32 {
11             range "2..20";
12         }
13     }
14
15     typedef int32-ext2 {
16         type int32-ext1 {
17             range "3..9|11..max";
18         }
19         units "mile";
20         default "11";
21     }
22
23     typedef string-ext1 {
24         type string {
25             pattern "[a-k]*";
26             length "5..11";
27         }
28     }
29
30     typedef string-ext2 {
31         type string-ext1 {
32             length "6..10";
33         }
34     }
35
36     typedef string-ext3 {
37         type string-ext2 {
38             pattern "[b-u]*";
39         }
40     }
41
42     typedef my-decimal-type {
43         type decimal64 {
44             fraction-digits 6;
45         }
46     }
47
48     typedef union-ext1 {
49         type union {
50             type int16 {
51                 range "1..100";
52             }
53             type int32;
54         }
55     }
56
57     typedef union-ext2 {
58         type union-ext1;
59     }
60
61     typedef union-ext3 {
62         type union {
63             type union-ext2;
64             type string;
65         }
66     }
67
68     typedef union-ext4 {
69         type union {
70             type union-ext3;
71             type int32-ext2;
72             type empty;
73             type my-decimal-type;
74         }
75     }
76
77     typedef b1 {
78         type binary;
79     }
80
81     typedef b2 {
82         type b1;
83     }
84
85     typedef b3 {
86         type b2 {
87             length 1..10;
88         }
89     }
90
91     container c1 {
92         leaf id {
93             type b3;
94         }
95     }
96
97 }