Clean up license text in appc-sequence-generator
[appc.git] / appc-sequence-generator / appc-sequence-generator-bundle / src / main / java / org / onap / appc / seqgen / objects / SequenceGeneratorInputBuilder.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APPC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Copyright (C) 2017 Amdocs
8  * =============================================================================
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22  * ============LICENSE_END=========================================================
23  */
24
25 package org.onap.appc.seqgen.objects;
26
27 import org.onap.appc.dg.objects.InventoryModel;
28 import org.onap.appc.dg.objects.VnfcDependencyModel;
29
30 import java.util.HashMap;
31 import java.util.List;
32 import java.util.Map;
33
34 public class SequenceGeneratorInputBuilder {
35
36     private RequestInfo requestInfo;
37
38     private InventoryModel inventoryModel;
39
40     private VnfcDependencyModel dependencyModel;
41
42     private Map<String,String> tunableParams;
43
44     private Map<String,List<String>> capability;
45
46     public SequenceGeneratorInputBuilder requestInfo(RequestInfo requestInfo){
47         this.requestInfo = requestInfo;
48         return this;
49     }
50
51     public SequenceGeneratorInputBuilder capability(String level,List<String> capabilities){
52         if(this.capability ==null){
53             this.capability = new HashMap<>();
54         }
55         this.capability.put(level,capabilities);
56         return this;
57     }
58
59     public SequenceGeneratorInputBuilder tunableParameter(String key,String value){
60         if(this.tunableParams ==null){
61             this.tunableParams = new HashMap<>();
62         }
63         this.tunableParams.put(key,value);
64         return this;
65     }
66
67     public SequenceGeneratorInputBuilder inventoryModel(InventoryModel model){
68         this.inventoryModel = model;
69         return this;
70     }
71
72     public SequenceGeneratorInputBuilder dependendcyModel(VnfcDependencyModel model){
73         this.dependencyModel = model;
74         return this;
75     }
76
77     public SequenceGeneratorInput build(){
78         SequenceGeneratorInput input = new SequenceGeneratorInput();
79         input.setRequestInfo(this.requestInfo);
80         input.setCapability(this.capability);
81         input.setInventoryModel(this.inventoryModel);
82         input.setDependencyModel(this.dependencyModel);
83         input.setTunableParams(this.tunableParams);
84         return input;
85     }
86
87
88
89 }