2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 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.policy.aai;
23 import java.io.Serializable;
25 public class Pnf implements Serializable {
26 private static final long serialVersionUID = -3535108358668248501L;
28 private String pnfName;
29 private PnfType pnfType;
36 this.pnfName = pnf.pnfName;
37 this.pnfType = pnf.pnfType;
40 public String getPnfName() {
44 public void setPnfName(String pnfName) {
45 this.pnfName = pnfName;
48 public PnfType getPnfType() {
52 public void setPnfType(PnfType pnfType) {
53 this.pnfType = pnfType;
57 public String toString() {
58 return "PNF [PNFName=" + pnfName + ", PNFType=" + pnfType + "]";
62 public int hashCode() {
65 result = prime * result + ((pnfName == null) ? 0 : pnfName.hashCode());
66 result = prime * result + ((pnfType == null) ? 0 : pnfType.hashCode());
71 public boolean equals(Object obj) {
78 if (getClass() != obj.getClass()) {
81 Pnf other = (Pnf) obj;
82 if (pnfName == null) {
83 if (other.pnfName != null) {
86 } else if (!pnfName.equals(other.pnfName)) {
89 return pnfType == other.pnfType;