2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2018 Intel Corp. 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.openstack.utils;
23 import java.io.Serializable;
24 import com.fasterxml.jackson.annotation.JsonCreator;
25 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
26 import com.fasterxml.jackson.annotation.JsonInclude;
27 import com.fasterxml.jackson.annotation.JsonProperty;
28 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
29 import com.fasterxml.jackson.databind.JsonNode;
30 import org.apache.commons.lang.builder.ToStringBuilder;
32 @JsonInclude(JsonInclude.Include.NON_NULL)
33 @JsonIgnoreProperties(ignoreUnknown = true)
34 @JsonPropertyOrder({"template_type", "workload_id", "template_response", "workload_status_reason", "workload_status"})
35 public class MulticloudCreateResponse implements Serializable {
36 private final static long serialVersionUID = -5215028275577848311L;
38 @JsonProperty("template_type")
39 private String templateType;
40 @JsonProperty("workload_id")
41 private String workloadId;
42 @JsonProperty("template_response")
43 private JsonNode templateResponse;
44 @JsonProperty("workload_status_reason")
45 private JsonNode workloadStatusReason;
46 @JsonProperty("workload_status")
47 private String workloadStatus;
50 public MulticloudCreateResponse(@JsonProperty("template_type") String templateType,
51 @JsonProperty("workload_id") String workloadId,
52 @JsonProperty("template_response") JsonNode templateResponse) {
53 this.templateType = templateType;
54 this.workloadId = workloadId;
55 this.templateResponse = templateResponse;
58 @JsonProperty("template_type")
59 public String getTemplateType() {
63 @JsonProperty("template_type")
64 public void setTemplateType(String templateType) {
65 this.templateType = templateType;
68 @JsonProperty("workload_id")
69 public String getWorkloadId() {
73 @JsonProperty("workload_id")
74 public void setWorkloadId(String workloadId) {
75 this.workloadId = workloadId;
78 @JsonProperty("template_response")
79 public void setTemplateResponse(JsonNode templateResponse) {
80 this.templateResponse = templateResponse;
83 @JsonProperty("template_response")
84 public JsonNode getTemplateResponse() {
85 return templateResponse;
88 @JsonProperty("workload_status_reason")
89 public void setWorkloadStatusReason(JsonNode workloadStatusReason) {
90 this.workloadStatusReason = workloadStatusReason;
93 @JsonProperty("workload_status_reason")
94 public JsonNode getWorkloadStatusReason() {
95 return workloadStatusReason;
98 @JsonProperty("workload_status")
99 public String getWorkloadSstatus() {
100 return workloadStatus;
103 @JsonProperty("workload_status")
104 public void setWorkloadStatus(String workloadStatus) {
105 this.workloadStatus = workloadStatus;
110 public String toString() {
111 return new ToStringBuilder(this).append("templateType", templateType).append("workloadId", workloadId)
112 .append("templateResponse", templateResponse)
113 .append("workload_status_reason", workloadStatusReason.toString())
114 .append("workload_status", workloadStatus).toString();