[SDC-29] rebase continue work to align source
[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 public class ToscaGroupsTopologyTemplateDefinition {
30
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;
39
40         public ToscaGroupsTopologyTemplateDefinition() {
41                 super();
42         }
43
44         public ToscaGroupsMetadataDefinition getMetadata() {
45                 return metadata;
46         }
47
48         public void setMetadata(ToscaGroupsMetadataDefinition metadata) {
49                 this.metadata = metadata;
50         }
51
52         public String getType() {
53                 return type;
54         }
55
56         public void setType(String type) {
57                 this.type = type;
58         }
59
60         public String getDescription() {
61                 return description;
62         }
63
64         public void setDescription(String description) {
65                 this.description = description;
66         }
67
68         public Map<String, Object> getProperties() {
69                 return properties;
70         }
71
72         public void setProperties(Map<String, Object> properties) {
73                 this.properties = properties;
74         }
75
76         public Map<String, String> getTargets() {
77                 return targets;
78         }
79
80         public void setTargets(Map<String, String> targets) {
81                 this.targets = targets;
82         }
83
84         public Map<String, Object> getInterfaces() {
85                 return interfaces;
86         }
87
88         public void setInterfaces(Map<String, Object> interfaces) {
89                 this.interfaces = interfaces;
90         }
91
92         public List<String> getMembers() {
93                 return members;
94         }
95
96         public void setMembers(List<String> members) {
97                 this.members = members;
98         }
99
100 //      public Map<String, String> getMetadata() {
101 //              return metadata;
102 //      }
103 //
104 //      public void setMetadata(Map<String, String> metadata) {
105 //              this.metadata = metadata;
106 //      }
107
108         @Override
109         public String toString() {
110                 return "ToscaGroupsTopologyTemplateDefinition [type=" + type + ", description=" + description + ", properties=" + properties + ", targets=" + targets + ", interfaces=" + interfaces + ", members=" + members + ", metadata=" + metadata
111                                 + "]";
112         }
113
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;
124         }
125
126 }