private static ApplicationClusterEndpoint.Scope scopeFrom(String s) {
        return switch (s) {
            case "global" -> ApplicationClusterEndpoint.Scope.global;
            case "application" -> ApplicationClusterEndpoint.Scope.application;
            case "zone" -> ApplicationClusterEndpoint.Scope.zone;
            default -> throw new IllegalArgumentException("Unknown scope '" + s + "'");
        };
    }
Contains all methods for de-/serializing ContainerEndpoints to/from JSON.
Also supports de-/serializing lists of these values.

@author ogronnesby
configserver/src/main/java/com/yahoo/vespa/config/server/tenant/ContainerEndpointSerializer.java