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;
12 import com.fasterxml.jackson.annotation.JsonProperty;
15 public class OvsdbType {
16 public enum PortType {
23 private PortType(String name) {
30 public String toString() {
34 public OvsdbType(String type){
35 this.key = new BaseType(type);
38 public OvsdbType(@JsonProperty("key") BaseType key, @JsonProperty("value") BaseType value,
39 @JsonProperty("min") Integer min, @JsonProperty("max") Object max){
47 public BaseType value;
51 public static class BaseType{
53 public BaseType(String type){
57 public BaseType(@JsonProperty("type") String type, @JsonProperty("enum") Object ovsdbEnum,
58 @JsonProperty("minInteger") Integer minInteger, @JsonProperty("maxInteger") Integer maxInteger,
59 @JsonProperty("minReal") Double minReal, @JsonProperty("maxReal") Double maxReal,
60 @JsonProperty("minLength") Integer minLength, @JsonProperty("maxLength") Integer maxLength,
61 @JsonProperty("refTable") String refTable, @JsonProperty("refType") String refType){
63 this.ovsdbEnum = ovsdbEnum;
64 this.minInteger = minInteger;
65 this.maxInteger = maxInteger;
66 this.minReal = minReal;
67 this.maxReal = maxReal;
68 this.minLength = minLength;
69 this.maxLength = maxLength;
70 this.refTable = refTable;
71 this.refType = refType;
75 public Object ovsdbEnum;
76 public Integer minInteger;
77 public Integer maxInteger;
78 public Double minReal;
79 public Double maxReal;
80 public Integer minLength;
81 public Integer maxLength;
82 public String refTable;
83 public String refType;
85 public String toString() {
86 return "BaseType [type=" + type + ", ovsdbEnum="
87 + ovsdbEnum + ", minInteger=" + minInteger
88 + ", maxInteger=" + maxInteger + ", minReal=" + minReal
89 + ", maxReal=" + maxReal + ", minLength=" + minLength
90 + ", maxLength=" + maxLength + ", refTable=" + refTable
91 + ", refType=" + refType + "]";
96 public String toString() {
97 return "OvsdbType [key=" + key + ", value=" + value + ", min=" + min
98 + ", max=" + max + "]";