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.db.catalog.beans.OrchestrationStatus;
31 import com.fasterxml.jackson.annotation.JsonProperty;
32 import com.fasterxml.jackson.annotation.JsonRootName;
33 import org.onap.so.bpmn.servicedecomposition.ShallowCopy;
36 public class Pnf implements Serializable, ShallowCopy<Pnf> {
38 private static final long serialVersionUID = -2544848120774529501L;
41 @JsonProperty("pnf-id")
44 @JsonProperty("pnf-name")
45 private String pnfName;
50 @JsonProperty("orchestration-status")
51 private OrchestrationStatus orchestrationStatus;
53 @JsonProperty("cloud-region")
54 private CloudRegion cloudRegion;
57 public String getPnfId() {
61 public void setPnfId(String pnfId) {
65 public String getPnfName() {
69 public void setPnfName(String pnfName) {
70 this.pnfName = pnfName;
74 * Distinguishes Primary or Secondary
76 public String getRole() {
81 * Distinguishes Primary or Secondary
83 public void setRole(String role) {
87 public OrchestrationStatus getOrchestrationStatus() {
88 return orchestrationStatus;
91 public void setOrchestrationStatus(OrchestrationStatus orchestrationStatus) {
92 this.orchestrationStatus = orchestrationStatus;
95 public CloudRegion getCloudRegion() {
99 public void setCloudRegion(CloudRegion cloudRegion) {
100 this.cloudRegion = cloudRegion;
104 public boolean equals(final Object other) {
105 if (!(other instanceof Pnf)) {
108 Pnf castOther = (Pnf) other;
109 return new EqualsBuilder().append(pnfId, castOther.pnfId).isEquals();
113 public int hashCode() {
114 return new HashCodeBuilder().append(pnfId).toHashCode();