2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
7 * Modifications Copyright (C) 2019 IBM.
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;
25 import java.util.HashMap;
27 import javax.xml.bind.annotation.XmlAccessType;
28 import javax.xml.bind.annotation.XmlAccessorType;
29 import javax.xml.bind.annotation.XmlRootElement;
30 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
31 import org.onap.so.entity.MsoRequest;
32 import org.onap.so.openstack.mappers.MapAdapter;
33 import com.fasterxml.jackson.annotation.JsonRootName;
36 * README Map<String, String> elements when marshalled to XML produce a list of
37 * <entry><key>${MsoUtils.xmlEscape(key)}</key><value>${MsoUtils.xmlEscape(value)}</value></entry> elements. When
38 * marshalling to JSON they create a list of "${key}" : "${value}" pairs with no extra wrappers.
40 @JsonRootName("createVfModuleRequest")
41 @XmlRootElement(name = "createVfModuleRequest")
42 @XmlAccessorType(XmlAccessType.FIELD)
43 public class CreateVfModuleRequest extends VfRequestCommon {
44 private String cloudSiteId;
45 private String cloudOwner;
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 getCloudOwner() {
82 public void setCloudOwner(String cloudOwner) {
83 this.cloudOwner = cloudOwner;
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, Object> getVfModuleParams() {
207 return vfModuleParams;
210 public void setVfModuleParams(Map<String, Object> vfModuleParams) {
211 this.vfModuleParams = vfModuleParams;
214 public MsoRequest getMsoRequest() {
218 public void setMsoRequest(MsoRequest msoRequest) {
219 this.msoRequest = msoRequest;
222 public Boolean getEnableBridge() {
223 return this.enableBridge;
226 public void setEnableBridge(Boolean enableBridge) {
227 this.enableBridge = enableBridge;