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;
69 private String modelCustomizationUuid;
71 private String requestType;
72 private Boolean failIfExists;
73 private Boolean backout;
75 private Map<String,String> vfModuleParams = new HashMap<String, String>();
76 private MsoRequest msoRequest = new MsoRequest();
78 public String getCloudSiteId() {
82 public void setCloudSiteId(String cloudSiteId) {
83 this.cloudSiteId = cloudSiteId;
86 public String getTenantId() {
90 public void setTenantId(String tenantId) {
91 this.tenantId = tenantId;
94 public String getVnfId() {
98 public void setVnfId(String vnfId) {
102 public String getVfModuleName() {
106 public void setVfModuleName(String vfModuleName) {
107 this.vfModuleName = vfModuleName;
110 public String getVnfType() {
114 public void setVnfType(String vnfType) {
115 this.vnfType = vnfType;
118 public String getVnfVersion() {
122 public void setVnfVersion(String vnfVersion) {
123 this.vnfVersion = vnfVersion;
126 public String getVfModuleId() {
130 public void setVfModuleId(String vfModuleId) {
131 this.vfModuleId = vfModuleId;
134 public String getVfModuleType() {
138 public void setVfModuleType(String vfModuleType) {
139 this.vfModuleType = vfModuleType;
142 public String getVolumeGroupId() {
143 return volumeGroupId;
146 public void setVolumeGroupId(String volumeGroupId) {
147 this.volumeGroupId = volumeGroupId;
150 public String getVolumeGroupStackId() {
151 return volumeGroupStackId;
154 public void setVolumeGroupStackId(String volumeGroupStackId) {
155 this.volumeGroupStackId = volumeGroupStackId;
158 public String getBaseVfModuleId() {
159 return baseVfModuleId;
162 public void setBaseVfModuleId(String baseVfModuleId) {
163 this.baseVfModuleId = baseVfModuleId;
166 public String getBaseVfModuleStackId() {
167 return baseVfModuleStackId;
170 public void setBaseVfModuleStackId(String baseVfModuleStackId) {
171 this.baseVfModuleStackId = baseVfModuleStackId;
174 public String getModelCustomizationUuid() {
175 return this.modelCustomizationUuid;
178 public void setModelCustomizationUuid(String modelCustomizationUuid) {
179 this.modelCustomizationUuid = modelCustomizationUuid;
182 public String getRequestType() {
186 public void setRequestType(String requestType) {
187 this.requestType = requestType;
190 public Boolean getFailIfExists() {
194 public void setFailIfExists(Boolean failIfExists) {
195 this.failIfExists = failIfExists;
198 public Boolean getBackout() {
202 public void setBackout(Boolean backout) {
203 this.backout = backout;
206 public Map<String, String> getVfModuleParams() {
207 return vfModuleParams;
210 public void setVfModuleParams(Map<String, String> vfModuleParams) {
211 this.vfModuleParams = vfModuleParams;
214 public MsoRequest getMsoRequest() {
218 public void setMsoRequest(MsoRequest msoRequest) {
219 this.msoRequest = msoRequest;