e8f9e125160832ce5cc7f8431420e0bf4e208ff5
[integration/csit.git] / plans / so / integration-etsi-testing / so-simulators / multicloud-simulator / src / main / java / org / onap / so / multicloudsimulator / beans / InstanceResponse.java
1
2 /*-
3  * ============LICENSE_START=======================================================
4  * ONAP - SO
5  * ================================================================================
6  * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  */
21 package org.onap.so.multicloudsimulator.beans;
22
23 import java.util.List;
24
25
26 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
27 import com.fasterxml.jackson.annotation.JsonInclude;
28 import com.fasterxml.jackson.annotation.JsonProperty;
29 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
30
31 @JsonInclude(JsonInclude.Include.NON_NULL)
32 @JsonPropertyOrder({"id", "request", "namespace", "resources"})
33 @JsonIgnoreProperties(value = "true")
34 public class InstanceResponse extends Response {
35
36     @JsonProperty("id")
37     private String id;
38     @JsonProperty("request")
39     private MulticloudInstanceRequest request;
40     @JsonProperty("namespace")
41     private String namespace;
42     @JsonProperty("resources")
43     private List<Resource> resources = null;
44
45     public InstanceResponse(String errorMsg) {
46         super(errorMsg);
47     }
48
49     public InstanceResponse() {
50         super("");
51         //new Response("");
52     } 
53     @JsonProperty("id")
54     public String getId() {
55         return id;
56     }
57
58     @JsonProperty("id")
59     public void setId(String id) {
60         this.id = id;
61     }
62
63     @JsonProperty("request")
64     public MulticloudInstanceRequest getRequest() {
65         return request;
66     }
67
68     @JsonProperty("request")
69     public void setRequest(MulticloudInstanceRequest request) {
70         this.request = request;
71     }
72
73     @JsonProperty("namespace")
74     public String getNamespace() {
75         return namespace;
76     }
77
78     @JsonProperty("namespace")
79     public void setNamespace(String namespace) {
80         this.namespace = namespace;
81     }
82
83     @JsonProperty("resources")
84     public List<Resource> getResources() {
85         return resources;
86     }
87
88     @JsonProperty("resources")
89     public void setResources(List<Resource> resources) {
90         this.resources = resources;
91     }
92
93 }