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.openecomp.sdc.tosca.datatypes.model;
23 import java.util.HashMap;
25 import java.util.Objects;
27 public class TopologyTemplate {
29 private String description;
30 private Map<String, ParameterDefinition> inputs;
31 private Map<String, NodeTemplate> node_templates;
32 private Map<String, RelationshipTemplate> relationship_templates;
33 private Map<String, GroupDefinition> groups;
34 private Map<String, ParameterDefinition> outputs;
35 private SubstitutionMapping substitution_mappings;
36 private Map<String, PolicyDefinition> policies;
38 public String getDescription() {
42 public void setDescription(String description) {
43 this.description = description;
46 public Map<String, ParameterDefinition> getInputs() {
50 public void setInputs(Map<String, ParameterDefinition> inputs) {
54 public Map<String, NodeTemplate> getNode_templates() {
55 return node_templates;
58 public void setNode_templates(Map<String, NodeTemplate> node_templates) {
59 this.node_templates = node_templates;
62 public Map<String, RelationshipTemplate> getRelationship_templates() {
63 return relationship_templates;
66 public void setRelationship_templates(Map<String, RelationshipTemplate> relationship_templates) {
67 this.relationship_templates = relationship_templates;
70 public Map<String, GroupDefinition> getGroups() {
74 public void setGroups(Map<String, GroupDefinition> groups) {
81 * @param groupKey the group key
82 * @param groupDefinition the group definition
84 public void addGroup(String groupKey, GroupDefinition groupDefinition) {
85 if (Objects.isNull(this.groups)) {
86 this.groups = new HashMap<>();
88 this.groups.put(groupKey, groupDefinition);
91 public Map<String, ParameterDefinition> getOutputs() {
95 public void setOutputs(Map<String, ParameterDefinition> outputs) {
96 this.outputs = outputs;
99 public SubstitutionMapping getSubstitution_mappings() {
100 return substitution_mappings;
103 public void setSubstitution_mappings(SubstitutionMapping substitution_mappings) {
104 this.substitution_mappings = substitution_mappings;
107 public Map<String, PolicyDefinition> getPolicies() {
111 public void setPolicies(Map<String, PolicyDefinition> policies) {
112 this.policies = policies;