Increased version of binding-generator to 0.5.5-SNAPSHOT.
[controller.git] / opendaylight / sal / yang-prototype / code-generator / binding-generator-impl / src / test / resources / bit_and_union_in_leaf.yang
1 module bit-and-union-in-leaf {
2
3     namespace "urn:bit:union:in:leaf";
4     prefix "sbd";
5
6     organization "OPEN DAYLIGHT";
7     contact "http://www.opendaylight.org/";
8
9     revision 2013-06-26 {
10
11     }
12
13     typedef union-typedef {
14         type union {
15             type string {
16                 pattern "[a-g]";
17             }
18             type int16;
19         }
20     }
21
22     typedef union-typedef2 {
23         type union {
24             type string; 
25             type int16;
26         }
27     }    
28
29     container parent-container {
30         leaf bit-leaf {
31             type bits {
32                 bit first-bit;
33                 bit second-bit;
34                 bit third-bit;
35             }
36         }
37
38         leaf union-leaf {
39             type union {
40                 type int32;
41                 type string {
42                     pattern "[a-z]";
43                 }
44                 type string {
45                     pattern "[0-9]*";
46                 }
47                 type string {
48                     pattern "[a-d]*";
49                     pattern "[0-5]*";
50                 }
51                 type uint8;
52             }
53         }
54     }
55 }