1 package com.atlassian.jira.rest.client.api.domain.input;
2
3 import com.atlassian.jira.rest.client.api.IdentifiableEntity;
4
5 public class PropertyInput implements IdentifiableEntity<String> {
6
7 private final String key;
8 private final String value;
9
10 public PropertyInput(String key, String value) {
11 this.key = key;
12 this.value = value;
13 }
14
15 public String getKey() {
16 return key;
17 }
18
19 public String getValue() {
20 return value;
21 }
22
23 @Override
24 public String getId() {
25 return key;
26 }
27
28 @Override
29 public boolean equals(Object o) {
30 if (this == o) return true;
31 if (o == null || getClass() != o.getClass()) return false;
32
33 PropertyInput that = (PropertyInput) o;
34
35 if (key != null ? !key.equals(that.key) : that.key != null) return false;
36 return value != null ? value.equals(that.value) : that.value == null;
37 }
38
39 @Override
40 public int hashCode() {
41 int result = key != null ? key.hashCode() : 0;
42 result = 31 * result + (value != null ? value.hashCode() : 0);
43 return result;
44 }
45
46 }