This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * RuntimeName name = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]"); + * Runtime response = managedNotebookServiceClient.getRuntime(name); + * } + * }+ * + *
Note: close() needs to be called on the ManagedNotebookServiceClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + *
The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of ManagedNotebookServiceSettings + * to create(). For example: + * + *
To customize credentials: + * + *
{@code + * ManagedNotebookServiceSettings managedNotebookServiceSettings = + * ManagedNotebookServiceSettings.newBuilder() + * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + * .build(); + * ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create(managedNotebookServiceSettings); + * }+ * + *
To customize the endpoint: + * + *
{@code + * ManagedNotebookServiceSettings managedNotebookServiceSettings = + * ManagedNotebookServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + * ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create(managedNotebookServiceSettings); + * }+ * + *
Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ManagedNotebookServiceClient implements BackgroundResource { + private final ManagedNotebookServiceSettings settings; + private final ManagedNotebookServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of ManagedNotebookServiceClient with default settings. */ + public static final ManagedNotebookServiceClient create() throws IOException { + return create(ManagedNotebookServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ManagedNotebookServiceClient, using the given settings. The channels + * are created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final ManagedNotebookServiceClient create(ManagedNotebookServiceSettings settings) + throws IOException { + return new ManagedNotebookServiceClient(settings); + } + + /** + * Constructs an instance of ManagedNotebookServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(ManagedNotebookServiceSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final ManagedNotebookServiceClient create(ManagedNotebookServiceStub stub) { + return new ManagedNotebookServiceClient(stub); + } + + /** + * Constructs an instance of ManagedNotebookServiceClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected ManagedNotebookServiceClient(ManagedNotebookServiceSettings settings) + throws IOException { + this.settings = settings; + this.stub = ((ManagedNotebookServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected ManagedNotebookServiceClient(ManagedNotebookServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final ManagedNotebookServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ManagedNotebookServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Runtimes in a given project and location. + * + *
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * for (Runtime element : managedNotebookServiceClient.listRuntimes(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRuntimesPagedResponse listRuntimes(LocationName parent) { + ListRuntimesRequest request = + ListRuntimesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listRuntimes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Runtimes in a given project and location. + * + *
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * String parent = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString(); + * for (Runtime element : managedNotebookServiceClient.listRuntimes(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRuntimesPagedResponse listRuntimes(String parent) { + ListRuntimesRequest request = ListRuntimesRequest.newBuilder().setParent(parent).build(); + return listRuntimes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Runtimes in a given project and location. + * + *
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * ListRuntimesRequest request = + * ListRuntimesRequest.newBuilder() + * .setParent(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (Runtime element : managedNotebookServiceClient.listRuntimes(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRuntimesPagedResponse listRuntimes(ListRuntimesRequest request) { + return listRuntimesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Runtimes in a given project and location. + * + *
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * ListRuntimesRequest request = + * ListRuntimesRequest.newBuilder() + * .setParent(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * managedNotebookServiceClient.listRuntimesPagedCallable().futureCall(request); + * // Do something. + * for (Runtime element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * ListRuntimesRequest request = + * ListRuntimesRequest.newBuilder() + * .setParent(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListRuntimesResponse response = + * managedNotebookServiceClient.listRuntimesCallable().call(request); + * for (Runtime element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * RuntimeName name = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]"); + * Runtime response = managedNotebookServiceClient.getRuntime(name); + * } + * }+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Runtime getRuntime(RuntimeName name) { + GetRuntimeRequest request = + GetRuntimeRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getRuntime(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Runtime. The location must be a regional endpoint rather than zonal. + * + *
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * String name = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString(); + * Runtime response = managedNotebookServiceClient.getRuntime(name); + * } + * }+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Runtime getRuntime(String name) { + GetRuntimeRequest request = GetRuntimeRequest.newBuilder().setName(name).build(); + return getRuntime(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Runtime. The location must be a regional endpoint rather than zonal. + * + *
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * GetRuntimeRequest request = + * GetRuntimeRequest.newBuilder() + * .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + * .build(); + * Runtime response = managedNotebookServiceClient.getRuntime(request); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Runtime getRuntime(GetRuntimeRequest request) { + return getRuntimeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Runtime. The location must be a regional endpoint rather than zonal. + * + *
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * GetRuntimeRequest request = + * GetRuntimeRequest.newBuilder() + * .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * managedNotebookServiceClient.getRuntimeCallable().futureCall(request); + * // Do something. + * Runtime response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * RuntimeName parent = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]"); + * String runtimeId = "runtimeId121455379"; + * Runtime runtime = Runtime.newBuilder().build(); + * Runtime response = + * managedNotebookServiceClient.createRuntimeAsync(parent, runtimeId, runtime).get(); + * } + * }+ * + * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}` + * @param runtimeId Required. User-defined unique ID of this Runtime. + * @param runtime Required. The Runtime to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * String parent = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString(); + * String runtimeId = "runtimeId121455379"; + * Runtime runtime = Runtime.newBuilder().build(); + * Runtime response = + * managedNotebookServiceClient.createRuntimeAsync(parent, runtimeId, runtime).get(); + * } + * }+ * + * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}` + * @param runtimeId Required. User-defined unique ID of this Runtime. + * @param runtime Required. The Runtime to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * CreateRuntimeRequest request = + * CreateRuntimeRequest.newBuilder() + * .setParent(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + * .setRuntimeId("runtimeId121455379") + * .setRuntime(Runtime.newBuilder().build()) + * .build(); + * Runtime response = managedNotebookServiceClient.createRuntimeAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * CreateRuntimeRequest request = + * CreateRuntimeRequest.newBuilder() + * .setParent(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + * .setRuntimeId("runtimeId121455379") + * .setRuntime(Runtime.newBuilder().build()) + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * managedNotebookServiceClient.createRuntimeOperationCallable().futureCall(request); + * // Do something. + * Runtime response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * CreateRuntimeRequest request = + * CreateRuntimeRequest.newBuilder() + * .setParent(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + * .setRuntimeId("runtimeId121455379") + * .setRuntime(Runtime.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * managedNotebookServiceClient.createRuntimeCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * RuntimeName name = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]"); + * managedNotebookServiceClient.deleteRuntimeAsync(name).get(); + * } + * }+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * String name = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString(); + * managedNotebookServiceClient.deleteRuntimeAsync(name).get(); + * } + * }+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * DeleteRuntimeRequest request = + * DeleteRuntimeRequest.newBuilder() + * .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + * .build(); + * managedNotebookServiceClient.deleteRuntimeAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * DeleteRuntimeRequest request = + * DeleteRuntimeRequest.newBuilder() + * .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * managedNotebookServiceClient.deleteRuntimeOperationCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * DeleteRuntimeRequest request = + * DeleteRuntimeRequest.newBuilder() + * .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * managedNotebookServiceClient.deleteRuntimeCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * String name = "name3373707"; + * Runtime response = managedNotebookServiceClient.startRuntimeAsync(name).get(); + * } + * }+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * StartRuntimeRequest request = StartRuntimeRequest.newBuilder().setName("name3373707").build(); + * Runtime response = managedNotebookServiceClient.startRuntimeAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * StartRuntimeRequest request = StartRuntimeRequest.newBuilder().setName("name3373707").build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * managedNotebookServiceClient.startRuntimeOperationCallable().futureCall(request); + * // Do something. + * Runtime response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * StartRuntimeRequest request = StartRuntimeRequest.newBuilder().setName("name3373707").build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * managedNotebookServiceClient.startRuntimeCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * String name = "name3373707"; + * Runtime response = managedNotebookServiceClient.stopRuntimeAsync(name).get(); + * } + * }+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * StopRuntimeRequest request = StopRuntimeRequest.newBuilder().setName("name3373707").build(); + * Runtime response = managedNotebookServiceClient.stopRuntimeAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * StopRuntimeRequest request = StopRuntimeRequest.newBuilder().setName("name3373707").build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * managedNotebookServiceClient.stopRuntimeOperationCallable().futureCall(request); + * // Do something. + * Runtime response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * StopRuntimeRequest request = StopRuntimeRequest.newBuilder().setName("name3373707").build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * managedNotebookServiceClient.stopRuntimeCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * String name = "name3373707"; + * Runtime response = managedNotebookServiceClient.switchRuntimeAsync(name).get(); + * } + * }+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * SwitchRuntimeRequest request = + * SwitchRuntimeRequest.newBuilder() + * .setName("name3373707") + * .setMachineType("machineType-218117087") + * .setAcceleratorConfig(RuntimeAcceleratorConfig.newBuilder().build()) + * .build(); + * Runtime response = managedNotebookServiceClient.switchRuntimeAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * SwitchRuntimeRequest request = + * SwitchRuntimeRequest.newBuilder() + * .setName("name3373707") + * .setMachineType("machineType-218117087") + * .setAcceleratorConfig(RuntimeAcceleratorConfig.newBuilder().build()) + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * managedNotebookServiceClient.switchRuntimeOperationCallable().futureCall(request); + * // Do something. + * Runtime response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * SwitchRuntimeRequest request = + * SwitchRuntimeRequest.newBuilder() + * .setName("name3373707") + * .setMachineType("machineType-218117087") + * .setAcceleratorConfig(RuntimeAcceleratorConfig.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * managedNotebookServiceClient.switchRuntimeCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * String name = "name3373707"; + * Runtime response = managedNotebookServiceClient.resetRuntimeAsync(name).get(); + * } + * }+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * ResetRuntimeRequest request = ResetRuntimeRequest.newBuilder().setName("name3373707").build(); + * Runtime response = managedNotebookServiceClient.resetRuntimeAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * ResetRuntimeRequest request = ResetRuntimeRequest.newBuilder().setName("name3373707").build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * managedNotebookServiceClient.resetRuntimeOperationCallable().futureCall(request); + * // Do something. + * Runtime response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * ResetRuntimeRequest request = ResetRuntimeRequest.newBuilder().setName("name3373707").build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * managedNotebookServiceClient.resetRuntimeCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * RuntimeName name = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]"); + * Runtime response = managedNotebookServiceClient.reportRuntimeEventAsync(name).get(); + * } + * }+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * String name = RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString(); + * Runtime response = managedNotebookServiceClient.reportRuntimeEventAsync(name).get(); + * } + * }+ * + * @param name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * ReportRuntimeEventRequest request = + * ReportRuntimeEventRequest.newBuilder() + * .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + * .setVmId("vmId3622450") + * .setEvent(Event.newBuilder().build()) + * .build(); + * Runtime response = managedNotebookServiceClient.reportRuntimeEventAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * ReportRuntimeEventRequest request = + * ReportRuntimeEventRequest.newBuilder() + * .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + * .setVmId("vmId3622450") + * .setEvent(Event.newBuilder().build()) + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * managedNotebookServiceClient.reportRuntimeEventOperationCallable().futureCall(request); + * // Do something. + * Runtime response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (ManagedNotebookServiceClient managedNotebookServiceClient = + * ManagedNotebookServiceClient.create()) { + * ReportRuntimeEventRequest request = + * ReportRuntimeEventRequest.newBuilder() + * .setName(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString()) + * .setVmId("vmId3622450") + * .setEvent(Event.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * managedNotebookServiceClient.reportRuntimeEventCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
The default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the total timeout of getRuntime to 30 seconds: + * + *
{@code + * ManagedNotebookServiceSettings.Builder managedNotebookServiceSettingsBuilder = + * ManagedNotebookServiceSettings.newBuilder(); + * managedNotebookServiceSettingsBuilder + * .getRuntimeSettings() + * .setRetrySettings( + * managedNotebookServiceSettingsBuilder + * .getRuntimeSettings() + * .getRetrySettings() + * .toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); + * ManagedNotebookServiceSettings managedNotebookServiceSettings = + * managedNotebookServiceSettingsBuilder.build(); + * }+ */ +@Generated("by gapic-generator-java") +public class ManagedNotebookServiceSettings extends ClientSettings
Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the NotebookServiceClient object to clean up resources
+ * such as threads. In the example above, try-with-resources is used, which automatically calls
+ * close().
+ *
+ * The surface of this class includes several types of Java methods for each of the API's
+ * methods:
+ *
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of NotebookServiceSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class NotebookServiceClient implements BackgroundResource {
+ private final NotebookServiceSettings settings;
+ private final NotebookServiceStub stub;
+ private final OperationsClient operationsClient;
+
+ /** Constructs an instance of NotebookServiceClient with default settings. */
+ public static final NotebookServiceClient create() throws IOException {
+ return create(NotebookServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of NotebookServiceClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final NotebookServiceClient create(NotebookServiceSettings settings)
+ throws IOException {
+ return new NotebookServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of NotebookServiceClient, using the given stub for making calls. This is
+ * for advanced usage - prefer using create(NotebookServiceSettings).
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final NotebookServiceClient create(NotebookServiceStub stub) {
+ return new NotebookServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of NotebookServiceClient, using the given settings. This is protected so
+ * that it is easy to make a subclass, but otherwise, the static factory methods should be
+ * preferred.
+ */
+ protected NotebookServiceClient(NotebookServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((NotebookServiceStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected NotebookServiceClient(NotebookServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ public final NotebookServiceSettings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public NotebookServiceStub getStub() {
+ return stub;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ public final OperationsClient getOperationsClient() {
+ return operationsClient;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists instances in a given project and location.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of getInstance to 30 seconds:
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * String name = "name3373707";
+ * Instance response = notebookServiceClient.getInstance(name);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ * {@code
+ * NotebookServiceSettings notebookServiceSettings =
+ * NotebookServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * NotebookServiceClient notebookServiceClient =
+ * NotebookServiceClient.create(notebookServiceSettings);
+ * }
+ *
+ * {@code
+ * NotebookServiceSettings notebookServiceSettings =
+ * NotebookServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * NotebookServiceClient notebookServiceClient =
+ * NotebookServiceClient.create(notebookServiceSettings);
+ * }
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * String parent = "parent-995424086";
+ * for (Instance element : notebookServiceClient.listInstances(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListInstancesPagedResponse listInstances(String parent) {
+ ListInstancesRequest request = ListInstancesRequest.newBuilder().setParent(parent).build();
+ return listInstances(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists instances in a given project and location.
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ListInstancesRequest request =
+ * ListInstancesRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Instance element : notebookServiceClient.listInstances(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListInstancesPagedResponse listInstances(ListInstancesRequest request) {
+ return listInstancesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists instances in a given project and location.
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ListInstancesRequest request =
+ * ListInstancesRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ListInstancesRequest request =
+ * ListInstancesRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListInstancesResponse response =
+ * notebookServiceClient.listInstancesCallable().call(request);
+ * for (Instance element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * String name = "name3373707";
+ * Instance response = notebookServiceClient.getInstance(name);
+ * }
+ * }
+ *
+ * @param name Required. Format:
+ * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Instance getInstance(String name) {
+ GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name).build();
+ return getInstance(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Instance.
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+ * Instance response = notebookServiceClient.getInstance(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Instance getInstance(GetInstanceRequest request) {
+ return getInstanceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Instance.
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * String parent = "parent-995424086";
+ * Instance instance = Instance.newBuilder().build();
+ * String instanceId = "instanceId902024336";
+ * Instance response =
+ * notebookServiceClient.createInstanceAsync(parent, instance, instanceId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}`
+ * @param instance Required. The instance to be created.
+ * @param instanceId Required. User-defined unique ID of this instance.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * CreateInstanceRequest request =
+ * CreateInstanceRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setInstanceId("instanceId902024336")
+ * .setInstance(Instance.newBuilder().build())
+ * .build();
+ * Instance response = notebookServiceClient.createInstanceAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * CreateInstanceRequest request =
+ * CreateInstanceRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setInstanceId("instanceId902024336")
+ * .setInstance(Instance.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * CreateInstanceRequest request =
+ * CreateInstanceRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setInstanceId("instanceId902024336")
+ * .setInstance(Instance.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * RegisterInstanceRequest request =
+ * RegisterInstanceRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setInstanceId("instanceId902024336")
+ * .build();
+ * Instance response = notebookServiceClient.registerInstanceAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * RegisterInstanceRequest request =
+ * RegisterInstanceRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setInstanceId("instanceId902024336")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * RegisterInstanceRequest request =
+ * RegisterInstanceRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setInstanceId("instanceId902024336")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * SetInstanceAcceleratorRequest request =
+ * SetInstanceAcceleratorRequest.newBuilder()
+ * .setName("name3373707")
+ * .setCoreCount(-1963855761)
+ * .build();
+ * Instance response = notebookServiceClient.setInstanceAcceleratorAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * SetInstanceAcceleratorRequest request =
+ * SetInstanceAcceleratorRequest.newBuilder()
+ * .setName("name3373707")
+ * .setCoreCount(-1963855761)
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * SetInstanceAcceleratorRequest request =
+ * SetInstanceAcceleratorRequest.newBuilder()
+ * .setName("name3373707")
+ * .setCoreCount(-1963855761)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * SetInstanceMachineTypeRequest request =
+ * SetInstanceMachineTypeRequest.newBuilder()
+ * .setName("name3373707")
+ * .setMachineType("machineType-218117087")
+ * .build();
+ * Instance response = notebookServiceClient.setInstanceMachineTypeAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * SetInstanceMachineTypeRequest request =
+ * SetInstanceMachineTypeRequest.newBuilder()
+ * .setName("name3373707")
+ * .setMachineType("machineType-218117087")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * SetInstanceMachineTypeRequest request =
+ * SetInstanceMachineTypeRequest.newBuilder()
+ * .setName("name3373707")
+ * .setMachineType("machineType-218117087")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * UpdateInstanceConfigRequest request =
+ * UpdateInstanceConfigRequest.newBuilder()
+ * .setName("name3373707")
+ * .setConfig(InstanceConfig.newBuilder().build())
+ * .build();
+ * Instance response = notebookServiceClient.updateInstanceConfigAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * UpdateInstanceConfigRequest request =
+ * UpdateInstanceConfigRequest.newBuilder()
+ * .setName("name3373707")
+ * .setConfig(InstanceConfig.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * UpdateInstanceConfigRequest request =
+ * UpdateInstanceConfigRequest.newBuilder()
+ * .setName("name3373707")
+ * .setConfig(InstanceConfig.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * UpdateShieldedInstanceConfigRequest request =
+ * UpdateShieldedInstanceConfigRequest.newBuilder()
+ * .setName("name3373707")
+ * .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build())
+ * .build();
+ * Instance response = notebookServiceClient.updateShieldedInstanceConfigAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * UpdateShieldedInstanceConfigRequest request =
+ * UpdateShieldedInstanceConfigRequest.newBuilder()
+ * .setName("name3373707")
+ * .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * UpdateShieldedInstanceConfigRequest request =
+ * UpdateShieldedInstanceConfigRequest.newBuilder()
+ * .setName("name3373707")
+ * .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * SetInstanceLabelsRequest request =
+ * SetInstanceLabelsRequest.newBuilder()
+ * .setName("name3373707")
+ * .putAllLabels(new HashMap
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * SetInstanceLabelsRequest request =
+ * SetInstanceLabelsRequest.newBuilder()
+ * .setName("name3373707")
+ * .putAllLabels(new HashMap
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * SetInstanceLabelsRequest request =
+ * SetInstanceLabelsRequest.newBuilder()
+ * .setName("name3373707")
+ * .putAllLabels(new HashMap
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * String name = "name3373707";
+ * notebookServiceClient.deleteInstanceAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Format:
+ * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * DeleteInstanceRequest request =
+ * DeleteInstanceRequest.newBuilder().setName("name3373707").build();
+ * notebookServiceClient.deleteInstanceAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * DeleteInstanceRequest request =
+ * DeleteInstanceRequest.newBuilder().setName("name3373707").build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * DeleteInstanceRequest request =
+ * DeleteInstanceRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * StartInstanceRequest request =
+ * StartInstanceRequest.newBuilder().setName("name3373707").build();
+ * Instance response = notebookServiceClient.startInstanceAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * StartInstanceRequest request =
+ * StartInstanceRequest.newBuilder().setName("name3373707").build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * StartInstanceRequest request =
+ * StartInstanceRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * StopInstanceRequest request = StopInstanceRequest.newBuilder().setName("name3373707").build();
+ * Instance response = notebookServiceClient.stopInstanceAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * StopInstanceRequest request = StopInstanceRequest.newBuilder().setName("name3373707").build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * StopInstanceRequest request = StopInstanceRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ResetInstanceRequest request =
+ * ResetInstanceRequest.newBuilder().setName("name3373707").build();
+ * Instance response = notebookServiceClient.resetInstanceAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ResetInstanceRequest request =
+ * ResetInstanceRequest.newBuilder().setName("name3373707").build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ResetInstanceRequest request =
+ * ResetInstanceRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ReportInstanceInfoRequest request =
+ * ReportInstanceInfoRequest.newBuilder()
+ * .setName("name3373707")
+ * .setVmId("vmId3622450")
+ * .putAllMetadata(new HashMap
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ReportInstanceInfoRequest request =
+ * ReportInstanceInfoRequest.newBuilder()
+ * .setName("name3373707")
+ * .setVmId("vmId3622450")
+ * .putAllMetadata(new HashMap
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ReportInstanceInfoRequest request =
+ * ReportInstanceInfoRequest.newBuilder()
+ * .setName("name3373707")
+ * .setVmId("vmId3622450")
+ * .putAllMetadata(new HashMap
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * IsInstanceUpgradeableRequest request =
+ * IsInstanceUpgradeableRequest.newBuilder()
+ * .setNotebookInstance("notebookInstance-544239728")
+ * .build();
+ * IsInstanceUpgradeableResponse response = notebookServiceClient.isInstanceUpgradeable(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final IsInstanceUpgradeableResponse isInstanceUpgradeable(
+ IsInstanceUpgradeableRequest request) {
+ return isInstanceUpgradeableCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Check if a notebook instance is upgradable.
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * IsInstanceUpgradeableRequest request =
+ * IsInstanceUpgradeableRequest.newBuilder()
+ * .setNotebookInstance("notebookInstance-544239728")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
+ * GetInstanceHealthResponse response = notebookServiceClient.getInstanceHealth(name);
+ * }
+ * }
+ *
+ * @param name Required. Format:
+ * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GetInstanceHealthResponse getInstanceHealth(InstanceName name) {
+ GetInstanceHealthRequest request =
+ GetInstanceHealthRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getInstanceHealth(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Check if a notebook instance is healthy.
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * String name = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
+ * GetInstanceHealthResponse response = notebookServiceClient.getInstanceHealth(name);
+ * }
+ * }
+ *
+ * @param name Required. Format:
+ * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GetInstanceHealthResponse getInstanceHealth(String name) {
+ GetInstanceHealthRequest request = GetInstanceHealthRequest.newBuilder().setName(name).build();
+ return getInstanceHealth(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Check if a notebook instance is healthy.
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * GetInstanceHealthRequest request =
+ * GetInstanceHealthRequest.newBuilder()
+ * .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .build();
+ * GetInstanceHealthResponse response = notebookServiceClient.getInstanceHealth(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GetInstanceHealthResponse getInstanceHealth(GetInstanceHealthRequest request) {
+ return getInstanceHealthCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Check if a notebook instance is healthy.
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * GetInstanceHealthRequest request =
+ * GetInstanceHealthRequest.newBuilder()
+ * .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * UpgradeInstanceRequest request =
+ * UpgradeInstanceRequest.newBuilder().setName("name3373707").build();
+ * Instance response = notebookServiceClient.upgradeInstanceAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * UpgradeInstanceRequest request =
+ * UpgradeInstanceRequest.newBuilder().setName("name3373707").build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * UpgradeInstanceRequest request =
+ * UpgradeInstanceRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * RollbackInstanceRequest request =
+ * RollbackInstanceRequest.newBuilder()
+ * .setName("name3373707")
+ * .setTargetSnapshot("targetSnapshot-1307211147")
+ * .build();
+ * Instance response = notebookServiceClient.rollbackInstanceAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * RollbackInstanceRequest request =
+ * RollbackInstanceRequest.newBuilder()
+ * .setName("name3373707")
+ * .setTargetSnapshot("targetSnapshot-1307211147")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * RollbackInstanceRequest request =
+ * RollbackInstanceRequest.newBuilder()
+ * .setName("name3373707")
+ * .setTargetSnapshot("targetSnapshot-1307211147")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * UpgradeInstanceInternalRequest request =
+ * UpgradeInstanceInternalRequest.newBuilder()
+ * .setName("name3373707")
+ * .setVmId("vmId3622450")
+ * .build();
+ * Instance response = notebookServiceClient.upgradeInstanceInternalAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * UpgradeInstanceInternalRequest request =
+ * UpgradeInstanceInternalRequest.newBuilder()
+ * .setName("name3373707")
+ * .setVmId("vmId3622450")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * UpgradeInstanceInternalRequest request =
+ * UpgradeInstanceInternalRequest.newBuilder()
+ * .setName("name3373707")
+ * .setVmId("vmId3622450")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * String parent = "parent-995424086";
+ * for (Environment element : notebookServiceClient.listEnvironments(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Format: `projects/{project_id}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListEnvironmentsPagedResponse listEnvironments(String parent) {
+ ListEnvironmentsRequest request =
+ ListEnvironmentsRequest.newBuilder().setParent(parent).build();
+ return listEnvironments(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists environments in a project.
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ListEnvironmentsRequest request =
+ * ListEnvironmentsRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Environment element : notebookServiceClient.listEnvironments(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListEnvironmentsPagedResponse listEnvironments(ListEnvironmentsRequest request) {
+ return listEnvironmentsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists environments in a project.
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ListEnvironmentsRequest request =
+ * ListEnvironmentsRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ListEnvironmentsRequest request =
+ * ListEnvironmentsRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListEnvironmentsResponse response =
+ * notebookServiceClient.listEnvironmentsCallable().call(request);
+ * for (Environment element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * String name = "name3373707";
+ * Environment response = notebookServiceClient.getEnvironment(name);
+ * }
+ * }
+ *
+ * @param name Required. Format:
+ * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Environment getEnvironment(String name) {
+ GetEnvironmentRequest request = GetEnvironmentRequest.newBuilder().setName(name).build();
+ return getEnvironment(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Environment.
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * GetEnvironmentRequest request =
+ * GetEnvironmentRequest.newBuilder().setName("name3373707").build();
+ * Environment response = notebookServiceClient.getEnvironment(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Environment getEnvironment(GetEnvironmentRequest request) {
+ return getEnvironmentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Environment.
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * GetEnvironmentRequest request =
+ * GetEnvironmentRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * String parent = "parent-995424086";
+ * Environment environment = Environment.newBuilder().build();
+ * String environmentId = "environmentId-950205810";
+ * Environment response =
+ * notebookServiceClient.createEnvironmentAsync(parent, environment, environmentId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Format: `projects/{project_id}/locations/{location}`
+ * @param environment Required. The environment to be created.
+ * @param environmentId Required. User-defined unique ID of this environment. The `environment_id`
+ * must be 1 to 63 characters long and contain only lowercase letters, numeric characters, and
+ * dashes. The first character must be a lowercase letter and the last character cannot be a
+ * dash.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * CreateEnvironmentRequest request =
+ * CreateEnvironmentRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setEnvironmentId("environmentId-950205810")
+ * .setEnvironment(Environment.newBuilder().build())
+ * .build();
+ * Environment response = notebookServiceClient.createEnvironmentAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * CreateEnvironmentRequest request =
+ * CreateEnvironmentRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setEnvironmentId("environmentId-950205810")
+ * .setEnvironment(Environment.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * CreateEnvironmentRequest request =
+ * CreateEnvironmentRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setEnvironmentId("environmentId-950205810")
+ * .setEnvironment(Environment.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * String name = "name3373707";
+ * notebookServiceClient.deleteEnvironmentAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Format:
+ * `projects/{project_id}/locations/{location}/environments/{environment_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * DeleteEnvironmentRequest request =
+ * DeleteEnvironmentRequest.newBuilder().setName("name3373707").build();
+ * notebookServiceClient.deleteEnvironmentAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * DeleteEnvironmentRequest request =
+ * DeleteEnvironmentRequest.newBuilder().setName("name3373707").build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * DeleteEnvironmentRequest request =
+ * DeleteEnvironmentRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ScheduleName parent = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]");
+ * for (Schedule element : notebookServiceClient.listSchedules(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSchedulesPagedResponse listSchedules(ScheduleName parent) {
+ ListSchedulesRequest request =
+ ListSchedulesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listSchedules(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists schedules in a given project and location.
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * String parent = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString();
+ * for (Schedule element : notebookServiceClient.listSchedules(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSchedulesPagedResponse listSchedules(String parent) {
+ ListSchedulesRequest request = ListSchedulesRequest.newBuilder().setParent(parent).build();
+ return listSchedules(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists schedules in a given project and location.
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ListSchedulesRequest request =
+ * ListSchedulesRequest.newBuilder()
+ * .setParent(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Schedule element : notebookServiceClient.listSchedules(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSchedulesPagedResponse listSchedules(ListSchedulesRequest request) {
+ return listSchedulesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists schedules in a given project and location.
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ListSchedulesRequest request =
+ * ListSchedulesRequest.newBuilder()
+ * .setParent(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ListSchedulesRequest request =
+ * ListSchedulesRequest.newBuilder()
+ * .setParent(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListSchedulesResponse response =
+ * notebookServiceClient.listSchedulesCallable().call(request);
+ * for (Schedule element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ScheduleName name = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]");
+ * Schedule response = notebookServiceClient.getSchedule(name);
+ * }
+ * }
+ *
+ * @param name Required. Format:
+ * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Schedule getSchedule(ScheduleName name) {
+ GetScheduleRequest request =
+ GetScheduleRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getSchedule(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of schedule
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * String name = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString();
+ * Schedule response = notebookServiceClient.getSchedule(name);
+ * }
+ * }
+ *
+ * @param name Required. Format:
+ * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Schedule getSchedule(String name) {
+ GetScheduleRequest request = GetScheduleRequest.newBuilder().setName(name).build();
+ return getSchedule(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of schedule
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * GetScheduleRequest request =
+ * GetScheduleRequest.newBuilder()
+ * .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+ * .build();
+ * Schedule response = notebookServiceClient.getSchedule(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Schedule getSchedule(GetScheduleRequest request) {
+ return getScheduleCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of schedule
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * GetScheduleRequest request =
+ * GetScheduleRequest.newBuilder()
+ * .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ScheduleName name = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]");
+ * notebookServiceClient.deleteScheduleAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Format:
+ * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * String name = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString();
+ * notebookServiceClient.deleteScheduleAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Format:
+ * `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * DeleteScheduleRequest request =
+ * DeleteScheduleRequest.newBuilder()
+ * .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+ * .build();
+ * notebookServiceClient.deleteScheduleAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * DeleteScheduleRequest request =
+ * DeleteScheduleRequest.newBuilder()
+ * .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * DeleteScheduleRequest request =
+ * DeleteScheduleRequest.newBuilder()
+ * .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ScheduleName parent = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]");
+ * Schedule schedule = Schedule.newBuilder().build();
+ * String scheduleId = "scheduleId-687058414";
+ * Schedule response =
+ * notebookServiceClient.createScheduleAsync(parent, schedule, scheduleId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}`
+ * @param schedule Required. The schedule to be created.
+ * @param scheduleId Required. User-defined unique ID of this schedule.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * String parent = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString();
+ * Schedule schedule = Schedule.newBuilder().build();
+ * String scheduleId = "scheduleId-687058414";
+ * Schedule response =
+ * notebookServiceClient.createScheduleAsync(parent, schedule, scheduleId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}`
+ * @param schedule Required. The schedule to be created.
+ * @param scheduleId Required. User-defined unique ID of this schedule.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * CreateScheduleRequest request =
+ * CreateScheduleRequest.newBuilder()
+ * .setParent(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+ * .setScheduleId("scheduleId-687058414")
+ * .setSchedule(Schedule.newBuilder().build())
+ * .build();
+ * Schedule response = notebookServiceClient.createScheduleAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * CreateScheduleRequest request =
+ * CreateScheduleRequest.newBuilder()
+ * .setParent(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+ * .setScheduleId("scheduleId-687058414")
+ * .setSchedule(Schedule.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * CreateScheduleRequest request =
+ * CreateScheduleRequest.newBuilder()
+ * .setParent(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+ * .setScheduleId("scheduleId-687058414")
+ * .setSchedule(Schedule.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * TriggerScheduleRequest request =
+ * TriggerScheduleRequest.newBuilder()
+ * .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+ * .build();
+ * Schedule response = notebookServiceClient.triggerScheduleAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * TriggerScheduleRequest request =
+ * TriggerScheduleRequest.newBuilder()
+ * .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * TriggerScheduleRequest request =
+ * TriggerScheduleRequest.newBuilder()
+ * .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ExecutionName parent = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]");
+ * for (Execution element : notebookServiceClient.listExecutions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListExecutionsPagedResponse listExecutions(ExecutionName parent) {
+ ListExecutionsRequest request =
+ ListExecutionsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listExecutions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists executions in a given project and location
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * String parent = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString();
+ * for (Execution element : notebookServiceClient.listExecutions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListExecutionsPagedResponse listExecutions(String parent) {
+ ListExecutionsRequest request = ListExecutionsRequest.newBuilder().setParent(parent).build();
+ return listExecutions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists executions in a given project and location
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ListExecutionsRequest request =
+ * ListExecutionsRequest.newBuilder()
+ * .setParent(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Execution element : notebookServiceClient.listExecutions(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListExecutionsPagedResponse listExecutions(ListExecutionsRequest request) {
+ return listExecutionsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists executions in a given project and location
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ListExecutionsRequest request =
+ * ListExecutionsRequest.newBuilder()
+ * .setParent(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ListExecutionsRequest request =
+ * ListExecutionsRequest.newBuilder()
+ * .setParent(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListExecutionsResponse response =
+ * notebookServiceClient.listExecutionsCallable().call(request);
+ * for (Execution element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ExecutionName name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]");
+ * Execution response = notebookServiceClient.getExecution(name);
+ * }
+ * }
+ *
+ * @param name Required. Format:
+ * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Execution getExecution(ExecutionName name) {
+ GetExecutionRequest request =
+ GetExecutionRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getExecution(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of executions
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * String name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString();
+ * Execution response = notebookServiceClient.getExecution(name);
+ * }
+ * }
+ *
+ * @param name Required. Format:
+ * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Execution getExecution(String name) {
+ GetExecutionRequest request = GetExecutionRequest.newBuilder().setName(name).build();
+ return getExecution(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of executions
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * GetExecutionRequest request =
+ * GetExecutionRequest.newBuilder()
+ * .setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+ * .build();
+ * Execution response = notebookServiceClient.getExecution(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Execution getExecution(GetExecutionRequest request) {
+ return getExecutionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of executions
+ *
+ * {@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * GetExecutionRequest request =
+ * GetExecutionRequest.newBuilder()
+ * .setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ExecutionName name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]");
+ * notebookServiceClient.deleteExecutionAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Format:
+ * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * String name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString();
+ * notebookServiceClient.deleteExecutionAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Format:
+ * `projects/{project_id}/locations/{location}/executions/{execution_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * DeleteExecutionRequest request =
+ * DeleteExecutionRequest.newBuilder()
+ * .setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+ * .build();
+ * notebookServiceClient.deleteExecutionAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * DeleteExecutionRequest request =
+ * DeleteExecutionRequest.newBuilder()
+ * .setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * DeleteExecutionRequest request =
+ * DeleteExecutionRequest.newBuilder()
+ * .setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * ExecutionName parent = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]");
+ * Execution execution = Execution.newBuilder().build();
+ * String executionId = "executionId-454906285";
+ * Execution response =
+ * notebookServiceClient.createExecutionAsync(parent, execution, executionId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}`
+ * @param execution Required. The execution to be created.
+ * @param executionId Required. User-defined unique ID of this execution.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * String parent = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString();
+ * Execution execution = Execution.newBuilder().build();
+ * String executionId = "executionId-454906285";
+ * Execution response =
+ * notebookServiceClient.createExecutionAsync(parent, execution, executionId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Format: `parent=projects/{project_id}/locations/{location}`
+ * @param execution Required. The execution to be created.
+ * @param executionId Required. User-defined unique ID of this execution.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * CreateExecutionRequest request =
+ * CreateExecutionRequest.newBuilder()
+ * .setParent(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+ * .setExecutionId("executionId-454906285")
+ * .setExecution(Execution.newBuilder().build())
+ * .build();
+ * Execution response = notebookServiceClient.createExecutionAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * CreateExecutionRequest request =
+ * CreateExecutionRequest.newBuilder()
+ * .setParent(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+ * .setExecutionId("executionId-454906285")
+ * .setExecution(Execution.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
+ * CreateExecutionRequest request =
+ * CreateExecutionRequest.newBuilder()
+ * .setParent(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
+ * .setExecutionId("executionId-454906285")
+ * .setExecution(Execution.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * NotebookServiceSettings.Builder notebookServiceSettingsBuilder =
+ * NotebookServiceSettings.newBuilder();
+ * notebookServiceSettingsBuilder
+ * .getInstanceSettings()
+ * .setRetrySettings(
+ * notebookServiceSettingsBuilder
+ * .getInstanceSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * NotebookServiceSettings notebookServiceSettings = notebookServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class NotebookServiceSettings extends ClientSettings