2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.so.bpmn.servicedecomposition.bbobjects;
23 import java.io.Serializable;
25 import javax.persistence.Id;
27 import org.apache.commons.lang3.builder.EqualsBuilder;
28 import org.apache.commons.lang3.builder.HashCodeBuilder;
29 import org.onap.so.bpmn.servicedecomposition.ShallowCopy;
31 import com.fasterxml.jackson.annotation.JsonProperty;
32 import com.fasterxml.jackson.annotation.JsonRootName;
34 @JsonRootName("physical-link")
35 public class PhysicalLink implements Serializable, ShallowCopy<PhysicalLink> {
37 private static final long serialVersionUID = -6378347998443741227L;
40 @JsonProperty("link-name")
41 private String linkName;
42 @JsonProperty("interface-name")
43 private String interfaceName;
44 @JsonProperty("service-provider-name")
45 private String serviceProviderName;
46 @JsonProperty("circuit-id")
47 private String circuitId;
48 @JsonProperty("management-option")
49 private String managementOption;
50 @JsonProperty("bandwidth-up")
51 private int bandwidthUp;
52 @JsonProperty("bandwidth-down")
53 private int bandwidthDown;
54 @JsonProperty("bandwidth-units")
55 private String bandwidthUnits;
56 @JsonProperty("wan-port")
57 private String wanPort;
60 public String getLinkName(){
64 public void setLinkName(String linkName){
65 this.linkName = linkName;
68 public String getInterfaceName(){
72 public void setInterfaceName(String interfaceName){
73 this.interfaceName = interfaceName;
77 public String getServiceProviderName(){
78 return serviceProviderName;
82 public void setServiceProviderName(String serviceProviderName){
83 this.serviceProviderName = serviceProviderName;
86 public String getCircuitId(){
90 public void setCircuitId(String circuitId){
91 this.circuitId = circuitId;
94 public String getManagementOption(){
95 return managementOption;
98 public void setManagementOption(String managementOption){
99 this.managementOption = managementOption;
102 public int getBandwidthUp(){
106 public void setBandwidthUp(int bandwidthUp){
107 this.bandwidthUp = bandwidthUp;
110 public int getBandwidthDown(){
111 return bandwidthDown;
114 public void setBandwidthDown(int bandwidthDown){
115 this.bandwidthDown = bandwidthDown;
118 public String getBandwidthUnits(){
119 return bandwidthUnits;
122 public void setBandwidthUnits(String bandwidthUnits){
123 this.bandwidthUnits = bandwidthUnits;
126 public String getWanPort(){
130 public void setWanPort(String wanPort){
131 this.wanPort = wanPort;
136 public boolean equals(final Object other){
137 if(!(other instanceof PhysicalLink)){
140 PhysicalLink castOther = (PhysicalLink) other;
141 return new EqualsBuilder().append(linkName, castOther.linkName).isEquals();
145 public int hashCode(){
146 return new HashCodeBuilder().append(linkName).toHashCode();