|
5 | 5 | package io.modelcontextprotocol.spec; |
6 | 6 |
|
7 | 7 | import java.io.IOException; |
8 | | -import java.util.ArrayList; |
9 | | -import java.util.Arrays; |
10 | | -import java.util.HashMap; |
11 | | -import java.util.List; |
12 | | -import java.util.Map; |
| 8 | +import java.util.*; |
13 | 9 |
|
14 | 10 | import com.fasterxml.jackson.annotation.JsonCreator; |
15 | 11 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
@@ -1692,13 +1688,17 @@ public record Task( //@formatter:off |
1692 | 1688 | @JsonProperty("status") String status, |
1693 | 1689 | @JsonProperty("statusMessage") String statusMessage, |
1694 | 1690 | @JsonProperty("createdAt") String createdAt, |
1695 | | - @JsonProperty("ttl") long ttl, |
1696 | | - @JsonProperty("pollInterval") long pollInterval, |
| 1691 | + @JsonProperty("ttl") Long ttl, |
| 1692 | + @JsonProperty("pollInterval") Long pollInterval, |
1697 | 1693 | @JsonProperty("extensions") Object extensions, |
1698 | 1694 | @JsonProperty("bizContext") Object bizContext) { // @formatter:on |
1699 | 1695 |
|
1700 | | - public Task(String taskId, String status, String statusMessage, String createdAt, long ttl) { |
1701 | | - this(taskId, status, statusMessage, createdAt, ttl, 0L, null, null); |
| 1696 | + public Task(String taskId, String status, String statusMessage, String createdAt) { |
| 1697 | + this(taskId, status, statusMessage, createdAt, null, null, null, null); |
| 1698 | + } |
| 1699 | + |
| 1700 | + public Task(String taskId, String status, String statusMessage, String createdAt, Long ttl, Long pollInterval) { |
| 1701 | + this(taskId, status, statusMessage, createdAt, ttl, pollInterval, null, null); |
1702 | 1702 | } |
1703 | 1703 |
|
1704 | 1704 | public static Builder builder() { |
|
0 commit comments