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;
29 public class ToscaGroupsTopologyTemplateDefinition {
31 private String type; // required
32 private String description;
33 private Map<String, Object> properties;
34 private Map<String, String> targets; // required
35 private Map<String, Object> interfaces;
36 private List<String> members;
37 // private Map<String, String> metadata;
38 private ToscaGroupsMetadataDefinition metadata;
40 public ToscaGroupsTopologyTemplateDefinition() {
44 public ToscaGroupsMetadataDefinition getMetadata() {
48 public void setMetadata(ToscaGroupsMetadataDefinition metadata) {
49 this.metadata = metadata;
52 public String getType() {
56 public void setType(String type) {
60 public String getDescription() {
64 public void setDescription(String description) {
65 this.description = description;
68 public Map<String, Object> getProperties() {
72 public void setProperties(Map<String, Object> properties) {
73 this.properties = properties;
76 public Map<String, String> getTargets() {
80 public void setTargets(Map<String, String> targets) {
81 this.targets = targets;
84 public Map<String, Object> getInterfaces() {
88 public void setInterfaces(Map<String, Object> interfaces) {
89 this.interfaces = interfaces;
92 public List<String> getMembers() {
96 public void setMembers(List<String> members) {
97 this.members = members;
100 // public Map<String, String> getMetadata() {
104 // public void setMetadata(Map<String, String> metadata) {
105 // this.metadata = metadata;
109 public String toString() {
110 return "ToscaGroupsTopologyTemplateDefinition [type=" + type + ", description=" + description + ", properties=" + properties + ", targets=" + targets + ", interfaces=" + interfaces + ", members=" + members + ", metadata=" + metadata
114 //gets Type description for Yaml snake
115 public static TypeDescription getTypeDescription(){
116 TypeDescription typeDescription = new TypeDescription(ToscaGroupsTopologyTemplateDefinition.class);
117 typeDescription.putMapPropertyType("properties", String.class, Object.class);
118 typeDescription.putMapPropertyType("interfaces", String.class, Object.class);
119 typeDescription.putMapPropertyType("targets", String.class, Object.class);
120 // typeDescription.putMapPropertyType("metadata", String.class, String.class);
121 typeDescription.putMapPropertyType("metadata", String.class, String.class);
122 typeDescription.putListPropertyType("members", String.class);
123 return typeDescription;