@SuppressWarnings("unchecked")
@Override
public <R extends HttpRequest> R bindToRequest(R request, Object input) {
checkArgument(input instanceof ResourceLimit, "this binder is only valid for ResourceLimit");
ResourceLimit limit = (ResourceLimit) input;
Builder<String, String> builder = ImmutableMultimap.<String, String> builder();
builder.put("resourcetype", limit.getResourceType().getCode() + "");
builder.put("account", limit.getAccount());
builder.put("domainid", limit.getDomainId());
builder.put("max", limit.getMax() + "");
return (R) request.toBuilder().replaceQueryParams(builder.build()).build();
}