> +import org.jclouds.json.SerializedNames;
> +
> +import com.google.auto.value.AutoValue;
> +
> +/**
> + * Representation of an OpenStack Poppy Caching Rule.
> + */
> +@AutoValue
> +public abstract class Caching {
> +   public abstract String getName();
> +   public abstract int getTtl();
> +   @Nullable public abstract List<CachingRule> getRules();
> +
> +   @SerializedNames({ "name", "ttl", "rules" })
> +   private static Caching create(String name, int ttl, List<CachingRule> 
> rules) {
> +      return builder().name(name).ttl(ttl).rules(rules).build();

To enforce immutability also in lists use `ImmutableList.copyOf` when the list 
is not null.

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

Reply via email to