> +
> +/**
> + * Encapsulates data related to DynECT HTTP redirect service.
> + */
> +public class HttpRedirect extends ForwardingMap<String, Object> {
> +   private final String url;
> +   private final int code;
> +   private final String keepUri;
> +   private final String fqdn;
> +   private final String zone;
> +
> +   @ConstructorProperties({ "url", "code", "keep_uri", "fqdn", "zone" })
> +   private HttpRedirect(String url, int code, String keepUri, String fqdn, 
> String zone) {
> +      this.url = checkNotNull(url, "url");
> +      checkArgument(code == 301 || code == 302, "code of %s must be 301 or 
> 302", code);
> +      checkArgument("Y".equals(keepUri) || "N".equals(keepUri), "code of %s 
> must be 'Y' or 'N'", keepUri);

We should send upper case to the API, but I'll robustify the input checking here

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/37/files#r4952479

Reply via email to