91da93065d37a227d3a698f0b04513481b2609a1
[so.git] / adapters / mso-adapters-rest-interface / src / main / java / org / openecomp / mso / adapters / vnfrest / QueryVfModuleResponse.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * OPENECOMP - MSO
4  * ================================================================================
5  * Copyright (C) 2017 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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20
21 package org.openecomp.mso.adapters.vnfrest;
22
23
24 import java.util.Map;
25
26 import javax.xml.bind.annotation.XmlRootElement;
27
28 import org.codehaus.jackson.map.ObjectMapper;
29 import org.jboss.resteasy.annotations.providers.NoJackson;
30
31 import org.openecomp.mso.openstack.beans.VnfStatus;
32
33 @XmlRootElement(name = "queryVfModuleResponse")
34 @NoJackson
35 public class QueryVfModuleResponse {
36         private String vnfId;
37         private String vfModuleId;
38         private String vfModuleStackId;
39         private VnfStatus vnfStatus;
40         private Map<String,String> vfModuleOutputs;
41
42         public QueryVfModuleResponse() {
43                 super();
44         }
45
46         public QueryVfModuleResponse(String vnfId, String vfModuleId,
47                         String vfModuleStackId, VnfStatus vnfStatus,
48                         Map<String, String> vfModuleOutputs) {
49                 super();
50                 this.vnfId = vnfId;
51                 this.vfModuleId = vfModuleId;
52                 this.vfModuleStackId = vfModuleStackId;
53                 this.vnfStatus = vnfStatus;
54                 this.vfModuleOutputs = vfModuleOutputs;
55         }
56
57         public String getVnfId() {
58                 return vnfId;
59         }
60
61         public void setVnfId(String vnfId) {
62                 this.vnfId = vnfId;
63         }
64
65         public String getVfModuleId() {
66                 return vfModuleId;
67         }
68
69         public void setVfModuleId(String vfModuleId) {
70                 this.vfModuleId = vfModuleId;
71         }
72
73         public String getVfModuleStackId() {
74                 return vfModuleStackId;
75         }
76
77         public void setVfModuleStackId(String vfModuleStackId) {
78                 this.vfModuleStackId = vfModuleStackId;
79         }
80
81         public VnfStatus getVnfStatus() {
82                 return vnfStatus;
83         }
84
85         public void setVnfStatus(VnfStatus vnfStatus) {
86                 this.vnfStatus = vnfStatus;
87         }
88
89         public Map<String, String> getVfModuleOutputs() {
90                 return vfModuleOutputs;
91         }
92
93         public void setVfModuleOutputs(Map<String, String> vfModuleOutputs) {
94                 this.vfModuleOutputs = vfModuleOutputs;
95         }
96
97         public String toJsonString() {
98                 String jsonString = null;
99                 try {
100                         ObjectMapper mapper = new ObjectMapper();
101                         jsonString = mapper.writeValueAsString(this);
102                 }
103                 catch (Exception e) {}
104                 return jsonString;
105         }
106 }