> +            .template(template)
> +            .templateUrl(templateUrl)
> +            .parameters(parameters)
> +            .disableRollback(disableRollback)
> +            .files(files)
> +            .environment(environment).build();
> +   }
> +
> +   public static final class Builder {
> +
> +      private String name;
> +      private String template;
> +      private String templateUrl;
> +      private Map<String, Object> parameters = new 
> ImmutableMap.Builder<String, Object>().build();
> +      private boolean disableRollback = true;
> +      private Map<String, String> files =  new ImmutableMap.Builder<String, 
> String>().build();

@nacx, I like the approach you are suggesting, but I don't think it's 
consistent with how we handle collections in other places. We usually 
completely override the existing collection, instead of adding more elements.
For example, here, parameetrs and files should not be initialized at all 
(because they are nullable, and will be skipped when json is generated). Just 
keep them as  private Map<String, Object> parameters;
The builder build() already checks for null values and copies the map if needed.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/188/files#r28991929

Reply via email to