diff --git a/examples/src/main/java/com/google/cloud/agentplatform/examples/AgentEngineSandboxTemplatesAndSnapshots.java b/examples/src/main/java/com/google/cloud/agentplatform/examples/AgentEngineSandboxTemplatesAndSnapshots.java
new file mode 100644
index 0000000..613225d
--- /dev/null
+++ b/examples/src/main/java/com/google/cloud/agentplatform/examples/AgentEngineSandboxTemplatesAndSnapshots.java
@@ -0,0 +1,235 @@
+/*
+ * Copyright 2026 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.
+ */
+
+/**
+ * Usage:
+ *
+ *
1a. If you are using Vertex AI, setup ADC to get credentials:
+ * https://cloud.google.com/docs/authentication/provide-credentials-adc#google-idp
+ *
+ *
Then set Project, Location, and USE_VERTEXAI flag as environment variables:
+ *
+ *
export GOOGLE_CLOUD_PROJECT=YOUR_PROJECT
+ *
+ *
export GOOGLE_CLOUD_LOCATION=YOUR_LOCATION
+ *
+ *
2. Compile the java package and run the sample code.
+ *
+ *
mvn clean compile
+ *
+ *
mvn exec:java
+ * -Dexec.mainClass="com.google.cloud.agentplatform.examples.AgentEngineSandboxTemplatesAndSnapshots"
+ */
+package com.google.cloud.agentplatform.examples;
+
+import com.google.cloud.agentplatform.Client;
+import com.google.cloud.agentplatform.types.AgentEngineOperation;
+import com.google.cloud.agentplatform.types.AgentEngineSandboxOperation;
+import com.google.cloud.agentplatform.types.AgentEngineSandboxSnapshotOperation;
+import com.google.cloud.agentplatform.types.CreateAgentEngineConfig;
+import com.google.cloud.agentplatform.types.CreateAgentEngineSandboxSnapshotConfig;
+import com.google.cloud.agentplatform.types.CreateSandboxEnvironmentTemplateConfig;
+import com.google.cloud.agentplatform.types.DeleteAgentEngineOperation;
+import com.google.cloud.agentplatform.types.DeleteAgentEngineSandboxOperation;
+import com.google.cloud.agentplatform.types.DeleteSandboxEnvironmentSnapshotOperation;
+import com.google.cloud.agentplatform.types.DeleteSandboxEnvironmentTemplateOperation;
+import com.google.cloud.agentplatform.types.ListSandboxEnvironmentSnapshotsResponse;
+import com.google.cloud.agentplatform.types.ListSandboxEnvironmentTemplatesResponse;
+import com.google.cloud.agentplatform.types.SandboxEnvironmentSnapshot;
+import com.google.cloud.agentplatform.types.SandboxEnvironmentSpec;
+import com.google.cloud.agentplatform.types.SandboxEnvironmentSpecCodeExecutionEnvironment;
+import com.google.cloud.agentplatform.types.SandboxEnvironmentTemplate;
+import com.google.cloud.agentplatform.types.SandboxEnvironmentTemplateDefaultContainerEnvironment;
+import com.google.cloud.agentplatform.types.SandboxEnvironmentTemplateEgressControlConfig;
+import com.google.cloud.agentplatform.types.SandboxEnvironmentTemplateOperation;
+import com.google.common.collect.ImmutableMap;
+import java.time.Duration;
+import java.util.List;
+
+/**
+ * An example of using the Java SDK to perform operations on Agent Engine sandbox environment
+ * templates and snapshots.
+ */
+public final class AgentEngineSandboxTemplatesAndSnapshots {
+ public static void main(String[] args) {
+ // Instantiate the client. It reads from the environment variables `GOOGLE_CLOUD_LOCATION` and
+ // `GOOGLE_CLOUD_PROJECT`.
+ Client client = new Client();
+
+ System.out.println("Creating a temporary Agent Engine...");
+ CreateAgentEngineConfig config =
+ CreateAgentEngineConfig.builder()
+ .labels(ImmutableMap.of("test-label", "test-value"))
+ .build();
+ AgentEngineOperation createOperation = client.agentEngines.privateCreate(config);
+ while (!createOperation.done().filter(Boolean::booleanValue).isPresent()) {
+ sleep(10000);
+ createOperation =
+ client.agentEngines.privateGetAgentOperation(createOperation.name().get(), null);
+ }
+ String agentEngineName = createOperation.response().get().name().get();
+ System.out.println("Created Agent Engine: " + agentEngineName);
+
+ try {
+ runSandboxTemplatesExample(client, agentEngineName);
+ runSandboxSnapshotsExample(client, agentEngineName);
+ } finally {
+ System.out.println("\nCleaning up Agent Engine...");
+ DeleteAgentEngineOperation deleteOperation =
+ client.agentEngines.privateDelete(agentEngineName, true, null);
+ System.out.println("Delete operation started: " + deleteOperation.name().orElse(""));
+ }
+ }
+
+ /** Demonstrates the sandbox templates submodule: create, get, list, and delete. */
+ private static void runSandboxTemplatesExample(Client client, String agentEngineName) {
+ System.out.println("\n=== Sandbox Templates ===");
+
+ // 1. Create a sandbox environment template.
+ System.out.println("\n--- Creating a sandbox template ---");
+ SandboxEnvironmentTemplateOperation templateOp =
+ client.agentEngines.sandboxes.templates.privateCreate(
+ agentEngineName,
+ "Example Sandbox Template",
+ CreateSandboxEnvironmentTemplateConfig.builder()
+ .defaultContainerEnvironment(
+ SandboxEnvironmentTemplateDefaultContainerEnvironment.builder()
+ .defaultContainerCategory("DEFAULT_CONTAINER_CATEGORY_COMPUTER_USE")
+ .build())
+ .egressControlConfig(
+ SandboxEnvironmentTemplateEgressControlConfig.builder()
+ .internetAccess(true)
+ .build())
+ .build());
+ System.out.println("Create template operation: " + templateOp.name().orElse(""));
+
+ // Wait for the template creation to complete.
+ while (!templateOp.done().filter(Boolean::booleanValue).isPresent()) {
+ sleep(10000);
+ templateOp =
+ client.agentEngines.sandboxes.templates.getSandboxEnvironmentTemplateOperation(
+ templateOp.name().get(), null);
+ }
+ String templateName = templateOp.response().get().name().get();
+ System.out.println("Created Sandbox Template: " + templateName);
+
+ // 2. Get the template.
+ System.out.println("\n--- Getting the sandbox template ---");
+ SandboxEnvironmentTemplate template =
+ client.agentEngines.sandboxes.templates.privateGet(templateName, null);
+ System.out.println("Template display name: " + template.displayName().orElse(""));
+
+ // 3. List templates.
+ System.out.println("\n--- Listing sandbox templates ---");
+ ListSandboxEnvironmentTemplatesResponse listResponse =
+ client.agentEngines.sandboxes.templates.privateList(agentEngineName, null);
+ System.out.println(
+ "Templates found: " + listResponse.sandboxEnvironmentTemplates().map(List::size).orElse(0));
+
+ // 4. Delete the template.
+ System.out.println("\n--- Deleting the sandbox template ---");
+ DeleteSandboxEnvironmentTemplateOperation deleteOp =
+ client.agentEngines.sandboxes.templates.privateDelete(templateName, null);
+ System.out.println("Delete template operation: " + deleteOp.name().orElse(""));
+ }
+
+ /**
+ * Demonstrates the sandbox snapshots submodule: create a sandbox, snapshot it, get, list, and
+ * delete.
+ */
+ private static void runSandboxSnapshotsExample(Client client, String agentEngineName) {
+ System.out.println("\n=== Sandbox Snapshots ===");
+
+ // A snapshot captures the state of an existing sandbox environment, so first create one.
+ System.out.println("\n--- Creating a source sandbox ---");
+ AgentEngineSandboxOperation sandboxOp =
+ client.agentEngines.sandboxes.privateCreate(
+ agentEngineName,
+ SandboxEnvironmentSpec.builder()
+ .codeExecutionEnvironment(
+ SandboxEnvironmentSpecCodeExecutionEnvironment.builder()
+ .machineConfig("MACHINE_CONFIG_VCPU4_RAM4GIB")
+ .build())
+ .build(),
+ null);
+ while (!sandboxOp.done().filter(Boolean::booleanValue).isPresent()) {
+ sleep(10000);
+ sandboxOp =
+ client.agentEngines.sandboxes.privateGetSandboxOperation(sandboxOp.name().get(), null);
+ }
+ String sandboxName = sandboxOp.response().get().name().get();
+ System.out.println("Created source Sandbox: " + sandboxName);
+
+ try {
+ // 1. Create a snapshot of the sandbox.
+ System.out.println("\n--- Creating a sandbox snapshot ---");
+ AgentEngineSandboxSnapshotOperation snapshotOp =
+ client.agentEngines.sandboxes.snapshots.privateCreate(
+ sandboxName,
+ CreateAgentEngineSandboxSnapshotConfig.builder()
+ .displayName("Example Sandbox Snapshot")
+ .ttl(Duration.ofSeconds(3600))
+ .build());
+ System.out.println("Create snapshot operation: " + snapshotOp.name().orElse(""));
+
+ // Wait for the snapshot creation to complete.
+ while (!snapshotOp.done().filter(Boolean::booleanValue).isPresent()) {
+ sleep(10000);
+ snapshotOp =
+ client.agentEngines.sandboxes.snapshots.getSandboxSnapshotOperation(
+ snapshotOp.name().get(), null);
+ }
+ String snapshotName = snapshotOp.response().get().name().get();
+ System.out.println("Created Sandbox Snapshot: " + snapshotName);
+
+ // 2. Get the snapshot.
+ System.out.println("\n--- Getting the sandbox snapshot ---");
+ SandboxEnvironmentSnapshot snapshot =
+ client.agentEngines.sandboxes.snapshots.privateGet(snapshotName, null);
+ System.out.println("Snapshot Name: " + snapshot.name().orElse(""));
+
+ // 3. List snapshots.
+ System.out.println("\n--- Listing sandbox snapshots ---");
+ ListSandboxEnvironmentSnapshotsResponse listResponse =
+ client.agentEngines.sandboxes.snapshots.privateList(agentEngineName, null);
+ System.out.println(
+ "Snapshots found: "
+ + listResponse.sandboxEnvironmentSnapshots().map(List::size).orElse(0));
+
+ // 4. Delete the snapshot.
+ System.out.println("\n--- Deleting the sandbox snapshot ---");
+ DeleteSandboxEnvironmentSnapshotOperation deleteOp =
+ client.agentEngines.sandboxes.snapshots.privateDelete(snapshotName, null);
+ System.out.println("Delete snapshot operation: " + deleteOp.name().orElse(""));
+ } finally {
+ // Clean up the source sandbox.
+ System.out.println("\n--- Deleting the source sandbox ---");
+ DeleteAgentEngineSandboxOperation deleteSandboxOp =
+ client.agentEngines.sandboxes.privateDelete(sandboxName, null);
+ System.out.println("Delete sandbox operation: " + deleteSandboxOp.name().orElse(""));
+ }
+ }
+
+ private static void sleep(long millis) {
+ try {
+ Thread.sleep(millis);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ }
+ }
+
+ private AgentEngineSandboxTemplatesAndSnapshots() {}
+}
diff --git a/src/main/java/com/google/cloud/agentplatform/AsyncSandboxSnapshots.java b/src/main/java/com/google/cloud/agentplatform/AsyncSandboxSnapshots.java
new file mode 100644
index 0000000..1636bc8
--- /dev/null
+++ b/src/main/java/com/google/cloud/agentplatform/AsyncSandboxSnapshots.java
@@ -0,0 +1,118 @@
+/*
+ * 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;
+
+import com.google.cloud.agentplatform.types.AgentEngineSandboxSnapshotOperation;
+import com.google.cloud.agentplatform.types.CreateAgentEngineSandboxSnapshotConfig;
+import com.google.cloud.agentplatform.types.DeleteSandboxEnvironmentSnapshotConfig;
+import com.google.cloud.agentplatform.types.DeleteSandboxEnvironmentSnapshotOperation;
+import com.google.cloud.agentplatform.types.GetAgentEngineOperationConfig;
+import com.google.cloud.agentplatform.types.GetSandboxEnvironmentSnapshotConfig;
+import com.google.cloud.agentplatform.types.ListSandboxEnvironmentSnapshotsConfig;
+import com.google.cloud.agentplatform.types.ListSandboxEnvironmentSnapshotsResponse;
+import com.google.cloud.agentplatform.types.SandboxEnvironmentSnapshot;
+import com.google.genai.ApiClient;
+import com.google.genai.ApiResponse;
+import com.google.genai.Common.BuiltRequest;
+import java.util.concurrent.CompletableFuture;
+
+/** Async module of {@link SandboxSnapshots} */
+public final class AsyncSandboxSnapshots {
+
+ SandboxSnapshots sandboxSnapshots;
+ ApiClient apiClient;
+
+ public AsyncSandboxSnapshots(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ this.sandboxSnapshots = new SandboxSnapshots(apiClient);
+ }
+
+ CompletableFuture privateCreate(
+ String sourceSandboxEnvironmentName, CreateAgentEngineSandboxSnapshotConfig config) {
+
+ BuiltRequest builtRequest =
+ sandboxSnapshots.buildRequestForPrivateCreate(sourceSandboxEnvironmentName, config);
+ return this.apiClient
+ .asyncRequest("post", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
+ .thenApplyAsync(
+ response -> {
+ try (ApiResponse res = response) {
+ return sandboxSnapshots.processResponseForPrivateCreate(res, config);
+ }
+ });
+ }
+
+ CompletableFuture privateDelete(
+ String name, DeleteSandboxEnvironmentSnapshotConfig config) {
+
+ BuiltRequest builtRequest = sandboxSnapshots.buildRequestForPrivateDelete(name, config);
+ return this.apiClient
+ .asyncRequest(
+ "delete", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
+ .thenApplyAsync(
+ response -> {
+ try (ApiResponse res = response) {
+ return sandboxSnapshots.processResponseForPrivateDelete(res, config);
+ }
+ });
+ }
+
+ CompletableFuture privateGet(
+ String name, GetSandboxEnvironmentSnapshotConfig config) {
+
+ BuiltRequest builtRequest = sandboxSnapshots.buildRequestForPrivateGet(name, config);
+ return this.apiClient
+ .asyncRequest("get", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
+ .thenApplyAsync(
+ response -> {
+ try (ApiResponse res = response) {
+ return sandboxSnapshots.processResponseForPrivateGet(res, config);
+ }
+ });
+ }
+
+ CompletableFuture privateList(
+ String name, ListSandboxEnvironmentSnapshotsConfig config) {
+
+ BuiltRequest builtRequest = sandboxSnapshots.buildRequestForPrivateList(name, config);
+ return this.apiClient
+ .asyncRequest("get", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
+ .thenApplyAsync(
+ response -> {
+ try (ApiResponse res = response) {
+ return sandboxSnapshots.processResponseForPrivateList(res, config);
+ }
+ });
+ }
+
+ public CompletableFuture getSandboxSnapshotOperation(
+ String operationName, GetAgentEngineOperationConfig config) {
+
+ BuiltRequest builtRequest =
+ sandboxSnapshots.buildRequestForGetSandboxSnapshotOperation(operationName, config);
+ return this.apiClient
+ .asyncRequest("get", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
+ .thenApplyAsync(
+ response -> {
+ try (ApiResponse res = response) {
+ return sandboxSnapshots.processResponseForGetSandboxSnapshotOperation(res, config);
+ }
+ });
+ }
+}
diff --git a/src/main/java/com/google/cloud/agentplatform/AsyncSandboxTemplates.java b/src/main/java/com/google/cloud/agentplatform/AsyncSandboxTemplates.java
new file mode 100644
index 0000000..a62eb50
--- /dev/null
+++ b/src/main/java/com/google/cloud/agentplatform/AsyncSandboxTemplates.java
@@ -0,0 +1,121 @@
+/*
+ * 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;
+
+import com.google.cloud.agentplatform.types.CreateSandboxEnvironmentTemplateConfig;
+import com.google.cloud.agentplatform.types.DeleteSandboxEnvironmentTemplateConfig;
+import com.google.cloud.agentplatform.types.DeleteSandboxEnvironmentTemplateOperation;
+import com.google.cloud.agentplatform.types.GetAgentEngineOperationConfig;
+import com.google.cloud.agentplatform.types.GetSandboxEnvironmentTemplateConfig;
+import com.google.cloud.agentplatform.types.ListSandboxEnvironmentTemplatesConfig;
+import com.google.cloud.agentplatform.types.ListSandboxEnvironmentTemplatesResponse;
+import com.google.cloud.agentplatform.types.SandboxEnvironmentTemplate;
+import com.google.cloud.agentplatform.types.SandboxEnvironmentTemplateOperation;
+import com.google.genai.ApiClient;
+import com.google.genai.ApiResponse;
+import com.google.genai.Common.BuiltRequest;
+import java.util.concurrent.CompletableFuture;
+
+/** Async module of {@link SandboxTemplates} */
+public final class AsyncSandboxTemplates {
+
+ SandboxTemplates sandboxTemplates;
+ ApiClient apiClient;
+
+ public AsyncSandboxTemplates(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ this.sandboxTemplates = new SandboxTemplates(apiClient);
+ }
+
+ CompletableFuture privateCreate(
+ String name, String displayName, CreateSandboxEnvironmentTemplateConfig config) {
+
+ BuiltRequest builtRequest =
+ sandboxTemplates.buildRequestForPrivateCreate(name, displayName, config);
+ return this.apiClient
+ .asyncRequest("post", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
+ .thenApplyAsync(
+ response -> {
+ try (ApiResponse res = response) {
+ return sandboxTemplates.processResponseForPrivateCreate(res, config);
+ }
+ });
+ }
+
+ CompletableFuture privateDelete(
+ String name, DeleteSandboxEnvironmentTemplateConfig config) {
+
+ BuiltRequest builtRequest = sandboxTemplates.buildRequestForPrivateDelete(name, config);
+ return this.apiClient
+ .asyncRequest(
+ "delete", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
+ .thenApplyAsync(
+ response -> {
+ try (ApiResponse res = response) {
+ return sandboxTemplates.processResponseForPrivateDelete(res, config);
+ }
+ });
+ }
+
+ CompletableFuture privateGet(
+ String name, GetSandboxEnvironmentTemplateConfig config) {
+
+ BuiltRequest builtRequest = sandboxTemplates.buildRequestForPrivateGet(name, config);
+ return this.apiClient
+ .asyncRequest("get", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
+ .thenApplyAsync(
+ response -> {
+ try (ApiResponse res = response) {
+ return sandboxTemplates.processResponseForPrivateGet(res, config);
+ }
+ });
+ }
+
+ CompletableFuture privateList(
+ String name, ListSandboxEnvironmentTemplatesConfig config) {
+
+ BuiltRequest builtRequest = sandboxTemplates.buildRequestForPrivateList(name, config);
+ return this.apiClient
+ .asyncRequest("get", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
+ .thenApplyAsync(
+ response -> {
+ try (ApiResponse res = response) {
+ return sandboxTemplates.processResponseForPrivateList(res, config);
+ }
+ });
+ }
+
+ public CompletableFuture
+ getSandboxEnvironmentTemplateOperation(
+ String operationName, GetAgentEngineOperationConfig config) {
+
+ BuiltRequest builtRequest =
+ sandboxTemplates.buildRequestForGetSandboxEnvironmentTemplateOperation(
+ operationName, config);
+ return this.apiClient
+ .asyncRequest("get", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
+ .thenApplyAsync(
+ response -> {
+ try (ApiResponse res = response) {
+ return sandboxTemplates.processResponseForGetSandboxEnvironmentTemplateOperation(
+ res, config);
+ }
+ });
+ }
+}
diff --git a/src/main/java/com/google/cloud/agentplatform/AsyncSandboxes.java b/src/main/java/com/google/cloud/agentplatform/AsyncSandboxes.java
index 0b51029..4777717 100644
--- a/src/main/java/com/google/cloud/agentplatform/AsyncSandboxes.java
+++ b/src/main/java/com/google/cloud/agentplatform/AsyncSandboxes.java
@@ -39,6 +39,8 @@
/** Async module of {@link Sandboxes} */
public final class AsyncSandboxes {
+ public final AsyncSandboxTemplates templates;
+ public final AsyncSandboxSnapshots snapshots;
Sandboxes sandboxes;
ApiClient apiClient;
@@ -46,6 +48,9 @@ public final class AsyncSandboxes {
public AsyncSandboxes(ApiClient apiClient) {
this.apiClient = apiClient;
this.sandboxes = new Sandboxes(apiClient);
+
+ this.templates = new AsyncSandboxTemplates(apiClient);
+ this.snapshots = new AsyncSandboxSnapshots(apiClient);
}
CompletableFuture privateCreate(
diff --git a/src/main/java/com/google/cloud/agentplatform/SandboxSnapshots.java b/src/main/java/com/google/cloud/agentplatform/SandboxSnapshots.java
new file mode 100644
index 0000000..670f408
--- /dev/null
+++ b/src/main/java/com/google/cloud/agentplatform/SandboxSnapshots.java
@@ -0,0 +1,575 @@
+/*
+ * 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;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.google.cloud.agentplatform.types.AgentEngineSandboxSnapshotOperation;
+import com.google.cloud.agentplatform.types.CreateAgentEngineSandboxSnapshotConfig;
+import com.google.cloud.agentplatform.types.CreateSandboxEnvironmentSnapshotRequestParameters;
+import com.google.cloud.agentplatform.types.DeleteSandboxEnvironmentSnapshotConfig;
+import com.google.cloud.agentplatform.types.DeleteSandboxEnvironmentSnapshotOperation;
+import com.google.cloud.agentplatform.types.DeleteSandboxEnvironmentSnapshotRequestParameters;
+import com.google.cloud.agentplatform.types.GetAgentEngineOperationConfig;
+import com.google.cloud.agentplatform.types.GetAgentEngineSandboxSnapshotOperationParameters;
+import com.google.cloud.agentplatform.types.GetSandboxEnvironmentSnapshotConfig;
+import com.google.cloud.agentplatform.types.GetSandboxEnvironmentSnapshotRequestParameters;
+import com.google.cloud.agentplatform.types.ListSandboxEnvironmentSnapshotsConfig;
+import com.google.cloud.agentplatform.types.ListSandboxEnvironmentSnapshotsRequestParameters;
+import com.google.cloud.agentplatform.types.ListSandboxEnvironmentSnapshotsResponse;
+import com.google.cloud.agentplatform.types.SandboxEnvironmentSnapshot;
+import com.google.genai.ApiClient;
+import com.google.genai.ApiResponse;
+import com.google.genai.Common;
+import com.google.genai.Common.BuiltRequest;
+import com.google.genai.JsonSerializable;
+import com.google.genai.errors.GenAiIOException;
+import com.google.genai.types.HttpOptions;
+import java.io.IOException;
+import java.util.Optional;
+import okhttp3.ResponseBody;
+
+public final class SandboxSnapshots {
+
+ final ApiClient apiClient;
+
+ public SandboxSnapshots(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode createAgentEngineSandboxSnapshotConfigToVertex(
+ JsonNode fromObject, ObjectNode parentObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+
+ if (Common.getValueByPath(fromObject, new String[] {"displayName"}) != null) {
+ Common.setValueByPath(
+ parentObject,
+ new String[] {"displayName"},
+ Common.getValueByPath(fromObject, new String[] {"displayName"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"owner"}) != null) {
+ Common.setValueByPath(
+ parentObject,
+ new String[] {"owner"},
+ Common.getValueByPath(fromObject, new String[] {"owner"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"ttl"}) != null) {
+ Common.setValueByPath(
+ parentObject,
+ new String[] {"ttl"},
+ Common.getValueByPath(fromObject, new String[] {"ttl"}));
+ }
+
+ return toObject;
+ }
+
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode createSandboxEnvironmentSnapshotRequestParametersToVertex(
+ JsonNode fromObject, ObjectNode parentObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+ if (Common.getValueByPath(fromObject, new String[] {"sourceSandboxEnvironmentName"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"_url", "name"},
+ Common.getValueByPath(fromObject, new String[] {"sourceSandboxEnvironmentName"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"config"}) != null) {
+ JsonNode unused =
+ createAgentEngineSandboxSnapshotConfigToVertex(
+ JsonSerializable.toJsonNode(
+ Common.getValueByPath(fromObject, new String[] {"config"})),
+ toObject);
+ }
+
+ return toObject;
+ }
+
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode deleteSandboxEnvironmentSnapshotRequestParametersToVertex(
+ JsonNode fromObject, ObjectNode parentObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+ if (Common.getValueByPath(fromObject, new String[] {"name"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"_url", "name"},
+ Common.getValueByPath(fromObject, new String[] {"name"}));
+ }
+
+ return toObject;
+ }
+
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode getAgentEngineSandboxSnapshotOperationParametersToVertex(
+ JsonNode fromObject, ObjectNode parentObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+ if (Common.getValueByPath(fromObject, new String[] {"operationName"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"_url", "operationName"},
+ Common.getValueByPath(fromObject, new String[] {"operationName"}));
+ }
+
+ return toObject;
+ }
+
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode getSandboxEnvironmentSnapshotRequestParametersToVertex(
+ JsonNode fromObject, ObjectNode parentObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+ if (Common.getValueByPath(fromObject, new String[] {"name"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"_url", "name"},
+ Common.getValueByPath(fromObject, new String[] {"name"}));
+ }
+
+ return toObject;
+ }
+
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode listSandboxEnvironmentSnapshotsConfigToVertex(
+ JsonNode fromObject, ObjectNode parentObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+
+ if (Common.getValueByPath(fromObject, new String[] {"pageSize"}) != null) {
+ Common.setValueByPath(
+ parentObject,
+ new String[] {"_query", "pageSize"},
+ Common.getValueByPath(fromObject, new String[] {"pageSize"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"pageToken"}) != null) {
+ Common.setValueByPath(
+ parentObject,
+ new String[] {"_query", "pageToken"},
+ Common.getValueByPath(fromObject, new String[] {"pageToken"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"filter"}) != null) {
+ Common.setValueByPath(
+ parentObject,
+ new String[] {"_query", "filter"},
+ Common.getValueByPath(fromObject, new String[] {"filter"}));
+ }
+
+ return toObject;
+ }
+
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode listSandboxEnvironmentSnapshotsRequestParametersToVertex(
+ JsonNode fromObject, ObjectNode parentObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+ if (Common.getValueByPath(fromObject, new String[] {"name"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"_url", "name"},
+ Common.getValueByPath(fromObject, new String[] {"name"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"config"}) != null) {
+ JsonNode unused =
+ listSandboxEnvironmentSnapshotsConfigToVertex(
+ JsonSerializable.toJsonNode(
+ Common.getValueByPath(fromObject, new String[] {"config"})),
+ toObject);
+ }
+
+ return toObject;
+ }
+
+ /** A shared buildRequest method for both sync and async methods. */
+ BuiltRequest buildRequestForPrivateCreate(
+ String sourceSandboxEnvironmentName, CreateAgentEngineSandboxSnapshotConfig config) {
+
+ CreateSandboxEnvironmentSnapshotRequestParameters.Builder parameterBuilder =
+ CreateSandboxEnvironmentSnapshotRequestParameters.builder();
+
+ if (!Common.isZero(sourceSandboxEnvironmentName)) {
+ parameterBuilder.sourceSandboxEnvironmentName(sourceSandboxEnvironmentName);
+ }
+ if (!Common.isZero(config)) {
+ parameterBuilder.config(config);
+ }
+ JsonNode parameterNode = JsonSerializable.toJsonNode(parameterBuilder.build());
+
+ ObjectNode body;
+ String path;
+ if (this.apiClient.vertexAI()) {
+ body = createSandboxEnvironmentSnapshotRequestParametersToVertex(parameterNode, null);
+ path = Common.formatMap("{name}:snapshot", body.get("_url"));
+ } else {
+ throw new UnsupportedOperationException(
+ "This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini"
+ + " Developer API mode.");
+ }
+ body.remove("_url");
+
+ JsonNode queryParams = body.get("_query");
+ if (queryParams != null) {
+ body.remove("_query");
+ path = String.format("%s?%s", path, Common.urlEncode((ObjectNode) queryParams));
+ }
+
+ // TODO: Remove the hack that removes config.
+ Optional requestHttpOptions = Optional.empty();
+ if (config != null) {
+ requestHttpOptions = config.httpOptions();
+ }
+
+ return new BuiltRequest(path, JsonSerializable.toJsonString(body), requestHttpOptions);
+ }
+
+ /** A shared processResponse function for both sync and async methods. */
+ AgentEngineSandboxSnapshotOperation processResponseForPrivateCreate(
+ ApiResponse response, CreateAgentEngineSandboxSnapshotConfig config) {
+ ResponseBody responseBody = response.getBody();
+ String responseString;
+ try {
+ responseString = responseBody.string();
+ } catch (IOException e) {
+ throw new GenAiIOException("Failed to read HTTP response.", e);
+ }
+
+ JsonNode responseNode = JsonSerializable.stringToJsonNode(responseString);
+
+ if (!this.apiClient.vertexAI()) {
+ throw new UnsupportedOperationException(
+ "This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini"
+ + " Developer API mode.");
+ }
+
+ return JsonSerializable.fromJsonNode(responseNode, AgentEngineSandboxSnapshotOperation.class);
+ }
+
+ public AgentEngineSandboxSnapshotOperation privateCreate(
+ String sourceSandboxEnvironmentName, CreateAgentEngineSandboxSnapshotConfig config) {
+ BuiltRequest builtRequest = buildRequestForPrivateCreate(sourceSandboxEnvironmentName, config);
+
+ try (ApiResponse response =
+ this.apiClient.request(
+ "post", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())) {
+ return processResponseForPrivateCreate(response, config);
+ }
+ }
+
+ /** A shared buildRequest method for both sync and async methods. */
+ BuiltRequest buildRequestForPrivateDelete(
+ String name, DeleteSandboxEnvironmentSnapshotConfig config) {
+
+ DeleteSandboxEnvironmentSnapshotRequestParameters.Builder parameterBuilder =
+ DeleteSandboxEnvironmentSnapshotRequestParameters.builder();
+
+ if (!Common.isZero(name)) {
+ parameterBuilder.name(name);
+ }
+ if (!Common.isZero(config)) {
+ parameterBuilder.config(config);
+ }
+ JsonNode parameterNode = JsonSerializable.toJsonNode(parameterBuilder.build());
+
+ ObjectNode body;
+ String path;
+ if (this.apiClient.vertexAI()) {
+ body = deleteSandboxEnvironmentSnapshotRequestParametersToVertex(parameterNode, null);
+ path = Common.formatMap("{name}", body.get("_url"));
+ } else {
+ throw new UnsupportedOperationException(
+ "This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini"
+ + " Developer API mode.");
+ }
+ body.remove("_url");
+
+ JsonNode queryParams = body.get("_query");
+ if (queryParams != null) {
+ body.remove("_query");
+ path = String.format("%s?%s", path, Common.urlEncode((ObjectNode) queryParams));
+ }
+
+ // TODO: Remove the hack that removes config.
+ Optional requestHttpOptions = Optional.empty();
+ if (config != null) {
+ requestHttpOptions = config.httpOptions();
+ }
+
+ return new BuiltRequest(path, JsonSerializable.toJsonString(body), requestHttpOptions);
+ }
+
+ /** A shared processResponse function for both sync and async methods. */
+ DeleteSandboxEnvironmentSnapshotOperation processResponseForPrivateDelete(
+ ApiResponse response, DeleteSandboxEnvironmentSnapshotConfig config) {
+ ResponseBody responseBody = response.getBody();
+ String responseString;
+ try {
+ responseString = responseBody.string();
+ } catch (IOException e) {
+ throw new GenAiIOException("Failed to read HTTP response.", e);
+ }
+
+ JsonNode responseNode = JsonSerializable.stringToJsonNode(responseString);
+
+ if (!this.apiClient.vertexAI()) {
+ throw new UnsupportedOperationException(
+ "This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini"
+ + " Developer API mode.");
+ }
+
+ return JsonSerializable.fromJsonNode(
+ responseNode, DeleteSandboxEnvironmentSnapshotOperation.class);
+ }
+
+ public DeleteSandboxEnvironmentSnapshotOperation privateDelete(
+ String name, DeleteSandboxEnvironmentSnapshotConfig config) {
+ BuiltRequest builtRequest = buildRequestForPrivateDelete(name, config);
+
+ try (ApiResponse response =
+ this.apiClient.request(
+ "delete", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())) {
+ return processResponseForPrivateDelete(response, config);
+ }
+ }
+
+ /** A shared buildRequest method for both sync and async methods. */
+ BuiltRequest buildRequestForPrivateGet(String name, GetSandboxEnvironmentSnapshotConfig config) {
+
+ GetSandboxEnvironmentSnapshotRequestParameters.Builder parameterBuilder =
+ GetSandboxEnvironmentSnapshotRequestParameters.builder();
+
+ if (!Common.isZero(name)) {
+ parameterBuilder.name(name);
+ }
+ if (!Common.isZero(config)) {
+ parameterBuilder.config(config);
+ }
+ JsonNode parameterNode = JsonSerializable.toJsonNode(parameterBuilder.build());
+
+ ObjectNode body;
+ String path;
+ if (this.apiClient.vertexAI()) {
+ body = getSandboxEnvironmentSnapshotRequestParametersToVertex(parameterNode, null);
+ path = Common.formatMap("{name}", body.get("_url"));
+ } else {
+ throw new UnsupportedOperationException(
+ "This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini"
+ + " Developer API mode.");
+ }
+ body.remove("_url");
+
+ JsonNode queryParams = body.get("_query");
+ if (queryParams != null) {
+ body.remove("_query");
+ path = String.format("%s?%s", path, Common.urlEncode((ObjectNode) queryParams));
+ }
+
+ // TODO: Remove the hack that removes config.
+ Optional requestHttpOptions = Optional.empty();
+ if (config != null) {
+ requestHttpOptions = config.httpOptions();
+ }
+
+ return new BuiltRequest(path, JsonSerializable.toJsonString(body), requestHttpOptions);
+ }
+
+ /** A shared processResponse function for both sync and async methods. */
+ SandboxEnvironmentSnapshot processResponseForPrivateGet(
+ ApiResponse response, GetSandboxEnvironmentSnapshotConfig config) {
+ ResponseBody responseBody = response.getBody();
+ String responseString;
+ try {
+ responseString = responseBody.string();
+ } catch (IOException e) {
+ throw new GenAiIOException("Failed to read HTTP response.", e);
+ }
+
+ JsonNode responseNode = JsonSerializable.stringToJsonNode(responseString);
+
+ if (!this.apiClient.vertexAI()) {
+ throw new UnsupportedOperationException(
+ "This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini"
+ + " Developer API mode.");
+ }
+
+ return JsonSerializable.fromJsonNode(responseNode, SandboxEnvironmentSnapshot.class);
+ }
+
+ public SandboxEnvironmentSnapshot privateGet(
+ String name, GetSandboxEnvironmentSnapshotConfig config) {
+ BuiltRequest builtRequest = buildRequestForPrivateGet(name, config);
+
+ try (ApiResponse response =
+ this.apiClient.request(
+ "get", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())) {
+ return processResponseForPrivateGet(response, config);
+ }
+ }
+
+ /** A shared buildRequest method for both sync and async methods. */
+ BuiltRequest buildRequestForPrivateList(
+ String name, ListSandboxEnvironmentSnapshotsConfig config) {
+
+ ListSandboxEnvironmentSnapshotsRequestParameters.Builder parameterBuilder =
+ ListSandboxEnvironmentSnapshotsRequestParameters.builder();
+
+ if (!Common.isZero(name)) {
+ parameterBuilder.name(name);
+ }
+ if (!Common.isZero(config)) {
+ parameterBuilder.config(config);
+ }
+ JsonNode parameterNode = JsonSerializable.toJsonNode(parameterBuilder.build());
+
+ ObjectNode body;
+ String path;
+ if (this.apiClient.vertexAI()) {
+ body = listSandboxEnvironmentSnapshotsRequestParametersToVertex(parameterNode, null);
+ path = Common.formatMap("{name}/sandboxEnvironmentSnapshots", body.get("_url"));
+ } else {
+ throw new UnsupportedOperationException(
+ "This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini"
+ + " Developer API mode.");
+ }
+ body.remove("_url");
+
+ JsonNode queryParams = body.get("_query");
+ if (queryParams != null) {
+ body.remove("_query");
+ path = String.format("%s?%s", path, Common.urlEncode((ObjectNode) queryParams));
+ }
+
+ // TODO: Remove the hack that removes config.
+ Optional requestHttpOptions = Optional.empty();
+ if (config != null) {
+ requestHttpOptions = config.httpOptions();
+ }
+
+ return new BuiltRequest(path, JsonSerializable.toJsonString(body), requestHttpOptions);
+ }
+
+ /** A shared processResponse function for both sync and async methods. */
+ ListSandboxEnvironmentSnapshotsResponse processResponseForPrivateList(
+ ApiResponse response, ListSandboxEnvironmentSnapshotsConfig config) {
+ ResponseBody responseBody = response.getBody();
+ String responseString;
+ try {
+ responseString = responseBody.string();
+ } catch (IOException e) {
+ throw new GenAiIOException("Failed to read HTTP response.", e);
+ }
+
+ JsonNode responseNode = JsonSerializable.stringToJsonNode(responseString);
+
+ if (!this.apiClient.vertexAI()) {
+ throw new UnsupportedOperationException(
+ "This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini"
+ + " Developer API mode.");
+ }
+
+ return JsonSerializable.fromJsonNode(
+ responseNode, ListSandboxEnvironmentSnapshotsResponse.class);
+ }
+
+ public ListSandboxEnvironmentSnapshotsResponse privateList(
+ String name, ListSandboxEnvironmentSnapshotsConfig config) {
+ BuiltRequest builtRequest = buildRequestForPrivateList(name, config);
+
+ try (ApiResponse response =
+ this.apiClient.request(
+ "get", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())) {
+ return processResponseForPrivateList(response, config);
+ }
+ }
+
+ /** A shared buildRequest method for both sync and async methods. */
+ BuiltRequest buildRequestForGetSandboxSnapshotOperation(
+ String operationName, GetAgentEngineOperationConfig config) {
+
+ GetAgentEngineSandboxSnapshotOperationParameters.Builder parameterBuilder =
+ GetAgentEngineSandboxSnapshotOperationParameters.builder();
+
+ if (!Common.isZero(operationName)) {
+ parameterBuilder.operationName(operationName);
+ }
+ if (!Common.isZero(config)) {
+ parameterBuilder.config(config);
+ }
+ JsonNode parameterNode = JsonSerializable.toJsonNode(parameterBuilder.build());
+
+ ObjectNode body;
+ String path;
+ if (this.apiClient.vertexAI()) {
+ body = getAgentEngineSandboxSnapshotOperationParametersToVertex(parameterNode, null);
+ path = Common.formatMap("{operationName}", body.get("_url"));
+ } else {
+ throw new UnsupportedOperationException(
+ "This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini"
+ + " Developer API mode.");
+ }
+ body.remove("_url");
+
+ JsonNode queryParams = body.get("_query");
+ if (queryParams != null) {
+ body.remove("_query");
+ path = String.format("%s?%s", path, Common.urlEncode((ObjectNode) queryParams));
+ }
+
+ // TODO: Remove the hack that removes config.
+ Optional requestHttpOptions = Optional.empty();
+ if (config != null) {
+ requestHttpOptions = config.httpOptions();
+ }
+
+ return new BuiltRequest(path, JsonSerializable.toJsonString(body), requestHttpOptions);
+ }
+
+ /** A shared processResponse function for both sync and async methods. */
+ AgentEngineSandboxSnapshotOperation processResponseForGetSandboxSnapshotOperation(
+ ApiResponse response, GetAgentEngineOperationConfig config) {
+ ResponseBody responseBody = response.getBody();
+ String responseString;
+ try {
+ responseString = responseBody.string();
+ } catch (IOException e) {
+ throw new GenAiIOException("Failed to read HTTP response.", e);
+ }
+
+ JsonNode responseNode = JsonSerializable.stringToJsonNode(responseString);
+
+ if (!this.apiClient.vertexAI()) {
+ throw new UnsupportedOperationException(
+ "This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini"
+ + " Developer API mode.");
+ }
+
+ return JsonSerializable.fromJsonNode(responseNode, AgentEngineSandboxSnapshotOperation.class);
+ }
+
+ public AgentEngineSandboxSnapshotOperation getSandboxSnapshotOperation(
+ String operationName, GetAgentEngineOperationConfig config) {
+ BuiltRequest builtRequest = buildRequestForGetSandboxSnapshotOperation(operationName, config);
+
+ try (ApiResponse response =
+ this.apiClient.request(
+ "get", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())) {
+ return processResponseForGetSandboxSnapshotOperation(response, config);
+ }
+ }
+}
diff --git a/src/main/java/com/google/cloud/agentplatform/SandboxTemplates.java b/src/main/java/com/google/cloud/agentplatform/SandboxTemplates.java
new file mode 100644
index 0000000..4f02a6b
--- /dev/null
+++ b/src/main/java/com/google/cloud/agentplatform/SandboxTemplates.java
@@ -0,0 +1,586 @@
+/*
+ * 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;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.google.cloud.agentplatform.types.CreateSandboxEnvironmentTemplateConfig;
+import com.google.cloud.agentplatform.types.CreateSandboxEnvironmentTemplateRequestParameters;
+import com.google.cloud.agentplatform.types.DeleteSandboxEnvironmentTemplateConfig;
+import com.google.cloud.agentplatform.types.DeleteSandboxEnvironmentTemplateOperation;
+import com.google.cloud.agentplatform.types.DeleteSandboxEnvironmentTemplateRequestParameters;
+import com.google.cloud.agentplatform.types.GetAgentEngineOperationConfig;
+import com.google.cloud.agentplatform.types.GetSandboxEnvironmentTemplateConfig;
+import com.google.cloud.agentplatform.types.GetSandboxEnvironmentTemplateOperationParameters;
+import com.google.cloud.agentplatform.types.GetSandboxEnvironmentTemplateRequestParameters;
+import com.google.cloud.agentplatform.types.ListSandboxEnvironmentTemplatesConfig;
+import com.google.cloud.agentplatform.types.ListSandboxEnvironmentTemplatesRequestParameters;
+import com.google.cloud.agentplatform.types.ListSandboxEnvironmentTemplatesResponse;
+import com.google.cloud.agentplatform.types.SandboxEnvironmentTemplate;
+import com.google.cloud.agentplatform.types.SandboxEnvironmentTemplateOperation;
+import com.google.genai.ApiClient;
+import com.google.genai.ApiResponse;
+import com.google.genai.Common;
+import com.google.genai.Common.BuiltRequest;
+import com.google.genai.JsonSerializable;
+import com.google.genai.errors.GenAiIOException;
+import com.google.genai.types.HttpOptions;
+import java.io.IOException;
+import java.util.Optional;
+import okhttp3.ResponseBody;
+
+public final class SandboxTemplates {
+
+ final ApiClient apiClient;
+
+ public SandboxTemplates(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode createSandboxEnvironmentTemplateConfigToVertex(
+ JsonNode fromObject, ObjectNode parentObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+
+ if (Common.getValueByPath(fromObject, new String[] {"customContainerEnvironment"}) != null) {
+ Common.setValueByPath(
+ parentObject,
+ new String[] {"customContainerEnvironment"},
+ Common.getValueByPath(fromObject, new String[] {"customContainerEnvironment"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"defaultContainerEnvironment"}) != null) {
+ Common.setValueByPath(
+ parentObject,
+ new String[] {"defaultContainerEnvironment"},
+ Common.getValueByPath(fromObject, new String[] {"defaultContainerEnvironment"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"egressControlConfig"}) != null) {
+ Common.setValueByPath(
+ parentObject,
+ new String[] {"egressControlConfig"},
+ Common.getValueByPath(fromObject, new String[] {"egressControlConfig"}));
+ }
+
+ return toObject;
+ }
+
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode createSandboxEnvironmentTemplateRequestParametersToVertex(
+ JsonNode fromObject, ObjectNode parentObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+ if (Common.getValueByPath(fromObject, new String[] {"name"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"_url", "name"},
+ Common.getValueByPath(fromObject, new String[] {"name"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"displayName"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"displayName"},
+ Common.getValueByPath(fromObject, new String[] {"displayName"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"config"}) != null) {
+ JsonNode unused =
+ createSandboxEnvironmentTemplateConfigToVertex(
+ JsonSerializable.toJsonNode(
+ Common.getValueByPath(fromObject, new String[] {"config"})),
+ toObject);
+ }
+
+ return toObject;
+ }
+
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode deleteSandboxEnvironmentTemplateRequestParametersToVertex(
+ JsonNode fromObject, ObjectNode parentObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+ if (Common.getValueByPath(fromObject, new String[] {"name"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"_url", "name"},
+ Common.getValueByPath(fromObject, new String[] {"name"}));
+ }
+
+ return toObject;
+ }
+
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode getSandboxEnvironmentTemplateOperationParametersToVertex(
+ JsonNode fromObject, ObjectNode parentObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+ if (Common.getValueByPath(fromObject, new String[] {"operationName"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"_url", "operationName"},
+ Common.getValueByPath(fromObject, new String[] {"operationName"}));
+ }
+
+ return toObject;
+ }
+
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode getSandboxEnvironmentTemplateRequestParametersToVertex(
+ JsonNode fromObject, ObjectNode parentObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+ if (Common.getValueByPath(fromObject, new String[] {"name"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"_url", "name"},
+ Common.getValueByPath(fromObject, new String[] {"name"}));
+ }
+
+ return toObject;
+ }
+
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode listSandboxEnvironmentTemplatesConfigToVertex(
+ JsonNode fromObject, ObjectNode parentObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+
+ if (Common.getValueByPath(fromObject, new String[] {"pageSize"}) != null) {
+ Common.setValueByPath(
+ parentObject,
+ new String[] {"_query", "pageSize"},
+ Common.getValueByPath(fromObject, new String[] {"pageSize"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"pageToken"}) != null) {
+ Common.setValueByPath(
+ parentObject,
+ new String[] {"_query", "pageToken"},
+ Common.getValueByPath(fromObject, new String[] {"pageToken"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"filter"}) != null) {
+ Common.setValueByPath(
+ parentObject,
+ new String[] {"_query", "filter"},
+ Common.getValueByPath(fromObject, new String[] {"filter"}));
+ }
+
+ return toObject;
+ }
+
+ @ExcludeFromGeneratedCoverageReport
+ ObjectNode listSandboxEnvironmentTemplatesRequestParametersToVertex(
+ JsonNode fromObject, ObjectNode parentObject) {
+ ObjectNode toObject = JsonSerializable.objectMapper().createObjectNode();
+ if (Common.getValueByPath(fromObject, new String[] {"name"}) != null) {
+ Common.setValueByPath(
+ toObject,
+ new String[] {"_url", "name"},
+ Common.getValueByPath(fromObject, new String[] {"name"}));
+ }
+
+ if (Common.getValueByPath(fromObject, new String[] {"config"}) != null) {
+ JsonNode unused =
+ listSandboxEnvironmentTemplatesConfigToVertex(
+ JsonSerializable.toJsonNode(
+ Common.getValueByPath(fromObject, new String[] {"config"})),
+ toObject);
+ }
+
+ return toObject;
+ }
+
+ /** A shared buildRequest method for both sync and async methods. */
+ BuiltRequest buildRequestForPrivateCreate(
+ String name, String displayName, CreateSandboxEnvironmentTemplateConfig config) {
+
+ CreateSandboxEnvironmentTemplateRequestParameters.Builder parameterBuilder =
+ CreateSandboxEnvironmentTemplateRequestParameters.builder();
+
+ if (!Common.isZero(name)) {
+ parameterBuilder.name(name);
+ }
+ if (!Common.isZero(displayName)) {
+ parameterBuilder.displayName(displayName);
+ }
+ if (!Common.isZero(config)) {
+ parameterBuilder.config(config);
+ }
+ JsonNode parameterNode = JsonSerializable.toJsonNode(parameterBuilder.build());
+
+ ObjectNode body;
+ String path;
+ if (this.apiClient.vertexAI()) {
+ body = createSandboxEnvironmentTemplateRequestParametersToVertex(parameterNode, null);
+ path = Common.formatMap("{name}/sandboxEnvironmentTemplates", body.get("_url"));
+ } else {
+ throw new UnsupportedOperationException(
+ "This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini"
+ + " Developer API mode.");
+ }
+ body.remove("_url");
+
+ JsonNode queryParams = body.get("_query");
+ if (queryParams != null) {
+ body.remove("_query");
+ path = String.format("%s?%s", path, Common.urlEncode((ObjectNode) queryParams));
+ }
+
+ // TODO: Remove the hack that removes config.
+ Optional requestHttpOptions = Optional.empty();
+ if (config != null) {
+ requestHttpOptions = config.httpOptions();
+ }
+
+ return new BuiltRequest(path, JsonSerializable.toJsonString(body), requestHttpOptions);
+ }
+
+ /** A shared processResponse function for both sync and async methods. */
+ SandboxEnvironmentTemplateOperation processResponseForPrivateCreate(
+ ApiResponse response, CreateSandboxEnvironmentTemplateConfig config) {
+ ResponseBody responseBody = response.getBody();
+ String responseString;
+ try {
+ responseString = responseBody.string();
+ } catch (IOException e) {
+ throw new GenAiIOException("Failed to read HTTP response.", e);
+ }
+
+ JsonNode responseNode = JsonSerializable.stringToJsonNode(responseString);
+
+ if (!this.apiClient.vertexAI()) {
+ throw new UnsupportedOperationException(
+ "This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini"
+ + " Developer API mode.");
+ }
+
+ return JsonSerializable.fromJsonNode(responseNode, SandboxEnvironmentTemplateOperation.class);
+ }
+
+ public SandboxEnvironmentTemplateOperation privateCreate(
+ String name, String displayName, CreateSandboxEnvironmentTemplateConfig config) {
+ BuiltRequest builtRequest = buildRequestForPrivateCreate(name, displayName, config);
+
+ try (ApiResponse response =
+ this.apiClient.request(
+ "post", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())) {
+ return processResponseForPrivateCreate(response, config);
+ }
+ }
+
+ /** A shared buildRequest method for both sync and async methods. */
+ BuiltRequest buildRequestForPrivateDelete(
+ String name, DeleteSandboxEnvironmentTemplateConfig config) {
+
+ DeleteSandboxEnvironmentTemplateRequestParameters.Builder parameterBuilder =
+ DeleteSandboxEnvironmentTemplateRequestParameters.builder();
+
+ if (!Common.isZero(name)) {
+ parameterBuilder.name(name);
+ }
+ if (!Common.isZero(config)) {
+ parameterBuilder.config(config);
+ }
+ JsonNode parameterNode = JsonSerializable.toJsonNode(parameterBuilder.build());
+
+ ObjectNode body;
+ String path;
+ if (this.apiClient.vertexAI()) {
+ body = deleteSandboxEnvironmentTemplateRequestParametersToVertex(parameterNode, null);
+ path = Common.formatMap("{name}", body.get("_url"));
+ } else {
+ throw new UnsupportedOperationException(
+ "This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini"
+ + " Developer API mode.");
+ }
+ body.remove("_url");
+
+ JsonNode queryParams = body.get("_query");
+ if (queryParams != null) {
+ body.remove("_query");
+ path = String.format("%s?%s", path, Common.urlEncode((ObjectNode) queryParams));
+ }
+
+ // TODO: Remove the hack that removes config.
+ Optional requestHttpOptions = Optional.empty();
+ if (config != null) {
+ requestHttpOptions = config.httpOptions();
+ }
+
+ return new BuiltRequest(path, JsonSerializable.toJsonString(body), requestHttpOptions);
+ }
+
+ /** A shared processResponse function for both sync and async methods. */
+ DeleteSandboxEnvironmentTemplateOperation processResponseForPrivateDelete(
+ ApiResponse response, DeleteSandboxEnvironmentTemplateConfig config) {
+ ResponseBody responseBody = response.getBody();
+ String responseString;
+ try {
+ responseString = responseBody.string();
+ } catch (IOException e) {
+ throw new GenAiIOException("Failed to read HTTP response.", e);
+ }
+
+ JsonNode responseNode = JsonSerializable.stringToJsonNode(responseString);
+
+ if (!this.apiClient.vertexAI()) {
+ throw new UnsupportedOperationException(
+ "This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini"
+ + " Developer API mode.");
+ }
+
+ return JsonSerializable.fromJsonNode(
+ responseNode, DeleteSandboxEnvironmentTemplateOperation.class);
+ }
+
+ public DeleteSandboxEnvironmentTemplateOperation privateDelete(
+ String name, DeleteSandboxEnvironmentTemplateConfig config) {
+ BuiltRequest builtRequest = buildRequestForPrivateDelete(name, config);
+
+ try (ApiResponse response =
+ this.apiClient.request(
+ "delete", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())) {
+ return processResponseForPrivateDelete(response, config);
+ }
+ }
+
+ /** A shared buildRequest method for both sync and async methods. */
+ BuiltRequest buildRequestForPrivateGet(String name, GetSandboxEnvironmentTemplateConfig config) {
+
+ GetSandboxEnvironmentTemplateRequestParameters.Builder parameterBuilder =
+ GetSandboxEnvironmentTemplateRequestParameters.builder();
+
+ if (!Common.isZero(name)) {
+ parameterBuilder.name(name);
+ }
+ if (!Common.isZero(config)) {
+ parameterBuilder.config(config);
+ }
+ JsonNode parameterNode = JsonSerializable.toJsonNode(parameterBuilder.build());
+
+ ObjectNode body;
+ String path;
+ if (this.apiClient.vertexAI()) {
+ body = getSandboxEnvironmentTemplateRequestParametersToVertex(parameterNode, null);
+ path = Common.formatMap("{name}", body.get("_url"));
+ } else {
+ throw new UnsupportedOperationException(
+ "This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini"
+ + " Developer API mode.");
+ }
+ body.remove("_url");
+
+ JsonNode queryParams = body.get("_query");
+ if (queryParams != null) {
+ body.remove("_query");
+ path = String.format("%s?%s", path, Common.urlEncode((ObjectNode) queryParams));
+ }
+
+ // TODO: Remove the hack that removes config.
+ Optional requestHttpOptions = Optional.empty();
+ if (config != null) {
+ requestHttpOptions = config.httpOptions();
+ }
+
+ return new BuiltRequest(path, JsonSerializable.toJsonString(body), requestHttpOptions);
+ }
+
+ /** A shared processResponse function for both sync and async methods. */
+ SandboxEnvironmentTemplate processResponseForPrivateGet(
+ ApiResponse response, GetSandboxEnvironmentTemplateConfig config) {
+ ResponseBody responseBody = response.getBody();
+ String responseString;
+ try {
+ responseString = responseBody.string();
+ } catch (IOException e) {
+ throw new GenAiIOException("Failed to read HTTP response.", e);
+ }
+
+ JsonNode responseNode = JsonSerializable.stringToJsonNode(responseString);
+
+ if (!this.apiClient.vertexAI()) {
+ throw new UnsupportedOperationException(
+ "This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini"
+ + " Developer API mode.");
+ }
+
+ return JsonSerializable.fromJsonNode(responseNode, SandboxEnvironmentTemplate.class);
+ }
+
+ public SandboxEnvironmentTemplate privateGet(
+ String name, GetSandboxEnvironmentTemplateConfig config) {
+ BuiltRequest builtRequest = buildRequestForPrivateGet(name, config);
+
+ try (ApiResponse response =
+ this.apiClient.request(
+ "get", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())) {
+ return processResponseForPrivateGet(response, config);
+ }
+ }
+
+ /** A shared buildRequest method for both sync and async methods. */
+ BuiltRequest buildRequestForPrivateList(
+ String name, ListSandboxEnvironmentTemplatesConfig config) {
+
+ ListSandboxEnvironmentTemplatesRequestParameters.Builder parameterBuilder =
+ ListSandboxEnvironmentTemplatesRequestParameters.builder();
+
+ if (!Common.isZero(name)) {
+ parameterBuilder.name(name);
+ }
+ if (!Common.isZero(config)) {
+ parameterBuilder.config(config);
+ }
+ JsonNode parameterNode = JsonSerializable.toJsonNode(parameterBuilder.build());
+
+ ObjectNode body;
+ String path;
+ if (this.apiClient.vertexAI()) {
+ body = listSandboxEnvironmentTemplatesRequestParametersToVertex(parameterNode, null);
+ path = Common.formatMap("{name}/sandboxEnvironmentTemplates", body.get("_url"));
+ } else {
+ throw new UnsupportedOperationException(
+ "This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini"
+ + " Developer API mode.");
+ }
+ body.remove("_url");
+
+ JsonNode queryParams = body.get("_query");
+ if (queryParams != null) {
+ body.remove("_query");
+ path = String.format("%s?%s", path, Common.urlEncode((ObjectNode) queryParams));
+ }
+
+ // TODO: Remove the hack that removes config.
+ Optional requestHttpOptions = Optional.empty();
+ if (config != null) {
+ requestHttpOptions = config.httpOptions();
+ }
+
+ return new BuiltRequest(path, JsonSerializable.toJsonString(body), requestHttpOptions);
+ }
+
+ /** A shared processResponse function for both sync and async methods. */
+ ListSandboxEnvironmentTemplatesResponse processResponseForPrivateList(
+ ApiResponse response, ListSandboxEnvironmentTemplatesConfig config) {
+ ResponseBody responseBody = response.getBody();
+ String responseString;
+ try {
+ responseString = responseBody.string();
+ } catch (IOException e) {
+ throw new GenAiIOException("Failed to read HTTP response.", e);
+ }
+
+ JsonNode responseNode = JsonSerializable.stringToJsonNode(responseString);
+
+ if (!this.apiClient.vertexAI()) {
+ throw new UnsupportedOperationException(
+ "This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini"
+ + " Developer API mode.");
+ }
+
+ return JsonSerializable.fromJsonNode(
+ responseNode, ListSandboxEnvironmentTemplatesResponse.class);
+ }
+
+ public ListSandboxEnvironmentTemplatesResponse privateList(
+ String name, ListSandboxEnvironmentTemplatesConfig config) {
+ BuiltRequest builtRequest = buildRequestForPrivateList(name, config);
+
+ try (ApiResponse response =
+ this.apiClient.request(
+ "get", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())) {
+ return processResponseForPrivateList(response, config);
+ }
+ }
+
+ /** A shared buildRequest method for both sync and async methods. */
+ BuiltRequest buildRequestForGetSandboxEnvironmentTemplateOperation(
+ String operationName, GetAgentEngineOperationConfig config) {
+
+ GetSandboxEnvironmentTemplateOperationParameters.Builder parameterBuilder =
+ GetSandboxEnvironmentTemplateOperationParameters.builder();
+
+ if (!Common.isZero(operationName)) {
+ parameterBuilder.operationName(operationName);
+ }
+ if (!Common.isZero(config)) {
+ parameterBuilder.config(config);
+ }
+ JsonNode parameterNode = JsonSerializable.toJsonNode(parameterBuilder.build());
+
+ ObjectNode body;
+ String path;
+ if (this.apiClient.vertexAI()) {
+ body = getSandboxEnvironmentTemplateOperationParametersToVertex(parameterNode, null);
+ path = Common.formatMap("{operationName}", body.get("_url"));
+ } else {
+ throw new UnsupportedOperationException(
+ "This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini"
+ + " Developer API mode.");
+ }
+ body.remove("_url");
+
+ JsonNode queryParams = body.get("_query");
+ if (queryParams != null) {
+ body.remove("_query");
+ path = String.format("%s?%s", path, Common.urlEncode((ObjectNode) queryParams));
+ }
+
+ // TODO: Remove the hack that removes config.
+ Optional requestHttpOptions = Optional.empty();
+ if (config != null) {
+ requestHttpOptions = config.httpOptions();
+ }
+
+ return new BuiltRequest(path, JsonSerializable.toJsonString(body), requestHttpOptions);
+ }
+
+ /** A shared processResponse function for both sync and async methods. */
+ SandboxEnvironmentTemplateOperation processResponseForGetSandboxEnvironmentTemplateOperation(
+ ApiResponse response, GetAgentEngineOperationConfig config) {
+ ResponseBody responseBody = response.getBody();
+ String responseString;
+ try {
+ responseString = responseBody.string();
+ } catch (IOException e) {
+ throw new GenAiIOException("Failed to read HTTP response.", e);
+ }
+
+ JsonNode responseNode = JsonSerializable.stringToJsonNode(responseString);
+
+ if (!this.apiClient.vertexAI()) {
+ throw new UnsupportedOperationException(
+ "This method is only supported in Gemini Enterprise Agent Platform mode, not in Gemini"
+ + " Developer API mode.");
+ }
+
+ return JsonSerializable.fromJsonNode(responseNode, SandboxEnvironmentTemplateOperation.class);
+ }
+
+ public SandboxEnvironmentTemplateOperation getSandboxEnvironmentTemplateOperation(
+ String operationName, GetAgentEngineOperationConfig config) {
+ BuiltRequest builtRequest =
+ buildRequestForGetSandboxEnvironmentTemplateOperation(operationName, config);
+
+ try (ApiResponse response =
+ this.apiClient.request(
+ "get", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())) {
+ return processResponseForGetSandboxEnvironmentTemplateOperation(response, config);
+ }
+ }
+}
diff --git a/src/main/java/com/google/cloud/agentplatform/Sandboxes.java b/src/main/java/com/google/cloud/agentplatform/Sandboxes.java
index ae0d9e1..d49c0af 100644
--- a/src/main/java/com/google/cloud/agentplatform/Sandboxes.java
+++ b/src/main/java/com/google/cloud/agentplatform/Sandboxes.java
@@ -52,11 +52,15 @@
import okhttp3.ResponseBody;
public final class Sandboxes {
+ public final SandboxTemplates templates;
+ public final SandboxSnapshots snapshots;
final ApiClient apiClient;
public Sandboxes(ApiClient apiClient) {
this.apiClient = apiClient;
+ this.templates = new SandboxTemplates(apiClient);
+ this.snapshots = new SandboxSnapshots(apiClient);
}
@ExcludeFromGeneratedCoverageReport
diff --git a/src/main/java/com/google/cloud/agentplatform/types/AgentEngineSandboxSnapshotOperation.java b/src/main/java/com/google/cloud/agentplatform/types/AgentEngineSandboxSnapshotOperation.java
new file mode 100644
index 0000000..d9cc607
--- /dev/null
+++ b/src/main/java/com/google/cloud/agentplatform/types/AgentEngineSandboxSnapshotOperation.java
@@ -0,0 +1,201 @@
+/*
+ * 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.Map;
+import java.util.Optional;
+
+/** Operation that has an agent engine sandbox snapshot as a response. */
+@AutoValue
+@JsonDeserialize(builder = AgentEngineSandboxSnapshotOperation.Builder.class)
+public abstract class AgentEngineSandboxSnapshotOperation extends JsonSerializable {
+ /**
+ * The server-assigned name, which is only unique within the same service that originally returns
+ * it. If you use the default HTTP mapping, the `name` should be a resource name ending with
+ * `operations/{unique_id}`.
+ */
+ @JsonProperty("name")
+ public abstract Optional name();
+
+ /**
+ * Service-specific metadata associated with the operation. It typically contains progress
+ * information and common metadata such as create time. Some services might not provide such
+ * metadata. Any method that returns a long-running operation should document the metadata type,
+ * if any.
+ */
+ @JsonProperty("metadata")
+ public abstract Optional