code: public static MonitoredResource of(String type, Map<String, String> labels) {
      return newBuilder(type).setLabels(labels).build();
    }
docs: Creates a {@code MonitoredResource} object given the resource's type and labels.