Porting the OVSDB services to use the Controller SAL services : Connection and Bridge...
[ovsdb.git] / ovsdb / src / main / java / org / opendaylight / ovsdb / database / OvsdbType.java
1 package org.opendaylight.ovsdb.database;\r
2 \r
3 import com.fasterxml.jackson.annotation.JsonProperty;\r
4 \r
5 \r
6 public class OvsdbType {\r
7     public enum PortType {\r
8         VLAN("vlan"),\r
9         TUNNEL("Tunnel"),\r
10         BONDING("Bonding");\r
11 \r
12         private PortType(String name) {\r
13             this.name = name;\r
14         }\r
15 \r
16         private String name;\r
17 \r
18         public String toString() {\r
19             return name;\r
20         }\r
21     }\r
22     public OvsdbType(String type){\r
23         this.key = new BaseType(type);\r
24     }\r
25 \r
26     public OvsdbType(@JsonProperty("key") BaseType key, @JsonProperty("value") BaseType value,\r
27             @JsonProperty("min") Integer min, @JsonProperty("max") Object max){\r
28         this.key = key;\r
29         this.value = value;\r
30         this.min = min;\r
31         this.max = max;\r
32     }\r
33 \r
34     public BaseType key;\r
35     public BaseType value;\r
36     public Integer min;\r
37     public Object max;\r
38 \r
39     public static class BaseType{\r
40 \r
41         public BaseType(String type){\r
42             this.type = type;\r
43         }\r
44 \r
45         public BaseType(@JsonProperty("type") String type, @JsonProperty("enum") Object[] ovsdbEnum,\r
46                 @JsonProperty("minInteger") Integer minInteger, @JsonProperty("maxInteger") Integer maxInteger,\r
47                 @JsonProperty("minReal") Double minReal, @JsonProperty("maxReal") Double maxReal,\r
48                 @JsonProperty("minLength") Integer minLength, @JsonProperty("maxLength") Integer maxLength,\r
49                 @JsonProperty("refTable") String refTable, @JsonProperty("refType") String refType){\r
50             this.type = type;\r
51             this.ovsdbEnum = ovsdbEnum;\r
52             this.minInteger = minInteger;\r
53             this.maxInteger = maxInteger;\r
54             this.minReal = minReal;\r
55             this.maxReal = maxReal;\r
56             this.minLength = minLength;\r
57             this.maxLength = maxLength;\r
58             this.refTable = refTable;\r
59             this.refType = refType;\r
60         }\r
61 \r
62         public String type;\r
63         public Object[] ovsdbEnum;\r
64         public Integer minInteger;\r
65         public Integer maxInteger;\r
66         public Double minReal;\r
67         public Double maxReal;\r
68         public Integer minLength;\r
69         public Integer maxLength;\r
70         public String refTable;\r
71         public String refType;\r
72     }\r
73 \r
74 \r
75 }\r