bcee2ffd8a9b25282aa4915e2cd5c7d073468be9
[so.git] / adapters / mso-adapters-rest-interface / src / main / java / org / openecomp / mso / adapters / vnfrest / CreateVfModuleRequest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * OPENECOMP - MSO
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
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
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=========================================================
19  */
20
21 package org.openecomp.mso.adapters.vnfrest;
22
23
24 import org.openecomp.mso.entity.MsoRequest;
25
26 import java.util.Map;
27 import java.util.HashMap;
28
29 import javax.xml.bind.annotation.XmlRootElement;
30
31 import org.jboss.resteasy.annotations.providers.NoJackson;
32
33 import org.codehaus.jackson.map.annotate.JsonRootName;
34
35 /* README
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
38
39 "vfModuleParams": {"entry": [
40                                 {"key": "network_id",
41                                 "value": "59ed7b41-2983-413f-ba93-e7d437433916"},
42                                 {"key": "subnet_id",
43                                 "value": "086c9298-5c57-49b7-bb2b-6fd5730c5d92"},
44                                 {"key": "server_name_0",
45                                 "value": "RaaVnf1"}
46                                 ]},
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
49 */
50 @JsonRootName("createVfModuleRequest")
51 @XmlRootElement(name = "createVfModuleRequest")
52 @NoJackson
53 public class CreateVfModuleRequest extends VfRequestCommon {
54         private String cloudSiteId;
55         private String tenantId;
56
57         private String vnfId;
58         private String vnfType;
59         private String vnfVersion;
60
61         private String vfModuleId;
62         private String vfModuleName;
63         private String vfModuleType;
64
65         private String volumeGroupId;
66         private String volumeGroupStackId;
67         private String baseVfModuleId;
68         private String baseVfModuleStackId;
69         private String modelCustomizationUuid;
70
71         private String requestType;
72         private Boolean failIfExists;
73         private Boolean backout;
74
75         private Map<String,String> vfModuleParams = new HashMap<String, String>();
76         private MsoRequest msoRequest = new MsoRequest();
77
78         public String getCloudSiteId() {
79                 return cloudSiteId;
80         }
81
82         public void setCloudSiteId(String cloudSiteId) {
83                 this.cloudSiteId = cloudSiteId;
84         }
85
86         public String getTenantId() {
87                 return tenantId;
88         }
89
90         public void setTenantId(String tenantId) {
91                 this.tenantId = tenantId;
92         }
93
94         public String getVnfId() {
95                 return vnfId;
96         }
97
98         public void setVnfId(String vnfId) {
99                 this.vnfId = vnfId;
100         }
101
102         public String getVfModuleName() {
103                 return vfModuleName;
104         }
105
106         public void setVfModuleName(String vfModuleName) {
107                 this.vfModuleName = vfModuleName;
108         }
109
110         public String getVnfType() {
111                 return vnfType;
112         }
113
114         public void setVnfType(String vnfType) {
115                 this.vnfType = vnfType;
116         }
117
118         public String getVnfVersion() {
119                 return vnfVersion;
120         }
121
122         public void setVnfVersion(String vnfVersion) {
123                 this.vnfVersion = vnfVersion;
124         }
125
126         public String getVfModuleId() {
127                 return vfModuleId;
128         }
129
130         public void setVfModuleId(String vfModuleId) {
131                 this.vfModuleId = vfModuleId;
132         }
133
134         public String getVfModuleType() {
135                 return vfModuleType;
136         }
137
138         public void setVfModuleType(String vfModuleType) {
139                 this.vfModuleType = vfModuleType;
140         }
141
142         public String getVolumeGroupId() {
143                 return volumeGroupId;
144         }
145
146         public void setVolumeGroupId(String volumeGroupId) {
147                 this.volumeGroupId = volumeGroupId;
148         }
149
150         public String getVolumeGroupStackId() {
151                 return volumeGroupStackId;
152         }
153
154         public void setVolumeGroupStackId(String volumeGroupStackId) {
155                 this.volumeGroupStackId = volumeGroupStackId;
156         }
157
158         public String getBaseVfModuleId() {
159                 return baseVfModuleId;
160         }
161
162         public void setBaseVfModuleId(String baseVfModuleId) {
163                 this.baseVfModuleId = baseVfModuleId;
164         }
165
166         public String getBaseVfModuleStackId() {
167                 return baseVfModuleStackId;
168         }
169
170         public void setBaseVfModuleStackId(String baseVfModuleStackId) {
171                 this.baseVfModuleStackId = baseVfModuleStackId;
172         }
173
174         public String getModelCustomizationUuid() {
175                 return this.modelCustomizationUuid;
176         }
177
178         public void setModelCustomizationUuid(String modelCustomizationUuid) {
179                 this.modelCustomizationUuid = modelCustomizationUuid;
180         }
181
182         public String getRequestType() {
183                 return requestType;
184         }
185
186         public void setRequestType(String requestType) {
187                 this.requestType = requestType;
188         }
189
190         public Boolean getFailIfExists() {
191                 return failIfExists;
192         }
193
194         public void setFailIfExists(Boolean failIfExists) {
195                 this.failIfExists = failIfExists;
196         }
197
198         public Boolean getBackout() {
199                 return backout;
200         }
201
202         public void setBackout(Boolean backout) {
203                 this.backout = backout;
204         }
205
206         public Map<String, String> getVfModuleParams() {
207                 return vfModuleParams;
208         }
209
210         public void setVfModuleParams(Map<String, String> vfModuleParams) {
211                 this.vfModuleParams = vfModuleParams;
212         }
213
214         public MsoRequest getMsoRequest() {
215                 return msoRequest;
216         }
217
218         public void setMsoRequest(MsoRequest msoRequest) {
219                 this.msoRequest = msoRequest;
220         }
221 }