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.policy.appclcm;
23 import com.google.gson.annotations.SerializedName;
25 import java.io.Serializable;
27 public class LcmWrapper implements Serializable {
29 private static final long serialVersionUID = 753005805432396532L;
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 LCMWrapper instance
55 public String getVersion() {
62 * @param version the version to set
64 public void setVersion(String version) {
65 this.version = version;
69 * Get the cambria partition.
71 * @return the cambriaPartition
73 public String getCambriaPartition() {
74 return cambriaPartition;
78 * Set the cambria partition.
80 * @param cambriaPartition the cambriaPartition to set
82 public void setCambriaPartition(String cambriaPartition) {
83 this.cambriaPartition = cambriaPartition;
91 public String getRpcName() {
98 * @param rpcName the rpcName to set
100 public void setRpcName(String rpcName) {
101 this.rpcName = rpcName;
105 * Get the correlation Id.
107 * @return the correlationId
109 public String getCorrelationId() {
110 return correlationId;
114 * Set the correclation Id.
116 * @param correlationId the correlationId to set
118 public void setCorrelationId(String correlationId) {
119 this.correlationId = correlationId;
127 public String getType() {
134 * @param type the type to set
136 public void setType(String type) {
141 public String toString() {
142 return "Wrapper [version=" + version + ", cambriaPartition=" + cambriaPartition + ", rpcName=" + rpcName
143 + ", correlationId=" + correlationId + ", type=" + type + "]";
147 public int hashCode() {
148 final int prime = 31;
150 result = prime * result + ((cambriaPartition == null) ? 0 : cambriaPartition.hashCode());
151 result = prime * result + ((correlationId == null) ? 0 : correlationId.hashCode());
152 result = prime * result + ((rpcName == null) ? 0 : rpcName.hashCode());
153 result = prime * result + ((type == null) ? 0 : type.hashCode());
154 result = prime * result + ((version == null) ? 0 : version.hashCode());
159 public boolean equals(Object obj) {
166 if (getClass() != obj.getClass()) {
169 LcmWrapper other = (LcmWrapper) obj;
170 if (cambriaPartition == null) {
171 if (other.cambriaPartition != null) {
174 } else if (!cambriaPartition.equals(other.cambriaPartition)) {
177 if (correlationId == null) {
178 if (other.correlationId != null) {
181 } else if (!correlationId.equals(other.correlationId)) {
184 if (rpcName == null) {
185 if (other.rpcName != null) {
188 } else if (!rpcName.equals(other.rpcName)) {
192 if (other.type != null) {
195 } else if (!type.equals(other.type)) {
198 if (version == null) {
199 if (other.version != null) {
202 } else if (!version.equals(other.version)) {