diff --git a/src/main/java/com/google/genai/gaos/models/environments/CreateEnvironmentRequest.java b/src/main/java/com/google/genai/gaos/models/environments/CreateEnvironmentRequest.java
index 8c267ec599a..999ed96d48a 100644
--- a/src/main/java/com/google/genai/gaos/models/environments/CreateEnvironmentRequest.java
+++ b/src/main/java/com/google/genai/gaos/models/environments/CreateEnvironmentRequest.java
@@ -37,6 +37,15 @@
*
Request for `CreateEnvironment`.
*/
public class CreateEnvironmentRequest {
+ /**
+ * Optional. The source environment to copy/fork from.
+ * Format: `environments/{environment_id}` or `{environment_id}`.
+ * When specified, `sources` and `env` must be empty.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("from_environment")
+ private String fromEnvironment;
+
/**
* Network configuration for the environment.
*/
@@ -53,14 +62,25 @@ public class CreateEnvironmentRequest {
@JsonCreator
public CreateEnvironmentRequest(
+ @JsonProperty("from_environment") @Nullable String fromEnvironment,
@JsonProperty("network") @Nullable CreateEnvironmentRequestNetworkUnion network,
@JsonProperty("sources") @Nullable List sources) {
+ this.fromEnvironment = fromEnvironment;
this.network = network;
this.sources = sources;
}
public CreateEnvironmentRequest() {
- this(null, null);
+ this(null, null, null);
+ }
+
+ /**
+ * Optional. The source environment to copy/fork from.
+ * Format: `environments/{environment_id}` or `{environment_id}`.
+ * When specified, `sources` and `env` must be empty.
+ */
+ public Optional fromEnvironment() {
+ return Optional.ofNullable(this.fromEnvironment);
}
/**
@@ -82,6 +102,17 @@ public static Builder builder() {
}
+ /**
+ * Optional. The source environment to copy/fork from.
+ * Format: `environments/{environment_id}` or `{environment_id}`.
+ * When specified, `sources` and `env` must be empty.
+ */
+ public CreateEnvironmentRequest withFromEnvironment(@Nullable String fromEnvironment) {
+ this.fromEnvironment = fromEnvironment;
+ return this;
+ }
+
+
/**
* Network configuration for the environment.
*/
@@ -110,6 +141,7 @@ public boolean equals(java.lang.Object o) {
}
CreateEnvironmentRequest other = (CreateEnvironmentRequest) o;
return
+ Utils.enhancedDeepEquals(this.fromEnvironment, other.fromEnvironment) &&
Utils.enhancedDeepEquals(this.network, other.network) &&
Utils.enhancedDeepEquals(this.sources, other.sources);
}
@@ -117,12 +149,13 @@ public boolean equals(java.lang.Object o) {
@Override
public int hashCode() {
return Utils.enhancedHash(
- network, sources);
+ fromEnvironment, network, sources);
}
@Override
public String toString() {
return Utils.toString(CreateEnvironmentRequest.class,
+ "fromEnvironment", fromEnvironment,
"network", network,
"sources", sources);
}
@@ -130,6 +163,8 @@ public String toString() {
@SuppressWarnings("UnusedReturnValue")
public final static class Builder {
+ private String fromEnvironment;
+
private CreateEnvironmentRequestNetworkUnion network;
private List sources;
@@ -138,6 +173,16 @@ private Builder() {
// force use of static builder() method
}
+ /**
+ * Optional. The source environment to copy/fork from.
+ * Format: `environments/{environment_id}` or `{environment_id}`.
+ * When specified, `sources` and `env` must be empty.
+ */
+ public Builder fromEnvironment(@Nullable String fromEnvironment) {
+ this.fromEnvironment = fromEnvironment;
+ return this;
+ }
+
/**
* Network configuration for the environment.
*/
@@ -156,7 +201,7 @@ public Builder sources(@Nullable List sources) {
public CreateEnvironmentRequest build() {
return new CreateEnvironmentRequest(
- network, sources);
+ fromEnvironment, network, sources);
}
}
diff --git a/src/main/java/com/google/genai/gaos/models/interactions/FunctionResultDelta.java b/src/main/java/com/google/genai/gaos/models/interactions/FunctionResultDelta.java
index d81f5428903..b8988d1bbe5 100644
--- a/src/main/java/com/google/genai/gaos/models/interactions/FunctionResultDelta.java
+++ b/src/main/java/com/google/genai/gaos/models/interactions/FunctionResultDelta.java
@@ -35,12 +35,6 @@
public class FunctionResultDelta implements StepDeltaData {
- /**
- * Required. ID to match the ID from the function call block.
- */
- @JsonProperty("call_id")
- private String callId;
-
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("is_error")
@@ -61,12 +55,9 @@ public class FunctionResultDelta implements StepDeltaData {
@JsonCreator
public FunctionResultDelta(
- @JsonProperty("call_id") @Nonnull String callId,
@JsonProperty("is_error") @Nullable Boolean isError,
@JsonProperty("name") @Nullable String name,
@JsonProperty("result") @Nonnull FunctionResultDeltaResultUnion result) {
- this.callId = Optional.ofNullable(callId)
- .orElseThrow(() -> new IllegalArgumentException("callId cannot be null"));
this.isError = isError;
this.name = name;
this.result = Optional.ofNullable(result)
@@ -75,17 +66,8 @@ public FunctionResultDelta(
}
public FunctionResultDelta(
- @Nonnull String callId,
@Nonnull FunctionResultDeltaResultUnion result) {
- this(callId, null, null,
- result);
- }
-
- /**
- * Required. ID to match the ID from the function call block.
- */
- public Optional callId() {
- return Optional.ofNullable(this.callId);
+ this(null, null, result);
}
public Optional isError() {
@@ -110,15 +92,6 @@ public static Builder builder() {
}
- /**
- * Required. ID to match the ID from the function call block.
- */
- public FunctionResultDelta withCallId(@Nonnull String callId) {
- this.callId = Utils.checkNotNull(callId, "callId");
- return this;
- }
-
-
public FunctionResultDelta withIsError(@Nullable Boolean isError) {
this.isError = isError;
return this;
@@ -147,7 +120,6 @@ public boolean equals(java.lang.Object o) {
}
FunctionResultDelta other = (FunctionResultDelta) o;
return
- Utils.enhancedDeepEquals(this.callId, other.callId) &&
Utils.enhancedDeepEquals(this.isError, other.isError) &&
Utils.enhancedDeepEquals(this.name, other.name) &&
Utils.enhancedDeepEquals(this.result, other.result) &&
@@ -157,14 +129,13 @@ public boolean equals(java.lang.Object o) {
@Override
public int hashCode() {
return Utils.enhancedHash(
- callId, isError, name,
- result, type);
+ isError, name, result,
+ type);
}
@Override
public String toString() {
return Utils.toString(FunctionResultDelta.class,
- "callId", callId,
"isError", isError,
"name", name,
"result", result,
@@ -174,8 +145,6 @@ public String toString() {
@SuppressWarnings("UnusedReturnValue")
public final static class Builder {
- private String callId;
-
private Boolean isError;
private String name;
@@ -186,14 +155,6 @@ private Builder() {
// force use of static builder() method
}
- /**
- * Required. ID to match the ID from the function call block.
- */
- public Builder callId(@Nonnull String callId) {
- this.callId = Utils.checkNotNull(callId, "callId");
- return this;
- }
-
public Builder isError(@Nullable Boolean isError) {
this.isError = isError;
return this;
@@ -211,8 +172,7 @@ public Builder result(@Nonnull FunctionResultDeltaResultUnion result) {
public FunctionResultDelta build() {
return new FunctionResultDelta(
- callId, isError, name,
- result);
+ isError, name, result);
}
diff --git a/src/main/java/com/google/genai/gaos/models/triggers/Trigger.java b/src/main/java/com/google/genai/gaos/models/triggers/Trigger.java
index 465f32d85be..224e85f27f6 100644
--- a/src/main/java/com/google/genai/gaos/models/triggers/Trigger.java
+++ b/src/main/java/com/google/genai/gaos/models/triggers/Trigger.java
@@ -111,8 +111,8 @@ public class Trigger {
private OffsetDateTime lastRunTime;
/**
- * Optional. The maximum number of consecutive failures allowed before
- * the trigger is automatically paused (status becomes ERROR).
+ * Optional. The maximum number of consecutive failures allowed before the
+ * trigger is automatically paused (status becomes ERROR).
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("max_consecutive_failures")
@@ -133,8 +133,8 @@ public class Trigger {
private String previousInteractionId;
/**
- * Required. The cron schedule on which the trigger should run.
- * Standard cron format.
+ * Required. The cron schedule on which the trigger should run. Standard cron
+ * format.
*/
@JsonProperty("schedule")
private String schedule;
@@ -288,8 +288,8 @@ public Optional lastRunTime() {
}
/**
- * Optional. The maximum number of consecutive failures allowed before
- * the trigger is automatically paused (status becomes ERROR).
+ * Optional. The maximum number of consecutive failures allowed before the
+ * trigger is automatically paused (status becomes ERROR).
*/
public Optional maxConsecutiveFailures() {
return Optional.ofNullable(this.maxConsecutiveFailures);
@@ -310,8 +310,8 @@ public Optional previousInteractionId() {
}
/**
- * Required. The cron schedule on which the trigger should run.
- * Standard cron format.
+ * Required. The cron schedule on which the trigger should run. Standard cron
+ * format.
*/
public Optional schedule() {
return Optional.ofNullable(this.schedule);
@@ -437,8 +437,8 @@ public Trigger withLastRunTime(@Nullable OffsetDateTime lastRunTime) {
/**
- * Optional. The maximum number of consecutive failures allowed before
- * the trigger is automatically paused (status becomes ERROR).
+ * Optional. The maximum number of consecutive failures allowed before the
+ * trigger is automatically paused (status becomes ERROR).
*/
public Trigger withMaxConsecutiveFailures(@Nullable Integer maxConsecutiveFailures) {
this.maxConsecutiveFailures = maxConsecutiveFailures;
@@ -465,8 +465,8 @@ public Trigger withPreviousInteractionId(@Nullable String previousInteractionId)
/**
- * Required. The cron schedule on which the trigger should run.
- * Standard cron format.
+ * Required. The cron schedule on which the trigger should run. Standard cron
+ * format.
*/
public Trigger withSchedule(@Nonnull String schedule) {
this.schedule = Utils.checkNotNull(schedule, "schedule");
@@ -688,8 +688,8 @@ public Builder lastRunTime(@Nullable OffsetDateTime lastRunTime) {
}
/**
- * Optional. The maximum number of consecutive failures allowed before
- * the trigger is automatically paused (status becomes ERROR).
+ * Optional. The maximum number of consecutive failures allowed before the
+ * trigger is automatically paused (status becomes ERROR).
*/
public Builder maxConsecutiveFailures(@Nullable Integer maxConsecutiveFailures) {
this.maxConsecutiveFailures = maxConsecutiveFailures;
@@ -713,8 +713,8 @@ public Builder previousInteractionId(@Nullable String previousInteractionId) {
}
/**
- * Required. The cron schedule on which the trigger should run.
- * Standard cron format.
+ * Required. The cron schedule on which the trigger should run. Standard cron
+ * format.
*/
public Builder schedule(@Nonnull String schedule) {
this.schedule = Utils.checkNotNull(schedule, "schedule");