2 * [[ Authors will Fill in the Copyright header ]]
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 * Authors : Brent Salisbury, Evan Zeller
10 package org.opendaylight.ovsdb.lib.database;
\r
12 import com.fasterxml.jackson.annotation.JsonProperty;
15 public class OvsdbType {
\r
16 public enum PortType {
\r
21 INTERNAL("internal");
\r
23 private PortType(String name) {
\r
27 private String name;
\r
30 public String toString() {
\r
34 public OvsdbType(String type){
\r
35 this.key = new BaseType(type);
\r
38 public OvsdbType(@JsonProperty("key") BaseType key, @JsonProperty("value") BaseType value,
\r
39 @JsonProperty("min") Integer min, @JsonProperty("max") Object max){
\r
46 public BaseType key;
\r
47 public BaseType value;
\r
51 public static class BaseType{
\r
53 public BaseType(String type){
\r
57 public BaseType(@JsonProperty("type") String type, @JsonProperty("enum") Object ovsdbEnum,
\r
58 @JsonProperty("minInteger") Integer minInteger, @JsonProperty("maxInteger") Integer maxInteger,
\r
59 @JsonProperty("minReal") Double minReal, @JsonProperty("maxReal") Double maxReal,
\r
60 @JsonProperty("minLength") Integer minLength, @JsonProperty("maxLength") Integer maxLength,
\r
61 @JsonProperty("refTable") String refTable, @JsonProperty("refType") String refType){
\r
63 this.ovsdbEnum = ovsdbEnum;
\r
64 this.minInteger = minInteger;
\r
65 this.maxInteger = maxInteger;
\r
66 this.minReal = minReal;
\r
67 this.maxReal = maxReal;
\r
68 this.minLength = minLength;
\r
69 this.maxLength = maxLength;
\r
70 this.refTable = refTable;
\r
71 this.refType = refType;
\r
75 public Object ovsdbEnum;
\r
76 public Integer minInteger;
\r
77 public Integer maxInteger;
\r
78 public Double minReal;
\r
79 public Double maxReal;
\r
80 public Integer minLength;
\r
81 public Integer maxLength;
\r
82 public String refTable;
\r
83 public String refType;
\r
85 public String toString() {
\r
86 return "BaseType [type=" + type + ", ovsdbEnum="
\r
87 + ovsdbEnum + ", minInteger=" + minInteger
\r
88 + ", maxInteger=" + maxInteger + ", minReal=" + minReal
\r
89 + ", maxReal=" + maxReal + ", minLength=" + minLength
\r
90 + ", maxLength=" + maxLength + ", refTable=" + refTable
\r
91 + ", refType=" + refType + "]";
\r
96 public String toString() {
\r
97 return "OvsdbType [key=" + key + ", value=" + value + ", min=" + min
\r
98 + ", max=" + max + "]";
\r