> + */
> +package org.jclouds.openstack.nova.v2_0.domain.zonescoped;
> +
> +import com.google.common.base.Objects;
> +import java.beans.ConstructorProperties;
> +
> +/**
> + * @author Inbar Stolberg
> + */
> +public class AvailabilityZone {
> +
> +   private final String name;
> +   private final ZoneState zoneState;
> +
> +   @ConstructorProperties({
> +         "zoneName" , "zoneState"

> what is the sentence regarding the @ConstructorProperties ?

As far as I understand the responses from Everett and Ignasi, we can either:

* use the JSON field names (zoneName and zoneState, I guess) as the constructor 
property names and then drop the annotation **or**
* use "nice" constructor property names (name and state) and keep the 
annotation as-is to help the deserializer. Not sure if that blows up GSON 
because the getters and setters would then be `getName` and `getState` rather 
than `getZoneName` and `getZoneState`

I'm wondering whether there's a third option

* use the JSON field names as constructor property names but use "nice" names 
for the instance variables. This would suffer from the same problem as option 2 
above

The latter option would be my preferred choice, if it works, otherwise we're 
left with option 1.

@nacx Any comment on that? And thanks to you and @everett-toews for explaining 
- learned something new again today!

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

Reply via email to