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 org.yaml.snakeyaml.TypeDescription;
25 import java.util.List;
28 public class ToscaNodeTemplatesTopologyTemplateDefinition {
32 private String description;
33 private String [] directives;
34 private Map<String, Object> properties;
35 private Map<String, Object> attributes;
36 private List<Map<String, Object>> requirements;
37 private Object capabilities;
38 // private List<Map<String, Object>> capabilities;
39 // private Map<String, ToscaPropertiesNodeTemplatesDefinition> properties;
40 // private Map<String, ToscaRequirementsNodeTemplatesDefinition> requirements;
41 // private Map<String, ToscaCapabilitiesNodeTemplatesDefinition> capabilities;
42 private Map<String, Object> interfaces;
43 private Map<String, Object> artifacts;
44 private Map<String, Object> node_filter;
46 private Map<String, String> metadata;
49 public ToscaNodeTemplatesTopologyTemplateDefinition() {
53 public Object getCapabilities() {
57 public void setCapabilities(Object capabilities) {
58 this.capabilities = capabilities;
61 public Map<String, String> getMetadata() {
65 public void setMetadata(Map<String, String> metadata) {
66 this.metadata = metadata;
70 public String getName() {
74 public void setName(String name) {
78 public String getType() {
82 public void setType(String type) {
86 public String getDescription() {
90 public void setDescription(String description) {
91 this.description = description;
94 public String[] getDirectives() {
98 public void setDirectives(String[] directives) {
99 this.directives = directives;
103 public Map<String, Object> getProperties() {
107 public void setProperties(Map<String, Object> properties) {
108 this.properties = properties;
111 public Map<String, Object> getAttributes() {
115 public void setAttributes(Map<String, Object> attributes) {
116 this.attributes = attributes;
119 public List<Map<String, Object>> getRequirements() {
123 public void setRequirements(List<Map<String, Object>> requirements) {
124 this.requirements = requirements;
127 public Map<String, Object> getInterfaces() {
131 public void setInterfaces(Map<String, Object> interfaces) {
132 this.interfaces = interfaces;
135 public Map<String, Object> getArtifacts() {
139 public void setArtifacts(Map<String, Object> artifacts) {
140 this.artifacts = artifacts;
143 public Map<String, Object> getNode_filter() {
147 public void setNode_filter(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.putMapPropertyType("capabilities",String.class, Object.class);
165 // typeDescription.putListPropertyType("capabilities", Object.class);
166 typeDescription.putMapPropertyType("attributes", String.class, Object.class);
167 typeDescription.putMapPropertyType("interfaces", String.class, Object.class);
168 typeDescription.putMapPropertyType("artifacts", String.class, Object.class);
169 typeDescription.putMapPropertyType("node_filter", String.class, Object.class);
170 typeDescription.putMapPropertyType("metadata", String.class, String.class);
171 return typeDescription;