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.ci.tests.tosca.datatypes;
23 import java.util.List;
26 import org.yaml.snakeyaml.TypeDescription;
28 public class ToscaNodeTemplatesTopologyTemplateDefinition {
32 private String description;
33 private String [] directives;
34 private Map<String, Object> properties;
35 private List<Map<String, Object>> attributes;
36 private List<Map<String, Object>> requirements;
37 private List<Map<String, Object>> capabilities;
38 private List<Map<String, Object>> interfaces;
39 private List<Map<String, Object>> artifacts;
40 private List<Map<String, Object>> node_filter;
42 private Map<String, String> metadata;
45 // private Map<String, ToscaPropertiesNodeTemplatesDefinition> properties;
46 // private Map<String, ToscaRequirementsNodeTemplatesDefinition> requirements;
47 // private Map<String, ToscaCapabilitiesNodeTemplatesDefinition> capabilities;
49 public ToscaNodeTemplatesTopologyTemplateDefinition() {
53 public Map<String, String> getMetadata() {
57 public void setMetadata(Map<String, String> metadata) {
58 this.metadata = metadata;
62 public String getName() {
66 public void setName(String name) {
70 public String getType() {
74 public void setType(String type) {
78 public String getDescription() {
82 public void setDescription(String description) {
83 this.description = description;
86 public String[] getDirectives() {
90 public void setDirectives(String[] directives) {
91 this.directives = directives;
95 public Map<String, Object> getProperties() {
99 public void setProperties(Map<String, Object> properties) {
100 this.properties = properties;
103 public List<Map<String, Object>> getAttributes() {
107 public void setAttributes(List<Map<String, Object>> attributes) {
108 this.attributes = attributes;
111 public List<Map<String, Object>> getRequirements() {
115 public void setRequirements(List<Map<String, Object>> requirements) {
116 this.requirements = requirements;
119 public List<Map<String, Object>> getCapabilities() {
123 public void setCapabilities(List<Map<String, Object>> capabilities) {
124 this.capabilities = capabilities;
127 public List<Map<String, Object>> getInterfaces() {
131 public void setInterfaces(List<Map<String, Object>> interfaces) {
132 this.interfaces = interfaces;
135 public List<Map<String, Object>> getArtifacts() {
139 public void setArtifacts(List<Map<String, Object>> artifacts) {
140 this.artifacts = artifacts;
143 public List<Map<String, Object>> getNode_filter() {
147 public void setNode_filter(List<Map<String, Object>> node_filter) {
148 this.node_filter = node_filter;
151 public String getCopy() {
155 public void setCopy(String copy) {
159 //gets Type description for Yaml snake
160 public static TypeDescription getTypeDescription(){
161 TypeDescription typeDescription = new TypeDescription(ToscaNodeTemplatesTopologyTemplateDefinition.class);
162 typeDescription.putMapPropertyType("properties", String.class, Object.class);
163 typeDescription.putListPropertyType("requirements", Map.class);
164 typeDescription.putListPropertyType("capabilities", Map.class);
165 typeDescription.putListPropertyType("attributes", Map.class);
166 typeDescription.putListPropertyType("interfaces", Map.class);
167 typeDescription.putListPropertyType("artifacts", Map.class);
168 typeDescription.putListPropertyType("node_filter", Map.class);
169 typeDescription.putMapPropertyType("metadata", String.class, String.class);
170 return typeDescription;