2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2018 Wipro Limited 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.sdnr;
23 import com.google.gson.annotations.SerializedName;
25 import java.io.Serializable;
27 public class PciWrapper implements Serializable {
29 private static final long serialVersionUID = 375215806432396532L;
31 @SerializedName(value = "version")
32 private String version;
34 @SerializedName(value = "cambria-partition")
35 private String cambriaPartition;
37 @SerializedName(value = "rpc-name")
38 private String rpcName;
40 @SerializedName(value = "correlation-id")
41 private String correlationId;
43 @SerializedName(value = "type")
47 // Create a default PciWrapper instance
55 public String getVersion() {
65 public void setVersion(String version) {
66 this.version = version;
70 * Get the cambria partition.
72 * @return the cambriaPartition
74 public String getCambriaPartition() {
75 return cambriaPartition;
79 * Set the cambria partition.
81 * @param cambriaPartition
82 * the cambriaPartition to set
84 public void setCambriaPartition(String cambriaPartition) {
85 this.cambriaPartition = cambriaPartition;
93 public String getRpcName() {
103 public void setRpcName(String rpcName) {
104 this.rpcName = rpcName;
108 * Get the correlation Id.
110 * @return the correlationId
112 public String getCorrelationId() {
113 return correlationId;
117 * Set the correclation Id.
119 * @param correlationId
120 * the correlationId to set
122 public void setCorrelationId(String correlationId) {
123 this.correlationId = correlationId;
131 public String getType() {
141 public void setType(String type) {
146 public String toString() {
147 return "Wrapper [version=" + version + ", cambriaPartition=" + cambriaPartition + ", rpcName=" + rpcName
148 + ", correlationId=" + correlationId + ", type=" + type + "]";
152 public int hashCode() {
153 final int prime = 31;
155 result = prime * result + ((cambriaPartition == null) ? 0 : cambriaPartition.hashCode());
156 result = prime * result + ((correlationId == null) ? 0 : correlationId.hashCode());
157 result = prime * result + ((rpcName == null) ? 0 : rpcName.hashCode());
158 result = prime * result + ((type == null) ? 0 : type.hashCode());
159 result = prime * result + ((version == null) ? 0 : version.hashCode());
164 public boolean equals(Object obj) {
171 if (getClass() != obj.getClass()) {
174 PciWrapper other = (PciWrapper) obj;
175 if (cambriaPartition == null) {
176 if (other.cambriaPartition != null) {
179 } else if (!cambriaPartition.equals(other.cambriaPartition)) {
182 if (correlationId == null) {
183 if (other.correlationId != null) {
186 } else if (!correlationId.equals(other.correlationId)) {
189 if (rpcName == null) {
190 if (other.rpcName != null) {
193 } else if (!rpcName.equals(other.rpcName)) {
197 if (other.type != null) {
200 } else if (!type.equals(other.type)) {
203 if (version == null) {
204 if (other.version != null) {
207 } else if (!version.equals(other.version)) {