> + */ > +package org.jclouds.openstack.neutron.v2.domain; > + > +import com.google.common.base.Objects; > +import com.google.gson.annotations.SerializedName; > + > +/** > + */ > +public class AddressPair { > + > + @SerializedName("mac_address") > + protected final String macAddress; > + @SerializedName("ip_address") > + protected final String ipAddress; > + > + protected AddressPair(String macAddress, String ipAddress) {
When deserializing, as there is no default constructor, we need to give gson some hints about which values have to be passed to each constructor argument. This is done with the `@ConstructorProperties` annotation. What I tried to say is that, even if the AddressPair class is not being used in deserialization (because it is an entity that might not be returned by the provider API), I'd rather add the annotation to the constructor, to complete the deserialization "configuration". Having the fields annotated is not enough if there is no default constructor. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/111/files#r14193425