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