blob: 4ef83760b5a7b9f8c7c5ed0b31c052b1c370fcfd (
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
50
51
52
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.athenz.client.zms.bindings;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* @author olaa
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class AssertionEntity {
private final String role;
private final String resource;
private final String action;
private final Long id;
public AssertionEntity(String role, String resource, String action) {
this(role, resource, action, null);
}
public AssertionEntity(@JsonProperty("role") String role,
@JsonProperty("resource") String resource,
@JsonProperty("action") String action,
@JsonProperty("id") Long id) {
this.role = role;
this.resource = resource;
this.action = action;
this.id = id;
}
public String getRole() {
return role;
}
public String getResource() {
return resource;
}
public String getAction() {
return action;
}
@JsonIgnore
public long getId() {
return id;
}
}
|