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