diff --git a/kubernetes/src/main/java/io/kubernetes/client/custom/IntOrString.java b/kubernetes/src/main/java/io/kubernetes/client/custom/IntOrString.java index 0c72287bd2..6acd23e1d5 100644 --- a/kubernetes/src/main/java/io/kubernetes/client/custom/IntOrString.java +++ b/kubernetes/src/main/java/io/kubernetes/client/custom/IntOrString.java @@ -44,6 +44,11 @@ public Integer getIntValue() { return intValue; } + @Override + public String toString() { + return (isInt ? String.valueOf(intValue) : strValue); + } + public static class IntOrStringAdapter extends TypeAdapter { @Override public void write(JsonWriter jsonWriter, IntOrString intOrString) throws IOException {