2 * ============LICENSE_START=======================================================
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
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.openecomp.mso.adapters.vnfrest;
26 import javax.xml.bind.annotation.XmlRootElement;
28 import org.codehaus.jackson.map.ObjectMapper;
29 import org.codehaus.jackson.map.SerializationConfig;
30 import org.jboss.resteasy.annotations.providers.NoJackson;
32 import org.openecomp.mso.openstack.beans.VnfStatus;
34 @XmlRootElement(name = "queryVolumeGroupResponse")
36 public class QueryVolumeGroupResponse {
37 private String volumeGroupId;
38 private String volumeGroupStackId;
39 private VnfStatus volumeGroupStatus;
40 private Map<String,String> volumeGroupOutputs;
42 public QueryVolumeGroupResponse() {
45 public QueryVolumeGroupResponse(
47 String volumeGroupStackId,
48 VnfStatus volumeGroupStatus,
49 Map<String, String> volumeGroupOutputs)
52 this.volumeGroupId = volumeGroupId;
53 this.volumeGroupStackId = volumeGroupStackId;
54 this.volumeGroupStatus = volumeGroupStatus;
55 this.volumeGroupOutputs = volumeGroupOutputs;
58 public String getVolumeGroupId() {
62 public void setVolumeGroupId(String volumeGroupId) {
63 this.volumeGroupId = volumeGroupId;
66 public String getVolumeGroupStackId() {
67 return volumeGroupStackId;
70 public void setVolumeGroupStackId(String volumeGroupStackId) {
71 this.volumeGroupStackId = volumeGroupStackId;
74 public VnfStatus getVolumeGroupStatus() {
75 return volumeGroupStatus;
78 public void setVolumeGroupStatus(VnfStatus volumeGroupStatus) {
79 this.volumeGroupStatus = volumeGroupStatus;
82 public Map<String, String> getVolumeGroupOutputs() {
83 return volumeGroupOutputs;
86 public void setVolumeGroupOutputs(Map<String, String> volumeGroupOutputs) {
87 this.volumeGroupOutputs = volumeGroupOutputs;
90 public String toJsonString() {
91 String jsonString = null;
93 ObjectMapper mapper = new ObjectMapper();
94 mapper.enable(SerializationConfig.Feature.WRAP_ROOT_VALUE);
95 jsonString = mapper.writeValueAsString(this);
97 catch (Exception e) {}