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.be.datatypes.elements;
23 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
25 import java.io.Serializable;
28 public class GetInputValueDataDefinition extends ToscaDataDefinition implements Serializable{
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;
39 boolean isList = false;
41 public GetInputValueDataDefinition(){
45 public GetInputValueDataDefinition(Map<String, Object> pr) {
50 public GetInputValueDataDefinition(GetInputValueDataDefinition p) {
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());
64 public String getPropName() {
68 public void setPropName(String propName) {
69 this.propName = propName;
72 public String getInputName() {
76 public void setInputName(String inputName) {
77 this.inputName = inputName;
80 public Integer getIndexValue() {
84 public void setIndexValue(Integer indexValue) {
85 this.indexValue = indexValue;
88 public GetInputValueDataDefinition getGetInputIndex() {
92 public void setGetInputIndex(GetInputValueDataDefinition getInputIndex) {
93 this.getInputIndex = getInputIndex;
96 public boolean isList() {
100 public void setList(boolean isList) {
101 this.isList = isList;
105 public String getInputId() {
109 public void setInputId(String inputId) {
110 this.inputId = inputId;
114 public String toString() {
115 return "GetInputValueDataDefinition [propName=" + propName + ", inputName=" + inputName + ", indexValue=" + indexValue + ", getInputIndex=" + getInputIndex + ", isList=" + isList + "]";
119 public int hashCode() {
120 final int prime = 31;
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());
131 public boolean equals(Object obj) {
136 if (getClass() != obj.getClass())
138 GetInputValueDataDefinition other = (GetInputValueDataDefinition) obj;
139 if (getInputIndex == null) {
140 if (other.getInputIndex != null)
142 } else if (!getInputIndex.equals(other.getInputIndex))
144 if (indexValue == null) {
145 if (other.indexValue != null)
147 } else if (!indexValue.equals(other.indexValue))
149 if (inputName == null) {
150 if (other.inputName != null)
152 } else if (!inputName.equals(other.inputName))
154 if (isList != other.isList)
156 if (propName == null) {
157 if (other.propName != null)
159 } else if (!propName.equals(other.propName))