blob: 531034a8def68acda6fc76a06c8be7ddb3b52651 [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 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.optical.cfg;
weibit38c42ed2014-10-09 19:03:54 -070017
Jian Lia5a312b2016-01-15 17:59:12 -080018import com.fasterxml.jackson.annotation.JsonProperty;
19import com.fasterxml.jackson.databind.JsonNode;
weibit38c42ed2014-10-09 19:03:54 -070020import org.onlab.util.HexString;
21
Jian Lia5a312b2016-01-15 17:59:12 -080022import java.util.Map;
23
weibit38c42ed2014-10-09 19:03:54 -070024/**
25 * Public class corresponding to JSON described data model.
Sho SHIMIZUbe63b232015-06-30 10:57:58 -070026 *
27 * @deprecated in Cardinal Release
weibit38c42ed2014-10-09 19:03:54 -070028 */
Thomas Vachuska112c7032014-11-16 11:05:14 -080029@Deprecated
weibit38c42ed2014-10-09 19:03:54 -070030public class OpticalSwitchDescription {
31 protected String name;
32 protected long dpid;
33 protected String nodeDpid;
34 protected String type;
35 protected double latitude;
36 protected double longitude;
37 protected boolean allowed;
38 protected Map<String, JsonNode> params;
39 protected Map<String, String> publishAttributes;
40
41 public String getName() {
42 return name;
43 }
44 @JsonProperty("name")
45 public void setName(String name) {
46 this.name = name;
47 }
48
49 public long getDpid() {
50 return dpid;
51 }
52 @JsonProperty("dpid")
53 public void setDpid(long dpid) {
54 this.dpid = dpid;
55 this.nodeDpid = HexString.toHexString(dpid);
56 }
57
58 public String getNodeDpid() {
59 return nodeDpid;
60 }
61
62 public String getHexDpid() {
63 return nodeDpid;
64 }
65
66 public void setNodeDpid(String nodeDpid) {
67 this.nodeDpid = nodeDpid;
68 this.dpid = HexString.toLong(nodeDpid);
69 }
70
71 public String getType() {
72 return type;
73 }
74
75 public void setType(String type) {
76 this.type = type;
77 }
78
79 public double getLatitude() {
80 return latitude;
81 }
82
83 public void setLatitude(double latitude) {
84 this.latitude = latitude;
85 }
86
87 public double getLongitude() {
88 return longitude;
89 }
90
91 public void setLongitude(double longitude) {
92 this.longitude = longitude;
93 }
94
95 public boolean isAllowed() {
96 return allowed;
97 }
98
99 public void setAllowed(boolean allowed) {
100 this.allowed = allowed;
101 }
102
103 public Map<String, JsonNode> getParams() {
104 return params;
105 }
106
107 public void setParams(Map<String, JsonNode> params) {
108 this.params = params;
109 }
110
111 public Map<String, String> getPublishAttributes() {
112 return publishAttributes;
113 }
114
115 public void setPublishAttributes(Map<String, String> publishAttributes) {
116 this.publishAttributes = publishAttributes;
117 }
118
119}