Initial OpenECOMP MSO commit
[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
70         private String requestType;
71         private Boolean failIfExists;
72         private Boolean backout;
73
74         private Map<String,String> vfModuleParams = new HashMap<String, String>();
75         private MsoRequest msoRequest = new MsoRequest();
76
77         public String getCloudSiteId() {
78                 return cloudSiteId;
79         }
80
81         public void setCloudSiteId(String cloudSiteId) {
82                 this.cloudSiteId = cloudSiteId;
83         }
84
85         public String getTenantId() {
86                 return tenantId;
87         }
88
89         public void setTenantId(String tenantId) {
90                 this.tenantId = tenantId;
91         }
92
93         public String getVnfId() {
94                 return vnfId;
95         }
96
97         public void setVnfId(String vnfId) {
98                 this.vnfId = vnfId;
99         }
100
101         public String getVfModuleName() {
102                 return vfModuleName;
103         }
104
105         public void setVfModuleName(String vfModuleName) {
106                 this.vfModuleName = vfModuleName;
107         }
108
109         public String getVnfType() {
110                 return vnfType;
111         }
112
113         public void setVnfType(String vnfType) {
114                 this.vnfType = vnfType;
115         }
116
117         public String getVnfVersion() {
118                 return vnfVersion;
119         }
120
121         public void setVnfVersion(String vnfVersion) {
122                 this.vnfVersion = vnfVersion;
123         }
124
125         public String getVfModuleId() {
126                 return vfModuleId;
127         }
128
129         public void setVfModuleId(String vfModuleId) {
130                 this.vfModuleId = vfModuleId;
131         }
132
133         public String getVfModuleType() {
134                 return vfModuleType;
135         }
136
137         public void setVfModuleType(String vfModuleType) {
138                 this.vfModuleType = vfModuleType;
139         }
140
141         public String getVolumeGroupId() {
142                 return volumeGroupId;
143         }
144
145         public void setVolumeGroupId(String volumeGroupId) {
146                 this.volumeGroupId = volumeGroupId;
147         }
148
149         public String getVolumeGroupStackId() {
150                 return volumeGroupStackId;
151         }
152
153         public void setVolumeGroupStackId(String volumeGroupStackId) {
154                 this.volumeGroupStackId = volumeGroupStackId;
155         }
156
157         public String getBaseVfModuleId() {
158                 return baseVfModuleId;
159         }
160
161         public void setBaseVfModuleId(String baseVfModuleId) {
162                 this.baseVfModuleId = baseVfModuleId;
163         }
164
165         public String getBaseVfModuleStackId() {
166                 return baseVfModuleStackId;
167         }
168
169         public void setBaseVfModuleStackId(String baseVfModuleStackId) {
170                 this.baseVfModuleStackId = baseVfModuleStackId;
171         }
172
173         public String getRequestType() {
174                 return requestType;
175         }
176
177         public void setRequestType(String requestType) {
178                 this.requestType = requestType;
179         }
180
181         public Boolean getFailIfExists() {
182                 return failIfExists;
183         }
184
185         public void setFailIfExists(Boolean failIfExists) {
186                 this.failIfExists = failIfExists;
187         }
188
189         public Boolean getBackout() {
190                 return backout;
191         }
192
193         public void setBackout(Boolean backout) {
194                 this.backout = backout;
195         }
196
197         public Map<String, String> getVfModuleParams() {
198                 return vfModuleParams;
199         }
200
201         public void setVfModuleParams(Map<String, String> vfModuleParams) {
202                 this.vfModuleParams = vfModuleParams;
203         }
204
205         public MsoRequest getMsoRequest() {
206                 return msoRequest;
207         }
208
209         public void setMsoRequest(MsoRequest msoRequest) {
210                 this.msoRequest = msoRequest;
211         }
212 }