Skip to content

Commit b9feeed

Browse files
committed
fix: add label object to handle correct resource group response parsing
1 parent ac4744d commit b9feeed

File tree

1 file changed

+27
-3
lines changed
  • com.developer.nefarious.zjoule.plugin/src/com/developer/nefarious/zjoule/plugin/models

1 file changed

+27
-3
lines changed

com.developer.nefarious.zjoule.plugin/src/com/developer/nefarious/zjoule/plugin/models/ResourceGroup.java

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class ResourceGroup {
2121

2222
/** A list of labels associated with the resource group. */
2323
@SerializedName("labels")
24-
private List<String> labels;
24+
private List<Label> labels;
2525

2626
/** The unique identifier of the resource group. */
2727
@SerializedName("resourceGroupId")
@@ -66,7 +66,7 @@ public void setCreatedAt(final String createdAt) {
6666
*
6767
* @return a {@link List} of labels as {@link String}.
6868
*/
69-
public List<String> getLabels() {
69+
public List<Label> getLabels() {
7070
return labels;
7171
}
7272

@@ -75,7 +75,7 @@ public List<String> getLabels() {
7575
*
7676
* @param labels a {@link List} of labels to set.
7777
*/
78-
public void setLabels(final List<String> labels) {
78+
public void setLabels(final List<Label> labels) {
7979
this.labels = labels;
8080
}
8181

@@ -169,3 +169,27 @@ public void setZoneId(final String zoneId) {
169169
this.zoneId = zoneId;
170170
}
171171
}
172+
173+
class Label {
174+
175+
private String key;
176+
177+
private String value;
178+
179+
public String getKey() {
180+
return key;
181+
}
182+
183+
public void setKey(final String key) {
184+
this.key = key;
185+
}
186+
187+
public String getValue() {
188+
return value;
189+
}
190+
191+
public void setValue(final String value) {
192+
this.value = value;
193+
}
194+
195+
}

0 commit comments

Comments
 (0)