2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
6 * Modifications Copyright (C) 2019 Nordix Foundation.
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
22 package org.onap.policy.aai;
24 import java.io.Serializable;
26 public class Pnf implements Serializable {
27 private static final long serialVersionUID = -3535108358668248501L;
29 private String pnfName;
30 private PnfType pnfType;
37 this.pnfName = pnf.pnfName;
38 this.pnfType = pnf.pnfType;
41 public String getPnfName() {
45 public void setPnfName(String pnfName) {
46 this.pnfName = pnfName;
49 public PnfType getPnfType() {
53 public void setPnfType(PnfType pnfType) {
54 this.pnfType = pnfType;
58 public String toString() {
59 return "PNF [PNFName=" + pnfName + ", PNFType=" + pnfType + "]";
63 public int hashCode() {
66 result = prime * result + ((pnfName == null) ? 0 : pnfName.hashCode());
67 result = prime * result + ((pnfType == null) ? 0 : pnfType.hashCode());
72 public boolean equals(Object obj) {
79 if (getClass() != obj.getClass()) {
82 Pnf other = (Pnf) obj;
83 if (pnfName == null) {
84 if (other.pnfName != null) {
87 } else if (!pnfName.equals(other.pnfName)) {
90 return pnfType == other.pnfType;