diff --git a/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/AgentEngineConfig.java b/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/AgentEngineConfig.java index 57c7d49..2dfd48a 100644 --- a/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/AgentEngineConfig.java +++ b/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/AgentEngineConfig.java @@ -228,6 +228,14 @@ public abstract class AgentEngineConfig extends JsonSerializable { @JsonProperty("agentConfigSource") public abstract Optional agentConfigSource(); + /** + * Optional. Specifies the configuration for keep-alive probe. Contains configuration on a + * specified endpoint that a deployment host should use to keep the container alive based on the + * probe settings. + */ + @JsonProperty("keepAliveProbe") + public abstract Optional keepAliveProbe(); + /** The container spec for the Agent Engine. */ @JsonProperty("containerSpec") public abstract Optional containerSpec(); @@ -1021,6 +1029,38 @@ public Builder clearAgentConfigSource() { return agentConfigSource(Optional.empty()); } + /** + * Setter for keepAliveProbe. + * + *

keepAliveProbe: Optional. Specifies the configuration for keep-alive probe. Contains + * configuration on a specified endpoint that a deployment host should use to keep the container + * alive based on the probe settings. + */ + @JsonProperty("keepAliveProbe") + public abstract Builder keepAliveProbe(KeepAliveProbe keepAliveProbe); + + /** + * Setter for keepAliveProbe builder. + * + *

keepAliveProbe: Optional. Specifies the configuration for keep-alive probe. Contains + * configuration on a specified endpoint that a deployment host should use to keep the container + * alive based on the probe settings. + */ + @CanIgnoreReturnValue + public Builder keepAliveProbe(KeepAliveProbe.Builder keepAliveProbeBuilder) { + return keepAliveProbe(keepAliveProbeBuilder.build()); + } + + @ExcludeFromGeneratedCoverageReport + abstract Builder keepAliveProbe(Optional keepAliveProbe); + + /** Clears the value of keepAliveProbe field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearKeepAliveProbe() { + return keepAliveProbe(Optional.empty()); + } + /** * Setter for containerSpec. * diff --git a/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/CreateAgentEngineConfig.java b/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/CreateAgentEngineConfig.java index 6c09f6d..ebd3217 100644 --- a/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/CreateAgentEngineConfig.java +++ b/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/CreateAgentEngineConfig.java @@ -173,6 +173,14 @@ public abstract class CreateAgentEngineConfig extends JsonSerializable { @JsonProperty("buildOptions") public abstract Optional>> buildOptions(); + /** + * Optional. Specifies the configuration for keep-alive probe. Contains configuration on a + * specified endpoint that a deployment host should use to keep the container alive based on the + * probe settings. + */ + @JsonProperty("keepAliveProbe") + public abstract Optional keepAliveProbe(); + /** Instantiates a builder for CreateAgentEngineConfig. */ @ExcludeFromGeneratedCoverageReport public static Builder builder() { @@ -727,6 +735,38 @@ public Builder clearBuildOptions() { return buildOptions(Optional.empty()); } + /** + * Setter for keepAliveProbe. + * + *

keepAliveProbe: Optional. Specifies the configuration for keep-alive probe. Contains + * configuration on a specified endpoint that a deployment host should use to keep the container + * alive based on the probe settings. + */ + @JsonProperty("keepAliveProbe") + public abstract Builder keepAliveProbe(KeepAliveProbe keepAliveProbe); + + /** + * Setter for keepAliveProbe builder. + * + *

keepAliveProbe: Optional. Specifies the configuration for keep-alive probe. Contains + * configuration on a specified endpoint that a deployment host should use to keep the container + * alive based on the probe settings. + */ + @CanIgnoreReturnValue + public Builder keepAliveProbe(KeepAliveProbe.Builder keepAliveProbeBuilder) { + return keepAliveProbe(keepAliveProbeBuilder.build()); + } + + @ExcludeFromGeneratedCoverageReport + abstract Builder keepAliveProbe(Optional keepAliveProbe); + + /** Clears the value of keepAliveProbe field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearKeepAliveProbe() { + return keepAliveProbe(Optional.empty()); + } + public abstract CreateAgentEngineConfig build(); } diff --git a/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/KeepAliveProbe.java b/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/KeepAliveProbe.java new file mode 100644 index 0000000..3aeb3e0 --- /dev/null +++ b/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/KeepAliveProbe.java @@ -0,0 +1,120 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Auto-generated code. Do not edit. + +package com.google.cloud.vertexai.genai.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.google.auto.value.AutoValue; +import com.google.errorprone.annotations.CanIgnoreReturnValue; +import com.google.genai.JsonSerializable; +import java.util.Optional; + +/** + * Represents the configuration for keep-alive probe. Contains configuration on a specified endpoint + * that a deployment host should use to keep the container alive based on the probe settings. + */ +@AutoValue +@JsonDeserialize(builder = KeepAliveProbe.Builder.class) +public abstract class KeepAliveProbe extends JsonSerializable { + /** Optional. Specifies the HTTP GET configuration for the probe. */ + @JsonProperty("httpGet") + public abstract Optional httpGet(); + + /** + * Optional. Specifies the maximum duration (in seconds) to keep the instance alive via this + * probe. Can be a maximum of 3600 seconds (1 hour). + */ + @JsonProperty("maxSeconds") + public abstract Optional maxSeconds(); + + /** Instantiates a builder for KeepAliveProbe. */ + @ExcludeFromGeneratedCoverageReport + public static Builder builder() { + return new AutoValue_KeepAliveProbe.Builder(); + } + + /** Creates a builder with the same values as this instance. */ + public abstract Builder toBuilder(); + + /** Builder for KeepAliveProbe. */ + @AutoValue.Builder + public abstract static class Builder { + /** For internal usage. Please use `KeepAliveProbe.builder()` for instantiation. */ + @JsonCreator + private static Builder create() { + return new AutoValue_KeepAliveProbe.Builder(); + } + + /** + * Setter for httpGet. + * + *

httpGet: Optional. Specifies the HTTP GET configuration for the probe. + */ + @JsonProperty("httpGet") + public abstract Builder httpGet(KeepAliveProbeHttpGet httpGet); + + /** + * Setter for httpGet builder. + * + *

httpGet: Optional. Specifies the HTTP GET configuration for the probe. + */ + @CanIgnoreReturnValue + public Builder httpGet(KeepAliveProbeHttpGet.Builder httpGetBuilder) { + return httpGet(httpGetBuilder.build()); + } + + @ExcludeFromGeneratedCoverageReport + abstract Builder httpGet(Optional httpGet); + + /** Clears the value of httpGet field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearHttpGet() { + return httpGet(Optional.empty()); + } + + /** + * Setter for maxSeconds. + * + *

maxSeconds: Optional. Specifies the maximum duration (in seconds) to keep the instance + * alive via this probe. Can be a maximum of 3600 seconds (1 hour). + */ + @JsonProperty("maxSeconds") + public abstract Builder maxSeconds(Integer maxSeconds); + + @ExcludeFromGeneratedCoverageReport + abstract Builder maxSeconds(Optional maxSeconds); + + /** Clears the value of maxSeconds field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearMaxSeconds() { + return maxSeconds(Optional.empty()); + } + + public abstract KeepAliveProbe build(); + } + + /** Deserializes a JSON string to a KeepAliveProbe object. */ + @ExcludeFromGeneratedCoverageReport + public static KeepAliveProbe fromJson(String jsonString) { + return JsonSerializable.fromJsonString(jsonString, KeepAliveProbe.class); + } +} diff --git a/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/KeepAliveProbeHttpGet.java b/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/KeepAliveProbeHttpGet.java new file mode 100644 index 0000000..256a5d6 --- /dev/null +++ b/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/KeepAliveProbeHttpGet.java @@ -0,0 +1,103 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Auto-generated code. Do not edit. + +package com.google.cloud.vertexai.genai.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.google.auto.value.AutoValue; +import com.google.errorprone.annotations.CanIgnoreReturnValue; +import com.google.genai.JsonSerializable; +import java.util.Optional; + +/** Specifies the HTTP GET configuration for the probe. */ +@AutoValue +@JsonDeserialize(builder = KeepAliveProbeHttpGet.Builder.class) +public abstract class KeepAliveProbeHttpGet extends JsonSerializable { + /** Required. Specifies the path of the HTTP GET request (e.g., "/is_busy"). */ + @JsonProperty("path") + public abstract Optional path(); + + /** Optional. Specifies the port number on the container to which the request is sent. */ + @JsonProperty("port") + public abstract Optional port(); + + /** Instantiates a builder for KeepAliveProbeHttpGet. */ + @ExcludeFromGeneratedCoverageReport + public static Builder builder() { + return new AutoValue_KeepAliveProbeHttpGet.Builder(); + } + + /** Creates a builder with the same values as this instance. */ + public abstract Builder toBuilder(); + + /** Builder for KeepAliveProbeHttpGet. */ + @AutoValue.Builder + public abstract static class Builder { + /** For internal usage. Please use `KeepAliveProbeHttpGet.builder()` for instantiation. */ + @JsonCreator + private static Builder create() { + return new AutoValue_KeepAliveProbeHttpGet.Builder(); + } + + /** + * Setter for path. + * + *

path: Required. Specifies the path of the HTTP GET request (e.g., "/is_busy"). + */ + @JsonProperty("path") + public abstract Builder path(String path); + + @ExcludeFromGeneratedCoverageReport + abstract Builder path(Optional path); + + /** Clears the value of path field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearPath() { + return path(Optional.empty()); + } + + /** + * Setter for port. + * + *

port: Optional. Specifies the port number on the container to which the request is sent. + */ + @JsonProperty("port") + public abstract Builder port(Integer port); + + @ExcludeFromGeneratedCoverageReport + abstract Builder port(Optional port); + + /** Clears the value of port field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearPort() { + return port(Optional.empty()); + } + + public abstract KeepAliveProbeHttpGet build(); + } + + /** Deserializes a JSON string to a KeepAliveProbeHttpGet object. */ + @ExcludeFromGeneratedCoverageReport + public static KeepAliveProbeHttpGet fromJson(String jsonString) { + return JsonSerializable.fromJsonString(jsonString, KeepAliveProbeHttpGet.class); + } +} diff --git a/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/ReasoningEngineSpecDeploymentSpec.java b/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/ReasoningEngineSpecDeploymentSpec.java index 09b535c..53f6d67 100644 --- a/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/ReasoningEngineSpecDeploymentSpec.java +++ b/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/ReasoningEngineSpecDeploymentSpec.java @@ -91,6 +91,14 @@ public abstract class ReasoningEngineSpecDeploymentSpec extends JsonSerializable @JsonProperty("secretEnv") public abstract Optional> secretEnv(); + /** + * Optional. Specifies the configuration for keep-alive probe. Contains configuration on a + * specified endpoint that a deployment host should use to keep the container alive based on the + * probe settings. + */ + @JsonProperty("keepAliveProbe") + public abstract Optional keepAliveProbe(); + /** Instantiates a builder for ReasoningEngineSpecDeploymentSpec. */ @ExcludeFromGeneratedCoverageReport public static Builder builder() { @@ -350,6 +358,38 @@ public Builder clearSecretEnv() { return secretEnv(Optional.empty()); } + /** + * Setter for keepAliveProbe. + * + *

keepAliveProbe: Optional. Specifies the configuration for keep-alive probe. Contains + * configuration on a specified endpoint that a deployment host should use to keep the container + * alive based on the probe settings. + */ + @JsonProperty("keepAliveProbe") + public abstract Builder keepAliveProbe(KeepAliveProbe keepAliveProbe); + + /** + * Setter for keepAliveProbe builder. + * + *

keepAliveProbe: Optional. Specifies the configuration for keep-alive probe. Contains + * configuration on a specified endpoint that a deployment host should use to keep the container + * alive based on the probe settings. + */ + @CanIgnoreReturnValue + public Builder keepAliveProbe(KeepAliveProbe.Builder keepAliveProbeBuilder) { + return keepAliveProbe(keepAliveProbeBuilder.build()); + } + + @ExcludeFromGeneratedCoverageReport + abstract Builder keepAliveProbe(Optional keepAliveProbe); + + /** Clears the value of keepAliveProbe field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearKeepAliveProbe() { + return keepAliveProbe(Optional.empty()); + } + public abstract ReasoningEngineSpecDeploymentSpec build(); } diff --git a/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/UpdateAgentEngineConfig.java b/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/UpdateAgentEngineConfig.java index 209e140..b08ce8c 100644 --- a/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/UpdateAgentEngineConfig.java +++ b/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/types/UpdateAgentEngineConfig.java @@ -173,6 +173,14 @@ public abstract class UpdateAgentEngineConfig extends JsonSerializable { @JsonProperty("buildOptions") public abstract Optional>> buildOptions(); + /** + * Optional. Specifies the configuration for keep-alive probe. Contains configuration on a + * specified endpoint that a deployment host should use to keep the container alive based on the + * probe settings. + */ + @JsonProperty("keepAliveProbe") + public abstract Optional keepAliveProbe(); + /** * The update mask to apply. For the `FieldMask` definition, see * https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask. @@ -734,6 +742,38 @@ public Builder clearBuildOptions() { return buildOptions(Optional.empty()); } + /** + * Setter for keepAliveProbe. + * + *

keepAliveProbe: Optional. Specifies the configuration for keep-alive probe. Contains + * configuration on a specified endpoint that a deployment host should use to keep the container + * alive based on the probe settings. + */ + @JsonProperty("keepAliveProbe") + public abstract Builder keepAliveProbe(KeepAliveProbe keepAliveProbe); + + /** + * Setter for keepAliveProbe builder. + * + *

keepAliveProbe: Optional. Specifies the configuration for keep-alive probe. Contains + * configuration on a specified endpoint that a deployment host should use to keep the container + * alive based on the probe settings. + */ + @CanIgnoreReturnValue + public Builder keepAliveProbe(KeepAliveProbe.Builder keepAliveProbeBuilder) { + return keepAliveProbe(keepAliveProbeBuilder.build()); + } + + @ExcludeFromGeneratedCoverageReport + abstract Builder keepAliveProbe(Optional keepAliveProbe); + + /** Clears the value of keepAliveProbe field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearKeepAliveProbe() { + return keepAliveProbe(Optional.empty()); + } + /** * Setter for updateMask. *