Sync Integ to Master
[sdc.git] / common-be / src / main / java / org / openecomp / sdc / be / datatypes / elements / GetInputValueDataDefinition.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.be.datatypes.elements;
22
23 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
24
25 import java.io.Serializable;
26 import java.util.Map;
27
28 public class GetInputValueDataDefinition  extends ToscaDataDefinition implements Serializable{
29         /**
30          * 
31          */
32         private static final long serialVersionUID = 5466910697527037975L;
33         private String propName;
34         private String inputName;
35         private String inputId;
36         private Integer indexValue;
37         private GetInputValueDataDefinition getInputIndex;
38
39         boolean isList = false;
40         
41         public GetInputValueDataDefinition(){
42                 super();
43         }
44
45         public GetInputValueDataDefinition(Map<String, Object> pr) {
46                 super(pr);
47                 
48         }
49
50         public GetInputValueDataDefinition(GetInputValueDataDefinition p) {
51                 
52                 
53                 super();
54                 this.setPropName(p.getPropName());
55                 this.setInputName( p.getInputName());
56                 this.setInputId( p.getInputId());
57                 this.setIndexValue (  p.getIndexValue());
58                 this.setGetInputIndex (  p.getGetInputIndex());
59                 this.setList (  p.isList());
60                 
61                 
62         }
63
64         public String getPropName() {
65                 return propName;
66         }
67
68         public void setPropName(String propName) {
69                 this.propName = propName;
70         }
71
72         public String getInputName() {
73                 return inputName;
74         }
75
76         public void setInputName(String inputName) {
77                 this.inputName = inputName;
78         }
79
80         public Integer getIndexValue() {
81                 return indexValue;
82         }
83
84         public void setIndexValue(Integer indexValue) {
85                 this.indexValue = indexValue;
86         }
87
88         public GetInputValueDataDefinition getGetInputIndex() {
89                 return getInputIndex;
90         }
91
92         public void setGetInputIndex(GetInputValueDataDefinition getInputIndex) {
93                 this.getInputIndex = getInputIndex;
94         }
95
96         public boolean isList() {
97                 return isList;
98         }
99
100         public void setList(boolean isList) {
101                 this.isList = isList;
102         }
103         
104         
105         public String getInputId() {
106                 return inputId;
107         }
108
109         public void setInputId(String inputId) {
110                 this.inputId = inputId;
111         }
112
113         @Override
114         public String toString() {
115                 return "GetInputValueDataDefinition [propName=" + propName + ", inputName=" + inputName + ", indexValue=" + indexValue + ", getInputIndex=" + getInputIndex + ", isList=" + isList + "]";
116         }
117
118         @Override
119         public int hashCode() {
120                 final int prime = 31;
121                 int result = 1;
122                 result = prime * result + ((getInputIndex == null) ? 0 : getInputIndex.hashCode());
123                 result = prime * result + ((indexValue == null) ? 0 : indexValue.hashCode());
124                 result = prime * result + ((inputName == null) ? 0 : inputName.hashCode());
125                 result = prime * result + (isList ? 1231 : 1237);
126                 result = prime * result + ((propName == null) ? 0 : propName.hashCode());
127                 return result;
128         }
129
130         @Override
131         public boolean equals(Object obj) {
132                 if (this == obj)
133                         return true;
134                 if (obj == null)
135                         return false;
136                 if (getClass() != obj.getClass())
137                         return false;
138                 GetInputValueDataDefinition other = (GetInputValueDataDefinition) obj;
139                 if (getInputIndex == null) {
140                         if (other.getInputIndex != null)
141                                 return false;
142                 } else if (!getInputIndex.equals(other.getInputIndex))
143                         return false;
144                 if (indexValue == null) {
145                         if (other.indexValue != null)
146                                 return false;
147                 } else if (!indexValue.equals(other.indexValue))
148                         return false;
149                 if (inputName == null) {
150                         if (other.inputName != null)
151                                 return false;
152                 } else if (!inputName.equals(other.inputName))
153                         return false;
154                 if (isList != other.isList)
155                         return false;
156                 if (propName == null) {
157                         if (other.propName != null)
158                                 return false;
159                 } else if (!propName.equals(other.propName))
160                         return false;
161                 return true;
162         }
163         
164         
165
166 }