2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
7 * Modifications Copyright (c) 2019 Samsung
8 * ================================================================================
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 * ============LICENSE_END=========================================================
23 package org.onap.so.adapters.vnfrest;
28 import javax.xml.bind.annotation.XmlRootElement;
30 import org.onap.so.openstack.beans.VnfStatus;
32 import com.fasterxml.jackson.databind.ObjectMapper;
33 import com.fasterxml.jackson.databind.SerializationFeature;
35 import org.slf4j.Logger;
36 import org.slf4j.LoggerFactory;
38 @XmlRootElement(name = "queryVolumeGroupResponse")
39 public class QueryVolumeGroupResponse {
40 private static final Logger logger = LoggerFactory.getLogger(QueryVolumeGroupResponse.class);
41 private String volumeGroupId;
42 private String volumeGroupStackId;
43 private VnfStatus volumeGroupStatus;
44 private Map<String,String> volumeGroupOutputs;
46 public QueryVolumeGroupResponse() {
49 public QueryVolumeGroupResponse(
51 String volumeGroupStackId,
52 VnfStatus volumeGroupStatus,
53 Map<String, String> volumeGroupOutputs)
56 this.volumeGroupId = volumeGroupId;
57 this.volumeGroupStackId = volumeGroupStackId;
58 this.volumeGroupStatus = volumeGroupStatus;
59 this.volumeGroupOutputs = volumeGroupOutputs;
62 public String getVolumeGroupId() {
66 public void setVolumeGroupId(String volumeGroupId) {
67 this.volumeGroupId = volumeGroupId;
70 public String getVolumeGroupStackId() {
71 return volumeGroupStackId;
74 public void setVolumeGroupStackId(String volumeGroupStackId) {
75 this.volumeGroupStackId = volumeGroupStackId;
78 public VnfStatus getVolumeGroupStatus() {
79 return volumeGroupStatus;
82 public void setVolumeGroupStatus(VnfStatus volumeGroupStatus) {
83 this.volumeGroupStatus = volumeGroupStatus;
86 public Map<String, String> getVolumeGroupOutputs() {
87 return volumeGroupOutputs;
90 public void setVolumeGroupOutputs(Map<String, String> volumeGroupOutputs) {
91 this.volumeGroupOutputs = volumeGroupOutputs;
94 public String toJsonString() {
95 String jsonString = null;
97 ObjectMapper mapper = new ObjectMapper();
98 mapper.enable(SerializationFeature.WRAP_ROOT_VALUE);
99 jsonString = mapper.writeValueAsString(this);
101 catch (Exception e) {
102 logger.debug("Exception :", e);