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 cloudOwner;
47 private String tenantId;
50 private String vnfType;
51 private String vnfVersion;
53 private String vfModuleId;
54 private String vfModuleName;
55 private String vfModuleType;
57 private String volumeGroupId;
58 private String volumeGroupStackId;
59 private String baseVfModuleId;
60 private String baseVfModuleStackId;
61 private String modelCustomizationUuid;
63 private String requestType;
64 private Boolean failIfExists = false;
65 private Boolean backout = true;
66 private Boolean enableBridge;
67 @XmlJavaTypeAdapter(MapAdapter.class)
68 private Map<String, Object> vfModuleParams = new HashMap<>();
69 private MsoRequest msoRequest = new MsoRequest();
71 public String getCloudSiteId() {
75 public void setCloudSiteId(String cloudSiteId) {
76 this.cloudSiteId = cloudSiteId;
79 public String getCloudOwner() {
83 public void setCloudOwner(String cloudOwner) {
84 this.cloudOwner = cloudOwner;
87 public String getTenantId() {
91 public void setTenantId(String tenantId) {
92 this.tenantId = tenantId;
95 public String getVnfId() {
99 public void setVnfId(String vnfId) {
103 public String getVfModuleName() {
107 public void setVfModuleName(String vfModuleName) {
108 this.vfModuleName = vfModuleName;
111 public String getVnfType() {
115 public void setVnfType(String vnfType) {
116 this.vnfType = vnfType;
119 public String getVnfVersion() {
123 public void setVnfVersion(String vnfVersion) {
124 this.vnfVersion = vnfVersion;
127 public String getVfModuleId() {
131 public void setVfModuleId(String vfModuleId) {
132 this.vfModuleId = vfModuleId;
135 public String getVfModuleType() {
139 public void setVfModuleType(String vfModuleType) {
140 this.vfModuleType = vfModuleType;
143 public String getVolumeGroupId() {
144 return volumeGroupId;
147 public void setVolumeGroupId(String volumeGroupId) {
148 this.volumeGroupId = volumeGroupId;
151 public String getVolumeGroupStackId() {
152 return volumeGroupStackId;
155 public void setVolumeGroupStackId(String volumeGroupStackId) {
156 this.volumeGroupStackId = volumeGroupStackId;
159 public String getBaseVfModuleId() {
160 return baseVfModuleId;
163 public void setBaseVfModuleId(String baseVfModuleId) {
164 this.baseVfModuleId = baseVfModuleId;
167 public String getBaseVfModuleStackId() {
168 return baseVfModuleStackId;
171 public void setBaseVfModuleStackId(String baseVfModuleStackId) {
172 this.baseVfModuleStackId = baseVfModuleStackId;
175 public String getModelCustomizationUuid() {
176 return this.modelCustomizationUuid;
179 public void setModelCustomizationUuid(String modelCustomizationUuid) {
180 this.modelCustomizationUuid = modelCustomizationUuid;
183 public String getRequestType() {
187 public void setRequestType(String requestType) {
188 this.requestType = requestType;
191 public Boolean getFailIfExists() {
195 public void setFailIfExists(Boolean failIfExists) {
196 this.failIfExists = failIfExists;
199 public Boolean getBackout() {
203 public void setBackout(Boolean backout) {
204 this.backout = backout;
207 public Map<String, Object> getVfModuleParams() {
208 return vfModuleParams;
211 public void setVfModuleParams(Map<String, Object> vfModuleParams) {
212 this.vfModuleParams = vfModuleParams;
215 public MsoRequest getMsoRequest() {
219 public void setMsoRequest(MsoRequest msoRequest) {
220 this.msoRequest = msoRequest;
223 public Boolean getEnableBridge() {
224 return this.enableBridge;
227 public void setEnableBridge(Boolean enableBridge) {
228 this.enableBridge = enableBridge;