blob: 6cccfffd94f1df087f0e8450929884b75a17ff16 [file] [log] [blame]
Thomas Vachuska781d18b2014-10-27 10:31:25 -07001/*
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07002 * Copyright 2014 Open Networking Laboratory
Thomas Vachuska781d18b2014-10-27 10:31:25 -07003 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07004 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
Thomas Vachuska781d18b2014-10-27 10:31:25 -07007 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07008 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
Thomas Vachuska781d18b2014-10-27 10:31:25 -070015 */
weibit38c42ed2014-10-09 19:03:54 -070016package org.onlab.onos.optical.cfg;
17
18import java.util.Map;
19import org.codehaus.jackson.JsonNode;
20import org.onlab.util.HexString;
21
22/**
23 * Public class corresponding to JSON described data model.
24 */
25public class OpticalLinkDescription {
26 protected String type;
27 protected Boolean allowed;
28 protected long dpid1;
29 protected long dpid2;
30 protected String nodeDpid1;
31 protected String nodeDpid2;
32 protected Map<String, JsonNode> params;
33 protected Map<String, String> publishAttributes;
34
35 public String getType() {
36 return type;
37 }
38
39 public void setType(String type) {
40 this.type = type;
41 }
42
43 public Boolean isAllowed() {
44 return allowed;
45 }
46
47 public void setAllowed(Boolean allowed) {
48 this.allowed = allowed;
49 }
50
51 public String getNodeDpid1() {
52 return nodeDpid1;
53 }
54
55 public void setNodeDpid1(String nodeDpid1) {
56 this.nodeDpid1 = nodeDpid1;
57 this.dpid1 = HexString.toLong(nodeDpid1);
58 }
59
60 public String getNodeDpid2() {
61 return nodeDpid2;
62 }
63
64 public void setNodeDpid2(String nodeDpid2) {
65 this.nodeDpid2 = nodeDpid2;
66 this.dpid2 = HexString.toLong(nodeDpid2);
67 }
68
69 public long getDpid1() {
70 return dpid1;
71 }
72
73 public void setDpid1(long dpid1) {
74 this.dpid1 = dpid1;
75 this.nodeDpid1 = HexString.toHexString(dpid1);
76 }
77
78 public long getDpid2() {
79 return dpid2;
80 }
81
82 public void setDpid2(long dpid2) {
83 this.dpid2 = dpid2;
84 this.nodeDpid2 = HexString.toHexString(dpid2);
85 }
86
87 public Map<String, JsonNode> getParams() {
88 return params;
89 }
90
91 public void setParams(Map<String, JsonNode> params) {
92 this.params = params;
93 }
94
95 public Map<String, String> getPublishAttributes() {
96 return publishAttributes;
97 }
98
99 public void setPublishAttributes(Map<String, String> publishAttributes) {
100 this.publishAttributes = publishAttributes;
101 }
102
103}
104