2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017-2018 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
13 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 * ============LICENSE_END=========================================================
24 package org.onap.appc.seqgen.objects;
26 import org.onap.appc.dg.objects.InventoryModel;
27 import org.onap.appc.dg.objects.VnfcDependencyModel;
29 import java.util.HashMap;
30 import java.util.List;
33 public class SequenceGeneratorInputBuilder {
35 private RequestInfo requestInfo;
37 private InventoryModel inventoryModel;
39 private VnfcDependencyModel dependencyModel;
41 private Map<String,String> tunableParams;
43 private Map<String,List<String>> capability;
45 public SequenceGeneratorInputBuilder requestInfo(RequestInfo requestInfo){
46 this.requestInfo = requestInfo;
50 public SequenceGeneratorInputBuilder capability(String level,List<String> capabilities){
51 if(this.capability ==null){
52 this.capability = new HashMap<>();
54 this.capability.put(level,capabilities);
58 public SequenceGeneratorInputBuilder tunableParameter(String key,String value){
59 if(this.tunableParams ==null){
60 this.tunableParams = new HashMap<>();
62 this.tunableParams.put(key,value);
66 public SequenceGeneratorInputBuilder inventoryModel(InventoryModel model){
67 this.inventoryModel = model;
71 public SequenceGeneratorInputBuilder dependendcyModel(VnfcDependencyModel model){
72 this.dependencyModel = model;
76 public SequenceGeneratorInput build(){
77 SequenceGeneratorInput input = new SequenceGeneratorInput();
78 input.setRequestInfo(this.requestInfo);
79 input.setCapability(this.capability);
80 input.setInventoryModel(this.inventoryModel);
81 input.setDependencyModel(this.dependencyModel);
82 input.setTunableParams(this.tunableParams);