Rename packages from openecomp to onap.
[sdc.git] / common / onap-tosca-datatype / src / main / java / org / onap / sdc / tosca / datatypes / model / TopologyTemplate.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20
21 package org.onap.sdc.tosca.datatypes.model;
22
23 import java.util.HashMap;
24 import java.util.List;
25 import java.util.Map;
26 import java.util.Objects;
27
28 public class TopologyTemplate {
29
30   private String description;
31   private Map<String, ParameterDefinition> inputs;
32   private Map<String, NodeTemplate> node_templates;
33   private Map<String, RelationshipTemplate> relationship_templates;
34   private Map<String, GroupDefinition> groups;
35   private Map<String, ParameterDefinition> outputs;
36   private SubstitutionMapping substitution_mappings;
37   private Map<String, PolicyDefinition> policies;
38   private List<WorkflowDefinition> workflows;
39
40   public String getDescription() {
41     return description;
42   }
43
44   public void setDescription(String description) {
45     this.description = description;
46   }
47
48   public Map<String, ParameterDefinition> getInputs() {
49     return inputs;
50   }
51
52   public void setInputs(Map<String, ParameterDefinition> inputs) {
53     this.inputs = inputs;
54   }
55
56   public Map<String, NodeTemplate> getNode_templates() {
57     return node_templates;
58   }
59
60   public void setNode_templates(Map<String, NodeTemplate> node_templates) {
61     this.node_templates = node_templates;
62   }
63
64   public Map<String, RelationshipTemplate> getRelationship_templates() {
65     return relationship_templates;
66   }
67
68   public void setRelationship_templates(Map<String, RelationshipTemplate> relationship_templates) {
69     this.relationship_templates = relationship_templates;
70   }
71
72   public Map<String, GroupDefinition> getGroups() {
73     return groups;
74   }
75
76   public void setGroups(Map<String, GroupDefinition> groups) {
77     this.groups = groups;
78   }
79
80   /**
81    * Add group.
82    *
83    * @param groupKey        the group key
84    * @param groupDefinition the group definition
85    */
86   public void addGroup(String groupKey, GroupDefinition groupDefinition) {
87     if (Objects.isNull(this.groups)) {
88       this.groups = new HashMap<>();
89     }
90     this.groups.put(groupKey, groupDefinition);
91   }
92
93   public Map<String, ParameterDefinition> getOutputs() {
94     return outputs;
95   }
96
97   public void setOutputs(Map<String, ParameterDefinition> outputs) {
98     this.outputs = outputs;
99   }
100
101   public SubstitutionMapping getSubstitution_mappings() {
102     return substitution_mappings;
103   }
104
105   public void setSubstitution_mappings(SubstitutionMapping substitution_mappings) {
106     this.substitution_mappings = substitution_mappings;
107   }
108
109   public Map<String, PolicyDefinition> getPolicies() {
110     return policies;
111   }
112
113   public void setPolicies(Map<String, PolicyDefinition> policies) {
114     this.policies = policies;
115   }
116
117   public List<WorkflowDefinition> getWorkflows() {
118     return workflows;
119   }
120
121   public void setWorkflows(List<WorkflowDefinition> workflows) {
122     this.workflows = workflows;
123   }
124 }