private static ApplicationClusterEndpoint.RoutingMethod routingMethodFrom(String s) {
        return switch (s) {
            case "shared" -> ApplicationClusterEndpoint.RoutingMethod.shared;
            case "sharedLayer4" -> ApplicationClusterEndpoint.RoutingMethod.sharedLayer4;
            case "exclusive" -> ApplicationClusterEndpoint.RoutingMethod.exclusive;
            default -> throw new IllegalArgumentException("Unknown routing method '" + 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