diff --git a/src/main/java/com/google/genai/gaos/models/agents/AgentListResponse.java b/src/main/java/com/google/genai/gaos/models/agents/AgentListResponse.java index de078c36e77a..1aa33c3398ec 100644 --- a/src/main/java/com/google/genai/gaos/models/agents/AgentListResponse.java +++ b/src/main/java/com/google/genai/gaos/models/agents/AgentListResponse.java @@ -32,12 +32,16 @@ public class AgentListResponse { - + /** + * The list of agents. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("agents") private List agents; - + /** + * A token to retrieve the next page of results. + */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("next_page_token") private String nextPageToken; @@ -54,10 +58,16 @@ public AgentListResponse() { this(null, null); } + /** + * The list of agents. + */ public Optional> agents() { return Optional.ofNullable(this.agents); } + /** + * A token to retrieve the next page of results. + */ public Optional nextPageToken() { return Optional.ofNullable(this.nextPageToken); } @@ -67,12 +77,18 @@ public static Builder builder() { } + /** + * The list of agents. + */ public AgentListResponse withAgents(@Nullable List agents) { this.agents = agents; return this; } + /** + * A token to retrieve the next page of results. + */ public AgentListResponse withNextPageToken(@Nullable String nextPageToken) { this.nextPageToken = nextPageToken; return this; @@ -117,11 +133,17 @@ private Builder() { // force use of static builder() method } + /** + * The list of agents. + */ public Builder agents(@Nullable List agents) { this.agents = agents; return this; } + /** + * A token to retrieve the next page of results. + */ public Builder nextPageToken(@Nullable String nextPageToken) { this.nextPageToken = nextPageToken; return this; diff --git a/src/main/java/com/google/genai/gaos/models/interactions/Env.java b/src/main/java/com/google/genai/gaos/models/interactions/Env.java index d4a696a88e19..07b880cea0f8 100644 --- a/src/main/java/com/google/genai/gaos/models/interactions/Env.java +++ b/src/main/java/com/google/genai/gaos/models/interactions/Env.java @@ -49,39 +49,39 @@ private Env(TypedObject value) { this.value = value; } - public static Env of(Map value) { + public static Env of(EnvVar value) { Utils.checkNotNull(value, "value"); - return new Env(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference>(){})); + return new Env(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); } - public static Env of(String value) { + public static Env of(Map value) { Utils.checkNotNull(value, "value"); - return new Env(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + return new Env(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference>(){})); } /** - * Returns an {@link Optional} containing the value if it is of type {@code Map}, + * Returns an {@link Optional} containing the value if it is of type {@code EnvVar}, * otherwise returns an empty {@link Optional}. * - * @return an {@link Optional} containing the {@code Map} value, or empty if not of this type + * @return an {@link Optional} containing the {@code EnvVar} value, or empty if not of this type */ - @SuppressWarnings("unchecked") - public Optional> mapOfEnvVar() { - if (value.value() instanceof Map) { - return Optional.of((Map) value.value()); + public Optional envVar() { + if (value.value() instanceof EnvVar) { + return Optional.of((EnvVar) value.value()); } return Optional.empty(); } /** - * Returns an {@link Optional} containing the value if it is of type {@code String}, + * Returns an {@link Optional} containing the value if it is of type {@code Map}, * otherwise returns an empty {@link Optional}. * - * @return an {@link Optional} containing the {@code String} value, or empty if not of this type + * @return an {@link Optional} containing the {@code Map} value, or empty if not of this type */ - public Optional string() { - if (value.value() instanceof String) { - return Optional.of((String) value.value()); + @SuppressWarnings("unchecked") + public Optional> mapOfEnvVar() { + if (value.value() instanceof Map) { + return Optional.of((Map) value.value()); } return Optional.empty(); } @@ -120,8 +120,8 @@ public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { super(Env.class, false, - TypeReferenceWithShape.of(new TypeReference>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference>() {}, JsonShape.DEFAULT)); } }