From 1dc99ea3b10575b19461eea2dbbafa2c3d93799e Mon Sep 17 00:00:00 2001 From: Son Do Date: Wed, 17 Jul 2024 08:18:43 +0700 Subject: [PATCH 1/2] update response for table list --- .../com/treasuredata/client/model/TDTable.java | 17 ++++++++++++++++- .../com/treasuredata/client/TestTDClient.java | 2 ++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/treasuredata/client/model/TDTable.java b/src/main/java/com/treasuredata/client/model/TDTable.java index e18005d6..036c3395 100644 --- a/src/main/java/com/treasuredata/client/model/TDTable.java +++ b/src/main/java/com/treasuredata/client/model/TDTable.java @@ -37,6 +37,8 @@ public class TDTable private final String expireDays; private final String createdAt; private final String updatedAt; + private final long userId; + private final String description; @JsonCreator public TDTable( @@ -49,7 +51,9 @@ public TDTable( @JsonProperty("last_log_timestamp") String lastLogTimeStamp, @JsonProperty("expire_days") String expireDays, @JsonProperty("created_at") String createdAt, - @JsonProperty("updated_at") String updatedAt + @JsonProperty("updated_at") String updatedAt, + @JsonProperty("user_id") long userId, + @JsonProperty("description") String description ) { this.id = id; @@ -62,6 +66,8 @@ public TDTable( this.expireDays = expireDays; this.createdAt = createdAt; this.updatedAt = updatedAt; + this.userId = userId; + this.description = description; } public String getId() @@ -126,6 +132,15 @@ public String getUpdatedAt() return updatedAt; } + public long getUserId() + { + return userId; + } + + public String getDescription() + { + return description; + } @Override public boolean equals(Object obj) { diff --git a/src/test/java/com/treasuredata/client/TestTDClient.java b/src/test/java/com/treasuredata/client/TestTDClient.java index 241a9c1e..c1b85888 100644 --- a/src/test/java/com/treasuredata/client/TestTDClient.java +++ b/src/test/java/com/treasuredata/client/TestTDClient.java @@ -262,6 +262,8 @@ public void listTables() Set tableSet = new HashSet<>(); for (final TDTable t : tableList) { logger.info("id: " + t.getId()); + logger.info("user id:" + t.getUserId()); + logger.info("description: " + t.getDescription()); logger.info("type: " + t.getType()); logger.info("estimated size:" + t.getEstimatedStorageSize()); logger.info("last log timestamp: " + t.getLastLogTimeStamp()); From daa143f70a084a0adfa61682fbaa4cd2a742c701 Mon Sep 17 00:00:00 2001 From: Son Do Date: Thu, 18 Jul 2024 09:50:00 +0700 Subject: [PATCH 2/2] Fixup! change user_id type --- src/main/java/com/treasuredata/client/model/TDTable.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/treasuredata/client/model/TDTable.java b/src/main/java/com/treasuredata/client/model/TDTable.java index 036c3395..68945182 100644 --- a/src/main/java/com/treasuredata/client/model/TDTable.java +++ b/src/main/java/com/treasuredata/client/model/TDTable.java @@ -37,7 +37,7 @@ public class TDTable private final String expireDays; private final String createdAt; private final String updatedAt; - private final long userId; + private final Integer userId; private final String description; @JsonCreator @@ -52,7 +52,7 @@ public TDTable( @JsonProperty("expire_days") String expireDays, @JsonProperty("created_at") String createdAt, @JsonProperty("updated_at") String updatedAt, - @JsonProperty("user_id") long userId, + @JsonProperty("user_id") Integer userId, @JsonProperty("description") String description ) { @@ -132,7 +132,7 @@ public String getUpdatedAt() return updatedAt; } - public long getUserId() + public Integer getUserId() { return userId; }