blob: 7531eb6992dacde5ea201fd7c9ca2a26ce8906c2 (
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 Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.provision.lb;
import ai.vespa.validation.PatternedStringWrapper;
import java.util.regex.Pattern;
/**
* ID of a private endpoint service, such as AWS's PrivateLink, or GCP's Private Service Connect.
*
* @author jonmv
*/
public class PrivateServiceId extends PatternedStringWrapper<PrivateServiceId> {
static final Pattern pattern = Pattern.compile("[a-zA-Z0-9/._-]{1,255}");
private PrivateServiceId(String value) {
super(value, pattern, "Private service ID");
}
public static PrivateServiceId of(String value) {
return new PrivateServiceId(value);
}
}
|