/** * Returns the version in this snapshot for the given resource type. * * @param typeUrl the URL for the requested resource type */ public String version(String typeUrl) { if (Strings.isNullOrEmpty(typeUrl)) { return ""; } switch (typeUrl) { case CLUSTER_TYPE_URL: return clusters().version(); case ENDPOINT_TYPE_URL: return endpoints().version(); case LISTENER_TYPE_URL: return listeners().version(); case ROUTE_TYPE_URL: return routes().version(); case SECRET_TYPE_URL: return secrets().version(); default: return ""; } }