summaryrefslogtreecommitdiffstats
path: root/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/api/IdentityDocument.java
blob: 8da2bd0a3431d47967e616efb9162c9da9b4363c (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
// 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.identityprovider.api;

import java.time.Instant;
import java.util.Set;

/**
 * The identity document that contains the instance specific information
 *
 * @author bjorncs
 */
public class IdentityDocument {
    private final VespaUniqueInstanceId providerUniqueId;
    private final String configServerHostname;
    private final String instanceHostname;
    private final Instant createdAt;
    private final Set<String> ipAddresses;

    public IdentityDocument(VespaUniqueInstanceId providerUniqueId,
                            String configServerHostname,
                            String instanceHostname,
                            Instant createdAt,
                            Set<String> ipAddresses) {
        this.providerUniqueId = providerUniqueId;
        this.configServerHostname = configServerHostname;
        this.instanceHostname = instanceHostname;
        this.createdAt = createdAt;
        this.ipAddresses = ipAddresses;
    }

    public VespaUniqueInstanceId providerUniqueId() {
        return providerUniqueId;
    }

    public String configServerHostname() {
        return configServerHostname;
    }

    public String instanceHostname() {
        return instanceHostname;
    }

    public Instant createdAt() {
        return createdAt;
    }

    public Set<String> ipAddresses() {
        return ipAddresses;
    }
}