blob: 547166a112a86d6f83fca0d2a153b27f9e2f5fc7 (
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.api.identifiers;
/**
* @author akvalsvik
*/
public class MetricsType extends SerializedIdentifier {
public MetricsType(String id) {
super(id);
}
@Override
public void validate() {
super.validate();
validateNoUpperCase();
}
public static void validate(String id) {
if (!(id.equals("deployment") || id.equals("proton"))) {
throwInvalidId(id, "MetricsType be \"deployment\" or \"proton\"");
}
}
}
|