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.onap.so.adapters.vnfrest;
23 import java.util.HashMap;
26 import javax.xml.bind.annotation.XmlAccessType;
27 import javax.xml.bind.annotation.XmlAccessorType;
28 import javax.xml.bind.annotation.XmlAnyElement;
29 import javax.xml.bind.annotation.XmlRootElement;
30 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
32 import org.onap.so.entity.MsoRequest;
33 import org.onap.so.openstack.mappers.MapAdapter;
35 import com.fasterxml.jackson.annotation.JsonRootName;
38 Map<String, String> elements when marshalled to XML produce a list of <entry><key>${MsoUtils.xmlEscape(key)}</key><value>${MsoUtils.xmlEscape(value)}</value></entry> elements.
39 When marshalling to JSON they create a list of "${key}" : "${value}" pairs with no extra wrappers.
41 @JsonRootName("createVfModuleRequest")
42 @XmlRootElement(name = "createVfModuleRequest")
43 @XmlAccessorType(XmlAccessType.FIELD)
44 public class CreateVfModuleRequest extends VfRequestCommon {
45 private String cloudSiteId;
46 private String tenantId;
49 private String vnfType;
50 private String vnfVersion;
52 private String vfModuleId;
53 private String vfModuleName;
54 private String vfModuleType;
56 private String volumeGroupId;
57 private String volumeGroupStackId;
58 private String baseVfModuleId;
59 private String baseVfModuleStackId;
60 private String modelCustomizationUuid;
62 private String requestType;
63 private Boolean failIfExists = false;
64 private Boolean backout = true;
65 private Boolean enableBridge;
66 @XmlJavaTypeAdapter(MapAdapter.class)
67 private Map<String, Object> vfModuleParams = new HashMap<>();
68 private MsoRequest msoRequest = new MsoRequest();
70 public String getCloudSiteId() {
74 public void setCloudSiteId(String cloudSiteId) {
75 this.cloudSiteId = cloudSiteId;
78 public String getTenantId() {
82 public void setTenantId(String tenantId) {
83 this.tenantId = tenantId;
86 public String getVnfId() {
90 public void setVnfId(String vnfId) {
94 public String getVfModuleName() {
98 public void setVfModuleName(String vfModuleName) {
99 this.vfModuleName = vfModuleName;
102 public String getVnfType() {
106 public void setVnfType(String vnfType) {
107 this.vnfType = vnfType;
110 public String getVnfVersion() {
114 public void setVnfVersion(String vnfVersion) {
115 this.vnfVersion = vnfVersion;
118 public String getVfModuleId() {
122 public void setVfModuleId(String vfModuleId) {
123 this.vfModuleId = vfModuleId;
126 public String getVfModuleType() {
130 public void setVfModuleType(String vfModuleType) {
131 this.vfModuleType = vfModuleType;
134 public String getVolumeGroupId() {
135 return volumeGroupId;
138 public void setVolumeGroupId(String volumeGroupId) {
139 this.volumeGroupId = volumeGroupId;
142 public String getVolumeGroupStackId() {
143 return volumeGroupStackId;
146 public void setVolumeGroupStackId(String volumeGroupStackId) {
147 this.volumeGroupStackId = volumeGroupStackId;
150 public String getBaseVfModuleId() {
151 return baseVfModuleId;
154 public void setBaseVfModuleId(String baseVfModuleId) {
155 this.baseVfModuleId = baseVfModuleId;
158 public String getBaseVfModuleStackId() {
159 return baseVfModuleStackId;
162 public void setBaseVfModuleStackId(String baseVfModuleStackId) {
163 this.baseVfModuleStackId = baseVfModuleStackId;
166 public String getModelCustomizationUuid() {
167 return this.modelCustomizationUuid;
170 public void setModelCustomizationUuid(String modelCustomizationUuid) {
171 this.modelCustomizationUuid = modelCustomizationUuid;
174 public String getRequestType() {
178 public void setRequestType(String requestType) {
179 this.requestType = requestType;
182 public Boolean getFailIfExists() {
186 public void setFailIfExists(Boolean failIfExists) {
187 this.failIfExists = failIfExists;
190 public Boolean getBackout() {
194 public void setBackout(Boolean backout) {
195 this.backout = backout;
198 public Map<String, Object> getVfModuleParams() {
199 return vfModuleParams;
202 public void setVfModuleParams(Map<String, Object> vfModuleParams) {
203 this.vfModuleParams = vfModuleParams;
206 public MsoRequest getMsoRequest() {
210 public void setMsoRequest(MsoRequest msoRequest) {
211 this.msoRequest = msoRequest;
214 public Boolean getEnableBridge() {
215 return this.enableBridge;
218 public void setEnableBridge(Boolean enableBridge) {
219 this.enableBridge = enableBridge;