blob: 405dd1aa56a33d9a4fe7ec652568239d04027faa (
plain) (
blame)
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
|
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.athenz.client.zms;
import com.yahoo.vespa.athenz.api.AthenzRole;
import java.util.Objects;
/**
* @author bjorncs
*/
public class RoleAction {
private final String roleName;
private final String action;
public RoleAction(String roleName, String action) {
this.roleName = roleName;
this.action = action;
}
public String getRoleName() {
return roleName;
}
public String getAction() {
return action;
}
@Override
public String toString() {
return "RoleAction{" +
"roleName=" + roleName +
", action='" + action + '\'' +
'}';
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
RoleAction that = (RoleAction) o;
return Objects.equals(roleName, that.roleName) &&
Objects.equals(action, that.action);
}
@Override
public int hashCode() {
return Objects.hash(roleName, action);
}
}
|