// Copyright Yahoo. 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;

import java.util.Objects;
import java.util.regex.Pattern;

/**
 * Represents a cloud provider used in a hosted Vespa system.
 *
 * @author mpolden
 */
public class CloudName extends PatternedStringWrapper<CloudName> {

    private static final Pattern pattern = Pattern.compile("[a-z]([a-z0-9-]*[a-z0-9])*");
    public static final CloudName AWS = new CloudName("aws");
    public static final CloudName GCP = new CloudName("gcp");
    public static final CloudName DEFAULT = from("default");
    private static final CloudName defaultCloud = from("default");

    private CloudName(String cloud) {
        super(cloud, pattern, "cloud name");
    }

    public static CloudName defaultName() {
        return defaultCloud;
    }

    public static CloudName from(String cloud) {
        return new CloudName(cloud);
    }

}

@@ -536,29 +536,20 @@
 e AWS = 
-new CloudName
+from
 (%22aws%22);
@@ -589,29 +589,20 @@
 e GCP = 
-new CloudName
+from
 (%22gcp%22);
@@ -666,75 +666,8 @@
 t%22);
-%0A    private static final CloudName defaultCloud = from(%22default%22);
 %0A%0A  
@@ -758,88 +758,8 @@
  %7D%0A%0A
-    public static CloudName defaultName() %7B%0A        return defaultCloud;%0A    %7D%0A%0A
     

Remove defaultName