2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============LICENSE_END=========================================================
\r
20 package org.openecomp.mso.bpmn.common.recipe;
\r
22 import com.fasterxml.jackson.annotation.JsonProperty;
\r
23 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
\r
24 import com.fasterxml.jackson.annotation.JsonRootName;
\r
25 import com.fasterxml.jackson.core.JsonProcessingException;
\r
26 import com.fasterxml.jackson.databind.ObjectMapper;
\r
27 import com.fasterxml.jackson.databind.SerializationFeature;
\r
30 * the inputs for the resource recipe
\r
36 * @version ONAP Beijing Release 2018-03-08
\r
38 @JsonPropertyOrder({"resourceInstanceName", "resourceInstanceDes", "globalSubscriberId", "serviceType", "serviceId", "operationId", "resourceType","resourceCustomizationUuid"})
\r
39 @JsonRootName("variables")
\r
40 public class ResourceInput {
\r
42 @JsonProperty("resourceInstanceName")
\r
43 private String resourceInstanceName;
\r
45 @JsonProperty("resourceInstanceDes")
\r
46 private String resourceInstanceDes;
\r
48 @JsonProperty("globalSubscriberId")
\r
49 private String globalSubscriberId;
\r
51 @JsonProperty("serviceType")
\r
52 private String serviceType;
\r
54 @JsonProperty("serviceInstanceId")
\r
55 private String serviceInstanceId;
\r
57 @JsonProperty("operationId")
\r
58 private String operationId;
\r
60 //for create resource
\r
61 @JsonProperty("resourceInvariantUuid")
\r
62 private String resourceInvariantUuid;
\r
64 //for create resource
\r
65 @JsonProperty("resourceUuid")
\r
66 private String resourceUuid;
\r
68 //for create resource
\r
69 @JsonProperty("resourceCustomizationUuid")
\r
70 private String resourceCustomizationUuid;
\r
72 //for delete resource
\r
73 @JsonProperty("resourceInstancenUuid")
\r
74 private String resourceInstancenUuid;
\r
76 @JsonProperty("resourceParameters")
\r
77 private String resourceParameters;
\r
79 @JsonProperty("operationType")
\r
80 private String operationType;
\r
84 * @return Returns the resourceInstanceName.
\r
86 @JsonProperty("resourceInstanceName")
\r
87 public String getResourceInstanceName() {
\r
88 return resourceInstanceName;
\r
93 * @param resourceInstanceName The resourceInstanceName to set.
\r
95 @JsonProperty("resourceInstanceName")
\r
96 public void setResourceInstanceName(String resourceInstanceName) {
\r
97 this.resourceInstanceName = resourceInstanceName;
\r
102 * @return Returns the resourceInstanceDes.
\r
104 @JsonProperty("resourceInstanceDes")
\r
105 public String getResourceInstanceDes() {
\r
106 return resourceInstanceDes;
\r
111 * @param resourceInstanceDes The resourceInstanceDes to set.
\r
113 @JsonProperty("resourceInstanceDes")
\r
114 public void setResourceInstanceDes(String resourceInstanceDes) {
\r
115 this.resourceInstanceDes = resourceInstanceDes;
\r
120 * @return Returns the globalSubscriberId.
\r
122 @JsonProperty("globalSubscriberId")
\r
123 public String getGlobalSubscriberId() {
\r
124 return globalSubscriberId;
\r
129 * @param globalSubscriberId The globalSubscriberId to set.
\r
131 @JsonProperty("globalSubscriberId")
\r
132 public void setGlobalSubscriberId(String globalSubscriberId) {
\r
133 this.globalSubscriberId = globalSubscriberId;
\r
138 * @return Returns the serviceType.
\r
140 @JsonProperty("serviceType")
\r
141 public String getServiceType() {
\r
142 return serviceType;
\r
147 * @param serviceType The serviceType to set.
\r
149 @JsonProperty("serviceType")
\r
150 public void setServiceType(String serviceType) {
\r
151 this.serviceType = serviceType;
\r
156 * @return Returns the serviceId.
\r
158 @JsonProperty("serviceInstanceId")
\r
159 public String getServiceInstanceId() {
\r
160 return serviceInstanceId;
\r
165 * @param serviceId The serviceId to set.
\r
167 @JsonProperty("serviceInstanceId")
\r
168 public void setServiceInstanceId(String serviceId) {
\r
169 this.serviceInstanceId = serviceId;
\r
174 * @return Returns the operationId.
\r
176 @JsonProperty("operationId")
\r
177 public String getOperationId() {
\r
178 return operationId;
\r
183 * @param operationId The operationId to set.
\r
185 @JsonProperty("operationId")
\r
186 public void setOperationId(String operationId) {
\r
187 this.operationId = operationId;
\r
193 * @return Returns the resourceInvariantUuid.
\r
195 @JsonProperty("resourceInvariantUuid")
\r
196 public String getResourceInvariantUuid() {
\r
197 return resourceInvariantUuid;
\r
203 * @param resourceInvariantUuid The resourceInvariantUuid to set.
\r
205 @JsonProperty("resourceInvariantUuid")
\r
206 public void setResourceInvariantUuid(String resourceInvariantUuid) {
\r
207 this.resourceInvariantUuid = resourceInvariantUuid;
\r
213 * @return Returns the resourceUuid.
\r
215 @JsonProperty("resourceUuid")
\r
216 public String getResourceUuid() {
\r
217 return resourceUuid;
\r
223 * @param resourceUuid The resourceUuid to set.
\r
225 @JsonProperty("resourceUuid")
\r
226 public void setResourceUuid(String resourceUuid) {
\r
227 this.resourceUuid = resourceUuid;
\r
232 * @return Returns the resourceCustomizationUuid.
\r
234 @JsonProperty("resourceCustomizationUuid")
\r
235 public String getResourceCustomizationUuid() {
\r
236 return resourceCustomizationUuid;
\r
241 * @param resourceCustomizationUuid The resourceCustomizationUuid to set.
\r
243 @JsonProperty("resourceCustomizationUuid")
\r
244 public void setResourceCustomizationUuid(String resourceCustomizationUuid) {
\r
245 this.resourceCustomizationUuid = resourceCustomizationUuid;
\r
250 * @return Returns the resourceParameters.
\r
252 @JsonProperty("resourceParameters")
\r
253 public String getResourceParameters() {
\r
254 return resourceParameters;
\r
259 * @param resourceParameters The resourceParameters to set.
\r
261 @JsonProperty("resourceParameters")
\r
262 public void setResourceParameters(String resourceParameters) {
\r
263 this.resourceParameters = resourceParameters;
\r
268 * @return Returns the operationType.
\r
270 @JsonProperty("operationType")
\r
271 public String getOperationType() {
\r
272 return operationType;
\r
277 * @param operationType The operationType to set.
\r
279 @JsonProperty("operationType")
\r
280 public void setOperationType(String operationType) {
\r
281 this.operationType = operationType;
\r
287 * @return Returns the resourceInstancenUuid.
\r
289 @JsonProperty("resourceInstancenUuid")
\r
290 public String getResourceInstancenUuid() {
\r
291 return resourceInstancenUuid;
\r
297 * @param resourceInstancenUuid The resourceInstancenUuid to set.
\r
299 @JsonProperty("resourceInstancenUuid")
\r
300 public void setResourceInstancenUuid(String resourceInstancenUuid) {
\r
301 this.resourceInstancenUuid = resourceInstancenUuid;
\r
305 public String toString() {
\r
306 ObjectMapper mapper = new ObjectMapper();
\r
307 mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
\r
308 String jsonStr = "";
\r
310 jsonStr = mapper.writeValueAsString(this);
\r
311 } catch(JsonProcessingException e) {
\r
313 e.printStackTrace();
\r