591e94ee1d0338f22035648419ec730af4e0c634
[sdc.git] /
1 package org.openecomp.sdc.tosca.datatypes.model;
2
3 import java.util.Map;
4
5 public class OperationDefinition {
6
7   private String description;
8   private String implementation;
9   private Map<String, PropertyDefinition> inputs;
10
11   public String getDescription() {
12     return description;
13   }
14
15   public void setDescription(String description) {
16     this.description = description;
17   }
18
19   public String getImplementation() {
20     return implementation;
21   }
22
23   public void setImplementation(String implementation) {
24     this.implementation = implementation;
25   }
26
27   public Map<String, PropertyDefinition> getInputs() {
28     return inputs;
29   }
30
31   public void setInputs(
32       Map<String, PropertyDefinition> inputs) {
33     this.inputs = inputs;
34   }
35
36   @Override
37   public boolean equals(Object o) {
38     if (this == o) {
39       return true;
40     }
41     if (!(o instanceof OperationDefinition)) {
42       return false;
43     }
44
45     OperationDefinition that = (OperationDefinition) o;
46
47     if (getDescription() != null ? !getDescription().equals(that.getDescription())
48         : that.getDescription() != null) {
49       return false;
50     }
51     if (getImplementation() != null ? !getImplementation().equals(that.getImplementation())
52         : that.getImplementation() != null) {
53       return false;
54     }
55     return getInputs() != null ? getInputs().equals(that.getInputs()) : that.getInputs() == null;
56   }
57
58   @Override
59   public int hashCode() {
60     int result = getDescription() != null ? getDescription().hashCode() : 0;
61     result = 31 * result + (getImplementation() != null ? getImplementation().hashCode() : 0);
62     result = 31 * result + (getInputs() != null ? getInputs().hashCode() : 0);
63     return result;
64   }
65 }