Update field address type to Href and update tests templates

This commit is contained in:
cpanato 2017-08-15 17:47:09 -03:00 committed by Andrea Turli
parent 7c58f9d77d
commit e153322ee0
4 changed files with 20 additions and 8 deletions

View File

@ -32,10 +32,10 @@ public abstract class Facility {
public abstract String code();
public abstract List<String> features();
@Nullable
public abstract String address();
public abstract Href address();
@SerializedNames({"id", "name", "code", "features", "address"})
public static Facility create(final String id, String name, String code, List<String> features, String address) {
public static Facility create(final String id, String name, String code, List<String> features, Href address) {
return new AutoValue_Facility(id, name, code,
features == null ? ImmutableList.<String> of() : ImmutableList.copyOf(features),
address);

View File

@ -8,7 +8,9 @@
"baremetal",
"storage"
],
"address": null
"address": {
"href": "e1e9c52e-a0bc-4117-b996-0fc94843ea09"
}
},
{
"id": "8e6470b3-b75e-47d1-bb93-45b225750975",
@ -17,7 +19,9 @@
"features": [
"storage"
],
"address": null
"address": {
"href": "e1e9c52e-a0bc-4117-b996-0fc94843ea09"
}
}
],
"meta": {

View File

@ -5,7 +5,9 @@
"name": "Sunnyvale, CA",
"code": "sjc1",
"features": [],
"address": null
"address": {
"href": "e1e9c52e-a0bc-4117-b996-0fc94843ea09"
}
}
],
"meta": {

View File

@ -8,7 +8,9 @@
"baremetal",
"storage"
],
"address": null
"address": {
"href": "e1e9c52e-a0bc-4117-b996-0fc94843ea09"
}
},
{
"id": "8e6470b3-b75e-47d1-bb93-45b225750975",
@ -17,14 +19,18 @@
"features": [
"storage"
],
"address": null
"address": {
"href": "e1e9c52e-a0bc-4117-b996-0fc94843ea09"
}
},
{
"id": "2b70eb8f-fa18-47c0-aba7-222a842362fd",
"name": "Sunnyvale, CA",
"code": "sjc1",
"features": [],
"address": null
"address": {
"href": "e1e9c52e-a0bc-4117-b996-0fc94843ea09"
}
}
]
}