2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2018 Wipro Limited 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.sdnr;
24 import com.google.gson.annotations.SerializedName;
26 import java.io.Serializable;
28 public class PciWrapper implements Serializable {
30 private static final long serialVersionUID = 375215806432396532L;
32 @SerializedName(value = "version")
33 private String version;
35 @SerializedName(value = "cambria-partition")
36 private String cambriaPartition;
38 @SerializedName(value = "rpc-name")
39 private String rpcName;
41 @SerializedName(value = "correlation-id")
42 private String correlationId;
44 @SerializedName(value = "type")
48 // Create a default PciWrapper instance
56 public String getVersion() {
66 public void setVersion(String version) {
67 this.version = version;
71 * Get the cambria partition.
73 * @return the cambriaPartition
75 public String getCambriaPartition() {
76 return cambriaPartition;
80 * Set the cambria partition.
82 * @param cambriaPartition
83 * the cambriaPartition to set
85 public void setCambriaPartition(String cambriaPartition) {
86 this.cambriaPartition = cambriaPartition;
94 public String getRpcName() {
104 public void setRpcName(String rpcName) {
105 this.rpcName = rpcName;
109 * Get the correlation Id.
111 * @return the correlationId
113 public String getCorrelationId() {
114 return correlationId;
118 * Set the correclation Id.
120 * @param correlationId
121 * the correlationId to set
123 public void setCorrelationId(String correlationId) {
124 this.correlationId = correlationId;
132 public String getType() {
142 public void setType(String type) {
147 public String toString() {
148 return "Wrapper [version=" + version + ", cambriaPartition=" + cambriaPartition + ", rpcName=" + rpcName
149 + ", correlationId=" + correlationId + ", type=" + type + "]";
153 public int hashCode() {
154 final int prime = 31;
156 result = prime * result + ((cambriaPartition == null) ? 0 : cambriaPartition.hashCode());
157 result = prime * result + ((correlationId == null) ? 0 : correlationId.hashCode());
158 result = prime * result + ((rpcName == null) ? 0 : rpcName.hashCode());
159 result = prime * result + ((type == null) ? 0 : type.hashCode());
160 result = prime * result + ((version == null) ? 0 : version.hashCode());
165 public boolean equals(Object obj) {
172 if (getClass() != obj.getClass()) {
175 PciWrapper other = (PciWrapper) obj;
176 if (cambriaPartition == null) {
177 if (other.cambriaPartition != null) {
180 } else if (!cambriaPartition.equals(other.cambriaPartition)) {
183 if (correlationId == null) {
184 if (other.correlationId != null) {
187 } else if (!correlationId.equals(other.correlationId)) {
190 if (rpcName == null) {
191 if (other.rpcName != null) {
194 } else if (!rpcName.equals(other.rpcName)) {
198 if (other.type != null) {
201 } else if (!type.equals(other.type)) {
204 if (version == null) {
205 if (other.version != null) {
208 } else if (!version.equals(other.version)) {