3cf3907424ae72e257bbb312bc93fe743dfc521e
[so.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  */
21
22 package org.onap.so.apihandler.common;
23
24 public class RequestClientParameter {
25
26     private String requestId;
27     private boolean isBaseVfModule;
28     private int recipeTimeout;
29     private String requestAction;
30     private String serviceInstanceId;
31     private String pnfCorrelationId;
32     private String vnfId;
33     private String vfModuleId;
34     private String volumeGroupId;
35     private String networkId;
36     private String configurationId;
37     private String serviceType;
38     private String vnfType;
39     private String vfModuleType;
40     private String networkType;
41     private String requestDetails;
42     private String apiVersion;
43     private boolean aLaCarte;
44     private String recipeParamXsd;
45     private String requestUri;
46     private String instanceGroupId;
47     private boolean generateIdsOnly;
48
49     private RequestClientParameter(Builder builder) {
50         requestId = builder.requestId;
51         isBaseVfModule = builder.isBaseVfModule;
52         recipeTimeout = builder.recipeTimeout;
53         requestAction = builder.requestAction;
54         serviceInstanceId = builder.serviceInstanceId;
55         pnfCorrelationId = builder.pnfCorrelationId;
56         vnfId = builder.vnfId;
57         vfModuleId = builder.vfModuleId;
58         volumeGroupId = builder.volumeGroupId;
59         networkId = builder.networkId;
60         configurationId = builder.configurationId;
61         serviceType = builder.serviceType;
62         vnfType = builder.vnfType;
63         vfModuleType = builder.vfModuleType;
64         networkType = builder.networkType;
65         requestDetails = builder.requestDetails;
66         recipeParamXsd = builder.recipeParamXsd;
67         apiVersion = builder.apiVersion;
68         aLaCarte = builder.aLaCarte;
69         requestUri = builder.requestUri;
70         instanceGroupId = builder.instanceGroupId;
71         generateIdsOnly = builder.generateIdsOnly;
72     }
73
74     public String getRequestId() {
75         return requestId;
76     }
77
78     public boolean isBaseVfModule() {
79         return isBaseVfModule;
80     }
81
82     public int getRecipeTimeout() {
83         return recipeTimeout;
84     }
85
86     public String getRequestAction() {
87         return requestAction;
88     }
89
90     public String getServiceInstanceId() {
91         return serviceInstanceId;
92     }
93
94     public String getPnfCorrelationId() {
95         return pnfCorrelationId;
96     }
97
98     public String getVnfId() {
99         return vnfId;
100     }
101
102     public String getVfModuleId() {
103         return vfModuleId;
104     }
105
106     public String getVolumeGroupId() {
107         return volumeGroupId;
108     }
109
110     public String getNetworkId() {
111         return networkId;
112     }
113
114     public String getConfigurationId() {
115         return configurationId;
116     }
117
118     public String getServiceType() {
119         return serviceType;
120     }
121
122     public String getVnfType() {
123         return vnfType;
124     }
125
126     public String getVfModuleType() {
127         return vfModuleType;
128     }
129
130     public String getNetworkType() {
131         return networkType;
132     }
133
134     public String getRequestDetails() {
135         return requestDetails;
136     }
137
138     public String getRecipeParamXsd() {
139         return recipeParamXsd;
140     }
141
142     public String getApiVersion() {
143         return apiVersion;
144     }
145
146     public boolean isaLaCarte() {
147         return aLaCarte;
148     }
149
150     public String getRequestUri() {
151         return requestUri;
152     }
153
154     public String getInstanceGroupId() {
155         return instanceGroupId;
156     }
157
158     public boolean isGenerateIdsOnly() {
159         return generateIdsOnly;
160     }
161
162     public void setGenerateIdsOnly(boolean generateIdsOnly) {
163         this.generateIdsOnly = generateIdsOnly;
164     }
165
166     public static class Builder {
167         private String requestId;
168         private boolean isBaseVfModule = false;
169         private int recipeTimeout;
170         private String requestAction;
171         private String serviceInstanceId;
172         private String pnfCorrelationId;
173         private String vnfId;
174         private String vfModuleId;
175         private String volumeGroupId;
176         private String networkId;
177         private String configurationId;
178         private String serviceType;
179         private String vnfType;
180         private String vfModuleType;
181         private String networkType;
182         private String requestDetails;
183         private String apiVersion;
184         private boolean aLaCarte = false;
185         private String recipeParamXsd;
186         private String requestUri;
187         private String instanceGroupId;
188         private boolean generateIdsOnly;
189
190         public Builder setRequestId(String requestId) {
191             this.requestId = requestId;
192             return this;
193         }
194
195         public Builder setBaseVfModule(boolean baseVfModule) {
196             isBaseVfModule = baseVfModule;
197             return this;
198         }
199
200         public Builder setRecipeTimeout(int recipeTimeout) {
201             this.recipeTimeout = recipeTimeout;
202             return this;
203         }
204
205         public Builder setRequestAction(String requestAction) {
206             this.requestAction = requestAction;
207             return this;
208         }
209
210         public Builder setServiceInstanceId(String serviceInstanceId) {
211             this.serviceInstanceId = serviceInstanceId;
212             return this;
213         }
214
215         public Builder setPnfCorrelationId(String pnfCorrelationId) {
216             this.pnfCorrelationId = pnfCorrelationId;
217             return this;
218         }
219
220         public Builder setVnfId(String vnfId) {
221             this.vnfId = vnfId;
222             return this;
223         }
224
225         public Builder setVfModuleId(String vfModuleId) {
226             this.vfModuleId = vfModuleId;
227             return this;
228         }
229
230         public Builder setVolumeGroupId(String volumeGroupId) {
231             this.volumeGroupId = volumeGroupId;
232             return this;
233         }
234
235         public Builder setNetworkId(String networkId) {
236             this.networkId = networkId;
237             return this;
238         }
239
240         public Builder setConfigurationId(String configurationId) {
241             this.configurationId = configurationId;
242             return this;
243         }
244
245         public Builder setServiceType(String serviceType) {
246             this.serviceType = serviceType;
247             return this;
248         }
249
250         public Builder setVnfType(String vnfType) {
251             this.vnfType = vnfType;
252             return this;
253         }
254
255         public Builder setVfModuleType(String vfModuleType) {
256             this.vfModuleType = vfModuleType;
257             return this;
258         }
259
260         public Builder setNetworkType(String networkType) {
261             this.networkType = networkType;
262             return this;
263         }
264
265         public Builder setRequestDetails(String requestDetails) {
266             this.requestDetails = requestDetails;
267             return this;
268         }
269
270         public Builder setRecipeParamXsd(String recipeParamXsd) {
271             this.recipeParamXsd = recipeParamXsd;
272             return this;
273         }
274
275         public Builder setApiVersion(String apiVersion) {
276             this.apiVersion = apiVersion;
277             return this;
278         }
279
280         public Builder setALaCarte(boolean aLaCarte) {
281             this.aLaCarte = aLaCarte;
282             return this;
283         }
284
285         public Builder setRequestUri(String requestUri) {
286             this.requestUri = requestUri;
287             return this;
288         }
289
290         public Builder setInstanceGroupId(String instanceGroupId) {
291             this.instanceGroupId = instanceGroupId;
292             return this;
293         }
294
295         public Builder setGenerateIds(boolean generateIdsOnly) {
296             this.generateIdsOnly = generateIdsOnly;
297             return this;
298         }
299
300         public RequestClientParameter build() {
301             return new RequestClientParameter(this);
302         }
303
304     }
305 }