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;
25 import javax.xml.bind.annotation.XmlAccessType;
26 import javax.xml.bind.annotation.XmlAccessorType;
27 import javax.xml.bind.annotation.XmlAnyElement;
28 import javax.xml.bind.annotation.XmlRootElement;
29 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
30 import org.onap.so.entity.MsoRequest;
31 import org.onap.so.openstack.mappers.MapAdapter;
32 import com.fasterxml.jackson.annotation.JsonRootName;
35 * README Map<String, String> elements when marshalled to XML produce a list of
36 * <entry><key>${MsoUtils.xmlEscape(key)}</key><value>${MsoUtils.xmlEscape(value)}</value></entry> elements. When
37 * marshalling to JSON they create a list of "${key}" : "${value}" pairs with no extra wrappers.
39 @JsonRootName("createVfModuleRequest")
40 @XmlRootElement(name = "createVfModuleRequest")
41 @XmlAccessorType(XmlAccessType.FIELD)
42 public class CreateVfModuleRequest extends VfRequestCommon {
43 private String cloudSiteId;
44 private String cloudOwner;
45 private String tenantId;
48 private String vnfType;
49 private String vnfVersion;
51 private String vfModuleId;
52 private String vfModuleName;
53 private String vfModuleType;
55 private String volumeGroupId;
56 private String volumeGroupStackId;
57 private String baseVfModuleId;
58 private String baseVfModuleStackId;
59 private String modelCustomizationUuid;
61 private String requestType;
62 private Boolean failIfExists = false;
63 private Boolean backout = true;
64 private Boolean enableBridge;
65 @XmlJavaTypeAdapter(MapAdapter.class)
66 private Map<String, Object> vfModuleParams = new HashMap<>();
67 private MsoRequest msoRequest = new MsoRequest();
69 public String getCloudSiteId() {
73 public void setCloudSiteId(String cloudSiteId) {
74 this.cloudSiteId = cloudSiteId;
77 public String getCloudOwner() {
81 public void setCloudOwner(String cloudOwner) {
82 this.cloudOwner = cloudOwner;
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 getModelCustomizationUuid() {
174 return this.modelCustomizationUuid;
177 public void setModelCustomizationUuid(String modelCustomizationUuid) {
178 this.modelCustomizationUuid = modelCustomizationUuid;
181 public String getRequestType() {
185 public void setRequestType(String requestType) {
186 this.requestType = requestType;
189 public Boolean getFailIfExists() {
193 public void setFailIfExists(Boolean failIfExists) {
194 this.failIfExists = failIfExists;
197 public Boolean getBackout() {
201 public void setBackout(Boolean backout) {
202 this.backout = backout;
205 public Map<String, Object> getVfModuleParams() {
206 return vfModuleParams;
209 public void setVfModuleParams(Map<String, Object> vfModuleParams) {
210 this.vfModuleParams = vfModuleParams;
213 public MsoRequest getMsoRequest() {
217 public void setMsoRequest(MsoRequest msoRequest) {
218 this.msoRequest = msoRequest;
221 public Boolean getEnableBridge() {
222 return this.enableBridge;
225 public void setEnableBridge(Boolean enableBridge) {
226 this.enableBridge = enableBridge;