/** Returns a map of the methods on this resource. */
  public Map<String, RestMethod> getMethods() {
    if (resource.getMethods() == null) {
      return Collections.emptyMap();
    }

    return Maps.transformValues(
        resource.getMethods(),
        new Function<Restmethod, RestMethod>() {
          public RestMethod apply(Restmethod input) {
            return new RestMethod(topLevelSchemas, input);
          }
        });
  }