-
Notifications
You must be signed in to change notification settings - Fork 116
/
ServiceAccount.java
58 lines (48 loc) · 1.36 KB
/
ServiceAccount.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package com.purbon.kafka.topology.model.cluster;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
import lombok.Getter;
@Getter
public class ServiceAccount {
private String id;
private String name;
private String description;
@JsonProperty("resource_id")
private String resourceId;
public ServiceAccount() {
this("", "", "", "");
}
public ServiceAccount(String id, String name, String description) {
this(id, name, description, "");
}
public ServiceAccount(String id, String name, String description, String resourceId) {
this.id = id;
this.name = name;
this.description = description;
this.resourceId = resourceId;
}
@Override
public String toString() {
final StringBuffer sb = new StringBuffer("ServiceAccount{");
sb.append("id=").append(id);
sb.append(", name='").append(name).append('\'');
sb.append(", resourceId='").append(resourceId).append('\'');
sb.append('}');
return sb.toString();
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof ServiceAccount)) {
return false;
}
ServiceAccount that = (ServiceAccount) o;
return getName().equals(that.getName());
}
@Override
public int hashCode() {
return Objects.hash(getId(), getName(), getDescription(), getResourceId());
}
}