Skip to content

Commit 9b787c7

Browse files
committed
Add lifecycle_state and login_before_ready to agent response
1 parent 3b06d9f commit 9b787c7

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

src/main/kotlin/com/coder/gateway/sdk/v2/models/WorkspaceAgent.kt

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,30 @@ data class WorkspaceAgent(
2626
@SerializedName("latency") val derpLatency: Map<String, DERPRegion>?,
2727
@SerializedName("connection_timeout_seconds") val connectionTimeoutSeconds: Int,
2828
@SerializedName("troubleshooting_url") val troubleshootingURL: String,
29+
@SerializedName("lifecycle_state") val lifecycleState: WorkspaceAgentLifecycleState,
30+
@SerializedName("login_before_ready") val loginBeforeReady: Boolean?,
2931
)
3032

3133
enum class WorkspaceAgentStatus {
32-
@SerializedName("connecting")
33-
CONNECTING,
34-
35-
@SerializedName("connected")
36-
CONNECTED,
37-
38-
@SerializedName("disconnected")
39-
DISCONNECTED,
34+
@SerializedName("connecting") CONNECTING,
35+
@SerializedName("connected") CONNECTED,
36+
@SerializedName("disconnected") DISCONNECTED,
37+
@SerializedName("timeout") TIMEOUT
38+
}
4039

41-
@SerializedName("timeout")
42-
TIMEOUT
40+
enum class WorkspaceAgentLifecycleState {
41+
@SerializedName("created") CREATED,
42+
@SerializedName("starting") STARTING,
43+
@SerializedName("start_timeout") START_TIMEOUT,
44+
@SerializedName("start_error") START_ERROR,
45+
@SerializedName("ready") READY,
46+
@SerializedName("shutting_down") SHUTTING_DOWN,
47+
@SerializedName("shutdown_timeout") SHUTDOWN_TIMEOUT,
48+
@SerializedName("shutdown_error") SHUTDOWN_ERROR,
49+
@SerializedName("off") OFF,
4350
}
4451

4552
data class DERPRegion(
4653
@SerializedName("preferred") val preferred: Boolean,
47-
@SerializedName("latency_ms") val latencyMillis: Double
54+
@SerializedName("latency_ms") val latencyMillis: Double,
4855
)

0 commit comments

Comments
 (0)