jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds-labs] Profitbricks REST - Datacenter (#225)
Date Tue, 15 Dec 2015 21:30:33 GMT
> +@AutoValue
> +public abstract class DataCenters {
> +
> +   public abstract String id();
> +
> +   public abstract String type();
> +
> +   public abstract String href();
> +
> +   public abstract List<DataCenter> items();
> +
> +   @SerializedNames({"id", "type", "href", "items"})
> +   public static DataCenters create(String id, String type, String href, List<DataCenter>
items) {
> +      return new AutoValue_DataCenters(id, type, href, items == null ? ImmutableList.<DataCenter>of()
: copyOf(items));
> +   }
> +}

Do the id, type and href fields provide useful information? Can we get rid of this object
and let the API just "select" the items field and directly return lists of DataCenter objects?
It looks unnecessary to have this entity if the fields it adds provide no useful info.

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