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.sdc.tosca.datatypes.model;
23 import java.util.HashMap;
24 import java.util.List;
26 import java.util.Objects;
28 public class TopologyTemplate {
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;
40 public String getDescription() {
44 public void setDescription(String description) {
45 this.description = description;
48 public Map<String, ParameterDefinition> getInputs() {
52 public void setInputs(Map<String, ParameterDefinition> inputs) {
56 public Map<String, NodeTemplate> getNode_templates() {
57 return node_templates;
60 public void setNode_templates(Map<String, NodeTemplate> node_templates) {
61 this.node_templates = node_templates;
64 public Map<String, RelationshipTemplate> getRelationship_templates() {
65 return relationship_templates;
68 public void setRelationship_templates(Map<String, RelationshipTemplate> relationship_templates) {
69 this.relationship_templates = relationship_templates;
72 public Map<String, GroupDefinition> getGroups() {
76 public void setGroups(Map<String, GroupDefinition> groups) {
83 * @param groupKey the group key
84 * @param groupDefinition the group definition
86 public void addGroup(String groupKey, GroupDefinition groupDefinition) {
87 if (Objects.isNull(this.groups)) {
88 this.groups = new HashMap<>();
90 this.groups.put(groupKey, groupDefinition);
93 public Map<String, ParameterDefinition> getOutputs() {
97 public void setOutputs(Map<String, ParameterDefinition> outputs) {
98 this.outputs = outputs;
101 public SubstitutionMapping getSubstitution_mappings() {
102 return substitution_mappings;
105 public void setSubstitution_mappings(SubstitutionMapping substitution_mappings) {
106 this.substitution_mappings = substitution_mappings;
109 public Map<String, PolicyDefinition> getPolicies() {
113 public void setPolicies(Map<String, PolicyDefinition> policies) {
114 this.policies = policies;
117 public List<WorkflowDefinition> getWorkflows() {
121 public void setWorkflows(List<WorkflowDefinition> workflows) {
122 this.workflows = workflows;