# Class NotebookServiceClient (1.91.0)

1.91.0 (latest) 1.89.0 1.86.0 1.85.0 1.83.0 1.81.0 1.80.0 1.78.0 1.76.0 1.74.0 1.73.0 1.72.0 1.71.0 1.70.0 1.68.0 1.66.0 1.65.0 1.62.0 1.61.0 1.60.0 1.58.0 1.57.0 1.56.0 1.55.0 1.54.0 1.53.0 1.52.0 1.51.0 1.50.0 1.49.0 1.47.0 1.46.0 1.45.0 1.44.0 1.43.0 1.42.0 1.41.0 1.40.0 1.39.0 1.38.0 1.37.0 1.35.0 1.34.0 1.33.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 1.22.0 1.21.0 1.20.0 1.19.0 1.18.0 1.17.0 1.16.0 1.15.0 1.14.0 1.13.0 1.12.0 1.11.0 1.10.0 1.9.0 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.3 1.0.6 0.6.2

|---|---|
| [GitHub Repository](https://github.com/googleapis/google-cloud-java/tree/main/java-notebooks/google-cloud-notebooks/src/main/java/com/google/cloud/notebooks/v1/NotebookServiceClient.java) | [Product Reference](https://cloud.google.com/ai-platform-notebooks) |

Service Description: API v1 service for Cloud AI Platform Notebooks.

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:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       String name = "name3373707";
       Instance response = notebookServiceClient.getInstance(name);
     }
     
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().

| Method | Description | Method Variants |
|---|---|---|
| ListInstances | Lists instances in a given project and location. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listInstances(ListInstancesRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listInstances(String parent) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listInstancesPagedCallable() - listInstancesCallable() |
| GetInstance | Gets details of a single Instance. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getInstance(GetInstanceRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getInstance(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getInstanceCallable() |
| CreateInstance | Creates a new Instance in a given project and location. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createInstanceAsync(CreateInstanceRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - createInstanceAsync(String parent, Instance instance, String instanceId) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createInstanceOperationCallable() - createInstanceCallable() |
| RegisterInstance | Registers an existing legacy notebook instance to the Notebooks API server. Legacy instances are instances created with the legacy Compute Engine calls. They are not manageable by the Notebooks API out of the box. This call makes these instances manageable by the Notebooks API. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - registerInstanceAsync(RegisterInstanceRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - registerInstanceOperationCallable() - registerInstanceCallable() |
| SetInstanceAccelerator | Updates the guest accelerators of a single Instance. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - setInstanceAcceleratorAsync(SetInstanceAcceleratorRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - setInstanceAcceleratorOperationCallable() - setInstanceAcceleratorCallable() |
| SetInstanceMachineType | Updates the machine type of a single Instance. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - setInstanceMachineTypeAsync(SetInstanceMachineTypeRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - setInstanceMachineTypeOperationCallable() - setInstanceMachineTypeCallable() |
| UpdateInstanceConfig | Update Notebook Instance configurations. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - updateInstanceConfigAsync(UpdateInstanceConfigRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - updateInstanceConfigOperationCallable() - updateInstanceConfigCallable() |
| UpdateShieldedInstanceConfig | Updates the Shielded instance configuration of a single Instance. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - updateShieldedInstanceConfigAsync(UpdateShieldedInstanceConfigRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - updateShieldedInstanceConfigOperationCallable() - updateShieldedInstanceConfigCallable() |
| SetInstanceLabels | Replaces all the labels of an Instance. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - setInstanceLabelsAsync(SetInstanceLabelsRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - setInstanceLabelsOperationCallable() - setInstanceLabelsCallable() |
| UpdateInstanceMetadataItems | Add/update metadata items for an instance. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - updateInstanceMetadataItems(UpdateInstanceMetadataItemsRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - updateInstanceMetadataItemsCallable() |
| DeleteInstance | Deletes a single Instance. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - deleteInstanceAsync(DeleteInstanceRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - deleteInstanceAsync(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - deleteInstanceOperationCallable() - deleteInstanceCallable() |
| StartInstance | Starts a notebook instance. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - startInstanceAsync(StartInstanceRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - startInstanceOperationCallable() - startInstanceCallable() |
| StopInstance | Stops a notebook instance. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - stopInstanceAsync(StopInstanceRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - stopInstanceOperationCallable() - stopInstanceCallable() |
| ResetInstance | Resets a notebook instance. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - resetInstanceAsync(ResetInstanceRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - resetInstanceOperationCallable() - resetInstanceCallable() |
| ReportInstanceInfo | Allows notebook instances to report their latest instance information to the Notebooks API server. The server will merge the reported information to the instance metadata store. Do not use this method directly. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - reportInstanceInfoAsync(ReportInstanceInfoRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - reportInstanceInfoOperationCallable() - reportInstanceInfoCallable() |
| IsInstanceUpgradeable | Check if a notebook instance is upgradable. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - isInstanceUpgradeable(IsInstanceUpgradeableRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - isInstanceUpgradeableCallable() |
| GetInstanceHealth | Check if a notebook instance is healthy. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getInstanceHealth(GetInstanceHealthRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getInstanceHealth(InstanceName name) - getInstanceHealth(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getInstanceHealthCallable() |
| UpgradeInstance | Upgrades a notebook instance to the latest version. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - upgradeInstanceAsync(UpgradeInstanceRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - upgradeInstanceOperationCallable() - upgradeInstanceCallable() |
| RollbackInstance | Rollbacks a notebook instance to the previous version. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - rollbackInstanceAsync(RollbackInstanceRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - rollbackInstanceOperationCallable() - rollbackInstanceCallable() |
| DiagnoseInstance | Creates a Diagnostic File and runs Diagnostic Tool given an Instance. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - diagnoseInstanceAsync(DiagnoseInstanceRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - diagnoseInstanceAsync(InstanceName name, DiagnosticConfig diagnosticConfig) - diagnoseInstanceAsync(String name, DiagnosticConfig diagnosticConfig) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - diagnoseInstanceOperationCallable() - diagnoseInstanceCallable() |
| UpgradeInstanceInternal | Allows notebook instances to call this endpoint to upgrade themselves. Do not use this method directly. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - upgradeInstanceInternalAsync(UpgradeInstanceInternalRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - upgradeInstanceInternalOperationCallable() - upgradeInstanceInternalCallable() |
| ListEnvironments | Lists environments in a project. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listEnvironments(ListEnvironmentsRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listEnvironments(String parent) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listEnvironmentsPagedCallable() - listEnvironmentsCallable() |
| GetEnvironment | Gets details of a single Environment. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getEnvironment(GetEnvironmentRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getEnvironment(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getEnvironmentCallable() |
| CreateEnvironment | Creates a new Environment. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createEnvironmentAsync(CreateEnvironmentRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - createEnvironmentAsync(String parent, Environment environment, String environmentId) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createEnvironmentOperationCallable() - createEnvironmentCallable() |
| DeleteEnvironment | Deletes a single Environment. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - deleteEnvironmentAsync(DeleteEnvironmentRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - deleteEnvironmentAsync(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - deleteEnvironmentOperationCallable() - deleteEnvironmentCallable() |
| ListSchedules | Lists schedules in a given project and location. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listSchedules(ListSchedulesRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listSchedules(ScheduleName parent) - listSchedules(String parent) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listSchedulesPagedCallable() - listSchedulesCallable() |
| GetSchedule | Gets details of schedule | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getSchedule(GetScheduleRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getSchedule(ScheduleName name) - getSchedule(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getScheduleCallable() |
| DeleteSchedule | Deletes schedule and all underlying jobs | Request object method variants only take one parameter, a request object, which must be constructed before the call. - deleteScheduleAsync(DeleteScheduleRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - deleteScheduleAsync(ScheduleName name) - deleteScheduleAsync(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - deleteScheduleOperationCallable() - deleteScheduleCallable() |
| CreateSchedule | Creates a new Scheduled Notebook in a given project and location. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createScheduleAsync(CreateScheduleRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - createScheduleAsync(ScheduleName parent, Schedule schedule, String scheduleId) - createScheduleAsync(String parent, Schedule schedule, String scheduleId) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createScheduleOperationCallable() - createScheduleCallable() |
| TriggerSchedule | Triggers execution of an existing schedule. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - triggerScheduleAsync(TriggerScheduleRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - triggerScheduleOperationCallable() - triggerScheduleCallable() |
| ListExecutions | Lists executions in a given project and location | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listExecutions(ListExecutionsRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listExecutions(ExecutionName parent) - listExecutions(String parent) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listExecutionsPagedCallable() - listExecutionsCallable() |
| GetExecution | Gets details of executions | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getExecution(GetExecutionRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getExecution(ExecutionName name) - getExecution(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getExecutionCallable() |
| DeleteExecution | Deletes execution | Request object method variants only take one parameter, a request object, which must be constructed before the call. - deleteExecutionAsync(DeleteExecutionRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - deleteExecutionAsync(ExecutionName name) - deleteExecutionAsync(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - deleteExecutionOperationCallable() - deleteExecutionCallable() |
| CreateExecution | Creates a new Execution in a given project and location. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createExecutionAsync(CreateExecutionRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - createExecutionAsync(ExecutionName parent, Execution execution, String executionId) - createExecutionAsync(String parent, Execution execution, String executionId) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createExecutionOperationCallable() - createExecutionCallable() |
| ListLocations | Lists information about the supported locations for this service. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listLocations(ListLocationsRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listLocationsPagedCallable() - listLocationsCallable() |
| GetLocation | Gets information about a location. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getLocation(GetLocationRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getLocationCallable() |
| SetIamPolicy | Sets the access control policy on the specified resource. Replacesany existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - setIamPolicy(SetIamPolicyRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - setIamPolicyCallable() |
| GetIamPolicy | Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getIamPolicy(GetIamPolicyRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getIamPolicyCallable() |
| TestIamPermissions | Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - testIamPermissions(TestIamPermissionsRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - testIamPermissionsCallable() |
[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:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     NotebookServiceSettings notebookServiceSettings =
         NotebookServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
     NotebookServiceClient notebookServiceClient =
         NotebookServiceClient.create(notebookServiceSettings);
     
To customize the endpoint:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     NotebookServiceSettings notebookServiceSettings =
         NotebookServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     NotebookServiceClient notebookServiceClient =
         NotebookServiceClient.create(notebookServiceSettings);
     
Please refer to the GitHub repository's samples for more quickstart code snippets.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> NotebookServiceClient

## Static Methods

### create()

    public static final NotebookServiceClient create()

Constructs an instance of NotebookServiceClient with default settings.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceClient` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### create(NotebookServiceSettings settings)

    public static final NotebookServiceClient create(NotebookServiceSettings settings)

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceSettings` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceClient` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### create(NotebookServiceStub stub)

    public static final NotebookServiceClient create(NotebookServiceStub stub)

Constructs an instance of NotebookServiceClient, using the given stub for making calls. This is
for advanced usage - prefer using create(NotebookServiceSettings).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.stub.NotebookServiceStub` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceClient` |   |

## Constructors

### NotebookServiceClient(NotebookServiceSettings settings)

    protected NotebookServiceClient(NotebookServiceSettings settings)

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceSettings` |

### NotebookServiceClient(NotebookServiceStub stub)

    protected NotebookServiceClient(NotebookServiceStub stub)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.stub.NotebookServiceStub` |

## Methods

### awaitTermination(long duration, TimeUnit unit)

    public boolean awaitTermination(long duration, TimeUnit unit)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `duration` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `unit` | `https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html` |   |

### close()

    public final void close()

### createEnvironmentAsync(CreateEnvironmentRequest request)

    public final OperationFuture<Environment,OperationMetadata> createEnvironmentAsync(CreateEnvironmentRequest request)

Creates a new Environment.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.CreateEnvironmentRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Environment,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### createEnvironmentAsync(String parent, Environment environment, String environmentId)

    public final OperationFuture<Environment,OperationMetadata> createEnvironmentAsync(String parent, Environment environment, String environmentId)

Creates a new Environment.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Format: `projects/{project_id}/locations/{location}` |
| `environment` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Environment` Required. The environment to be created. |
| `environmentId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` 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. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Environment,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### createEnvironmentCallable()

    public final UnaryCallable<CreateEnvironmentRequest,Operation> createEnvironmentCallable()

Creates a new Environment.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       CreateEnvironmentRequest request =
           CreateEnvironmentRequest.newBuilder()
               .setParent("parent-995424086")
               .setEnvironmentId("environmentId-950205810")
               .setEnvironment(Environment.newBuilder().build())
               .build();
       ApiFuture<Operation> future =
           notebookServiceClient.createEnvironmentCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.CreateEnvironmentRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### createEnvironmentOperationCallable()

    public final OperationCallable<CreateEnvironmentRequest,Environment,OperationMetadata> createEnvironmentOperationCallable()

Creates a new Environment.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       CreateEnvironmentRequest request =
           CreateEnvironmentRequest.newBuilder()
               .setParent("parent-995424086")
               .setEnvironmentId("environmentId-950205810")
               .setEnvironment(Environment.newBuilder().build())
               .build();
       OperationFuture<Environment, OperationMetadata> future =
           notebookServiceClient.createEnvironmentOperationCallable().futureCall(request);
       // Do something.
       Environment response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.CreateEnvironmentRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Environment,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### createExecutionAsync(CreateExecutionRequest request)

    public final OperationFuture<Execution,OperationMetadata> createExecutionAsync(CreateExecutionRequest request)

Creates a new Execution in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.CreateExecutionRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Execution,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### createExecutionAsync(ExecutionName parent, Execution execution, String executionId)

    public final OperationFuture<Execution,OperationMetadata> createExecutionAsync(ExecutionName parent, Execution execution, String executionId)

Creates a new Execution in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ExecutionName` Required. Format: `parent=projects/{project_id}/locations/{location}` |
| `execution` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Execution` Required. The execution to be created. |
| `executionId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. User-defined unique ID of this execution. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Execution,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### createExecutionAsync(String parent, Execution execution, String executionId)

    public final OperationFuture<Execution,OperationMetadata> createExecutionAsync(String parent, Execution execution, String executionId)

Creates a new Execution in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Format: `parent=projects/{project_id}/locations/{location}` |
| `execution` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Execution` Required. The execution to be created. |
| `executionId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. User-defined unique ID of this execution. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Execution,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### createExecutionCallable()

    public final UnaryCallable<CreateExecutionRequest,Operation> createExecutionCallable()

Creates a new Execution in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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<Operation> future =
           notebookServiceClient.createExecutionCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.CreateExecutionRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### createExecutionOperationCallable()

    public final OperationCallable<CreateExecutionRequest,Execution,OperationMetadata> createExecutionOperationCallable()

Creates a new Execution in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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<Execution, OperationMetadata> future =
           notebookServiceClient.createExecutionOperationCallable().futureCall(request);
       // Do something.
       Execution response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.CreateExecutionRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Execution,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### createInstanceAsync(CreateInstanceRequest request)

    public final OperationFuture<Instance,OperationMetadata> createInstanceAsync(CreateInstanceRequest request)

Creates a new Instance in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.CreateInstanceRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### createInstanceAsync(String parent, Instance instance, String instanceId)

    public final OperationFuture<Instance,OperationMetadata> createInstanceAsync(String parent, Instance instance, String instanceId)

Creates a new Instance in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Format: `parent=projects/{project_id}/locations/{location}` |
| `instance` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance` Required. The instance to be created. |
| `instanceId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. User-defined unique ID of this instance. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### createInstanceCallable()

    public final UnaryCallable<CreateInstanceRequest,Operation> createInstanceCallable()

Creates a new Instance in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       CreateInstanceRequest request =
           CreateInstanceRequest.newBuilder()
               .setParent("parent-995424086")
               .setInstanceId("instanceId902024336")
               .setInstance(Instance.newBuilder().build())
               .build();
       ApiFuture<Operation> future =
           notebookServiceClient.createInstanceCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.CreateInstanceRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### createInstanceOperationCallable()

    public final OperationCallable<CreateInstanceRequest,Instance,OperationMetadata> createInstanceOperationCallable()

Creates a new Instance in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       CreateInstanceRequest request =
           CreateInstanceRequest.newBuilder()
               .setParent("parent-995424086")
               .setInstanceId("instanceId902024336")
               .setInstance(Instance.newBuilder().build())
               .build();
       OperationFuture<Instance, OperationMetadata> future =
           notebookServiceClient.createInstanceOperationCallable().futureCall(request);
       // Do something.
       Instance response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.CreateInstanceRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### createScheduleAsync(CreateScheduleRequest request)

    public final OperationFuture<Schedule,OperationMetadata> createScheduleAsync(CreateScheduleRequest request)

Creates a new Scheduled Notebook in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.CreateScheduleRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Schedule,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### createScheduleAsync(ScheduleName parent, Schedule schedule, String scheduleId)

    public final OperationFuture<Schedule,OperationMetadata> createScheduleAsync(ScheduleName parent, Schedule schedule, String scheduleId)

Creates a new Scheduled Notebook in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ScheduleName` Required. Format: `parent=projects/{project_id}/locations/{location}` |
| `schedule` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Schedule` Required. The schedule to be created. |
| `scheduleId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. User-defined unique ID of this schedule. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Schedule,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### createScheduleAsync(String parent, Schedule schedule, String scheduleId)

    public final OperationFuture<Schedule,OperationMetadata> createScheduleAsync(String parent, Schedule schedule, String scheduleId)

Creates a new Scheduled Notebook in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Format: `parent=projects/{project_id}/locations/{location}` |
| `schedule` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Schedule` Required. The schedule to be created. |
| `scheduleId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. User-defined unique ID of this schedule. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Schedule,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### createScheduleCallable()

    public final UnaryCallable<CreateScheduleRequest,Operation> createScheduleCallable()

Creates a new Scheduled Notebook in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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<Operation> future =
           notebookServiceClient.createScheduleCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.CreateScheduleRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### createScheduleOperationCallable()

    public final OperationCallable<CreateScheduleRequest,Schedule,OperationMetadata> createScheduleOperationCallable()

Creates a new Scheduled Notebook in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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<Schedule, OperationMetadata> future =
           notebookServiceClient.createScheduleOperationCallable().futureCall(request);
       // Do something.
       Schedule response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.CreateScheduleRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Schedule,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### deleteEnvironmentAsync(DeleteEnvironmentRequest request)

    public final OperationFuture<Empty,OperationMetadata> deleteEnvironmentAsync(DeleteEnvironmentRequest request)

Deletes a single Environment.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       DeleteEnvironmentRequest request =
           DeleteEnvironmentRequest.newBuilder().setName("name3373707").build();
       notebookServiceClient.deleteEnvironmentAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.DeleteEnvironmentRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### deleteEnvironmentAsync(String name)

    public final OperationFuture<Empty,OperationMetadata> deleteEnvironmentAsync(String name)

Deletes a single Environment.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       String name = "name3373707";
       notebookServiceClient.deleteEnvironmentAsync(name).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Format: `projects/{project_id}/locations/{location}/environments/{environment_id}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### deleteEnvironmentCallable()

    public final UnaryCallable<DeleteEnvironmentRequest,Operation> deleteEnvironmentCallable()

Deletes a single Environment.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       DeleteEnvironmentRequest request =
           DeleteEnvironmentRequest.newBuilder().setName("name3373707").build();
       ApiFuture<Operation> future =
           notebookServiceClient.deleteEnvironmentCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.DeleteEnvironmentRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### deleteEnvironmentOperationCallable()

    public final OperationCallable<DeleteEnvironmentRequest,Empty,OperationMetadata> deleteEnvironmentOperationCallable()

Deletes a single Environment.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       DeleteEnvironmentRequest request =
           DeleteEnvironmentRequest.newBuilder().setName("name3373707").build();
       OperationFuture<Empty, OperationMetadata> future =
           notebookServiceClient.deleteEnvironmentOperationCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.DeleteEnvironmentRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### deleteExecutionAsync(DeleteExecutionRequest request)

    public final OperationFuture<Empty,OperationMetadata> deleteExecutionAsync(DeleteExecutionRequest request)

Deletes execution

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       DeleteExecutionRequest request =
           DeleteExecutionRequest.newBuilder()
               .setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
               .build();
       notebookServiceClient.deleteExecutionAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.DeleteExecutionRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### deleteExecutionAsync(ExecutionName name)

    public final OperationFuture<Empty,OperationMetadata> deleteExecutionAsync(ExecutionName name)

Deletes execution

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       ExecutionName name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]");
       notebookServiceClient.deleteExecutionAsync(name).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ExecutionName` Required. Format: `projects/{project_id}/locations/{location}/executions/{execution_id}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### deleteExecutionAsync(String name)

    public final OperationFuture<Empty,OperationMetadata> deleteExecutionAsync(String name)

Deletes execution

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       String name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString();
       notebookServiceClient.deleteExecutionAsync(name).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Format: `projects/{project_id}/locations/{location}/executions/{execution_id}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### deleteExecutionCallable()

    public final UnaryCallable<DeleteExecutionRequest,Operation> deleteExecutionCallable()

Deletes execution

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       DeleteExecutionRequest request =
           DeleteExecutionRequest.newBuilder()
               .setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
               .build();
       ApiFuture<Operation> future =
           notebookServiceClient.deleteExecutionCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.DeleteExecutionRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### deleteExecutionOperationCallable()

    public final OperationCallable<DeleteExecutionRequest,Empty,OperationMetadata> deleteExecutionOperationCallable()

Deletes execution

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       DeleteExecutionRequest request =
           DeleteExecutionRequest.newBuilder()
               .setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
               .build();
       OperationFuture<Empty, OperationMetadata> future =
           notebookServiceClient.deleteExecutionOperationCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.DeleteExecutionRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### deleteInstanceAsync(DeleteInstanceRequest request)

    public final OperationFuture<Empty,OperationMetadata> deleteInstanceAsync(DeleteInstanceRequest request)

Deletes a single Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       DeleteInstanceRequest request =
           DeleteInstanceRequest.newBuilder().setName("name3373707").build();
       notebookServiceClient.deleteInstanceAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.DeleteInstanceRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### deleteInstanceAsync(String name)

    public final OperationFuture<Empty,OperationMetadata> deleteInstanceAsync(String name)

Deletes a single Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       String name = "name3373707";
       notebookServiceClient.deleteInstanceAsync(name).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### deleteInstanceCallable()

    public final UnaryCallable<DeleteInstanceRequest,Operation> deleteInstanceCallable()

Deletes a single Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       DeleteInstanceRequest request =
           DeleteInstanceRequest.newBuilder().setName("name3373707").build();
       ApiFuture<Operation> future =
           notebookServiceClient.deleteInstanceCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.DeleteInstanceRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### deleteInstanceOperationCallable()

    public final OperationCallable<DeleteInstanceRequest,Empty,OperationMetadata> deleteInstanceOperationCallable()

Deletes a single Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       DeleteInstanceRequest request =
           DeleteInstanceRequest.newBuilder().setName("name3373707").build();
       OperationFuture<Empty, OperationMetadata> future =
           notebookServiceClient.deleteInstanceOperationCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.DeleteInstanceRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### deleteScheduleAsync(DeleteScheduleRequest request)

    public final OperationFuture<Empty,OperationMetadata> deleteScheduleAsync(DeleteScheduleRequest request)

Deletes schedule and all underlying jobs

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       DeleteScheduleRequest request =
           DeleteScheduleRequest.newBuilder()
               .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
               .build();
       notebookServiceClient.deleteScheduleAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.DeleteScheduleRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### deleteScheduleAsync(ScheduleName name)

    public final OperationFuture<Empty,OperationMetadata> deleteScheduleAsync(ScheduleName name)

Deletes schedule and all underlying jobs

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       ScheduleName name = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]");
       notebookServiceClient.deleteScheduleAsync(name).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ScheduleName` Required. Format: `projects/{project_id}/locations/{location}/schedules/{schedule_id}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### deleteScheduleAsync(String name)

    public final OperationFuture<Empty,OperationMetadata> deleteScheduleAsync(String name)

Deletes schedule and all underlying jobs

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       String name = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString();
       notebookServiceClient.deleteScheduleAsync(name).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Format: `projects/{project_id}/locations/{location}/schedules/{schedule_id}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### deleteScheduleCallable()

    public final UnaryCallable<DeleteScheduleRequest,Operation> deleteScheduleCallable()

Deletes schedule and all underlying jobs

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       DeleteScheduleRequest request =
           DeleteScheduleRequest.newBuilder()
               .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
               .build();
       ApiFuture<Operation> future =
           notebookServiceClient.deleteScheduleCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.DeleteScheduleRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### deleteScheduleOperationCallable()

    public final OperationCallable<DeleteScheduleRequest,Empty,OperationMetadata> deleteScheduleOperationCallable()

Deletes schedule and all underlying jobs

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       DeleteScheduleRequest request =
           DeleteScheduleRequest.newBuilder()
               .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
               .build();
       OperationFuture<Empty, OperationMetadata> future =
           notebookServiceClient.deleteScheduleOperationCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.DeleteScheduleRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### diagnoseInstanceAsync(DiagnoseInstanceRequest request)

    public final OperationFuture<Instance,OperationMetadata> diagnoseInstanceAsync(DiagnoseInstanceRequest request)

Creates a Diagnostic File and runs Diagnostic Tool given an Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       DiagnoseInstanceRequest request =
           DiagnoseInstanceRequest.newBuilder()
               .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
               .setDiagnosticConfig(DiagnosticConfig.newBuilder().build())
               .build();
       Instance response = notebookServiceClient.diagnoseInstanceAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.DiagnoseInstanceRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### diagnoseInstanceAsync(InstanceName name, DiagnosticConfig diagnosticConfig)

    public final OperationFuture<Instance,OperationMetadata> diagnoseInstanceAsync(InstanceName name, DiagnosticConfig diagnosticConfig)

Creates a Diagnostic File and runs Diagnostic Tool given an Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
       DiagnosticConfig diagnosticConfig = DiagnosticConfig.newBuilder().build();
       Instance response = notebookServiceClient.diagnoseInstanceAsync(name, diagnosticConfig).get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.InstanceName` Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}` |
| `diagnosticConfig` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.DiagnosticConfig` Required. Defines flags that are used to run the diagnostic tool |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### diagnoseInstanceAsync(String name, DiagnosticConfig diagnosticConfig)

    public final OperationFuture<Instance,OperationMetadata> diagnoseInstanceAsync(String name, DiagnosticConfig diagnosticConfig)

Creates a Diagnostic File and runs Diagnostic Tool given an Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       String name = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
       DiagnosticConfig diagnosticConfig = DiagnosticConfig.newBuilder().build();
       Instance response = notebookServiceClient.diagnoseInstanceAsync(name, diagnosticConfig).get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}` |
| `diagnosticConfig` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.DiagnosticConfig` Required. Defines flags that are used to run the diagnostic tool |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### diagnoseInstanceCallable()

    public final UnaryCallable<DiagnoseInstanceRequest,Operation> diagnoseInstanceCallable()

Creates a Diagnostic File and runs Diagnostic Tool given an Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       DiagnoseInstanceRequest request =
           DiagnoseInstanceRequest.newBuilder()
               .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
               .setDiagnosticConfig(DiagnosticConfig.newBuilder().build())
               .build();
       ApiFuture<Operation> future =
           notebookServiceClient.diagnoseInstanceCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.DiagnoseInstanceRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### diagnoseInstanceOperationCallable()

    public final OperationCallable<DiagnoseInstanceRequest,Instance,OperationMetadata> diagnoseInstanceOperationCallable()

Creates a Diagnostic File and runs Diagnostic Tool given an Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       DiagnoseInstanceRequest request =
           DiagnoseInstanceRequest.newBuilder()
               .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
               .setDiagnosticConfig(DiagnosticConfig.newBuilder().build())
               .build();
       OperationFuture<Instance, OperationMetadata> future =
           notebookServiceClient.diagnoseInstanceOperationCallable().futureCall(request);
       // Do something.
       Instance response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.DiagnoseInstanceRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### getEnvironment(GetEnvironmentRequest request)

    public final Environment getEnvironment(GetEnvironmentRequest request)

Gets details of a single Environment.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       GetEnvironmentRequest request =
           GetEnvironmentRequest.newBuilder().setName("name3373707").build();
       Environment response = notebookServiceClient.getEnvironment(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.GetEnvironmentRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Environment` |   |

### getEnvironment(String name)

    public final Environment getEnvironment(String name)

Gets details of a single Environment.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       String name = "name3373707";
       Environment response = notebookServiceClient.getEnvironment(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Format: `projects/{project_id}/locations/{location}/environments/{environment_id}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Environment` |   |

### getEnvironmentCallable()

    public final UnaryCallable<GetEnvironmentRequest,Environment> getEnvironmentCallable()

Gets details of a single Environment.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       GetEnvironmentRequest request =
           GetEnvironmentRequest.newBuilder().setName("name3373707").build();
       ApiFuture<Environment> future =
           notebookServiceClient.getEnvironmentCallable().futureCall(request);
       // Do something.
       Environment response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.GetEnvironmentRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Environment>` |   |

### getExecution(ExecutionName name)

    public final Execution getExecution(ExecutionName name)

Gets details of executions

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       ExecutionName name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]");
       Execution response = notebookServiceClient.getExecution(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ExecutionName` Required. Format: `projects/{project_id}/locations/{location}/executions/{execution_id}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Execution` |   |

### getExecution(GetExecutionRequest request)

    public final Execution getExecution(GetExecutionRequest request)

Gets details of executions

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       GetExecutionRequest request =
           GetExecutionRequest.newBuilder()
               .setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
               .build();
       Execution response = notebookServiceClient.getExecution(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.GetExecutionRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Execution` |   |

### getExecution(String name)

    public final Execution getExecution(String name)

Gets details of executions

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       String name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString();
       Execution response = notebookServiceClient.getExecution(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Format: `projects/{project_id}/locations/{location}/executions/{execution_id}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Execution` |   |

### getExecutionCallable()

    public final UnaryCallable<GetExecutionRequest,Execution> getExecutionCallable()

Gets details of executions

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       GetExecutionRequest request =
           GetExecutionRequest.newBuilder()
               .setName(ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString())
               .build();
       ApiFuture<Execution> future =
           notebookServiceClient.getExecutionCallable().futureCall(request);
       // Do something.
       Execution response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.GetExecutionRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Execution>` |   |

### getIamPolicy(GetIamPolicyRequest request)

    public final Policy getIamPolicy(GetIamPolicyRequest request)

Gets the access control policy for a resource. Returns an empty policyif the resource exists
and does not have a policy set.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       GetIamPolicyRequest request =
           GetIamPolicyRequest.newBuilder()
               .setResource(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString())
               .setOptions(GetPolicyOptions.newBuilder().build())
               .build();
       Policy response = notebookServiceClient.getIamPolicy(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `com.google.iam.v1.GetIamPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.iam.v1.Policy` |   |

### getIamPolicyCallable()

    public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()

Gets the access control policy for a resource. Returns an empty policyif the resource exists
and does not have a policy set.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       GetIamPolicyRequest request =
           GetIamPolicyRequest.newBuilder()
               .setResource(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString())
               .setOptions(GetPolicyOptions.newBuilder().build())
               .build();
       ApiFuture<Policy> future = notebookServiceClient.getIamPolicyCallable().futureCall(request);
       // Do something.
       Policy response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy>` |   |

### getInstance(GetInstanceRequest request)

    public final Instance getInstance(GetInstanceRequest request)

Gets details of a single Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
       Instance response = notebookServiceClient.getInstance(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.GetInstanceRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance` |   |

### getInstance(String name)

    public final Instance getInstance(String name)

Gets details of a single Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       String name = "name3373707";
       Instance response = notebookServiceClient.getInstance(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance` |   |

### getInstanceCallable()

    public final UnaryCallable<GetInstanceRequest,Instance> getInstanceCallable()

Gets details of a single Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       GetInstanceRequest request = GetInstanceRequest.newBuilder().setName("name3373707").build();
       ApiFuture<Instance> future = notebookServiceClient.getInstanceCallable().futureCall(request);
       // Do something.
       Instance response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.GetInstanceRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance>` |   |

### getInstanceHealth(GetInstanceHealthRequest request)

    public final GetInstanceHealthResponse getInstanceHealth(GetInstanceHealthRequest request)

Check if a notebook instance is healthy.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       GetInstanceHealthRequest request =
           GetInstanceHealthRequest.newBuilder()
               .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
               .build();
       GetInstanceHealthResponse response = notebookServiceClient.getInstanceHealth(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.GetInstanceHealthRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.GetInstanceHealthResponse` |   |

### getInstanceHealth(InstanceName name)

    public final GetInstanceHealthResponse getInstanceHealth(InstanceName name)

Check if a notebook instance is healthy.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
       GetInstanceHealthResponse response = notebookServiceClient.getInstanceHealth(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.InstanceName` Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.GetInstanceHealthResponse` |   |

### getInstanceHealth(String name)

    public final GetInstanceHealthResponse getInstanceHealth(String name)

Check if a notebook instance is healthy.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       String name = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
       GetInstanceHealthResponse response = notebookServiceClient.getInstanceHealth(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.GetInstanceHealthResponse` |   |

### getInstanceHealthCallable()

    public final UnaryCallable<GetInstanceHealthRequest,GetInstanceHealthResponse> getInstanceHealthCallable()

Check if a notebook instance is healthy.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       GetInstanceHealthRequest request =
           GetInstanceHealthRequest.newBuilder()
               .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
               .build();
       ApiFuture<GetInstanceHealthResponse> future =
           notebookServiceClient.getInstanceHealthCallable().futureCall(request);
       // Do something.
       GetInstanceHealthResponse response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.GetInstanceHealthRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.GetInstanceHealthResponse>` |   |

### getLocation(GetLocationRequest request)

    public final Location getLocation(GetLocationRequest request)

Gets information about a location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
       Location response = notebookServiceClient.getLocation(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `com.google.cloud.location.GetLocationRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.cloud.location.Location` |   |

### getLocationCallable()

    public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()

Gets information about a location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
       ApiFuture<Location> future = notebookServiceClient.getLocationCallable().futureCall(request);
       // Do something.
       Location response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>` |   |

### getOperationsClient()

    public final OperationsClient getOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.OperationsClient.html` |   |

### getSchedule(GetScheduleRequest request)

    public final Schedule getSchedule(GetScheduleRequest request)

Gets details of schedule

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       GetScheduleRequest request =
           GetScheduleRequest.newBuilder()
               .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
               .build();
       Schedule response = notebookServiceClient.getSchedule(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.GetScheduleRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Schedule` |   |

### getSchedule(ScheduleName name)

    public final Schedule getSchedule(ScheduleName name)

Gets details of schedule

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       ScheduleName name = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]");
       Schedule response = notebookServiceClient.getSchedule(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ScheduleName` Required. Format: `projects/{project_id}/locations/{location}/schedules/{schedule_id}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Schedule` |   |

### getSchedule(String name)

    public final Schedule getSchedule(String name)

Gets details of schedule

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       String name = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString();
       Schedule response = notebookServiceClient.getSchedule(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Format: `projects/{project_id}/locations/{location}/schedules/{schedule_id}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Schedule` |   |

### getScheduleCallable()

    public final UnaryCallable<GetScheduleRequest,Schedule> getScheduleCallable()

Gets details of schedule

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       GetScheduleRequest request =
           GetScheduleRequest.newBuilder()
               .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
               .build();
       ApiFuture<Schedule> future = notebookServiceClient.getScheduleCallable().futureCall(request);
       // Do something.
       Schedule response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.GetScheduleRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Schedule>` |   |

### getSettings()

    public final NotebookServiceSettings getSettings()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceSettings` |   |

### getStub()

    public NotebookServiceStub getStub()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.stub.NotebookServiceStub` |   |

### isInstanceUpgradeable(IsInstanceUpgradeableRequest request)

    public final IsInstanceUpgradeableResponse isInstanceUpgradeable(IsInstanceUpgradeableRequest request)

Check if a notebook instance is upgradable.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       IsInstanceUpgradeableRequest request =
           IsInstanceUpgradeableRequest.newBuilder()
               .setNotebookInstance("notebookInstance-544239728")
               .setType(UpgradeType.forNumber(0))
               .build();
       IsInstanceUpgradeableResponse response = notebookServiceClient.isInstanceUpgradeable(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse` |   |

### isInstanceUpgradeableCallable()

    public final UnaryCallable<IsInstanceUpgradeableRequest,IsInstanceUpgradeableResponse> isInstanceUpgradeableCallable()

Check if a notebook instance is upgradable.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       IsInstanceUpgradeableRequest request =
           IsInstanceUpgradeableRequest.newBuilder()
               .setNotebookInstance("notebookInstance-544239728")
               .setType(UpgradeType.forNumber(0))
               .build();
       ApiFuture<IsInstanceUpgradeableResponse> future =
           notebookServiceClient.isInstanceUpgradeableCallable().futureCall(request);
       // Do something.
       IsInstanceUpgradeableResponse response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.IsInstanceUpgradeableRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.IsInstanceUpgradeableResponse>` |   |

### isShutdown()

    public boolean isShutdown()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### isTerminated()

    public boolean isTerminated()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### listEnvironments(ListEnvironmentsRequest request)

    public final NotebookServiceClient.ListEnvironmentsPagedResponse listEnvironments(ListEnvironmentsRequest request)

Lists environments in a project.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ListEnvironmentsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceClient.ListEnvironmentsPagedResponse` |   |

### listEnvironments(String parent)

    public final NotebookServiceClient.ListEnvironmentsPagedResponse listEnvironments(String parent)

Lists environments in a project.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       String parent = "parent-995424086";
       for (Environment element : notebookServiceClient.listEnvironments(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Format: `projects/{project_id}/locations/{location}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceClient.ListEnvironmentsPagedResponse` |   |

### listEnvironmentsCallable()

    public final UnaryCallable<ListEnvironmentsRequest,ListEnvironmentsResponse> listEnvironmentsCallable()

Lists environments in a project.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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.getEnvironmentsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ListEnvironmentsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ListEnvironmentsResponse>` |   |

### listEnvironmentsPagedCallable()

    public final UnaryCallable<ListEnvironmentsRequest,NotebookServiceClient.ListEnvironmentsPagedResponse> listEnvironmentsPagedCallable()

Lists environments in a project.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       ListEnvironmentsRequest request =
           ListEnvironmentsRequest.newBuilder()
               .setParent("parent-995424086")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<Environment> future =
           notebookServiceClient.listEnvironmentsPagedCallable().futureCall(request);
       // Do something.
       for (Environment element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ListEnvironmentsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceClient.ListEnvironmentsPagedResponse>` |   |

### listExecutions(ExecutionName parent)

    public final NotebookServiceClient.ListExecutionsPagedResponse listExecutions(ExecutionName parent)

Lists executions in a given project and location

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       ExecutionName parent = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]");
       for (Execution element : notebookServiceClient.listExecutions(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ExecutionName` Required. Format: `parent=projects/{project_id}/locations/{location}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceClient.ListExecutionsPagedResponse` |   |

### listExecutions(ListExecutionsRequest request)

    public final NotebookServiceClient.ListExecutionsPagedResponse listExecutions(ListExecutionsRequest request)

Lists executions in a given project and location

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ListExecutionsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceClient.ListExecutionsPagedResponse` |   |

### listExecutions(String parent)

    public final NotebookServiceClient.ListExecutionsPagedResponse listExecutions(String parent)

Lists executions in a given project and location

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       String parent = ExecutionName.of("[PROJECT]", "[LOCATION]", "[EXECUTION]").toString();
       for (Execution element : notebookServiceClient.listExecutions(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Format: `parent=projects/{project_id}/locations/{location}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceClient.ListExecutionsPagedResponse` |   |

### listExecutionsCallable()

    public final UnaryCallable<ListExecutionsRequest,ListExecutionsResponse> listExecutionsCallable()

Lists executions in a given project and location

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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.getExecutionsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ListExecutionsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ListExecutionsResponse>` |   |

### listExecutionsPagedCallable()

    public final UnaryCallable<ListExecutionsRequest,NotebookServiceClient.ListExecutionsPagedResponse> listExecutionsPagedCallable()

Lists executions in a given project and location

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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<Execution> future =
           notebookServiceClient.listExecutionsPagedCallable().futureCall(request);
       // Do something.
       for (Execution element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ListExecutionsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceClient.ListExecutionsPagedResponse>` |   |

### listInstances(ListInstancesRequest request)

    public final NotebookServiceClient.ListInstancesPagedResponse listInstances(ListInstancesRequest request)

Lists instances in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ListInstancesRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceClient.ListInstancesPagedResponse` |   |

### listInstances(String parent)

    public final NotebookServiceClient.ListInstancesPagedResponse listInstances(String parent)

Lists instances in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       String parent = "parent-995424086";
       for (Instance element : notebookServiceClient.listInstances(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Format: `parent=projects/{project_id}/locations/{location}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceClient.ListInstancesPagedResponse` |   |

### listInstancesCallable()

    public final UnaryCallable<ListInstancesRequest,ListInstancesResponse> listInstancesCallable()

Lists instances in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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.getInstancesList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ListInstancesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ListInstancesResponse>` |   |

### listInstancesPagedCallable()

    public final UnaryCallable<ListInstancesRequest,NotebookServiceClient.ListInstancesPagedResponse> listInstancesPagedCallable()

Lists instances in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       ListInstancesRequest request =
           ListInstancesRequest.newBuilder()
               .setParent("parent-995424086")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<Instance> future =
           notebookServiceClient.listInstancesPagedCallable().futureCall(request);
       // Do something.
       for (Instance element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ListInstancesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceClient.ListInstancesPagedResponse>` |   |

### listLocations(ListLocationsRequest request)

    public final NotebookServiceClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)

Lists information about the supported locations for this service.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       ListLocationsRequest request =
           ListLocationsRequest.newBuilder()
               .setName("name3373707")
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (Location element : notebookServiceClient.listLocations(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `com.google.cloud.location.ListLocationsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceClient.ListLocationsPagedResponse` |   |

### listLocationsCallable()

    public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()

Lists information about the supported locations for this service.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       ListLocationsRequest request =
           ListLocationsRequest.newBuilder()
               .setName("name3373707")
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         ListLocationsResponse response =
             notebookServiceClient.listLocationsCallable().call(request);
         for (Location element : response.getLocationsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>` |   |

### listLocationsPagedCallable()

    public final UnaryCallable<ListLocationsRequest,NotebookServiceClient.ListLocationsPagedResponse> listLocationsPagedCallable()

Lists information about the supported locations for this service.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       ListLocationsRequest request =
           ListLocationsRequest.newBuilder()
               .setName("name3373707")
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<Location> future =
           notebookServiceClient.listLocationsPagedCallable().futureCall(request);
       // Do something.
       for (Location element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.cloud.location.ListLocationsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceClient.ListLocationsPagedResponse>` |   |

### listSchedules(ListSchedulesRequest request)

    public final NotebookServiceClient.ListSchedulesPagedResponse listSchedules(ListSchedulesRequest request)

Lists schedules in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ListSchedulesRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceClient.ListSchedulesPagedResponse` |   |

### listSchedules(ScheduleName parent)

    public final NotebookServiceClient.ListSchedulesPagedResponse listSchedules(ScheduleName parent)

Lists schedules in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       ScheduleName parent = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]");
       for (Schedule element : notebookServiceClient.listSchedules(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ScheduleName` Required. Format: `parent=projects/{project_id}/locations/{location}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceClient.ListSchedulesPagedResponse` |   |

### listSchedules(String parent)

    public final NotebookServiceClient.ListSchedulesPagedResponse listSchedules(String parent)

Lists schedules in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       String parent = ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString();
       for (Schedule element : notebookServiceClient.listSchedules(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Format: `parent=projects/{project_id}/locations/{location}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceClient.ListSchedulesPagedResponse` |   |

### listSchedulesCallable()

    public final UnaryCallable<ListSchedulesRequest,ListSchedulesResponse> listSchedulesCallable()

Lists schedules in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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.getSchedulesList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ListSchedulesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ListSchedulesResponse>` |   |

### listSchedulesPagedCallable()

    public final UnaryCallable<ListSchedulesRequest,NotebookServiceClient.ListSchedulesPagedResponse> listSchedulesPagedCallable()

Lists schedules in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     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<Schedule> future =
           notebookServiceClient.listSchedulesPagedCallable().futureCall(request);
       // Do something.
       for (Schedule element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ListSchedulesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.NotebookServiceClient.ListSchedulesPagedResponse>` |   |

### registerInstanceAsync(RegisterInstanceRequest request)

    public final OperationFuture<Instance,OperationMetadata> registerInstanceAsync(RegisterInstanceRequest request)

Registers an existing legacy notebook instance to the Notebooks API server. Legacy instances
are instances created with the legacy Compute Engine calls. They are not manageable by the
Notebooks API out of the box. This call makes these instances manageable by the Notebooks API.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       RegisterInstanceRequest request =
           RegisterInstanceRequest.newBuilder()
               .setParent("parent-995424086")
               .setInstanceId("instanceId902024336")
               .build();
       Instance response = notebookServiceClient.registerInstanceAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.RegisterInstanceRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### registerInstanceCallable()

    public final UnaryCallable<RegisterInstanceRequest,Operation> registerInstanceCallable()

Registers an existing legacy notebook instance to the Notebooks API server. Legacy instances
are instances created with the legacy Compute Engine calls. They are not manageable by the
Notebooks API out of the box. This call makes these instances manageable by the Notebooks API.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       RegisterInstanceRequest request =
           RegisterInstanceRequest.newBuilder()
               .setParent("parent-995424086")
               .setInstanceId("instanceId902024336")
               .build();
       ApiFuture<Operation> future =
           notebookServiceClient.registerInstanceCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.RegisterInstanceRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### registerInstanceOperationCallable()

    public final OperationCallable<RegisterInstanceRequest,Instance,OperationMetadata> registerInstanceOperationCallable()

Registers an existing legacy notebook instance to the Notebooks API server. Legacy instances
are instances created with the legacy Compute Engine calls. They are not manageable by the
Notebooks API out of the box. This call makes these instances manageable by the Notebooks API.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       RegisterInstanceRequest request =
           RegisterInstanceRequest.newBuilder()
               .setParent("parent-995424086")
               .setInstanceId("instanceId902024336")
               .build();
       OperationFuture<Instance, OperationMetadata> future =
           notebookServiceClient.registerInstanceOperationCallable().futureCall(request);
       // Do something.
       Instance response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.RegisterInstanceRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### reportInstanceInfoAsync(ReportInstanceInfoRequest request)

    public final OperationFuture<Instance,OperationMetadata> reportInstanceInfoAsync(ReportInstanceInfoRequest request)

Allows notebook instances to report their latest instance information to the Notebooks API
server. The server will merge the reported information to the instance metadata store. Do not
use this method directly.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       ReportInstanceInfoRequest request =
           ReportInstanceInfoRequest.newBuilder()
               .setName("name3373707")
               .setVmId("vmId3622450")
               .putAllMetadata(new HashMap<String, String>())
               .build();
       Instance response = notebookServiceClient.reportInstanceInfoAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ReportInstanceInfoRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### reportInstanceInfoCallable()

    public final UnaryCallable<ReportInstanceInfoRequest,Operation> reportInstanceInfoCallable()

Allows notebook instances to report their latest instance information to the Notebooks API
server. The server will merge the reported information to the instance metadata store. Do not
use this method directly.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       ReportInstanceInfoRequest request =
           ReportInstanceInfoRequest.newBuilder()
               .setName("name3373707")
               .setVmId("vmId3622450")
               .putAllMetadata(new HashMap<String, String>())
               .build();
       ApiFuture<Operation> future =
           notebookServiceClient.reportInstanceInfoCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ReportInstanceInfoRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### reportInstanceInfoOperationCallable()

    public final OperationCallable<ReportInstanceInfoRequest,Instance,OperationMetadata> reportInstanceInfoOperationCallable()

Allows notebook instances to report their latest instance information to the Notebooks API
server. The server will merge the reported information to the instance metadata store. Do not
use this method directly.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       ReportInstanceInfoRequest request =
           ReportInstanceInfoRequest.newBuilder()
               .setName("name3373707")
               .setVmId("vmId3622450")
               .putAllMetadata(new HashMap<String, String>())
               .build();
       OperationFuture<Instance, OperationMetadata> future =
           notebookServiceClient.reportInstanceInfoOperationCallable().futureCall(request);
       // Do something.
       Instance response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ReportInstanceInfoRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### resetInstanceAsync(ResetInstanceRequest request)

    public final OperationFuture<Instance,OperationMetadata> resetInstanceAsync(ResetInstanceRequest request)

Resets a notebook instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       ResetInstanceRequest request =
           ResetInstanceRequest.newBuilder().setName("name3373707").build();
       Instance response = notebookServiceClient.resetInstanceAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ResetInstanceRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### resetInstanceCallable()

    public final UnaryCallable<ResetInstanceRequest,Operation> resetInstanceCallable()

Resets a notebook instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       ResetInstanceRequest request =
           ResetInstanceRequest.newBuilder().setName("name3373707").build();
       ApiFuture<Operation> future =
           notebookServiceClient.resetInstanceCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ResetInstanceRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### resetInstanceOperationCallable()

    public final OperationCallable<ResetInstanceRequest,Instance,OperationMetadata> resetInstanceOperationCallable()

Resets a notebook instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       ResetInstanceRequest request =
           ResetInstanceRequest.newBuilder().setName("name3373707").build();
       OperationFuture<Instance, OperationMetadata> future =
           notebookServiceClient.resetInstanceOperationCallable().futureCall(request);
       // Do something.
       Instance response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.ResetInstanceRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### rollbackInstanceAsync(RollbackInstanceRequest request)

    public final OperationFuture<Instance,OperationMetadata> rollbackInstanceAsync(RollbackInstanceRequest request)

Rollbacks a notebook instance to the previous version.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       RollbackInstanceRequest request =
           RollbackInstanceRequest.newBuilder()
               .setName("name3373707")
               .setTargetSnapshot("targetSnapshot-1307211147")
               .build();
       Instance response = notebookServiceClient.rollbackInstanceAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.RollbackInstanceRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### rollbackInstanceCallable()

    public final UnaryCallable<RollbackInstanceRequest,Operation> rollbackInstanceCallable()

Rollbacks a notebook instance to the previous version.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       RollbackInstanceRequest request =
           RollbackInstanceRequest.newBuilder()
               .setName("name3373707")
               .setTargetSnapshot("targetSnapshot-1307211147")
               .build();
       ApiFuture<Operation> future =
           notebookServiceClient.rollbackInstanceCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.RollbackInstanceRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### rollbackInstanceOperationCallable()

    public final OperationCallable<RollbackInstanceRequest,Instance,OperationMetadata> rollbackInstanceOperationCallable()

Rollbacks a notebook instance to the previous version.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       RollbackInstanceRequest request =
           RollbackInstanceRequest.newBuilder()
               .setName("name3373707")
               .setTargetSnapshot("targetSnapshot-1307211147")
               .build();
       OperationFuture<Instance, OperationMetadata> future =
           notebookServiceClient.rollbackInstanceOperationCallable().futureCall(request);
       // Do something.
       Instance response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.RollbackInstanceRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### setIamPolicy(SetIamPolicyRequest request)

    public final Policy setIamPolicy(SetIamPolicyRequest request)

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       SetIamPolicyRequest request =
           SetIamPolicyRequest.newBuilder()
               .setResource(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString())
               .setPolicy(Policy.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       Policy response = notebookServiceClient.setIamPolicy(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `com.google.iam.v1.SetIamPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.iam.v1.Policy` |   |

### setIamPolicyCallable()

    public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       SetIamPolicyRequest request =
           SetIamPolicyRequest.newBuilder()
               .setResource(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString())
               .setPolicy(Policy.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       ApiFuture<Policy> future = notebookServiceClient.setIamPolicyCallable().futureCall(request);
       // Do something.
       Policy response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy>` |   |

### setInstanceAcceleratorAsync(SetInstanceAcceleratorRequest request)

    public final OperationFuture<Instance,OperationMetadata> setInstanceAcceleratorAsync(SetInstanceAcceleratorRequest request)

Updates the guest accelerators of a single Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       SetInstanceAcceleratorRequest request =
           SetInstanceAcceleratorRequest.newBuilder()
               .setName("name3373707")
               .setCoreCount(-1963855761)
               .build();
       Instance response = notebookServiceClient.setInstanceAcceleratorAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### setInstanceAcceleratorCallable()

    public final UnaryCallable<SetInstanceAcceleratorRequest,Operation> setInstanceAcceleratorCallable()

Updates the guest accelerators of a single Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       SetInstanceAcceleratorRequest request =
           SetInstanceAcceleratorRequest.newBuilder()
               .setName("name3373707")
               .setCoreCount(-1963855761)
               .build();
       ApiFuture<Operation> future =
           notebookServiceClient.setInstanceAcceleratorCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### setInstanceAcceleratorOperationCallable()

    public final OperationCallable<SetInstanceAcceleratorRequest,Instance,OperationMetadata> setInstanceAcceleratorOperationCallable()

Updates the guest accelerators of a single Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       SetInstanceAcceleratorRequest request =
           SetInstanceAcceleratorRequest.newBuilder()
               .setName("name3373707")
               .setCoreCount(-1963855761)
               .build();
       OperationFuture<Instance, OperationMetadata> future =
           notebookServiceClient.setInstanceAcceleratorOperationCallable().futureCall(request);
       // Do something.
       Instance response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.SetInstanceAcceleratorRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### setInstanceLabelsAsync(SetInstanceLabelsRequest request)

    public final OperationFuture<Instance,OperationMetadata> setInstanceLabelsAsync(SetInstanceLabelsRequest request)

Replaces all the labels of an Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       SetInstanceLabelsRequest request =
           SetInstanceLabelsRequest.newBuilder()
               .setName("name3373707")
               .putAllLabels(new HashMap<String, String>())
               .build();
       Instance response = notebookServiceClient.setInstanceLabelsAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.SetInstanceLabelsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### setInstanceLabelsCallable()

    public final UnaryCallable<SetInstanceLabelsRequest,Operation> setInstanceLabelsCallable()

Replaces all the labels of an Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       SetInstanceLabelsRequest request =
           SetInstanceLabelsRequest.newBuilder()
               .setName("name3373707")
               .putAllLabels(new HashMap<String, String>())
               .build();
       ApiFuture<Operation> future =
           notebookServiceClient.setInstanceLabelsCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.SetInstanceLabelsRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### setInstanceLabelsOperationCallable()

    public final OperationCallable<SetInstanceLabelsRequest,Instance,OperationMetadata> setInstanceLabelsOperationCallable()

Replaces all the labels of an Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       SetInstanceLabelsRequest request =
           SetInstanceLabelsRequest.newBuilder()
               .setName("name3373707")
               .putAllLabels(new HashMap<String, String>())
               .build();
       OperationFuture<Instance, OperationMetadata> future =
           notebookServiceClient.setInstanceLabelsOperationCallable().futureCall(request);
       // Do something.
       Instance response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.SetInstanceLabelsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### setInstanceMachineTypeAsync(SetInstanceMachineTypeRequest request)

    public final OperationFuture<Instance,OperationMetadata> setInstanceMachineTypeAsync(SetInstanceMachineTypeRequest request)

Updates the machine type of a single Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       SetInstanceMachineTypeRequest request =
           SetInstanceMachineTypeRequest.newBuilder()
               .setName("name3373707")
               .setMachineType("machineType-218117087")
               .build();
       Instance response = notebookServiceClient.setInstanceMachineTypeAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### setInstanceMachineTypeCallable()

    public final UnaryCallable<SetInstanceMachineTypeRequest,Operation> setInstanceMachineTypeCallable()

Updates the machine type of a single Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       SetInstanceMachineTypeRequest request =
           SetInstanceMachineTypeRequest.newBuilder()
               .setName("name3373707")
               .setMachineType("machineType-218117087")
               .build();
       ApiFuture<Operation> future =
           notebookServiceClient.setInstanceMachineTypeCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### setInstanceMachineTypeOperationCallable()

    public final OperationCallable<SetInstanceMachineTypeRequest,Instance,OperationMetadata> setInstanceMachineTypeOperationCallable()

Updates the machine type of a single Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       SetInstanceMachineTypeRequest request =
           SetInstanceMachineTypeRequest.newBuilder()
               .setName("name3373707")
               .setMachineType("machineType-218117087")
               .build();
       OperationFuture<Instance, OperationMetadata> future =
           notebookServiceClient.setInstanceMachineTypeOperationCallable().futureCall(request);
       // Do something.
       Instance response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.SetInstanceMachineTypeRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### shutdown()

    public void shutdown()

### shutdownNow()

    public void shutdownNow()

### startInstanceAsync(StartInstanceRequest request)

    public final OperationFuture<Instance,OperationMetadata> startInstanceAsync(StartInstanceRequest request)

Starts a notebook instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       StartInstanceRequest request =
           StartInstanceRequest.newBuilder().setName("name3373707").build();
       Instance response = notebookServiceClient.startInstanceAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.StartInstanceRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### startInstanceCallable()

    public final UnaryCallable<StartInstanceRequest,Operation> startInstanceCallable()

Starts a notebook instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       StartInstanceRequest request =
           StartInstanceRequest.newBuilder().setName("name3373707").build();
       ApiFuture<Operation> future =
           notebookServiceClient.startInstanceCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.StartInstanceRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### startInstanceOperationCallable()

    public final OperationCallable<StartInstanceRequest,Instance,OperationMetadata> startInstanceOperationCallable()

Starts a notebook instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       StartInstanceRequest request =
           StartInstanceRequest.newBuilder().setName("name3373707").build();
       OperationFuture<Instance, OperationMetadata> future =
           notebookServiceClient.startInstanceOperationCallable().futureCall(request);
       // Do something.
       Instance response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.StartInstanceRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### stopInstanceAsync(StopInstanceRequest request)

    public final OperationFuture<Instance,OperationMetadata> stopInstanceAsync(StopInstanceRequest request)

Stops a notebook instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       StopInstanceRequest request = StopInstanceRequest.newBuilder().setName("name3373707").build();
       Instance response = notebookServiceClient.stopInstanceAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.StopInstanceRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### stopInstanceCallable()

    public final UnaryCallable<StopInstanceRequest,Operation> stopInstanceCallable()

Stops a notebook instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       StopInstanceRequest request = StopInstanceRequest.newBuilder().setName("name3373707").build();
       ApiFuture<Operation> future =
           notebookServiceClient.stopInstanceCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.StopInstanceRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### stopInstanceOperationCallable()

    public final OperationCallable<StopInstanceRequest,Instance,OperationMetadata> stopInstanceOperationCallable()

Stops a notebook instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       StopInstanceRequest request = StopInstanceRequest.newBuilder().setName("name3373707").build();
       OperationFuture<Instance, OperationMetadata> future =
           notebookServiceClient.stopInstanceOperationCallable().futureCall(request);
       // Do something.
       Instance response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.StopInstanceRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### testIamPermissions(TestIamPermissionsRequest request)

    public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)

Returns permissions that a caller has on the specified resource. If theresource does not exist,
this will return an empty set ofpermissions, not a `NOT_FOUND` error.

Note: This operation is designed to be used for buildingpermission-aware UIs and
command-line tools, not for authorizationchecking. This operation may "fail open" without
warning.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       TestIamPermissionsRequest request =
           TestIamPermissionsRequest.newBuilder()
               .setResource(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString())
               .addAllPermissions(new ArrayList<String>())
               .build();
       TestIamPermissionsResponse response = notebookServiceClient.testIamPermissions(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `com.google.iam.v1.TestIamPermissionsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.iam.v1.TestIamPermissionsResponse` |   |

### testIamPermissionsCallable()

    public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()

Returns permissions that a caller has on the specified resource. If theresource does not exist,
this will return an empty set ofpermissions, not a `NOT_FOUND` error.

Note: This operation is designed to be used for buildingpermission-aware UIs and
command-line tools, not for authorizationchecking. This operation may "fail open" without
warning.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       TestIamPermissionsRequest request =
           TestIamPermissionsRequest.newBuilder()
               .setResource(RuntimeName.of("[PROJECT]", "[LOCATION]", "[RUNTIME]").toString())
               .addAllPermissions(new ArrayList<String>())
               .build();
       ApiFuture<TestIamPermissionsResponse> future =
           notebookServiceClient.testIamPermissionsCallable().futureCall(request);
       // Do something.
       TestIamPermissionsResponse response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse>` |   |

### triggerScheduleAsync(TriggerScheduleRequest request)

    public final OperationFuture<Schedule,OperationMetadata> triggerScheduleAsync(TriggerScheduleRequest request)

Triggers execution of an existing schedule.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       TriggerScheduleRequest request =
           TriggerScheduleRequest.newBuilder()
               .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
               .build();
       Schedule response = notebookServiceClient.triggerScheduleAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.TriggerScheduleRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Schedule,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### triggerScheduleCallable()

    public final UnaryCallable<TriggerScheduleRequest,Operation> triggerScheduleCallable()

Triggers execution of an existing schedule.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       TriggerScheduleRequest request =
           TriggerScheduleRequest.newBuilder()
               .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
               .build();
       ApiFuture<Operation> future =
           notebookServiceClient.triggerScheduleCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.TriggerScheduleRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### triggerScheduleOperationCallable()

    public final OperationCallable<TriggerScheduleRequest,Schedule,OperationMetadata> triggerScheduleOperationCallable()

Triggers execution of an existing schedule.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       TriggerScheduleRequest request =
           TriggerScheduleRequest.newBuilder()
               .setName(ScheduleName.of("[PROJECT]", "[LOCATION]", "[SCHEDULE]").toString())
               .build();
       OperationFuture<Schedule, OperationMetadata> future =
           notebookServiceClient.triggerScheduleOperationCallable().futureCall(request);
       // Do something.
       Schedule response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.TriggerScheduleRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Schedule,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### updateInstanceConfigAsync(UpdateInstanceConfigRequest request)

    public final OperationFuture<Instance,OperationMetadata> updateInstanceConfigAsync(UpdateInstanceConfigRequest request)

Update Notebook Instance configurations.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       UpdateInstanceConfigRequest request =
           UpdateInstanceConfigRequest.newBuilder()
               .setName("name3373707")
               .setConfig(InstanceConfig.newBuilder().build())
               .build();
       Instance response = notebookServiceClient.updateInstanceConfigAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### updateInstanceConfigCallable()

    public final UnaryCallable<UpdateInstanceConfigRequest,Operation> updateInstanceConfigCallable()

Update Notebook Instance configurations.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       UpdateInstanceConfigRequest request =
           UpdateInstanceConfigRequest.newBuilder()
               .setName("name3373707")
               .setConfig(InstanceConfig.newBuilder().build())
               .build();
       ApiFuture<Operation> future =
           notebookServiceClient.updateInstanceConfigCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### updateInstanceConfigOperationCallable()

    public final OperationCallable<UpdateInstanceConfigRequest,Instance,OperationMetadata> updateInstanceConfigOperationCallable()

Update Notebook Instance configurations.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       UpdateInstanceConfigRequest request =
           UpdateInstanceConfigRequest.newBuilder()
               .setName("name3373707")
               .setConfig(InstanceConfig.newBuilder().build())
               .build();
       OperationFuture<Instance, OperationMetadata> future =
           notebookServiceClient.updateInstanceConfigOperationCallable().futureCall(request);
       // Do something.
       Instance response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.UpdateInstanceConfigRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### updateInstanceMetadataItems(UpdateInstanceMetadataItemsRequest request)

    public final UpdateInstanceMetadataItemsResponse updateInstanceMetadataItems(UpdateInstanceMetadataItemsRequest request)

Add/update metadata items for an instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       UpdateInstanceMetadataItemsRequest request =
           UpdateInstanceMetadataItemsRequest.newBuilder()
               .setName("name3373707")
               .putAllItems(new HashMap<String, String>())
               .build();
       UpdateInstanceMetadataItemsResponse response =
           notebookServiceClient.updateInstanceMetadataItems(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.UpdateInstanceMetadataItemsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.UpdateInstanceMetadataItemsResponse` |   |

### updateInstanceMetadataItemsCallable()

    public final UnaryCallable<UpdateInstanceMetadataItemsRequest,UpdateInstanceMetadataItemsResponse> updateInstanceMetadataItemsCallable()

Add/update metadata items for an instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       UpdateInstanceMetadataItemsRequest request =
           UpdateInstanceMetadataItemsRequest.newBuilder()
               .setName("name3373707")
               .putAllItems(new HashMap<String, String>())
               .build();
       ApiFuture<UpdateInstanceMetadataItemsResponse> future =
           notebookServiceClient.updateInstanceMetadataItemsCallable().futureCall(request);
       // Do something.
       UpdateInstanceMetadataItemsResponse response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.UpdateInstanceMetadataItemsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.UpdateInstanceMetadataItemsResponse>` |   |

### updateShieldedInstanceConfigAsync(UpdateShieldedInstanceConfigRequest request)

    public final OperationFuture<Instance,OperationMetadata> updateShieldedInstanceConfigAsync(UpdateShieldedInstanceConfigRequest request)

Updates the Shielded instance configuration of a single Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       UpdateShieldedInstanceConfigRequest request =
           UpdateShieldedInstanceConfigRequest.newBuilder()
               .setName("name3373707")
               .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build())
               .build();
       Instance response = notebookServiceClient.updateShieldedInstanceConfigAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### updateShieldedInstanceConfigCallable()

    public final UnaryCallable<UpdateShieldedInstanceConfigRequest,Operation> updateShieldedInstanceConfigCallable()

Updates the Shielded instance configuration of a single Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       UpdateShieldedInstanceConfigRequest request =
           UpdateShieldedInstanceConfigRequest.newBuilder()
               .setName("name3373707")
               .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build())
               .build();
       ApiFuture<Operation> future =
           notebookServiceClient.updateShieldedInstanceConfigCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### updateShieldedInstanceConfigOperationCallable()

    public final OperationCallable<UpdateShieldedInstanceConfigRequest,Instance,OperationMetadata> updateShieldedInstanceConfigOperationCallable()

Updates the Shielded instance configuration of a single Instance.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       UpdateShieldedInstanceConfigRequest request =
           UpdateShieldedInstanceConfigRequest.newBuilder()
               .setName("name3373707")
               .setShieldedInstanceConfig(Instance.ShieldedInstanceConfig.newBuilder().build())
               .build();
       OperationFuture<Instance, OperationMetadata> future =
           notebookServiceClient.updateShieldedInstanceConfigOperationCallable().futureCall(request);
       // Do something.
       Instance response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### upgradeInstanceAsync(UpgradeInstanceRequest request)

    public final OperationFuture<Instance,OperationMetadata> upgradeInstanceAsync(UpgradeInstanceRequest request)

Upgrades a notebook instance to the latest version.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       UpgradeInstanceRequest request =
           UpgradeInstanceRequest.newBuilder()
               .setName("name3373707")
               .setType(UpgradeType.forNumber(0))
               .build();
       Instance response = notebookServiceClient.upgradeInstanceAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.UpgradeInstanceRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### upgradeInstanceCallable()

    public final UnaryCallable<UpgradeInstanceRequest,Operation> upgradeInstanceCallable()

Upgrades a notebook instance to the latest version.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       UpgradeInstanceRequest request =
           UpgradeInstanceRequest.newBuilder()
               .setName("name3373707")
               .setType(UpgradeType.forNumber(0))
               .build();
       ApiFuture<Operation> future =
           notebookServiceClient.upgradeInstanceCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.UpgradeInstanceRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### upgradeInstanceInternalAsync(UpgradeInstanceInternalRequest request)

    public final OperationFuture<Instance,OperationMetadata> upgradeInstanceInternalAsync(UpgradeInstanceInternalRequest request)

Allows notebook instances to call this endpoint to upgrade themselves. Do not use this method
directly.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       UpgradeInstanceInternalRequest request =
           UpgradeInstanceInternalRequest.newBuilder()
               .setName("name3373707")
               .setVmId("vmId3622450")
               .setType(UpgradeType.forNumber(0))
               .build();
       Instance response = notebookServiceClient.upgradeInstanceInternalAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### upgradeInstanceInternalCallable()

    public final UnaryCallable<UpgradeInstanceInternalRequest,Operation> upgradeInstanceInternalCallable()

Allows notebook instances to call this endpoint to upgrade themselves. Do not use this method
directly.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       UpgradeInstanceInternalRequest request =
           UpgradeInstanceInternalRequest.newBuilder()
               .setName("name3373707")
               .setVmId("vmId3622450")
               .setType(UpgradeType.forNumber(0))
               .build();
       ApiFuture<Operation> future =
           notebookServiceClient.upgradeInstanceInternalCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### upgradeInstanceInternalOperationCallable()

    public final OperationCallable<UpgradeInstanceInternalRequest,Instance,OperationMetadata> upgradeInstanceInternalOperationCallable()

Allows notebook instances to call this endpoint to upgrade themselves. Do not use this method
directly.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       UpgradeInstanceInternalRequest request =
           UpgradeInstanceInternalRequest.newBuilder()
               .setName("name3373707")
               .setVmId("vmId3622450")
               .setType(UpgradeType.forNumber(0))
               .build();
       OperationFuture<Instance, OperationMetadata> future =
           notebookServiceClient.upgradeInstanceInternalOperationCallable().futureCall(request);
       // Do something.
       Instance response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.UpgradeInstanceInternalRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |

### upgradeInstanceOperationCallable()

    public final OperationCallable<UpgradeInstanceRequest,Instance,OperationMetadata> upgradeInstanceOperationCallable()

Upgrades a notebook instance to the latest version.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NotebookServiceClient notebookServiceClient = NotebookServiceClient.create()) {
       UpgradeInstanceRequest request =
           UpgradeInstanceRequest.newBuilder()
               .setName("name3373707")
               .setType(UpgradeType.forNumber(0))
               .build();
       OperationFuture<Instance, OperationMetadata> future =
           notebookServiceClient.upgradeInstanceOperationCallable().futureCall(request);
       // Do something.
       Instance response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.UpgradeInstanceRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.Instance,https://docs.cloud.google.com/java/docs/reference/google-cloud-notebooks/latest/com.google.cloud.notebooks.v1.OperationMetadata>` |   |