2 * ============LICENSE_START=======================================================
3 * Copyright 2021 Huawei Technologies Co., Ltd.
4 * ================================================================================
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 * ============LICENSE_END=========================================================
18 package org.onap.so.multicloudsimulator.beans;
20 import java.io.Serializable;
21 import org.apache.commons.lang3.builder.ToStringBuilder;
22 import com.fasterxml.jackson.annotation.JsonCreator;
23 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
24 import com.fasterxml.jackson.annotation.JsonInclude;
25 import com.fasterxml.jackson.annotation.JsonProperty;
26 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
27 import com.fasterxml.jackson.databind.JsonNode;
29 @JsonInclude(JsonInclude.Include.NON_NULL)
30 @JsonIgnoreProperties(ignoreUnknown = true)
31 @JsonPropertyOrder({ "template_type", "workload_id", "template_response", "workload_status_reason", "workload_status" })
32 public class MulticloudCreateResponse implements Serializable {
33 private static final long serialVersionUID = -5215028275577848311L;
35 @JsonProperty("template_type")
36 private String templateType;
37 @JsonProperty("workload_id")
38 private String workloadId;
39 @JsonProperty("template_response")
40 private JsonNode templateResponse;
41 @JsonProperty("workload_status_reason")
42 private JsonNode workloadStatusReason;
43 @JsonProperty("workload_status")
44 private String workloadStatus;
47 public MulticloudCreateResponse(@JsonProperty("template_type") String templateType,
48 @JsonProperty("workload_id") String workloadId,
49 @JsonProperty("template_response") JsonNode templateResponse) {
50 this.templateType = templateType;
51 this.workloadId = workloadId;
52 this.templateResponse = templateResponse;
55 public MulticloudCreateResponse() {
59 public String getTemplateType() {
63 public void setTemplateType(final String templateType) {
64 this.templateType = templateType;
67 public String getWorkloadId() {
71 public void setWorkloadId(final String workloadId) {
72 this.workloadId = workloadId;
75 public void setTemplateResponse(final JsonNode templateResponse) {
76 this.templateResponse = templateResponse;
79 public JsonNode getTemplateResponse() {
80 return templateResponse;
83 public void setWorkloadStatusReason(final JsonNode workloadStatusReason) {
84 this.workloadStatusReason = workloadStatusReason;
87 public JsonNode getWorkloadStatusReason() {
88 return workloadStatusReason;
91 public String getWorkloadSstatus() {
92 return workloadStatus;
95 public void setWorkloadStatus(final String workloadStatus) {
96 this.workloadStatus = workloadStatus;
100 public String toString() {
101 return new ToStringBuilder(this).append("templateType", templateType).append("workloadId", workloadId)
102 .append("templateResponse", templateResponse)
103 .append("workload_status_reason", workloadStatusReason.toString())
104 .append("workload_status", workloadStatus).toString();