Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
import com.google.bigtable.admin.v2.ListClustersResponse;
import com.google.bigtable.admin.v2.ListInstancesRequest;
import com.google.bigtable.admin.v2.ListInstancesResponse;
import com.google.bigtable.admin.v2.PartialUpdateClusterMetadata;
import com.google.bigtable.admin.v2.PartialUpdateClusterRequest;
import com.google.bigtable.admin.v2.PartialUpdateInstanceRequest;
import com.google.bigtable.admin.v2.ProjectName;
import com.google.bigtable.admin.v2.UpdateAppProfileMetadata;
Expand Down Expand Up @@ -149,6 +151,11 @@ public final OperationsClient getOperationsClient() {
/**
* Create an instance within a project.
*
* <p>Note that exactly one of Cluster.serve_nodes and
* Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to
* non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is
* non-empty, then autoscaling is enabled.
*
* <p>Sample code:
*
* <pre>{@code
Expand Down Expand Up @@ -193,6 +200,11 @@ public final OperationFuture<Instance, CreateInstanceMetadata> createInstanceAsy
/**
* Create an instance within a project.
*
* <p>Note that exactly one of Cluster.serve_nodes and
* Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to
* non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is
* non-empty, then autoscaling is enabled.
*
* <p>Sample code:
*
* <pre>{@code
Expand Down Expand Up @@ -237,6 +249,11 @@ public final OperationFuture<Instance, CreateInstanceMetadata> createInstanceAsy
/**
* Create an instance within a project.
*
* <p>Note that exactly one of Cluster.serve_nodes and
* Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to
* non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is
* non-empty, then autoscaling is enabled.
*
* <p>Sample code:
*
* <pre>{@code
Expand Down Expand Up @@ -265,6 +282,11 @@ public final OperationFuture<Instance, CreateInstanceMetadata> createInstanceAsy
/**
* Create an instance within a project.
*
* <p>Note that exactly one of Cluster.serve_nodes and
* Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to
* non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is
* non-empty, then autoscaling is enabled.
*
* <p>Sample code:
*
* <pre>{@code
Expand Down Expand Up @@ -293,6 +315,11 @@ public final OperationFuture<Instance, CreateInstanceMetadata> createInstanceAsy
/**
* Create an instance within a project.
*
* <p>Note that exactly one of Cluster.serve_nodes and
* Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to
* non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is
* non-empty, then autoscaling is enabled.
*
* <p>Sample code:
*
* <pre>{@code
Expand Down Expand Up @@ -780,6 +807,11 @@ public final UnaryCallable<DeleteInstanceRequest, Empty> deleteInstanceCallable(
/**
* Creates a cluster within an instance.
*
* <p>Note that exactly one of Cluster.serve_nodes and
* Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to
* non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is
* non-empty, then autoscaling is enabled.
*
* <p>Sample code:
*
* <pre>{@code
Expand Down Expand Up @@ -817,6 +849,11 @@ public final OperationFuture<Cluster, CreateClusterMetadata> createClusterAsync(
/**
* Creates a cluster within an instance.
*
* <p>Note that exactly one of Cluster.serve_nodes and
* Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to
* non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is
* non-empty, then autoscaling is enabled.
*
* <p>Sample code:
*
* <pre>{@code
Expand Down Expand Up @@ -854,6 +891,11 @@ public final OperationFuture<Cluster, CreateClusterMetadata> createClusterAsync(
/**
* Creates a cluster within an instance.
*
* <p>Note that exactly one of Cluster.serve_nodes and
* Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to
* non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is
* non-empty, then autoscaling is enabled.
*
* <p>Sample code:
*
* <pre>{@code
Expand Down Expand Up @@ -881,6 +923,11 @@ public final OperationFuture<Cluster, CreateClusterMetadata> createClusterAsync(
/**
* Creates a cluster within an instance.
*
* <p>Note that exactly one of Cluster.serve_nodes and
* Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to
* non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is
* non-empty, then autoscaling is enabled.
*
* <p>Sample code:
*
* <pre>{@code
Expand Down Expand Up @@ -908,6 +955,11 @@ public final OperationFuture<Cluster, CreateClusterMetadata> createClusterAsync(
/**
* Creates a cluster within an instance.
*
* <p>Note that exactly one of Cluster.serve_nodes and
* Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to
* non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is
* non-empty, then autoscaling is enabled.
*
* <p>Sample code:
*
* <pre>{@code
Expand Down Expand Up @@ -1132,6 +1184,9 @@ public final UnaryCallable<ListClustersRequest, ListClustersResponse> listCluste
/**
* Updates a cluster within an instance.
*
* <p>Note that UpdateCluster does not support updating cluster_config.cluster_autoscaling_config.
* In order to update it, you must use PartialUpdateCluster.
*
* <p>Sample code:
*
* <pre>{@code
Expand Down Expand Up @@ -1160,6 +1215,9 @@ public final OperationFuture<Cluster, UpdateClusterMetadata> updateClusterAsync(
/**
* Updates a cluster within an instance.
*
* <p>Note that UpdateCluster does not support updating cluster_config.cluster_autoscaling_config.
* In order to update it, you must use PartialUpdateCluster.
*
* <p>Sample code:
*
* <pre>{@code
Expand Down Expand Up @@ -1189,6 +1247,9 @@ public final OperationFuture<Cluster, UpdateClusterMetadata> updateClusterAsync(
/**
* Updates a cluster within an instance.
*
* <p>Note that UpdateCluster does not support updating cluster_config.cluster_autoscaling_config.
* In order to update it, you must use PartialUpdateCluster.
*
* <p>Sample code:
*
* <pre>{@code
Expand All @@ -1213,6 +1274,157 @@ public final UnaryCallable<Cluster, Operation> updateClusterCallable() {
return stub.updateClusterCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Partially updates a cluster within a project. This method is the preferred way to update a
* Cluster.
*
* <p>To enable and update autoscaling, set cluster_config.cluster_autoscaling_config. When
* autoscaling is enabled, serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to
* it are ignored. Note that an update cannot simultaneously set serve_nodes to non-zero and
* cluster_config.cluster_autoscaling_config to non-empty, and also specify both in the
* update_mask.
*
* <p>To disable autoscaling, clear cluster_config.cluster_autoscaling_config, and explicitly set
* a serve_node count via the update_mask.
*
* <p>Sample code:
*
* <pre>{@code
* try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
* BaseBigtableInstanceAdminClient.create()) {
* Cluster cluster = Cluster.newBuilder().build();
* FieldMask updateMask = FieldMask.newBuilder().build();
* Cluster response =
* baseBigtableInstanceAdminClient.partialUpdateClusterAsync(cluster, updateMask).get();
* }
* }</pre>
*
* @param cluster Required. The Cluster which contains the partial updates to be applied, subject
* to the update_mask.
* @param updateMask Required. The subset of Cluster fields which should be replaced.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<Cluster, PartialUpdateClusterMetadata> partialUpdateClusterAsync(
Cluster cluster, FieldMask updateMask) {
PartialUpdateClusterRequest request =
PartialUpdateClusterRequest.newBuilder()
.setCluster(cluster)
.setUpdateMask(updateMask)
.build();
return partialUpdateClusterAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Partially updates a cluster within a project. This method is the preferred way to update a
* Cluster.
*
* <p>To enable and update autoscaling, set cluster_config.cluster_autoscaling_config. When
* autoscaling is enabled, serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to
* it are ignored. Note that an update cannot simultaneously set serve_nodes to non-zero and
* cluster_config.cluster_autoscaling_config to non-empty, and also specify both in the
* update_mask.
*
* <p>To disable autoscaling, clear cluster_config.cluster_autoscaling_config, and explicitly set
* a serve_node count via the update_mask.
*
* <p>Sample code:
*
* <pre>{@code
* try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
* BaseBigtableInstanceAdminClient.create()) {
* PartialUpdateClusterRequest request =
* PartialUpdateClusterRequest.newBuilder()
* .setCluster(Cluster.newBuilder().build())
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* Cluster response = baseBigtableInstanceAdminClient.partialUpdateClusterAsync(request).get();
* }
* }</pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<Cluster, PartialUpdateClusterMetadata> partialUpdateClusterAsync(
PartialUpdateClusterRequest request) {
return partialUpdateClusterOperationCallable().futureCall(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Partially updates a cluster within a project. This method is the preferred way to update a
* Cluster.
*
* <p>To enable and update autoscaling, set cluster_config.cluster_autoscaling_config. When
* autoscaling is enabled, serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to
* it are ignored. Note that an update cannot simultaneously set serve_nodes to non-zero and
* cluster_config.cluster_autoscaling_config to non-empty, and also specify both in the
* update_mask.
*
* <p>To disable autoscaling, clear cluster_config.cluster_autoscaling_config, and explicitly set
* a serve_node count via the update_mask.
*
* <p>Sample code:
*
* <pre>{@code
* try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
* BaseBigtableInstanceAdminClient.create()) {
* PartialUpdateClusterRequest request =
* PartialUpdateClusterRequest.newBuilder()
* .setCluster(Cluster.newBuilder().build())
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* OperationFuture<Cluster, PartialUpdateClusterMetadata> future =
* baseBigtableInstanceAdminClient
* .partialUpdateClusterOperationCallable()
* .futureCall(request);
* // Do something.
* Cluster response = future.get();
* }
* }</pre>
*/
public final OperationCallable<PartialUpdateClusterRequest, Cluster, PartialUpdateClusterMetadata>
partialUpdateClusterOperationCallable() {
return stub.partialUpdateClusterOperationCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Partially updates a cluster within a project. This method is the preferred way to update a
* Cluster.
*
* <p>To enable and update autoscaling, set cluster_config.cluster_autoscaling_config. When
* autoscaling is enabled, serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to
* it are ignored. Note that an update cannot simultaneously set serve_nodes to non-zero and
* cluster_config.cluster_autoscaling_config to non-empty, and also specify both in the
* update_mask.
*
* <p>To disable autoscaling, clear cluster_config.cluster_autoscaling_config, and explicitly set
* a serve_node count via the update_mask.
*
* <p>Sample code:
*
* <pre>{@code
* try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
* BaseBigtableInstanceAdminClient.create()) {
* PartialUpdateClusterRequest request =
* PartialUpdateClusterRequest.newBuilder()
* .setCluster(Cluster.newBuilder().build())
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* ApiFuture<Operation> future =
* baseBigtableInstanceAdminClient.partialUpdateClusterCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<PartialUpdateClusterRequest, Operation>
partialUpdateClusterCallable() {
return stub.partialUpdateClusterCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a cluster from an instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
import com.google.bigtable.admin.v2.ListClustersResponse;
import com.google.bigtable.admin.v2.ListInstancesRequest;
import com.google.bigtable.admin.v2.ListInstancesResponse;
import com.google.bigtable.admin.v2.PartialUpdateClusterMetadata;
import com.google.bigtable.admin.v2.PartialUpdateClusterRequest;
import com.google.bigtable.admin.v2.PartialUpdateInstanceRequest;
import com.google.bigtable.admin.v2.UpdateAppProfileMetadata;
import com.google.bigtable.admin.v2.UpdateAppProfileRequest;
Expand Down Expand Up @@ -147,6 +149,18 @@ public UnaryCallSettings<Cluster, Operation> updateClusterSettings() {
return ((BigtableInstanceAdminStubSettings) getStubSettings()).updateClusterOperationSettings();
}

/** Returns the object with the settings used for calls to partialUpdateCluster. */
public UnaryCallSettings<PartialUpdateClusterRequest, Operation> partialUpdateClusterSettings() {
return ((BigtableInstanceAdminStubSettings) getStubSettings()).partialUpdateClusterSettings();
}

/** Returns the object with the settings used for calls to partialUpdateCluster. */
public OperationCallSettings<PartialUpdateClusterRequest, Cluster, PartialUpdateClusterMetadata>
partialUpdateClusterOperationSettings() {
return ((BigtableInstanceAdminStubSettings) getStubSettings())
.partialUpdateClusterOperationSettings();
}

/** Returns the object with the settings used for calls to deleteCluster. */
public UnaryCallSettings<DeleteClusterRequest, Empty> deleteClusterSettings() {
return ((BigtableInstanceAdminStubSettings) getStubSettings()).deleteClusterSettings();
Expand Down Expand Up @@ -373,6 +387,19 @@ public UnaryCallSettings.Builder<Cluster, Operation> updateClusterSettings() {
return getStubSettingsBuilder().updateClusterOperationSettings();
}

/** Returns the builder for the settings used for calls to partialUpdateCluster. */
public UnaryCallSettings.Builder<PartialUpdateClusterRequest, Operation>
partialUpdateClusterSettings() {
return getStubSettingsBuilder().partialUpdateClusterSettings();
}

/** Returns the builder for the settings used for calls to partialUpdateCluster. */
public OperationCallSettings.Builder<
PartialUpdateClusterRequest, Cluster, PartialUpdateClusterMetadata>
partialUpdateClusterOperationSettings() {
return getStubSettingsBuilder().partialUpdateClusterOperationSettings();
}

/** Returns the builder for the settings used for calls to deleteCluster. */
public UnaryCallSettings.Builder<DeleteClusterRequest, Empty> deleteClusterSettings() {
return getStubSettingsBuilder().deleteClusterSettings();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
"ListInstances": {
"methods": ["listInstances", "listInstances", "listInstances", "listInstancesCallable"]
},
"PartialUpdateCluster": {
"methods": ["partialUpdateClusterAsync", "partialUpdateClusterAsync", "partialUpdateClusterOperationCallable", "partialUpdateClusterCallable"]
},
"PartialUpdateInstance": {
"methods": ["partialUpdateInstanceAsync", "partialUpdateInstanceAsync", "partialUpdateInstanceOperationCallable", "partialUpdateInstanceCallable"]
},
Expand Down
Loading