7043812fc733956d7b8249482859d05359d1d6b9
[sdc.git] / common / openecomp-tosca-datatype / src / main / java / org / openecomp / sdc / tosca / datatypes / model / OperationDefinitionType.java
1 /*
2  * Copyright © 2016-2018 European Support Limited
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.openecomp.sdc.tosca.datatypes.model;
18
19 import java.util.Map;
20 import java.util.Objects;
21
22 public class OperationDefinitionType extends OperationDefinition {
23
24   private String implementation;
25   private Map<String, PropertyDefinition> inputs;
26
27   public String getImplementation() {
28     return implementation;
29   }
30
31   public void setImplementation(String implementation) {
32     this.implementation = implementation;
33   }
34
35   public Map<String, PropertyDefinition> getInputs() {
36     return inputs;
37   }
38
39   public void setInputs(
40       Map<String, PropertyDefinition> inputs) {
41     this.inputs = inputs;
42   }
43
44   @Override
45   public boolean equals(Object o) {
46     if (this == o) {
47       return true;
48     }
49     if (!(o instanceof OperationDefinitionType)) {
50       return false;
51     }
52     OperationDefinitionType that = (OperationDefinitionType) o;
53     return Objects.equals(implementation, that.implementation) &&
54         Objects.equals(inputs, that.inputs);
55   }
56
57   @Override
58   public int hashCode() {
59
60     return Objects.hash(implementation, inputs);
61   }
62 }