Sync Integ to Master
[sdc.git] / test-apis-ci / src / main / java / org / openecomp / sdc / ci / tests / tosca / datatypes / ToscaGroupsTopologyTemplateDefinition.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20
21 package org.openecomp.sdc.ci.tests.tosca.datatypes;
22
23 import java.util.List;
24 import java.util.Map;
25
26 import org.yaml.snakeyaml.TypeDescription;
27
28 //      spec page 102
29
30 public class ToscaGroupsTopologyTemplateDefinition {
31
32         private String type; // required
33         private String description;
34         //      private Map<String, String> properties;
35         private ToscaGroupPropertyDefinition properties;
36         private Map<String, String> targets; // required
37         private Map<String, Object> interfaces;
38         private List<String> members;
39         //      private Map<String, String> metadata;
40         private ToscaServiceGroupsMetadataDefinition metadata;
41
42         public ToscaGroupsTopologyTemplateDefinition() {
43                 super();
44         }
45
46         public ToscaServiceGroupsMetadataDefinition getMetadata() {
47                 return metadata;
48         }
49
50         public void setMetadata(ToscaServiceGroupsMetadataDefinition metadata) {
51                 this.metadata = metadata;
52         }
53
54         public String getType() {
55                 return type;
56         }
57
58         public void setType(String type) {
59                 this.type = type;
60         }
61
62         public String getDescription() {
63                 return description;
64         }
65
66         public void setDescription(String description) {
67                 this.description = description;
68         }
69
70 //      public Map<String, String> getProperties() {
71 //              return properties;
72 //      }
73 //
74 //      public void setProperties(Map<String, String> properties) {
75 //              this.properties = properties;
76 //      }
77
78         public ToscaGroupPropertyDefinition getProperties() {
79                 return properties;
80         }
81
82         public void setProperties(ToscaGroupPropertyDefinition properties) {
83                 this.properties = properties;
84         }
85
86         public Map<String, String> getTargets() {
87                 return targets;
88         }
89
90         public void setTargets(Map<String, String> targets) {
91                 this.targets = targets;
92         }
93
94         public Map<String, Object> getInterfaces() {
95                 return interfaces;
96         }
97
98         public void setInterfaces(Map<String, Object> interfaces) {
99                 this.interfaces = interfaces;
100         }
101
102         public List<String> getMembers() {
103                 return members;
104         }
105
106         public void setMembers(List<String> members) {
107                 this.members = members;
108         }
109
110 //      public Map<String, String> getMetadata() {
111 //              return metadata;
112 //      }
113 //
114 //      public void setMetadata(Map<String, String> metadata) {
115 //              this.metadata = metadata;
116 //      }
117
118         @Override
119         public String toString() {
120                 return "ToscaGroupsTopologyTemplateDefinition [type=" + type + ", description=" + description + ", properties=" + properties + ", targets=" + targets + ", interfaces=" + interfaces + ", members=" + members + ", metadata=" + metadata
121                                 + "]";
122         }
123
124         //gets Type description for Yaml snake
125         public static TypeDescription getTypeDescription(){
126                 TypeDescription typeDescription = new TypeDescription(ToscaGroupsTopologyTemplateDefinition.class);
127 //        typeDescription.putMapPropertyType("properties", String.class, Object.class);
128 //              typeDescription.putListPropertyType("properties", ToscaGroupPropertyDefinition.class);
129                 typeDescription.putMapPropertyType("interfaces", String.class, Object.class);
130                 typeDescription.putMapPropertyType("targets", String.class, Object.class);
131 //        typeDescription.putMapPropertyType("metadata", String.class, String.class);
132                 typeDescription.putMapPropertyType("metadata", String.class, String.class);
133                 typeDescription.putListPropertyType("members", String.class);
134                 return typeDescription;
135         }
136
137 }