2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.appc.seqgen.objects;
23 import org.onap.appc.dg.objects.InventoryModel;
24 import org.onap.appc.dg.objects.VnfcDependencyModel;
26 import java.util.HashMap;
27 import java.util.List;
30 public class SequenceGeneratorInputBuilder {
32 private RequestInfo requestInfo;
34 private InventoryModel inventoryModel;
36 private VnfcDependencyModel dependencyModel;
38 private Map<String,String> tunableParams;
40 private Map<String,List<String>> capability;
42 public SequenceGeneratorInputBuilder requestInfo(RequestInfo requestInfo){
43 this.requestInfo = requestInfo;
47 public SequenceGeneratorInputBuilder capability(String level,List<String> capabilities){
48 if(this.capability ==null){
49 this.capability = new HashMap<>();
51 this.capability.put(level,capabilities);
55 public SequenceGeneratorInputBuilder tunableParameter(String key,String value){
56 if(this.tunableParams ==null){
57 this.tunableParams = new HashMap<>();
59 this.tunableParams.put(key,value);
63 public SequenceGeneratorInputBuilder inventoryModel(InventoryModel model){
64 this.inventoryModel = model;
68 public SequenceGeneratorInputBuilder dependendcyModel(VnfcDependencyModel model){
69 this.dependencyModel = model;
73 public SequenceGeneratorInput build(){
74 SequenceGeneratorInput input = new SequenceGeneratorInput();
75 input.setRequestInfo(this.requestInfo);
76 input.setCapability(this.capability);
77 input.setInventoryModel(this.inventoryModel);
78 input.setDependencyModel(this.dependencyModel);
79 input.setTunableParams(this.tunableParams);