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

Nice property names can be used without problem. The only thing to take into 
account is that you need to tell Gson how to deserialize and serialize 
(although it might not be needed here I'd also configure that, to make the 
whole thing consistent) the entity into a JSON object. The first is done with 
the `@ConstructorProperties` annotation, and the latter with the 
`@SerializedName` one.

You could have something like:

```java
public class AvailabilityZone {
   @SerializedName("zoneName")
   private final String name;
   private final ZoneState zoneState;

   @ConstructorProperties({"zoneName" , "zoneState"})
   protected AvailabilityZone(String name, ZoneState zoneState) {
      ...
   }

   public String getName() {
      return name;
   }
```
And keep the nice property names and getter/setters.

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

Reply via email to