aboutsummaryrefslogtreecommitdiffstats
path: root/security-utils/src/main/java/com/yahoo/security/tls/policy/PeerPolicy.java
blob: 332c0d1a43ff1ff165c56c858f2ec85b55724716 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.security.tls.policy;

import java.util.List;
import java.util.Optional;

/**
 * @author bjorncs
 */
public record PeerPolicy(String policyName, Optional<String> description, List<RequiredPeerCredential> requiredCredentials) {

    public PeerPolicy(String policyName, List<RequiredPeerCredential> requiredCredentials) {
        this(policyName, Optional.empty(), List.copyOf(requiredCredentials));
    }

    public PeerPolicy(String policyName, String description, List<RequiredPeerCredential> requiredCredentials) {
        this(policyName, Optional.ofNullable(description), List.copyOf(requiredCredentials));
    }
}