2101252ad09904fcb032194cc3ccebd1e214e6bd
[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     private String operationType;
49
50     private RequestClientParameter(Builder builder) {
51         requestId = builder.requestId;
52         isBaseVfModule = builder.isBaseVfModule;
53         recipeTimeout = builder.recipeTimeout;
54         requestAction = builder.requestAction;
55         serviceInstanceId = builder.serviceInstanceId;
56         pnfCorrelationId = builder.pnfCorrelationId;
57         vnfId = builder.vnfId;
58         vfModuleId = builder.vfModuleId;
59         volumeGroupId = builder.volumeGroupId;
60         networkId = builder.networkId;
61         configurationId = builder.configurationId;
62         serviceType = builder.serviceType;
63         vnfType = builder.vnfType;
64         vfModuleType = builder.vfModuleType;
65         networkType = builder.networkType;
66         requestDetails = builder.requestDetails;
67         recipeParamXsd = builder.recipeParamXsd;
68         apiVersion = builder.apiVersion;
69         aLaCarte = builder.aLaCarte;
70         requestUri = builder.requestUri;
71         instanceGroupId = builder.instanceGroupId;
72         generateIdsOnly = builder.generateIdsOnly;
73         operationType = builder.operationType;
74     }
75
76     public String getOperationType() {
77         return operationType;
78     }
79
80     public String getRequestId() {
81         return requestId;
82     }
83
84     public boolean isBaseVfModule() {
85         return isBaseVfModule;
86     }
87
88     public int getRecipeTimeout() {
89         return recipeTimeout;
90     }
91
92     public String getRequestAction() {
93         return requestAction;
94     }
95
96     public String getServiceInstanceId() {
97         return serviceInstanceId;
98     }
99
100     public String getPnfCorrelationId() {
101         return pnfCorrelationId;
102     }
103
104     public String getVnfId() {
105         return vnfId;
106     }
107
108     public String getVfModuleId() {
109         return vfModuleId;
110     }
111
112     public String getVolumeGroupId() {
113         return volumeGroupId;
114     }
115
116     public String getNetworkId() {
117         return networkId;
118     }
119
120     public String getConfigurationId() {
121         return configurationId;
122     }
123
124     public String getServiceType() {
125         return serviceType;
126     }
127
128     public String getVnfType() {
129         return vnfType;
130     }
131
132     public String getVfModuleType() {
133         return vfModuleType;
134     }
135
136     public String getNetworkType() {
137         return networkType;
138     }
139
140     public String getRequestDetails() {
141         return requestDetails;
142     }
143
144     public String getRecipeParamXsd() {
145         return recipeParamXsd;
146     }
147
148     public String getApiVersion() {
149         return apiVersion;
150     }
151
152     public boolean isaLaCarte() {
153         return aLaCarte;
154     }
155
156     public String getRequestUri() {
157         return requestUri;
158     }
159
160     public String getInstanceGroupId() {
161         return instanceGroupId;
162     }
163
164     public boolean isGenerateIdsOnly() {
165         return generateIdsOnly;
166     }
167
168     public void setGenerateIdsOnly(boolean generateIdsOnly) {
169         this.generateIdsOnly = generateIdsOnly;
170     }
171
172     public static class Builder {
173         private String requestId;
174         private boolean isBaseVfModule = false;
175         private int recipeTimeout;
176         private String requestAction;
177         private String serviceInstanceId;
178         private String pnfCorrelationId;
179         private String vnfId;
180         private String vfModuleId;
181         private String volumeGroupId;
182         private String networkId;
183         private String configurationId;
184         private String serviceType;
185         private String vnfType;
186         private String vfModuleType;
187         private String networkType;
188         private String requestDetails;
189         private String apiVersion;
190         private boolean aLaCarte = false;
191         private String recipeParamXsd;
192         private String requestUri;
193         private String instanceGroupId;
194         private boolean generateIdsOnly;
195         private String operationType;
196
197         public Builder setOperationType(String operationType) {
198             this.operationType = operationType;
199             return this;
200         }
201
202         public Builder setRequestId(String requestId) {
203             this.requestId = requestId;
204             return this;
205         }
206
207         public Builder setBaseVfModule(boolean baseVfModule) {
208             isBaseVfModule = baseVfModule;
209             return this;
210         }
211
212         public Builder setRecipeTimeout(int recipeTimeout) {
213             this.recipeTimeout = recipeTimeout;
214             return this;
215         }
216
217         public Builder setRequestAction(String requestAction) {
218             this.requestAction = requestAction;
219             return this;
220         }
221
222         public Builder setServiceInstanceId(String serviceInstanceId) {
223             this.serviceInstanceId = serviceInstanceId;
224             return this;
225         }
226
227         public Builder setPnfCorrelationId(String pnfCorrelationId) {
228             this.pnfCorrelationId = pnfCorrelationId;
229             return this;
230         }
231
232         public Builder setVnfId(String vnfId) {
233             this.vnfId = vnfId;
234             return this;
235         }
236
237         public Builder setVfModuleId(String vfModuleId) {
238             this.vfModuleId = vfModuleId;
239             return this;
240         }
241
242         public Builder setVolumeGroupId(String volumeGroupId) {
243             this.volumeGroupId = volumeGroupId;
244             return this;
245         }
246
247         public Builder setNetworkId(String networkId) {
248             this.networkId = networkId;
249             return this;
250         }
251
252         public Builder setConfigurationId(String configurationId) {
253             this.configurationId = configurationId;
254             return this;
255         }
256
257         public Builder setServiceType(String serviceType) {
258             this.serviceType = serviceType;
259             return this;
260         }
261
262         public Builder setVnfType(String vnfType) {
263             this.vnfType = vnfType;
264             return this;
265         }
266
267         public Builder setVfModuleType(String vfModuleType) {
268             this.vfModuleType = vfModuleType;
269             return this;
270         }
271
272         public Builder setNetworkType(String networkType) {
273             this.networkType = networkType;
274             return this;
275         }
276
277         public Builder setRequestDetails(String requestDetails) {
278             this.requestDetails = requestDetails;
279             return this;
280         }
281
282         public Builder setRecipeParamXsd(String recipeParamXsd) {
283             this.recipeParamXsd = recipeParamXsd;
284             return this;
285         }
286
287         public Builder setApiVersion(String apiVersion) {
288             this.apiVersion = apiVersion;
289             return this;
290         }
291
292         public Builder setALaCarte(boolean aLaCarte) {
293             this.aLaCarte = aLaCarte;
294             return this;
295         }
296
297         public Builder setRequestUri(String requestUri) {
298             this.requestUri = requestUri;
299             return this;
300         }
301
302         public Builder setInstanceGroupId(String instanceGroupId) {
303             this.instanceGroupId = instanceGroupId;
304             return this;
305         }
306
307         public Builder setGenerateIds(boolean generateIdsOnly) {
308             this.generateIdsOnly = generateIdsOnly;
309             return this;
310         }
311
312         public RequestClientParameter build() {
313             return new RequestClientParameter(this);
314         }
315
316     }
317
318
319 }