> + */
> +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"

Just to be more complete, the `@SerializedName` annotation is used for both 
serialization and deserialization, but that would require a default 
constructor. As we have an immutable model and have a constructor that requires 
all the parameters, we need to somehow tell Gson how to map the fields in the 
JSON object to the arguments of the constructor, and that is what jclouds does 
with the `@ConstructorProperties` annotation and the strategy mentioned in the 
previous comment.

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

Reply via email to