Skip to content

Commit

Permalink
Update response for table list (#352)
Browse files Browse the repository at this point in the history
* update response for table list

* Fixup! change user_id type
  • Loading branch information
imnutz authored Jul 19, 2024
1 parent 3e0e2c4 commit 125f90d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/main/java/com/treasuredata/client/model/TDTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public class TDTable
private final String expireDays;
private final String createdAt;
private final String updatedAt;
private final Integer userId;
private final String description;

@JsonCreator
public TDTable(
Expand All @@ -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") Integer userId,
@JsonProperty("description") String description
)
{
this.id = id;
Expand All @@ -62,6 +66,8 @@ public TDTable(
this.expireDays = expireDays;
this.createdAt = createdAt;
this.updatedAt = updatedAt;
this.userId = userId;
this.description = description;
}

public String getId()
Expand Down Expand Up @@ -126,6 +132,15 @@ public String getUpdatedAt()
return updatedAt;
}

public Integer getUserId()
{
return userId;
}

public String getDescription()
{
return description;
}
@Override
public boolean equals(Object obj)
{
Expand Down
2 changes: 2 additions & 0 deletions src/test/java/com/treasuredata/client/TestTDClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ public void listTables()
Set<TDTable> 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());
Expand Down

0 comments on commit 125f90d

Please sign in to comment.