2 * Copyright 2016-2017, Nokia Corporation
4 * 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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.notification;
18 import com.nokia.cbam.lcm.v32.model.ChangeType;
20 import java.util.Objects;
23 * Represent a single port change in the VNF
25 public class ReportedAffectedCp {
26 private String providerId;
28 private String ecpdId;
29 private String cpId; //the location of the resource in the Heat stack
30 private String tenantId;
31 private String ipAddress;
32 private String macAddress;
33 private String serverProviderId;
35 private String networkProviderId;
38 * @return the provider id of the port
40 public String getProviderId() {
45 * @param providerId the provider id of the port
47 public void setProviderId(String providerId) {
48 this.providerId = providerId;
52 * @return the identifier of the connection point of the port (may be null)
54 public String getCpdId() {
59 * @param cpdId the identifier of the connection point of the port (may be null)
61 public void setCpdId(String cpdId) {
66 * @return the identifier of the external connection point of the port (may be null)
68 public String getEcpdId() {
73 * @param ecpdId the identifier of the connection point of the port (may be null)
75 public void setEcpdId(String ecpdId) {
80 * @return the identifier of the connection point instance of the port
82 public String getCpId() {
87 * @param cpId the identifier of the connection point instance of the port
89 public void setCpId(String cpId) {
94 * @return the identifier of the tenant owning the port
96 public String getTenantId() {
101 * @param tenantId the identifier of the tenant owning the port
103 public void setTenantId(String tenantId) {
104 this.tenantId = tenantId;
108 * @return the IP address of the port (may be null)
110 public String getIpAddress() {
115 * @param ipAddress the IP address of the port (may be null)
117 public void setIpAddress(String ipAddress) {
118 this.ipAddress = ipAddress;
122 * @return the MAC address of the port
124 public String getMacAddress() {
129 * @param macAddress the MAC address of the port
131 public void setMacAddress(String macAddress) {
132 this.macAddress = macAddress;
136 * @return the provider id of the server to which the port is attached to (may be null)
138 public String getServerProviderId() {
139 return serverProviderId;
143 * @param serverProviderId the provider id of the server to which the port is attached to (may be null)
145 public void setServerProviderId(String serverProviderId) {
146 this.serverProviderId = serverProviderId;
150 * @return the name of the port (may be null)
152 public String getName() {
157 * @param name the name of the port
159 public void setName(String name) {
164 * @return the provider id of the network of the port
166 public String getNetworkProviderId() {
167 return networkProviderId;
171 * @param networkProviderId the provider id of the network of the port
173 public void setNetworkProviderId(String networkProviderId) {
174 this.networkProviderId = networkProviderId;
178 public String toString() {
179 return "ReportedAffectedCp{" +
180 "providerId='" + providerId + '\'' +
181 ", cpdId='" + cpdId + '\'' +
182 ", ecpdId='" + ecpdId + '\'' +
183 ", cpId='" + cpId + '\'' +
184 ", tenantId='" + tenantId + '\'' +
185 ", ipAddress='" + ipAddress + '\'' +
186 ", macAddress='" + macAddress + '\'' +
187 ", serverProviderId='" + serverProviderId + '\'' +
188 ", name='" + name + '\'' +
189 ", networkProviderId='" + networkProviderId + '\'' +
194 public boolean equals(Object o) {
195 if (this == o) return true;
196 if (o == null || getClass() != o.getClass()) return false;
197 ReportedAffectedCp that = (ReportedAffectedCp) o;
198 return Objects.equals(providerId, that.providerId) &&
199 Objects.equals(cpdId, that.cpdId) &&
200 Objects.equals(ecpdId, that.ecpdId) &&
201 Objects.equals(cpId, that.cpId) &&
202 Objects.equals(tenantId, that.tenantId) &&
203 Objects.equals(ipAddress, that.ipAddress) &&
204 Objects.equals(macAddress, that.macAddress) &&
205 Objects.equals(serverProviderId, that.serverProviderId) &&
206 Objects.equals(name, that.name) &&
207 Objects.equals(networkProviderId, that.networkProviderId);
211 public int hashCode() {
212 return Objects.hash(providerId, cpdId, ecpdId, cpId, tenantId, ipAddress, macAddress, serverProviderId, name, networkProviderId);