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 * ================================================================================
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
22 package org.onap.so.adapters.vnfrest;
27 import javax.xml.bind.annotation.XmlRootElement;
29 import org.onap.so.logger.MsoLogger;
30 import org.onap.so.openstack.beans.VnfStatus;
32 import com.fasterxml.jackson.databind.ObjectMapper;
33 import com.fasterxml.jackson.databind.SerializationFeature;
35 @XmlRootElement(name = "queryVolumeGroupResponse")
36 public class QueryVolumeGroupResponse {
37 private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, QueryVolumeGroupResponse.class);
38 private String volumeGroupId;
39 private String volumeGroupStackId;
40 private VnfStatus volumeGroupStatus;
41 private Map<String,String> volumeGroupOutputs;
43 public QueryVolumeGroupResponse() {
46 public QueryVolumeGroupResponse(
48 String volumeGroupStackId,
49 VnfStatus volumeGroupStatus,
50 Map<String, String> volumeGroupOutputs)
53 this.volumeGroupId = volumeGroupId;
54 this.volumeGroupStackId = volumeGroupStackId;
55 this.volumeGroupStatus = volumeGroupStatus;
56 this.volumeGroupOutputs = volumeGroupOutputs;
59 public String getVolumeGroupId() {
63 public void setVolumeGroupId(String volumeGroupId) {
64 this.volumeGroupId = volumeGroupId;
67 public String getVolumeGroupStackId() {
68 return volumeGroupStackId;
71 public void setVolumeGroupStackId(String volumeGroupStackId) {
72 this.volumeGroupStackId = volumeGroupStackId;
75 public VnfStatus getVolumeGroupStatus() {
76 return volumeGroupStatus;
79 public void setVolumeGroupStatus(VnfStatus volumeGroupStatus) {
80 this.volumeGroupStatus = volumeGroupStatus;
83 public Map<String, String> getVolumeGroupOutputs() {
84 return volumeGroupOutputs;
87 public void setVolumeGroupOutputs(Map<String, String> volumeGroupOutputs) {
88 this.volumeGroupOutputs = volumeGroupOutputs;
91 public String toJsonString() {
92 String jsonString = null;
94 ObjectMapper mapper = new ObjectMapper();
95 mapper.enable(SerializationFeature.WRAP_ROOT_VALUE);
96 jsonString = mapper.writeValueAsString(this);
99 LOGGER.debug("Exception :",e);