Added oparent to sdc main
[sdc.git] / test-apis-ci / src / main / java / org / openecomp / sdc / ci / tests / tosca / datatypes / ToscaInputsAnnotation.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2019 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 org.yaml.snakeyaml.TypeDescription;
24
25 import java.util.Map;
26 import java.util.Objects;
27
28 public class ToscaInputsAnnotation {
29         
30         String name;
31         String type;
32         private Map<String, Object> properties;
33         
34         public String getName() {
35                 return name;
36         }
37         public void setName(String name) {
38                 this.name = name;
39         }
40         public String getType() {
41                 return type;
42         }
43         public void setType(String type) {
44                 this.type = type;
45         }
46         public Map<String, Object> getProperties() {
47                 return properties;
48         }
49         public void setProperties(Map<String, Object> properties) {
50                 this.properties = properties;
51         }
52         
53         
54         //gets Type description for Yaml snake
55         public static TypeDescription getTypeDescription(){
56         return new TypeDescription(ToscaInputsAnnotation.class);
57         }
58
59         @Override
60         public boolean equals(Object o) {
61                 if (this == o) return true;
62                 if (o == null || getClass() != o.getClass()) return false;
63                 ToscaInputsAnnotation that = (ToscaInputsAnnotation) o;
64                 return Objects.equals(type, that.type);
65         }
66
67         @Override
68         public int hashCode() {
69                 return Objects.hash(type);
70         }
71 }