summaryrefslogtreecommitdiffstats
path: root/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/client/zms/bindings/PolicyEntity.java
blob: 4be82daee432bf39c0c711a925179e39e8c440ca (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
// 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.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

/**
 * @author olaa
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class PolicyEntity {

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private final List<AssertionEntity> assertions;
    private final String name;

    public PolicyEntity(@JsonProperty("name") String name,
                        @JsonProperty("assertions") List<AssertionEntity> assertions) {
        this.name = name;
        this.assertions = assertions;
    }

    public String getName() {
        return name;
    }

    public List<AssertionEntity> getAssertions() {
        return assertions;
    }
}