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;
24 import org.openecomp.mso.entity.MsoRequest;
27 import java.util.HashMap;
29 import javax.xml.bind.annotation.XmlRootElement;
31 import org.jboss.resteasy.annotations.providers.NoJackson;
33 import org.codehaus.jackson.map.annotate.JsonRootName;
36 * 1) Used JAXB/Jettison - see @NoJackson annotation on class to get RootElements REad by RestEasy
37 * 2) due to 1) Maps need to use this format
39 "vfModuleParams": {"entry": [
41 "value": "59ed7b41-2983-413f-ba93-e7d437433916"},
43 "value": "086c9298-5c57-49b7-bb2b-6fd5730c5d92"},
44 {"key": "server_name_0",
47 * 3) to output json see toJSonString method below which required the @JsonRootName annotation and the WRAP_ROOT feature enabled
48 * 4) Tryong to work with RESTEASY JACKSON and JAXB/JETTISON to conform to Json input/output specs
50 @JsonRootName("createVfModuleRequest")
51 @XmlRootElement(name = "createVfModuleRequest")
53 public class CreateVfModuleRequest extends VfRequestCommon {
54 private String cloudSiteId;
55 private String tenantId;
58 private String vnfType;
59 private String vnfVersion;
61 private String vfModuleId;
62 private String vfModuleName;
63 private String vfModuleType;
65 private String volumeGroupId;
66 private String volumeGroupStackId;
67 private String baseVfModuleId;
68 private String baseVfModuleStackId;
70 private String requestType;
71 private Boolean failIfExists;
72 private Boolean backout;
74 private Map<String,String> vfModuleParams = new HashMap<String, String>();
75 private MsoRequest msoRequest = new MsoRequest();
77 public String getCloudSiteId() {
81 public void setCloudSiteId(String cloudSiteId) {
82 this.cloudSiteId = cloudSiteId;
85 public String getTenantId() {
89 public void setTenantId(String tenantId) {
90 this.tenantId = tenantId;
93 public String getVnfId() {
97 public void setVnfId(String vnfId) {
101 public String getVfModuleName() {
105 public void setVfModuleName(String vfModuleName) {
106 this.vfModuleName = vfModuleName;
109 public String getVnfType() {
113 public void setVnfType(String vnfType) {
114 this.vnfType = vnfType;
117 public String getVnfVersion() {
121 public void setVnfVersion(String vnfVersion) {
122 this.vnfVersion = vnfVersion;
125 public String getVfModuleId() {
129 public void setVfModuleId(String vfModuleId) {
130 this.vfModuleId = vfModuleId;
133 public String getVfModuleType() {
137 public void setVfModuleType(String vfModuleType) {
138 this.vfModuleType = vfModuleType;
141 public String getVolumeGroupId() {
142 return volumeGroupId;
145 public void setVolumeGroupId(String volumeGroupId) {
146 this.volumeGroupId = volumeGroupId;
149 public String getVolumeGroupStackId() {
150 return volumeGroupStackId;
153 public void setVolumeGroupStackId(String volumeGroupStackId) {
154 this.volumeGroupStackId = volumeGroupStackId;
157 public String getBaseVfModuleId() {
158 return baseVfModuleId;
161 public void setBaseVfModuleId(String baseVfModuleId) {
162 this.baseVfModuleId = baseVfModuleId;
165 public String getBaseVfModuleStackId() {
166 return baseVfModuleStackId;
169 public void setBaseVfModuleStackId(String baseVfModuleStackId) {
170 this.baseVfModuleStackId = baseVfModuleStackId;
173 public String getRequestType() {
177 public void setRequestType(String requestType) {
178 this.requestType = requestType;
181 public Boolean getFailIfExists() {
185 public void setFailIfExists(Boolean failIfExists) {
186 this.failIfExists = failIfExists;
189 public Boolean getBackout() {
193 public void setBackout(Boolean backout) {
194 this.backout = backout;
197 public Map<String, String> getVfModuleParams() {
198 return vfModuleParams;
201 public void setVfModuleParams(Map<String, String> vfModuleParams) {
202 this.vfModuleParams = vfModuleParams;
205 public MsoRequest getMsoRequest() {
209 public void setMsoRequest(MsoRequest msoRequest) {
210 this.msoRequest = msoRequest;