jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zack Shoylev <notificati...@github.com>
Subject Re: [jclouds-labs-openstack] Poppy service api (#179)
Date Fri, 06 Mar 2015 22:47:26 GMT
> +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();

The reason I left it here as is: this only gets called by GSON when deserializing (afaik).
Thoughts on the trade-off? Probably just safer to change it to copy.

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