aboutsummaryrefslogtreecommitdiffstats
path: root/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/security/TenantSpec.java
blob: 9ad2254bf93ccaea6f248ff842571ab230d846e5 (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.security;

import com.yahoo.config.provision.TenantName;
import com.yahoo.vespa.hosted.controller.tenant.Tenant;

import static java.util.Objects.requireNonNull;

/**
 * A specification of a tenant, typically to create or modify one.
 *
 * @author jonmv
 */
public abstract class TenantSpec {

    private final TenantName tenant;

    protected TenantSpec(TenantName tenant) {
        this.tenant = Tenant.requireName(requireNonNull(tenant));
    }

    /** The name of the tenant. */
    public TenantName tenant() { return tenant; }

}