blob: 4b37c4f4c63e2a22c5ea5a73cf43d7e5e40b1104 (
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
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config.provision;
import ai.vespa.validation.PatternedStringWrapper;
/**
* Represents a tenant in the provision API.
*
* @author Ulf Lilleengen
*/
public class TenantName extends PatternedStringWrapper<TenantName> {
private static final TenantName defaultName = new TenantName("default");
private TenantName(String name) {
super(name, ApplicationId.namePattern, "tenant name");
}
public static TenantName from(String name) {
return new TenantName(name);
}
public static TenantName defaultName() {
return defaultName;
}
public boolean isDefault() {
return equals(defaultName);
}
}
|