From 11bd66387471e9dbbdea3be3ea716ee4b84fc077 Mon Sep 17 00:00:00 2001 From: Yvonne Yu Date: Tue, 25 Aug 2026 14:11:10 -0700 Subject: [PATCH] feat: Weekly Discovery Doc update PiperOrigin-RevId: 970786393 --- .../types/PSCAutomationConfig.java | 219 +++++++++++++++++ .../types/PrivateServiceConnectConfig.java | 228 ++++++++++++++++++ .../types/PscAutomationState.java | 111 +++++++++ .../SandboxEnvironmentConnectionInfo.java | 30 +++ .../types/SandboxEnvironmentSpec.java | 8 +- ...andboxEnvironmentSpecShellEnvironment.java | 2 +- .../types/SandboxEnvironmentTemplate.java | 59 +++++ ...nvironmentTemplateEgressControlConfig.java | 6 +- ...teEgressControlConfigDnsPeeringConfig.java | 8 +- .../agentplatform/types/SandboxState.java | 3 + .../types/SchemaPromptSpecAppBuilderData.java | 40 +++ 11 files changed, 703 insertions(+), 11 deletions(-) create mode 100644 src/main/java/com/google/cloud/agentplatform/types/PSCAutomationConfig.java create mode 100644 src/main/java/com/google/cloud/agentplatform/types/PrivateServiceConnectConfig.java create mode 100644 src/main/java/com/google/cloud/agentplatform/types/PscAutomationState.java diff --git a/src/main/java/com/google/cloud/agentplatform/types/PSCAutomationConfig.java b/src/main/java/com/google/cloud/agentplatform/types/PSCAutomationConfig.java new file mode 100644 index 0000000..b8a1f05 --- /dev/null +++ b/src/main/java/com/google/cloud/agentplatform/types/PSCAutomationConfig.java @@ -0,0 +1,219 @@ +/* + * 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.agentplatform.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; + +/** PSC config that is used to automatically create PSC endpoints in the user projects. */ +@AutoValue +@JsonDeserialize(builder = PSCAutomationConfig.Builder.class) +public abstract class PSCAutomationConfig extends JsonSerializable { + /** Output only. Error message if the PSC service automation failed. */ + @JsonProperty("errorMessage") + public abstract Optional errorMessage(); + + /** Output only. Forwarding rule created by the PSC service automation. */ + @JsonProperty("forwardingRule") + public abstract Optional forwardingRule(); + + /** Output only. IP address rule created by the PSC service automation. */ + @JsonProperty("ipAddress") + public abstract Optional ipAddress(); + + /** + * Required. The full name of the Google Compute Engine + * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). + * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get): + * `projects/{project}/global/networks/{network}`. + */ + @JsonProperty("network") + public abstract Optional network(); + + /** Required. Project id used to create forwarding rule. */ + @JsonProperty("projectId") + public abstract Optional projectId(); + + /** Output only. The state of the PSC service automation. */ + @JsonProperty("state") + public abstract Optional state(); + + /** Instantiates a builder for PSCAutomationConfig. */ + @ExcludeFromGeneratedCoverageReport + public static Builder builder() { + return new AutoValue_PSCAutomationConfig.Builder(); + } + + /** Creates a builder with the same values as this instance. */ + public abstract Builder toBuilder(); + + /** Builder for PSCAutomationConfig. */ + @AutoValue.Builder + public abstract static class Builder { + /** For internal usage. Please use `PSCAutomationConfig.builder()` for instantiation. */ + @JsonCreator + private static Builder create() { + return new AutoValue_PSCAutomationConfig.Builder(); + } + + /** + * Setter for errorMessage. + * + *

errorMessage: Output only. Error message if the PSC service automation failed. + */ + @JsonProperty("errorMessage") + public abstract Builder errorMessage(String errorMessage); + + @ExcludeFromGeneratedCoverageReport + abstract Builder errorMessage(Optional errorMessage); + + /** Clears the value of errorMessage field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearErrorMessage() { + return errorMessage(Optional.empty()); + } + + /** + * Setter for forwardingRule. + * + *

forwardingRule: Output only. Forwarding rule created by the PSC service automation. + */ + @JsonProperty("forwardingRule") + public abstract Builder forwardingRule(String forwardingRule); + + @ExcludeFromGeneratedCoverageReport + abstract Builder forwardingRule(Optional forwardingRule); + + /** Clears the value of forwardingRule field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearForwardingRule() { + return forwardingRule(Optional.empty()); + } + + /** + * Setter for ipAddress. + * + *

ipAddress: Output only. IP address rule created by the PSC service automation. + */ + @JsonProperty("ipAddress") + public abstract Builder ipAddress(String ipAddress); + + @ExcludeFromGeneratedCoverageReport + abstract Builder ipAddress(Optional ipAddress); + + /** Clears the value of ipAddress field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearIpAddress() { + return ipAddress(Optional.empty()); + } + + /** + * Setter for network. + * + *

network: Required. The full name of the Google Compute Engine + * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). + * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get): + * `projects/{project}/global/networks/{network}`. + */ + @JsonProperty("network") + public abstract Builder network(String network); + + @ExcludeFromGeneratedCoverageReport + abstract Builder network(Optional network); + + /** Clears the value of network field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearNetwork() { + return network(Optional.empty()); + } + + /** + * Setter for projectId. + * + *

projectId: Required. Project id used to create forwarding rule. + */ + @JsonProperty("projectId") + public abstract Builder projectId(String projectId); + + @ExcludeFromGeneratedCoverageReport + abstract Builder projectId(Optional projectId); + + /** Clears the value of projectId field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearProjectId() { + return projectId(Optional.empty()); + } + + /** + * Setter for state. + * + *

state: Output only. The state of the PSC service automation. + */ + @JsonProperty("state") + public abstract Builder state(PscAutomationState state); + + @ExcludeFromGeneratedCoverageReport + abstract Builder state(Optional state); + + /** Clears the value of state field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearState() { + return state(Optional.empty()); + } + + /** + * Setter for state given a known enum. + * + *

state: Output only. The state of the PSC service automation. + */ + @CanIgnoreReturnValue + public Builder state(PscAutomationState.Known knownType) { + return state(new PscAutomationState(knownType)); + } + + /** + * Setter for state given a string. + * + *

state: Output only. The state of the PSC service automation. + */ + @CanIgnoreReturnValue + public Builder state(String state) { + return state(new PscAutomationState(state)); + } + + public abstract PSCAutomationConfig build(); + } + + /** Deserializes a JSON string to a PSCAutomationConfig object. */ + @ExcludeFromGeneratedCoverageReport + public static PSCAutomationConfig fromJson(String jsonString) { + return JsonSerializable.fromJsonString(jsonString, PSCAutomationConfig.class); + } +} diff --git a/src/main/java/com/google/cloud/agentplatform/types/PrivateServiceConnectConfig.java b/src/main/java/com/google/cloud/agentplatform/types/PrivateServiceConnectConfig.java new file mode 100644 index 0000000..6a1fa08 --- /dev/null +++ b/src/main/java/com/google/cloud/agentplatform/types/PrivateServiceConnectConfig.java @@ -0,0 +1,228 @@ +/* + * 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.agentplatform.types; + +import static com.google.common.collect.ImmutableList.toImmutableList; + +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.Arrays; +import java.util.List; +import java.util.Optional; + +/** Represents configuration for private service connect. */ +@AutoValue +@JsonDeserialize(builder = PrivateServiceConnectConfig.Builder.class) +public abstract class PrivateServiceConnectConfig extends JsonSerializable { + /** Required. If true, expose the IndexEndpoint via private service connect. */ + @JsonProperty("enablePrivateServiceConnect") + public abstract Optional enablePrivateServiceConnect(); + + /** + * Optional. If set to true, enable secure private service connect with IAM authorization. + * Otherwise, private service connect will be done without authorization. Note latency will be + * slightly increased if authorization is enabled. + */ + @JsonProperty("enableSecurePrivateServiceConnect") + public abstract Optional enableSecurePrivateServiceConnect(); + + /** A list of Projects from which the forwarding rule will target the service attachment. */ + @JsonProperty("projectAllowlist") + public abstract Optional> projectAllowlist(); + + /** + * Optional. List of projects and networks where the PSC endpoints will be created. This field is + * used by Online Inference(Prediction) only. + */ + @JsonProperty("pscAutomationConfigs") + public abstract Optional> pscAutomationConfigs(); + + /** + * Output only. The name of the generated service attachment resource. This is only populated if + * the endpoint is deployed with PrivateServiceConnect. + */ + @JsonProperty("serviceAttachment") + public abstract Optional serviceAttachment(); + + /** Instantiates a builder for PrivateServiceConnectConfig. */ + @ExcludeFromGeneratedCoverageReport + public static Builder builder() { + return new AutoValue_PrivateServiceConnectConfig.Builder(); + } + + /** Creates a builder with the same values as this instance. */ + public abstract Builder toBuilder(); + + /** Builder for PrivateServiceConnectConfig. */ + @AutoValue.Builder + public abstract static class Builder { + /** For internal usage. Please use `PrivateServiceConnectConfig.builder()` for instantiation. */ + @JsonCreator + private static Builder create() { + return new AutoValue_PrivateServiceConnectConfig.Builder(); + } + + /** + * Setter for enablePrivateServiceConnect. + * + *

enablePrivateServiceConnect: Required. If true, expose the IndexEndpoint via private + * service connect. + */ + @JsonProperty("enablePrivateServiceConnect") + public abstract Builder enablePrivateServiceConnect(boolean enablePrivateServiceConnect); + + @ExcludeFromGeneratedCoverageReport + abstract Builder enablePrivateServiceConnect(Optional enablePrivateServiceConnect); + + /** Clears the value of enablePrivateServiceConnect field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearEnablePrivateServiceConnect() { + return enablePrivateServiceConnect(Optional.empty()); + } + + /** + * Setter for enableSecurePrivateServiceConnect. + * + *

enableSecurePrivateServiceConnect: Optional. If set to true, enable secure private service + * connect with IAM authorization. Otherwise, private service connect will be done without + * authorization. Note latency will be slightly increased if authorization is enabled. + */ + @JsonProperty("enableSecurePrivateServiceConnect") + public abstract Builder enableSecurePrivateServiceConnect( + boolean enableSecurePrivateServiceConnect); + + @ExcludeFromGeneratedCoverageReport + abstract Builder enableSecurePrivateServiceConnect( + Optional enableSecurePrivateServiceConnect); + + /** Clears the value of enableSecurePrivateServiceConnect field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearEnableSecurePrivateServiceConnect() { + return enableSecurePrivateServiceConnect(Optional.empty()); + } + + /** + * Setter for projectAllowlist. + * + *

projectAllowlist: A list of Projects from which the forwarding rule will target the + * service attachment. + */ + @JsonProperty("projectAllowlist") + public abstract Builder projectAllowlist(List projectAllowlist); + + /** + * Setter for projectAllowlist. + * + *

projectAllowlist: A list of Projects from which the forwarding rule will target the + * service attachment. + */ + @CanIgnoreReturnValue + public Builder projectAllowlist(String... projectAllowlist) { + return projectAllowlist(Arrays.asList(projectAllowlist)); + } + + @ExcludeFromGeneratedCoverageReport + abstract Builder projectAllowlist(Optional> projectAllowlist); + + /** Clears the value of projectAllowlist field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearProjectAllowlist() { + return projectAllowlist(Optional.empty()); + } + + /** + * Setter for pscAutomationConfigs. + * + *

pscAutomationConfigs: Optional. List of projects and networks where the PSC endpoints will + * be created. This field is used by Online Inference(Prediction) only. + */ + @JsonProperty("pscAutomationConfigs") + public abstract Builder pscAutomationConfigs(List pscAutomationConfigs); + + /** + * Setter for pscAutomationConfigs. + * + *

pscAutomationConfigs: Optional. List of projects and networks where the PSC endpoints will + * be created. This field is used by Online Inference(Prediction) only. + */ + @CanIgnoreReturnValue + public Builder pscAutomationConfigs(PSCAutomationConfig... pscAutomationConfigs) { + return pscAutomationConfigs(Arrays.asList(pscAutomationConfigs)); + } + + /** + * Setter for pscAutomationConfigs builder. + * + *

pscAutomationConfigs: Optional. List of projects and networks where the PSC endpoints will + * be created. This field is used by Online Inference(Prediction) only. + */ + @CanIgnoreReturnValue + public Builder pscAutomationConfigs( + PSCAutomationConfig.Builder... pscAutomationConfigsBuilders) { + return pscAutomationConfigs( + Arrays.asList(pscAutomationConfigsBuilders).stream() + .map(PSCAutomationConfig.Builder::build) + .collect(toImmutableList())); + } + + @ExcludeFromGeneratedCoverageReport + abstract Builder pscAutomationConfigs(Optional> pscAutomationConfigs); + + /** Clears the value of pscAutomationConfigs field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearPscAutomationConfigs() { + return pscAutomationConfigs(Optional.empty()); + } + + /** + * Setter for serviceAttachment. + * + *

serviceAttachment: Output only. The name of the generated service attachment resource. + * This is only populated if the endpoint is deployed with PrivateServiceConnect. + */ + @JsonProperty("serviceAttachment") + public abstract Builder serviceAttachment(String serviceAttachment); + + @ExcludeFromGeneratedCoverageReport + abstract Builder serviceAttachment(Optional serviceAttachment); + + /** Clears the value of serviceAttachment field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearServiceAttachment() { + return serviceAttachment(Optional.empty()); + } + + public abstract PrivateServiceConnectConfig build(); + } + + /** Deserializes a JSON string to a PrivateServiceConnectConfig object. */ + @ExcludeFromGeneratedCoverageReport + public static PrivateServiceConnectConfig fromJson(String jsonString) { + return JsonSerializable.fromJsonString(jsonString, PrivateServiceConnectConfig.class); + } +} diff --git a/src/main/java/com/google/cloud/agentplatform/types/PscAutomationState.java b/src/main/java/com/google/cloud/agentplatform/types/PscAutomationState.java new file mode 100644 index 0000000..57f58ca --- /dev/null +++ b/src/main/java/com/google/cloud/agentplatform/types/PscAutomationState.java @@ -0,0 +1,111 @@ +/* + * 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.agentplatform.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.google.common.base.Ascii; +import java.util.Objects; + +/** Output only. The state of the PSC service automation. */ +public class PscAutomationState { + + /** Enum representing the known values for PscAutomationState. */ + public enum Known { + /** Should not be used. */ + PSC_AUTOMATION_STATE_UNSPECIFIED, + + /** The PSC service automation is successful. */ + PSC_AUTOMATION_STATE_SUCCESSFUL, + + /** The PSC service automation has failed. */ + PSC_AUTOMATION_STATE_FAILED + } + + private Known pscAutomationStateEnum; + private final String value; + + @JsonCreator + public PscAutomationState(String value) { + this.value = value; + for (Known pscAutomationStateEnum : Known.values()) { + if (Ascii.equalsIgnoreCase(pscAutomationStateEnum.toString(), value)) { + this.pscAutomationStateEnum = pscAutomationStateEnum; + break; + } + } + if (this.pscAutomationStateEnum == null) { + this.pscAutomationStateEnum = Known.PSC_AUTOMATION_STATE_UNSPECIFIED; + } + } + + public PscAutomationState(Known knownValue) { + this.pscAutomationStateEnum = knownValue; + this.value = knownValue.toString(); + } + + @ExcludeFromGeneratedCoverageReport + @Override + @JsonValue + public String toString() { + return this.value; + } + + @ExcludeFromGeneratedCoverageReport + @SuppressWarnings("PatternMatchingInstanceof") + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null) { + return false; + } + + if (!(o instanceof PscAutomationState)) { + return false; + } + + PscAutomationState other = (PscAutomationState) o; + + if (this.pscAutomationStateEnum != Known.PSC_AUTOMATION_STATE_UNSPECIFIED + && other.pscAutomationStateEnum != Known.PSC_AUTOMATION_STATE_UNSPECIFIED) { + return this.pscAutomationStateEnum == other.pscAutomationStateEnum; + } else if (this.pscAutomationStateEnum == Known.PSC_AUTOMATION_STATE_UNSPECIFIED + && other.pscAutomationStateEnum == Known.PSC_AUTOMATION_STATE_UNSPECIFIED) { + return this.value.equals(other.value); + } + return false; + } + + @ExcludeFromGeneratedCoverageReport + @Override + public int hashCode() { + if (this.pscAutomationStateEnum != Known.PSC_AUTOMATION_STATE_UNSPECIFIED) { + return this.pscAutomationStateEnum.hashCode(); + } else { + return Objects.hashCode(this.value); + } + } + + @ExcludeFromGeneratedCoverageReport + public Known knownEnum() { + return this.pscAutomationStateEnum; + } +} diff --git a/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentConnectionInfo.java b/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentConnectionInfo.java index 8d704f3..1d7d3e0 100644 --- a/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentConnectionInfo.java +++ b/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentConnectionInfo.java @@ -46,6 +46,15 @@ public abstract class SandboxEnvironmentConnectionInfo extends JsonSerializable @JsonProperty("routingToken") public abstract Optional routingToken(); + /** + * Output only. The name of the PSC-E service attachment created for private ingress to this + * SandboxEnvironment. Only populated when the template enables private ingress (see + * SandboxEnvironmentTemplate.ingress_control_config). VPC-SC customers use this to create a PSC + * endpoint in their VPC. + */ + @JsonProperty("serviceAttachment") + public abstract Optional serviceAttachment(); + /** Instantiates a builder for SandboxEnvironmentConnectionInfo. */ @ExcludeFromGeneratedCoverageReport public static Builder builder() { @@ -139,6 +148,27 @@ public Builder clearRoutingToken() { return routingToken(Optional.empty()); } + /** + * Setter for serviceAttachment. + * + *

serviceAttachment: Output only. The name of the PSC-E service attachment created for + * private ingress to this SandboxEnvironment. Only populated when the template enables private + * ingress (see SandboxEnvironmentTemplate.ingress_control_config). VPC-SC customers use this to + * create a PSC endpoint in their VPC. + */ + @JsonProperty("serviceAttachment") + public abstract Builder serviceAttachment(String serviceAttachment); + + @ExcludeFromGeneratedCoverageReport + abstract Builder serviceAttachment(Optional serviceAttachment); + + /** Clears the value of serviceAttachment field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearServiceAttachment() { + return serviceAttachment(Optional.empty()); + } + public abstract SandboxEnvironmentConnectionInfo build(); } diff --git a/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentSpec.java b/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentSpec.java index 82f7c5d..dfc06a1 100644 --- a/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentSpec.java +++ b/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentSpec.java @@ -39,7 +39,7 @@ public abstract class SandboxEnvironmentSpec extends JsonSerializable { @JsonProperty("computerUseEnvironment") public abstract Optional computerUseEnvironment(); - /** Optional. The shell environment. */ + /** Optional. The shell environment for executing shell commands and scripts. */ @JsonProperty("shellEnvironment") public abstract Optional shellEnvironment(); @@ -126,7 +126,8 @@ public Builder clearComputerUseEnvironment() { /** * Setter for shellEnvironment. * - *

shellEnvironment: Optional. The shell environment. + *

shellEnvironment: Optional. The shell environment for executing shell commands and + * scripts. */ @JsonProperty("shellEnvironment") public abstract Builder shellEnvironment( @@ -135,7 +136,8 @@ public abstract Builder shellEnvironment( /** * Setter for shellEnvironment builder. * - *

shellEnvironment: Optional. The shell environment. + *

shellEnvironment: Optional. The shell environment for executing shell commands and + * scripts. */ @CanIgnoreReturnValue public Builder shellEnvironment( diff --git a/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentSpecShellEnvironment.java b/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentSpecShellEnvironment.java index a1dab64..b6ae5a4 100644 --- a/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentSpecShellEnvironment.java +++ b/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentSpecShellEnvironment.java @@ -23,7 +23,7 @@ import com.google.auto.value.AutoValue; import com.google.genai.JsonSerializable; -/** The shell environment with customized settings. */ +/** The shell environment. */ @AutoValue @JsonDeserialize(builder = SandboxEnvironmentSpecShellEnvironment.Builder.class) public abstract class SandboxEnvironmentSpecShellEnvironment extends JsonSerializable { diff --git a/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentTemplate.java b/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentTemplate.java index bb66a0d..f4daffd 100644 --- a/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentTemplate.java +++ b/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentTemplate.java @@ -68,6 +68,19 @@ public abstract class SandboxEnvironmentTemplate extends JsonSerializable { @JsonProperty("updateTime") public abstract Optional updateTime(); + /** + * Optional. The configuration for private ingress (PSC-E) of this template. When set, the sandbox + * router is exposed privately via a PSC service attachment so VPC-SC customers can connect from + * their VPC over a private endpoint instead of the public internet. The resulting service + * attachment is surfaced on `SandboxEnvironment.connection_info.service_attachment`. Only the + * PSC-E (service-attachment/ingress) portion of `PrivateServiceConnectConfig` applies here: + * `enable_private_service_connect` and `project_allowlist` (the consumer projects allowed to + * connect). The nested `psc_interface_config` (PSC-I / egress) is not used for sandbox ingress; + * sandbox egress is configured via `egress_control_config` instead. + */ + @JsonProperty("ingressControlConfig") + public abstract Optional ingressControlConfig(); + /** Instantiates a builder for SandboxEnvironmentTemplate. */ @ExcludeFromGeneratedCoverageReport public static Builder builder() { @@ -294,6 +307,52 @@ public Builder clearUpdateTime() { return updateTime(Optional.empty()); } + /** + * Setter for ingressControlConfig. + * + *

ingressControlConfig: Optional. The configuration for private ingress (PSC-E) of this + * template. When set, the sandbox router is exposed privately via a PSC service attachment so + * VPC-SC customers can connect from their VPC over a private endpoint instead of the public + * internet. The resulting service attachment is surfaced on + * `SandboxEnvironment.connection_info.service_attachment`. Only the PSC-E + * (service-attachment/ingress) portion of `PrivateServiceConnectConfig` applies here: + * `enable_private_service_connect` and `project_allowlist` (the consumer projects allowed to + * connect). The nested `psc_interface_config` (PSC-I / egress) is not used for sandbox ingress; + * sandbox egress is configured via `egress_control_config` instead. + */ + @JsonProperty("ingressControlConfig") + public abstract Builder ingressControlConfig(PrivateServiceConnectConfig ingressControlConfig); + + /** + * Setter for ingressControlConfig builder. + * + *

ingressControlConfig: Optional. The configuration for private ingress (PSC-E) of this + * template. When set, the sandbox router is exposed privately via a PSC service attachment so + * VPC-SC customers can connect from their VPC over a private endpoint instead of the public + * internet. The resulting service attachment is surfaced on + * `SandboxEnvironment.connection_info.service_attachment`. Only the PSC-E + * (service-attachment/ingress) portion of `PrivateServiceConnectConfig` applies here: + * `enable_private_service_connect` and `project_allowlist` (the consumer projects allowed to + * connect). The nested `psc_interface_config` (PSC-I / egress) is not used for sandbox ingress; + * sandbox egress is configured via `egress_control_config` instead. + */ + @CanIgnoreReturnValue + public Builder ingressControlConfig( + PrivateServiceConnectConfig.Builder ingressControlConfigBuilder) { + return ingressControlConfig(ingressControlConfigBuilder.build()); + } + + @ExcludeFromGeneratedCoverageReport + abstract Builder ingressControlConfig( + Optional ingressControlConfig); + + /** Clears the value of ingressControlConfig field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearIngressControlConfig() { + return ingressControlConfig(Optional.empty()); + } + public abstract SandboxEnvironmentTemplate build(); } diff --git a/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentTemplateEgressControlConfig.java b/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentTemplateEgressControlConfig.java index 2edcf5c..1eb7aec 100644 --- a/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentTemplateEgressControlConfig.java +++ b/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentTemplateEgressControlConfig.java @@ -51,7 +51,7 @@ public abstract class SandboxEnvironmentTemplateEgressControlConfig extends Json dnsPeeringConfigs(); /** - * Optional. The name of the customer VPC NetworkAttachment used to draw a PSC interface IP into + * Optional. The name of the customer VPC `NetworkAttachment` used to draw a PSC interface IP into * the customer VPC for sandbox egress. */ @JsonProperty("networkAttachment") @@ -167,8 +167,8 @@ public Builder clearDnsPeeringConfigs() { /** * Setter for networkAttachment. * - *

networkAttachment: Optional. The name of the customer VPC NetworkAttachment used to draw a - * PSC interface IP into the customer VPC for sandbox egress. + *

networkAttachment: Optional. The name of the customer VPC `NetworkAttachment` used to draw + * a PSC interface IP into the customer VPC for sandbox egress. */ @JsonProperty("networkAttachment") public abstract Builder networkAttachment(String networkAttachment); diff --git a/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentTemplateEgressControlConfigDnsPeeringConfig.java b/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentTemplateEgressControlConfigDnsPeeringConfig.java index 0788053..19dcdd3 100644 --- a/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentTemplateEgressControlConfigDnsPeeringConfig.java +++ b/src/main/java/com/google/cloud/agentplatform/types/SandboxEnvironmentTemplateEgressControlConfigDnsPeeringConfig.java @@ -43,14 +43,14 @@ public abstract class SandboxEnvironmentTemplateEgressControlConfigDnsPeeringCon public abstract Optional domain(); /** - * Required. The VPC network name in the target_project where the DNS zone specified by 'domain' + * Required. The VPC network name in the target_project where the DNS zone specified by `domain` * is visible. */ @JsonProperty("targetNetwork") public abstract Optional targetNetwork(); /** - * Required. The project ID hosting the Cloud DNS managed zone that contains the 'domain'. The + * Required. The project ID hosting the Cloud DNS managed zone that contains the `domain`. The * Vertex AI Service Agent requires the dns.peer role on this project. */ @JsonProperty("targetProject") @@ -100,7 +100,7 @@ public Builder clearDomain() { * Setter for targetNetwork. * *

targetNetwork: Required. The VPC network name in the target_project where the DNS zone - * specified by 'domain' is visible. + * specified by `domain` is visible. */ @JsonProperty("targetNetwork") public abstract Builder targetNetwork(String targetNetwork); @@ -119,7 +119,7 @@ public Builder clearTargetNetwork() { * Setter for targetProject. * *

targetProject: Required. The project ID hosting the Cloud DNS managed zone that contains - * the 'domain'. The Vertex AI Service Agent requires the dns.peer role on this project. + * the `domain`. The Vertex AI Service Agent requires the dns.peer role on this project. */ @JsonProperty("targetProject") public abstract Builder targetProject(String targetProject); diff --git a/src/main/java/com/google/cloud/agentplatform/types/SandboxState.java b/src/main/java/com/google/cloud/agentplatform/types/SandboxState.java index cf9adc9..ef61bd5 100644 --- a/src/main/java/com/google/cloud/agentplatform/types/SandboxState.java +++ b/src/main/java/com/google/cloud/agentplatform/types/SandboxState.java @@ -46,6 +46,9 @@ public enum Known { /** Sandbox runtime has been deleted. */ STATE_DELETED, + /** Sandbox runtime is stopping. */ + STATE_STOPPING, + SANDBOX_STATE_UNSPECIFIED } diff --git a/src/main/java/com/google/cloud/agentplatform/types/SchemaPromptSpecAppBuilderData.java b/src/main/java/com/google/cloud/agentplatform/types/SchemaPromptSpecAppBuilderData.java index 36fa917..db19908 100644 --- a/src/main/java/com/google/cloud/agentplatform/types/SchemaPromptSpecAppBuilderData.java +++ b/src/main/java/com/google/cloud/agentplatform/types/SchemaPromptSpecAppBuilderData.java @@ -50,6 +50,14 @@ public abstract class SchemaPromptSpecAppBuilderData extends JsonSerializable { @JsonProperty("linkedResources") public abstract Optional> linkedResources(); + /** + * Optional. The Cloud Run regions in which the application is currently deployed. Used to + * rediscover and redeploy the app in the regions it already runs in, which may differ from the + * prompt's location. + */ + @JsonProperty("deployedRegions") + public abstract Optional> deployedRegions(); + /** Instantiates a builder for SchemaPromptSpecAppBuilderData. */ @ExcludeFromGeneratedCoverageReport public static Builder builder() { @@ -173,6 +181,38 @@ public Builder clearLinkedResources() { return linkedResources(Optional.empty()); } + /** + * Setter for deployedRegions. + * + *

deployedRegions: Optional. The Cloud Run regions in which the application is currently + * deployed. Used to rediscover and redeploy the app in the regions it already runs in, which + * may differ from the prompt's location. + */ + @JsonProperty("deployedRegions") + public abstract Builder deployedRegions(List deployedRegions); + + /** + * Setter for deployedRegions. + * + *

deployedRegions: Optional. The Cloud Run regions in which the application is currently + * deployed. Used to rediscover and redeploy the app in the regions it already runs in, which + * may differ from the prompt's location. + */ + @CanIgnoreReturnValue + public Builder deployedRegions(String... deployedRegions) { + return deployedRegions(Arrays.asList(deployedRegions)); + } + + @ExcludeFromGeneratedCoverageReport + abstract Builder deployedRegions(Optional> deployedRegions); + + /** Clears the value of deployedRegions field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearDeployedRegions() { + return deployedRegions(Optional.empty()); + } + public abstract SchemaPromptSpecAppBuilderData build(); }