diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java index 21d398cb0..aa9dc1668 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.cloud.bigtable.admin.v2; import com.google.api.core.ApiFunction; @@ -76,7 +77,7 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND SERVICE +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** For internal use only. */ @Generated("by gapic-generator") @InternalApi @@ -102,7 +103,7 @@ public static final BaseBigtableInstanceAdminClient create( /** * Constructs an instance of BaseBigtableInstanceAdminClient, using the given stub for making - * calls. This is for advanced usage - prefer to use BaseBigtableInstanceAdminSettings}. + * calls. This is for advanced usage - prefer using create(BaseBigtableInstanceAdminSettings). */ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final BaseBigtableInstanceAdminClient create(BigtableInstanceAdminStub stub) { @@ -141,27 +142,29 @@ public BigtableInstanceAdminStub getStub() { * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public final OperationsClient getOperationsClient() { return operationsClient; } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Create an instance within a project. * *
Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
* ProjectName parent = ProjectName.of("[PROJECT]");
- * String instanceId = "";
+ * String instanceId = "instanceId902024336";
* Instance instance = Instance.newBuilder().build();
- * Map<String, Cluster> clusters = new HashMap<>();
- * Instance response = baseBigtableInstanceAdminClient.createInstanceAsync(parent, instanceId, instance, clusters).get();
+ * Map clusters = new HashMap<>();
+ * Instance response =
+ * baseBigtableInstanceAdminClient
+ * .createInstanceAsync(parent, instanceId, instance, clusters)
+ * .get();
* }
- *
+ * }
*
* @param parent Required. The unique name of the project in which to create the new instance.
* Values are of the form `projects/{project}`.
@@ -175,8 +178,6 @@ public final OperationsClient getOperationsClient() {
* must be left blank. Currently, at most four clusters can be specified.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * String instanceId = "";
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * String parent = ProjectName.of("[PROJECT]").toString();
+ * String instanceId = "instanceId902024336";
* Instance instance = Instance.newBuilder().build();
- * Map<String, Cluster> clusters = new HashMap<>();
- * Instance response = baseBigtableInstanceAdminClient.createInstanceAsync(parent.toString(), instanceId, instance, clusters).get();
+ * Map clusters = new HashMap<>();
+ * Instance response =
+ * baseBigtableInstanceAdminClient
+ * .createInstanceAsync(parent, instanceId, instance, clusters)
+ * .get();
* }
- *
+ * }
*
* @param parent Required. The unique name of the project in which to create the new instance.
* Values are of the form `projects/{project}`.
@@ -217,8 +222,6 @@ public final OperationFutureSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * String instanceId = "";
- * Instance instance = Instance.newBuilder().build();
- * Map<String, Cluster> clusters = new HashMap<>();
- * CreateInstanceRequest request = CreateInstanceRequest.newBuilder()
- * .setParent(parent.toString())
- * .setInstanceId(instanceId)
- * .setInstance(instance)
- * .putAllClusters(clusters)
- * .build();
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * CreateInstanceRequest request =
+ * CreateInstanceRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setInstanceId("instanceId902024336")
+ * .setInstance(Instance.newBuilder().build())
+ * .putAllClusters(new HashMap())
+ * .build();
* Instance response = baseBigtableInstanceAdminClient.createInstanceAsync(request).get();
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * String instanceId = "";
- * Instance instance = Instance.newBuilder().build();
- * Map<String, Cluster> clusters = new HashMap<>();
- * CreateInstanceRequest request = CreateInstanceRequest.newBuilder()
- * .setParent(parent.toString())
- * .setInstanceId(instanceId)
- * .setInstance(instance)
- * .putAllClusters(clusters)
- * .build();
- * OperationFuture<Instance, CreateInstanceMetadata> future = baseBigtableInstanceAdminClient.createInstanceOperationCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * CreateInstanceRequest request =
+ * CreateInstanceRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setInstanceId("instanceId902024336")
+ * .setInstance(Instance.newBuilder().build())
+ * .putAllClusters(new HashMap())
+ * .build();
+ * OperationFuture future =
+ * baseBigtableInstanceAdminClient.createInstanceOperationCallable().futureCall(request);
+ * // Do something.
* Instance response = future.get();
* }
- *
+ * }
*/
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public final OperationCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * String instanceId = "";
- * Instance instance = Instance.newBuilder().build();
- * Map<String, Cluster> clusters = new HashMap<>();
- * CreateInstanceRequest request = CreateInstanceRequest.newBuilder()
- * .setParent(parent.toString())
- * .setInstanceId(instanceId)
- * .setInstance(instance)
- * .putAllClusters(clusters)
- * .build();
- * ApiFuture<Operation> future = baseBigtableInstanceAdminClient.createInstanceCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * CreateInstanceRequest request =
+ * CreateInstanceRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setInstanceId("instanceId902024336")
+ * .setInstance(Instance.newBuilder().build())
+ * .putAllClusters(new HashMap())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableInstanceAdminClient.createInstanceCallable().futureCall(request);
+ * // Do something.
* Operation response = future.get();
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
* InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
* Instance response = baseBigtableInstanceAdminClient.getInstance(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the requested instance. Values are of the form
* `projects/{project}/instances/{instance}`.
@@ -344,18 +341,19 @@ public final Instance getInstance(InstanceName name) {
return getInstance(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets information about an instance.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * Instance response = baseBigtableInstanceAdminClient.getInstance(name.toString());
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * String name = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
+ * Instance response = baseBigtableInstanceAdminClient.getInstance(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the requested instance. Values are of the form
* `projects/{project}/instances/{instance}`.
@@ -366,21 +364,22 @@ public final Instance getInstance(String name) {
return getInstance(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets information about an instance.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * GetInstanceRequest request = GetInstanceRequest.newBuilder()
- * .setName(name.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * GetInstanceRequest request =
+ * GetInstanceRequest.newBuilder()
+ * .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .build();
* Instance response = baseBigtableInstanceAdminClient.getInstance(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -389,40 +388,43 @@ public final Instance getInstance(GetInstanceRequest request) {
return getInstanceCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets information about an instance.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * GetInstanceRequest request = GetInstanceRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Instance> future = baseBigtableInstanceAdminClient.getInstanceCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * GetInstanceRequest request =
+ * GetInstanceRequest.newBuilder()
+ * .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableInstanceAdminClient.getInstanceCallable().futureCall(request);
+ * // Do something.
* Instance response = future.get();
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
* ProjectName parent = ProjectName.of("[PROJECT]");
* ListInstancesResponse response = baseBigtableInstanceAdminClient.listInstances(parent);
* }
- *
+ * }
*
* @param parent Required. The unique name of the project for which a list of instances is
* requested. Values are of the form `projects/{project}`.
@@ -436,18 +438,19 @@ public final ListInstancesResponse listInstances(ProjectName parent) {
return listInstances(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists information about instances in a project.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * ListInstancesResponse response = baseBigtableInstanceAdminClient.listInstances(parent.toString());
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * String parent = ProjectName.of("[PROJECT]").toString();
+ * ListInstancesResponse response = baseBigtableInstanceAdminClient.listInstances(parent);
* }
- *
+ * }
*
* @param parent Required. The unique name of the project for which a list of instances is
* requested. Values are of the form `projects/{project}`.
@@ -458,21 +461,23 @@ public final ListInstancesResponse listInstances(String parent) {
return listInstances(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists information about instances in a project.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * ListInstancesRequest request = ListInstancesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * ListInstancesRequest request =
+ * ListInstancesRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setPageToken("pageToken873572522")
+ * .build();
* ListInstancesResponse response = baseBigtableInstanceAdminClient.listInstances(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -481,50 +486,107 @@ public final ListInstancesResponse listInstances(ListInstancesRequest request) {
return listInstancesCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists information about instances in a project.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * ListInstancesRequest request = ListInstancesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * ApiFuture<ListInstancesResponse> future = baseBigtableInstanceAdminClient.listInstancesCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * ListInstancesRequest request =
+ * ListInstancesRequest.newBuilder()
+ * .setParent(ProjectName.of("[PROJECT]").toString())
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * baseBigtableInstanceAdminClient.listInstancesCallable().futureCall(request);
+ * // Do something.
* ListInstancesResponse response = future.get();
* }
- *
+ * }
*/
public final UnaryCallableSample code: + * + *
{@code + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * Instance request = + * Instance.newBuilder() + * .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + * .setDisplayName("displayName1714148973") + * .putAllLabels(new HashMap+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Instance updateInstance(Instance request) { + return updateInstanceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an instance within a project. This method updates only the display name and type for an + * Instance. To update other Instance properties, such as labels, use PartialUpdateInstance. + * + *()) + * .build(); + * Instance response = baseBigtableInstanceAdminClient.updateInstance(request); + * } + * }
Sample code: + * + *
{@code + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * Instance request = + * Instance.newBuilder() + * .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + * .setDisplayName("displayName1714148973") + * .putAllLabels(new HashMap+ */ + public final UnaryCallable()) + * .build(); + * ApiFuture future = + * baseBigtableInstanceAdminClient.updateInstanceCallable().futureCall(request); + * // Do something. + * Instance response = future.get(); + * } + * }
Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
* Instance instance = Instance.newBuilder().build();
* FieldMask updateMask = FieldMask.newBuilder().build();
- * Instance response = baseBigtableInstanceAdminClient.partialUpdateInstanceAsync(instance, updateMask).get();
+ * Instance response =
+ * baseBigtableInstanceAdminClient.partialUpdateInstanceAsync(instance, updateMask).get();
* }
- *
+ * }
*
* @param instance Required. The Instance which will (partially) replace the current value.
* @param updateMask Required. The subset of Instance fields which should be replaced. Must be
* explicitly set.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * Instance instance = Instance.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * PartialUpdateInstanceRequest request = PartialUpdateInstanceRequest.newBuilder()
- * .setInstance(instance)
- * .setUpdateMask(updateMask)
- * .build();
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * PartialUpdateInstanceRequest request =
+ * PartialUpdateInstanceRequest.newBuilder()
+ * .setInstance(Instance.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
* Instance response = baseBigtableInstanceAdminClient.partialUpdateInstanceAsync(request).get();
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * Instance instance = Instance.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * PartialUpdateInstanceRequest request = PartialUpdateInstanceRequest.newBuilder()
- * .setInstance(instance)
- * .setUpdateMask(updateMask)
- * .build();
- * OperationFuture<Instance, UpdateInstanceMetadata> future = baseBigtableInstanceAdminClient.partialUpdateInstanceOperationCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * PartialUpdateInstanceRequest request =
+ * PartialUpdateInstanceRequest.newBuilder()
+ * .setInstance(Instance.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * baseBigtableInstanceAdminClient
+ * .partialUpdateInstanceOperationCallable()
+ * .futureCall(request);
+ * // Do something.
* Instance response = future.get();
* }
- *
+ * }
*/
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public final OperationCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * Instance instance = Instance.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * PartialUpdateInstanceRequest request = PartialUpdateInstanceRequest.newBuilder()
- * .setInstance(instance)
- * .setUpdateMask(updateMask)
- * .build();
- * ApiFuture<Operation> future = baseBigtableInstanceAdminClient.partialUpdateInstanceCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * PartialUpdateInstanceRequest request =
+ * PartialUpdateInstanceRequest.newBuilder()
+ * .setInstance(Instance.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableInstanceAdminClient.partialUpdateInstanceCallable().futureCall(request);
+ * // Do something.
* Operation response = future.get();
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
* InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
* baseBigtableInstanceAdminClient.deleteInstance(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the instance to be deleted. Values are of the form
* `projects/{project}/instances/{instance}`.
@@ -640,18 +704,19 @@ public final void deleteInstance(InstanceName name) {
deleteInstance(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Delete an instance from a project.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * baseBigtableInstanceAdminClient.deleteInstance(name.toString());
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * String name = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
+ * baseBigtableInstanceAdminClient.deleteInstance(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the instance to be deleted. Values are of the form
* `projects/{project}/instances/{instance}`.
@@ -662,21 +727,22 @@ public final void deleteInstance(String name) {
deleteInstance(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Delete an instance from a project.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder()
- * .setName(name.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * DeleteInstanceRequest request =
+ * DeleteInstanceRequest.newBuilder()
+ * .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .build();
* baseBigtableInstanceAdminClient.deleteInstance(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -685,42 +751,46 @@ public final void deleteInstance(DeleteInstanceRequest request) {
deleteInstanceCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Delete an instance from a project.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Void> future = baseBigtableInstanceAdminClient.deleteInstanceCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * DeleteInstanceRequest request =
+ * DeleteInstanceRequest.newBuilder()
+ * .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableInstanceAdminClient.deleteInstanceCallable().futureCall(request);
+ * // Do something.
* future.get();
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
* InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String clusterId = "";
+ * String clusterId = "clusterId561939637";
* Cluster cluster = Cluster.newBuilder().build();
- * Cluster response = baseBigtableInstanceAdminClient.createClusterAsync(parent, clusterId, cluster).get();
+ * Cluster response =
+ * baseBigtableInstanceAdminClient.createClusterAsync(parent, clusterId, cluster).get();
* }
- *
+ * }
*
* @param parent Required. The unique name of the instance in which to create the new cluster.
* Values are of the form `projects/{project}/instances/{instance}`.
@@ -731,8 +801,6 @@ public final UnaryCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String clusterId = "";
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
+ * String clusterId = "clusterId561939637";
* Cluster cluster = Cluster.newBuilder().build();
- * Cluster response = baseBigtableInstanceAdminClient.createClusterAsync(parent.toString(), clusterId, cluster).get();
+ * Cluster response =
+ * baseBigtableInstanceAdminClient.createClusterAsync(parent, clusterId, cluster).get();
* }
- *
+ * }
*
* @param parent Required. The unique name of the instance in which to create the new cluster.
* Values are of the form `projects/{project}/instances/{instance}`.
@@ -768,8 +838,6 @@ public final OperationFutureSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String clusterId = "";
- * Cluster cluster = Cluster.newBuilder().build();
- * CreateClusterRequest request = CreateClusterRequest.newBuilder()
- * .setParent(parent.toString())
- * .setClusterId(clusterId)
- * .setCluster(cluster)
- * .build();
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * CreateClusterRequest request =
+ * CreateClusterRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .setClusterId("clusterId561939637")
+ * .setCluster(Cluster.newBuilder().build())
+ * .build();
* Cluster response = baseBigtableInstanceAdminClient.createClusterAsync(request).get();
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String clusterId = "";
- * Cluster cluster = Cluster.newBuilder().build();
- * CreateClusterRequest request = CreateClusterRequest.newBuilder()
- * .setParent(parent.toString())
- * .setClusterId(clusterId)
- * .setCluster(cluster)
- * .build();
- * OperationFuture<Cluster, CreateClusterMetadata> future = baseBigtableInstanceAdminClient.createClusterOperationCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * CreateClusterRequest request =
+ * CreateClusterRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .setClusterId("clusterId561939637")
+ * .setCluster(Cluster.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * baseBigtableInstanceAdminClient.createClusterOperationCallable().futureCall(request);
+ * // Do something.
* Cluster response = future.get();
* }
- *
+ * }
*/
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public final OperationCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String clusterId = "";
- * Cluster cluster = Cluster.newBuilder().build();
- * CreateClusterRequest request = CreateClusterRequest.newBuilder()
- * .setParent(parent.toString())
- * .setClusterId(clusterId)
- * .setCluster(cluster)
- * .build();
- * ApiFuture<Operation> future = baseBigtableInstanceAdminClient.createClusterCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * CreateClusterRequest request =
+ * CreateClusterRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .setClusterId("clusterId561939637")
+ * .setCluster(Cluster.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableInstanceAdminClient.createClusterCallable().futureCall(request);
+ * // Do something.
* Operation response = future.get();
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
* ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
* Cluster response = baseBigtableInstanceAdminClient.getCluster(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the requested cluster. Values are of the form
* `projects/{project}/instances/{instance}/clusters/{cluster}`.
@@ -888,18 +953,19 @@ public final Cluster getCluster(ClusterName name) {
return getCluster(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets information about a cluster.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * Cluster response = baseBigtableInstanceAdminClient.getCluster(name.toString());
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * String name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
+ * Cluster response = baseBigtableInstanceAdminClient.getCluster(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the requested cluster. Values are of the form
* `projects/{project}/instances/{instance}/clusters/{cluster}`.
@@ -910,21 +976,22 @@ public final Cluster getCluster(String name) {
return getCluster(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets information about a cluster.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * GetClusterRequest request = GetClusterRequest.newBuilder()
- * .setName(name.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * GetClusterRequest request =
+ * GetClusterRequest.newBuilder()
+ * .setName(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
+ * .build();
* Cluster response = baseBigtableInstanceAdminClient.getCluster(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -933,40 +1000,43 @@ public final Cluster getCluster(GetClusterRequest request) {
return getClusterCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets information about a cluster.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * GetClusterRequest request = GetClusterRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Cluster> future = baseBigtableInstanceAdminClient.getClusterCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * GetClusterRequest request =
+ * GetClusterRequest.newBuilder()
+ * .setName(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableInstanceAdminClient.getClusterCallable().futureCall(request);
+ * // Do something.
* Cluster response = future.get();
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
* InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
* ListClustersResponse response = baseBigtableInstanceAdminClient.listClusters(parent);
* }
- *
+ * }
*
* @param parent Required. The unique name of the instance for which a list of clusters is
* requested. Values are of the form `projects/{project}/instances/{instance}`. Use
@@ -982,18 +1052,19 @@ public final ListClustersResponse listClusters(InstanceName parent) {
return listClusters(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists information about clusters in an instance.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * ListClustersResponse response = baseBigtableInstanceAdminClient.listClusters(parent.toString());
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
+ * ListClustersResponse response = baseBigtableInstanceAdminClient.listClusters(parent);
* }
- *
+ * }
*
* @param parent Required. The unique name of the instance for which a list of clusters is
* requested. Values are of the form `projects/{project}/instances/{instance}`. Use
@@ -1006,21 +1077,23 @@ public final ListClustersResponse listClusters(String parent) {
return listClusters(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists information about clusters in an instance.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * ListClustersRequest request = ListClustersRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * ListClustersRequest request =
+ * ListClustersRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .setPageToken("pageToken873572522")
+ * .build();
* ListClustersResponse response = baseBigtableInstanceAdminClient.listClusters(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -1029,111 +1102,123 @@ public final ListClustersResponse listClusters(ListClustersRequest request) {
return listClustersCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists information about clusters in an instance.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * ListClustersRequest request = ListClustersRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * ApiFuture<ListClustersResponse> future = baseBigtableInstanceAdminClient.listClustersCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * ListClustersRequest request =
+ * ListClustersRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * baseBigtableInstanceAdminClient.listClustersCallable().futureCall(request);
+ * // Do something.
* ListClustersResponse response = future.get();
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * int serveNodes = 0;
- * Cluster request = Cluster.newBuilder()
- * .setServeNodes(serveNodes)
- * .build();
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * Cluster request =
+ * Cluster.newBuilder()
+ * .setName(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
+ * .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setServeNodes(-1288838783)
+ * .build();
* Cluster response = baseBigtableInstanceAdminClient.updateClusterAsync(request).get();
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * int serveNodes = 0;
- * Cluster request = Cluster.newBuilder()
- * .setServeNodes(serveNodes)
- * .build();
- * OperationFuture<Cluster, UpdateClusterMetadata> future = baseBigtableInstanceAdminClient.updateClusterOperationCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * Cluster request =
+ * Cluster.newBuilder()
+ * .setName(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
+ * .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setServeNodes(-1288838783)
+ * .build();
+ * OperationFuture future =
+ * baseBigtableInstanceAdminClient.updateClusterOperationCallable().futureCall(request);
+ * // Do something.
* Cluster response = future.get();
* }
- *
+ * }
*/
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public final OperationCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * int serveNodes = 0;
- * Cluster request = Cluster.newBuilder()
- * .setServeNodes(serveNodes)
- * .build();
- * ApiFuture<Operation> future = baseBigtableInstanceAdminClient.updateClusterCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * Cluster request =
+ * Cluster.newBuilder()
+ * .setName(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
+ * .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setServeNodes(-1288838783)
+ * .build();
+ * ApiFuture future =
+ * baseBigtableInstanceAdminClient.updateClusterCallable().futureCall(request);
+ * // Do something.
* Operation response = future.get();
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
* ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
* baseBigtableInstanceAdminClient.deleteCluster(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the cluster to be deleted. Values are of the form
* `projects/{project}/instances/{instance}/clusters/{cluster}`.
@@ -1145,18 +1230,19 @@ public final void deleteCluster(ClusterName name) {
deleteCluster(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a cluster from an instance.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * baseBigtableInstanceAdminClient.deleteCluster(name.toString());
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * String name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
+ * baseBigtableInstanceAdminClient.deleteCluster(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the cluster to be deleted. Values are of the form
* `projects/{project}/instances/{instance}/clusters/{cluster}`.
@@ -1167,21 +1253,22 @@ public final void deleteCluster(String name) {
deleteCluster(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a cluster from an instance.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * DeleteClusterRequest request = DeleteClusterRequest.newBuilder()
- * .setName(name.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * DeleteClusterRequest request =
+ * DeleteClusterRequest.newBuilder()
+ * .setName(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
+ * .build();
* baseBigtableInstanceAdminClient.deleteCluster(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -1190,42 +1277,46 @@ public final void deleteCluster(DeleteClusterRequest request) {
deleteClusterCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a cluster from an instance.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * DeleteClusterRequest request = DeleteClusterRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Void> future = baseBigtableInstanceAdminClient.deleteClusterCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * DeleteClusterRequest request =
+ * DeleteClusterRequest.newBuilder()
+ * .setName(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableInstanceAdminClient.deleteClusterCallable().futureCall(request);
+ * // Do something.
* future.get();
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
* InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String appProfileId = "";
+ * String appProfileId = "appProfileId704923523";
* AppProfile appProfile = AppProfile.newBuilder().build();
- * AppProfile response = baseBigtableInstanceAdminClient.createAppProfile(parent, appProfileId, appProfile);
+ * AppProfile response =
+ * baseBigtableInstanceAdminClient.createAppProfile(parent, appProfileId, appProfile);
* }
- *
+ * }
*
* @param parent Required. The unique name of the instance in which to create the new app profile.
* Values are of the form `projects/{project}/instances/{instance}`.
@@ -1247,20 +1338,22 @@ public final AppProfile createAppProfile(
return createAppProfile(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates an app profile within an instance.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String appProfileId = "";
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
+ * String appProfileId = "appProfileId704923523";
* AppProfile appProfile = AppProfile.newBuilder().build();
- * AppProfile response = baseBigtableInstanceAdminClient.createAppProfile(parent.toString(), appProfileId, appProfile);
+ * AppProfile response =
+ * baseBigtableInstanceAdminClient.createAppProfile(parent, appProfileId, appProfile);
* }
- *
+ * }
*
* @param parent Required. The unique name of the instance in which to create the new app profile.
* Values are of the form `projects/{project}/instances/{instance}`.
@@ -1282,25 +1375,25 @@ public final AppProfile createAppProfile(
return createAppProfile(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates an app profile within an instance.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String appProfileId = "";
- * AppProfile appProfile = AppProfile.newBuilder().build();
- * CreateAppProfileRequest request = CreateAppProfileRequest.newBuilder()
- * .setParent(parent.toString())
- * .setAppProfileId(appProfileId)
- * .setAppProfile(appProfile)
- * .build();
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * CreateAppProfileRequest request =
+ * CreateAppProfileRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .setAppProfileId("appProfileId704923523")
+ * .setAppProfile(AppProfile.newBuilder().build())
+ * .setIgnoreWarnings(true)
+ * .build();
* AppProfile response = baseBigtableInstanceAdminClient.createAppProfile(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -1309,44 +1402,46 @@ public final AppProfile createAppProfile(CreateAppProfileRequest request) {
return createAppProfileCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates an app profile within an instance.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String appProfileId = "";
- * AppProfile appProfile = AppProfile.newBuilder().build();
- * CreateAppProfileRequest request = CreateAppProfileRequest.newBuilder()
- * .setParent(parent.toString())
- * .setAppProfileId(appProfileId)
- * .setAppProfile(appProfile)
- * .build();
- * ApiFuture<AppProfile> future = baseBigtableInstanceAdminClient.createAppProfileCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * CreateAppProfileRequest request =
+ * CreateAppProfileRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .setAppProfileId("appProfileId704923523")
+ * .setAppProfile(AppProfile.newBuilder().build())
+ * .setIgnoreWarnings(true)
+ * .build();
+ * ApiFuture future =
+ * baseBigtableInstanceAdminClient.createAppProfileCallable().futureCall(request);
+ * // Do something.
* AppProfile response = future.get();
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
* AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
* AppProfile response = baseBigtableInstanceAdminClient.getAppProfile(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the requested app profile. Values are of the form
* `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
@@ -1358,18 +1453,19 @@ public final AppProfile getAppProfile(AppProfileName name) {
return getAppProfile(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets information about an app profile.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * AppProfile response = baseBigtableInstanceAdminClient.getAppProfile(name.toString());
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * String name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString();
+ * AppProfile response = baseBigtableInstanceAdminClient.getAppProfile(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the requested app profile. Values are of the form
* `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
@@ -1380,21 +1476,22 @@ public final AppProfile getAppProfile(String name) {
return getAppProfile(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets information about an app profile.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * GetAppProfileRequest request = GetAppProfileRequest.newBuilder()
- * .setName(name.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * GetAppProfileRequest request =
+ * GetAppProfileRequest.newBuilder()
+ * .setName(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString())
+ * .build();
* AppProfile response = baseBigtableInstanceAdminClient.getAppProfile(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -1403,42 +1500,46 @@ public final AppProfile getAppProfile(GetAppProfileRequest request) {
return getAppProfileCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets information about an app profile.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * GetAppProfileRequest request = GetAppProfileRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<AppProfile> future = baseBigtableInstanceAdminClient.getAppProfileCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * GetAppProfileRequest request =
+ * GetAppProfileRequest.newBuilder()
+ * .setName(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableInstanceAdminClient.getAppProfileCallable().futureCall(request);
+ * // Do something.
* AppProfile response = future.get();
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
* InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * for (AppProfile element : baseBigtableInstanceAdminClient.listAppProfiles(parent).iterateAll()) {
+ * for (AppProfile element :
+ * baseBigtableInstanceAdminClient.listAppProfiles(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*
* @param parent Required. The unique name of the instance for which a list of app profiles is
* requested. Values are of the form `projects/{project}/instances/{instance}`. Use
@@ -1454,20 +1555,22 @@ public final ListAppProfilesPagedResponse listAppProfiles(InstanceName parent) {
return listAppProfiles(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists information about app profiles in an instance.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * for (AppProfile element : baseBigtableInstanceAdminClient.listAppProfiles(parent.toString()).iterateAll()) {
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
+ * for (AppProfile element :
+ * baseBigtableInstanceAdminClient.listAppProfiles(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*
* @param parent Required. The unique name of the instance for which a list of app profiles is
* requested. Values are of the form `projects/{project}/instances/{instance}`. Use
@@ -1480,23 +1583,27 @@ public final ListAppProfilesPagedResponse listAppProfiles(String parent) {
return listAppProfiles(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists information about app profiles in an instance.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * ListAppProfilesRequest request = ListAppProfilesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * for (AppProfile element : baseBigtableInstanceAdminClient.listAppProfiles(request).iterateAll()) {
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * ListAppProfilesRequest request =
+ * ListAppProfilesRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (AppProfile element :
+ * baseBigtableInstanceAdminClient.listAppProfiles(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -1505,46 +1612,48 @@ public final ListAppProfilesPagedResponse listAppProfiles(ListAppProfilesRequest
return listAppProfilesPagedCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists information about app profiles in an instance.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * ListAppProfilesRequest request = ListAppProfilesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * ApiFuture<ListAppProfilesPagedResponse> future = baseBigtableInstanceAdminClient.listAppProfilesPagedCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * ListAppProfilesRequest request =
+ * ListAppProfilesRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * baseBigtableInstanceAdminClient.listAppProfilesPagedCallable().futureCall(request);
+ * // Do something.
* for (AppProfile element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * ListAppProfilesRequest request = ListAppProfilesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
* while (true) {
- * ListAppProfilesResponse response = baseBigtableInstanceAdminClient.listAppProfilesCallable().call(request);
- * for (AppProfile element : response.getAppProfilesList()) {
+ * ListAppProfilesResponse response =
+ * baseBigtableInstanceAdminClient.listAppProfilesCallable().call(request);
+ * for (AppProfile element : response.getResponsesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
@@ -1555,34 +1664,34 @@ public final ListAppProfilesPagedResponse listAppProfiles(ListAppProfilesRequest
* }
* }
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
* AppProfile appProfile = AppProfile.newBuilder().build();
* FieldMask updateMask = FieldMask.newBuilder().build();
- * AppProfile response = baseBigtableInstanceAdminClient.updateAppProfileAsync(appProfile, updateMask).get();
+ * AppProfile response =
+ * baseBigtableInstanceAdminClient.updateAppProfileAsync(appProfile, updateMask).get();
* }
- *
+ * }
*
* @param appProfile Required. The app profile which will (partially) replace the current value.
* @param updateMask Required. The subset of app profile fields which should be replaced. If
* unset, all fields will be replaced.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * AppProfile appProfile = AppProfile.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateAppProfileRequest request = UpdateAppProfileRequest.newBuilder()
- * .setAppProfile(appProfile)
- * .setUpdateMask(updateMask)
- * .build();
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * UpdateAppProfileRequest request =
+ * UpdateAppProfileRequest.newBuilder()
+ * .setAppProfile(AppProfile.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setIgnoreWarnings(true)
+ * .build();
* AppProfile response = baseBigtableInstanceAdminClient.updateAppProfileAsync(request).get();
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * AppProfile appProfile = AppProfile.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateAppProfileRequest request = UpdateAppProfileRequest.newBuilder()
- * .setAppProfile(appProfile)
- * .setUpdateMask(updateMask)
- * .build();
- * OperationFuture<AppProfile, UpdateAppProfileMetadata> future = baseBigtableInstanceAdminClient.updateAppProfileOperationCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * UpdateAppProfileRequest request =
+ * UpdateAppProfileRequest.newBuilder()
+ * .setAppProfile(AppProfile.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setIgnoreWarnings(true)
+ * .build();
+ * OperationFuture future =
+ * baseBigtableInstanceAdminClient.updateAppProfileOperationCallable().futureCall(request);
+ * // Do something.
* AppProfile response = future.get();
* }
- *
+ * }
*/
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public final OperationCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * AppProfile appProfile = AppProfile.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateAppProfileRequest request = UpdateAppProfileRequest.newBuilder()
- * .setAppProfile(appProfile)
- * .setUpdateMask(updateMask)
- * .build();
- * ApiFuture<Operation> future = baseBigtableInstanceAdminClient.updateAppProfileCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * UpdateAppProfileRequest request =
+ * UpdateAppProfileRequest.newBuilder()
+ * .setAppProfile(AppProfile.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setIgnoreWarnings(true)
+ * .build();
+ * ApiFuture future =
+ * baseBigtableInstanceAdminClient.updateAppProfileCallable().futureCall(request);
+ * // Do something.
* Operation response = future.get();
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
* AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
* baseBigtableInstanceAdminClient.deleteAppProfile(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the app profile to be deleted. Values are of the form
* `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
@@ -1694,18 +1806,19 @@ public final void deleteAppProfile(AppProfileName name) {
deleteAppProfile(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes an app profile from an instance.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * baseBigtableInstanceAdminClient.deleteAppProfile(name.toString());
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * String name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString();
+ * baseBigtableInstanceAdminClient.deleteAppProfile(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the app profile to be deleted. Values are of the form
* `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
@@ -1716,23 +1829,23 @@ public final void deleteAppProfile(String name) {
deleteAppProfile(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes an app profile from an instance.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * boolean ignoreWarnings = false;
- * DeleteAppProfileRequest request = DeleteAppProfileRequest.newBuilder()
- * .setName(name.toString())
- * .setIgnoreWarnings(ignoreWarnings)
- * .build();
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * DeleteAppProfileRequest request =
+ * DeleteAppProfileRequest.newBuilder()
+ * .setName(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString())
+ * .setIgnoreWarnings(true)
+ * .build();
* baseBigtableInstanceAdminClient.deleteAppProfile(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -1741,43 +1854,45 @@ public final void deleteAppProfile(DeleteAppProfileRequest request) {
deleteAppProfileCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes an app profile from an instance.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * boolean ignoreWarnings = false;
- * DeleteAppProfileRequest request = DeleteAppProfileRequest.newBuilder()
- * .setName(name.toString())
- * .setIgnoreWarnings(ignoreWarnings)
- * .build();
- * ApiFuture<Void> future = baseBigtableInstanceAdminClient.deleteAppProfileCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * DeleteAppProfileRequest request =
+ * DeleteAppProfileRequest.newBuilder()
+ * .setName(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString())
+ * .setIgnoreWarnings(true)
+ * .build();
+ * ApiFuture future =
+ * baseBigtableInstanceAdminClient.deleteAppProfileCallable().futureCall(request);
+ * // Do something.
* future.get();
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * ResourceName resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
* Policy response = baseBigtableInstanceAdminClient.getIamPolicy(resource);
* }
- *
+ * }
*
* @param resource REQUIRED: The resource for which the policy is being requested. See the
* operation documentation for the appropriate value for this field.
@@ -1791,19 +1906,20 @@ public final Policy getIamPolicy(ResourceName resource) {
return getIamPolicy(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the access control policy for an instance resource. Returns an empty policy if an instance
* exists but does not have a policy set.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * Policy response = baseBigtableInstanceAdminClient.getIamPolicy(resource.toString());
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * String resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
+ * Policy response = baseBigtableInstanceAdminClient.getIamPolicy(resource);
* }
- *
+ * }
*
* @param resource REQUIRED: The resource for which the policy is being requested. See the
* operation documentation for the appropriate value for this field.
@@ -1814,22 +1930,24 @@ public final Policy getIamPolicy(String resource) {
return getIamPolicy(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the access control policy for an instance resource. Returns an empty policy if an instance
* exists but does not have a policy set.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
- * .setResource(resource.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
* Policy response = baseBigtableInstanceAdminClient.getIamPolicy(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -1838,42 +1956,46 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) {
return getIamPolicyCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the access control policy for an instance resource. Returns an empty policy if an instance
* exists but does not have a policy set.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
- * .setResource(resource.toString())
- * .build();
- * ApiFuture<Policy> future = baseBigtableInstanceAdminClient.getIamPolicyCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableInstanceAdminClient.getIamPolicyCallable().futureCall(request);
+ * // Do something.
* Policy response = future.get();
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * ResourceName resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
* Policy policy = Policy.newBuilder().build();
* Policy response = baseBigtableInstanceAdminClient.setIamPolicy(resource, policy);
* }
- *
+ * }
*
* @param resource REQUIRED: The resource for which the policy is being specified. See the
* operation documentation for the appropriate value for this field.
@@ -1891,19 +2013,20 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) {
return setIamPolicy(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Sets the access control policy on an instance resource. Replaces any existing policy.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * String resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
* Policy policy = Policy.newBuilder().build();
- * Policy response = baseBigtableInstanceAdminClient.setIamPolicy(resource.toString(), policy);
+ * Policy response = baseBigtableInstanceAdminClient.setIamPolicy(resource, policy);
* }
- *
+ * }
*
* @param resource REQUIRED: The resource for which the policy is being specified. See the
* operation documentation for the appropriate value for this field.
@@ -1918,23 +2041,23 @@ public final Policy setIamPolicy(String resource, Policy policy) {
return setIamPolicy(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Sets the access control policy on an instance resource. Replaces any existing policy.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * Policy policy = Policy.newBuilder().build();
- * SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder()
- * .setResource(resource.toString())
- * .setPolicy(policy)
- * .build();
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .build();
* Policy response = baseBigtableInstanceAdminClient.setIamPolicy(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -1943,43 +2066,46 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
return setIamPolicyCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Sets the access control policy on an instance resource. Replaces any existing policy.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * Policy policy = Policy.newBuilder().build();
- * SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder()
- * .setResource(resource.toString())
- * .setPolicy(policy)
- * .build();
- * ApiFuture<Policy> future = baseBigtableInstanceAdminClient.setIamPolicyCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableInstanceAdminClient.setIamPolicyCallable().futureCall(request);
+ * // Do something.
* Policy response = future.get();
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * List<String> permissions = new ArrayList<>();
- * TestIamPermissionsResponse response = baseBigtableInstanceAdminClient.testIamPermissions(resource, permissions);
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * ResourceName resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
+ * List permissions = new ArrayList<>();
+ * TestIamPermissionsResponse response =
+ * baseBigtableInstanceAdminClient.testIamPermissions(resource, permissions);
* }
- *
+ * }
*
* @param resource REQUIRED: The resource for which the policy detail is being requested. See the
* operation documentation for the appropriate value for this field.
@@ -1998,19 +2124,21 @@ public final TestIamPermissionsResponse testIamPermissions(
return testIamPermissions(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns permissions that the caller has on the specified instance resource.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * List<String> permissions = new ArrayList<>();
- * TestIamPermissionsResponse response = baseBigtableInstanceAdminClient.testIamPermissions(resource.toString(), permissions);
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * String resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
+ * List permissions = new ArrayList<>();
+ * TestIamPermissionsResponse response =
+ * baseBigtableInstanceAdminClient.testIamPermissions(resource, permissions);
* }
- *
+ * }
*
* @param resource REQUIRED: The resource for which the policy detail is being requested. See the
* operation documentation for the appropriate value for this field.
@@ -2029,23 +2157,24 @@ public final TestIamPermissionsResponse testIamPermissions(
return testIamPermissions(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns permissions that the caller has on the specified instance resource.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * List<String> permissions = new ArrayList<>();
- * TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
- * .setResource(resource.toString())
- * .addAllPermissions(permissions)
- * .build();
- * TestIamPermissionsResponse response = baseBigtableInstanceAdminClient.testIamPermissions(request);
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * TestIamPermissionsResponse response =
+ * baseBigtableInstanceAdminClient.testIamPermissions(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -2054,25 +2183,26 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
return testIamPermissionsCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns permissions that the caller has on the specified instance resource.
*
* Sample code: * - *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * List<String> permissions = new ArrayList<>();
- * TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
- * .setResource(resource.toString())
- * .addAllPermissions(permissions)
- * .build();
- * ApiFuture<TestIamPermissionsResponse> future = baseBigtableInstanceAdminClient.testIamPermissionsCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
+ * BaseBigtableInstanceAdminClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableInstanceAdminClient.testIamPermissionsCallable().futureCall(request);
+ * // Do something.
* TestIamPermissionsResponse response = future.get();
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
* InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String tableId = "";
+ * String tableId = "tableId-1552905847";
* Table table = Table.newBuilder().build();
* Table response = baseBigtableTableAdminClient.createTable(parent, tableId, table);
* }
- *
+ * }
*
* @param parent Required. The unique name of the instance in which to create the table. Values
* are of the form `projects/{project}/instances/{instance}`.
@@ -186,21 +186,22 @@ public final Table createTable(InstanceName parent, String tableId, Table table)
return createTable(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new table in the specified instance. The table can be created with a full set of
* initial column families, specified in the request.
*
* Sample code: * - *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String tableId = "";
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
+ * String tableId = "tableId-1552905847";
* Table table = Table.newBuilder().build();
- * Table response = baseBigtableTableAdminClient.createTable(parent.toString(), tableId, table);
+ * Table response = baseBigtableTableAdminClient.createTable(parent, tableId, table);
* }
- *
+ * }
*
* @param parent Required. The unique name of the instance in which to create the table. Values
* are of the form `projects/{project}/instances/{instance}`.
@@ -220,26 +221,26 @@ public final Table createTable(String parent, String tableId, Table table) {
return createTable(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new table in the specified instance. The table can be created with a full set of
* initial column families, specified in the request.
*
* Sample code: * - *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String tableId = "";
- * Table table = Table.newBuilder().build();
- * CreateTableRequest request = CreateTableRequest.newBuilder()
- * .setParent(parent.toString())
- * .setTableId(tableId)
- * .setTable(table)
- * .build();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * CreateTableRequest request =
+ * CreateTableRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .setTableId("tableId-1552905847")
+ * .setTable(Table.newBuilder().build())
+ * .addAllInitialSplits(new ArrayList())
+ * .build();
* Table response = baseBigtableTableAdminClient.createTable(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -248,34 +249,35 @@ public final Table createTable(CreateTableRequest request) {
return createTableCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new table in the specified instance. The table can be created with a full set of
* initial column families, specified in the request.
*
* Sample code: * - *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String tableId = "";
- * Table table = Table.newBuilder().build();
- * CreateTableRequest request = CreateTableRequest.newBuilder()
- * .setParent(parent.toString())
- * .setTableId(tableId)
- * .setTable(table)
- * .build();
- * ApiFuture<Table> future = baseBigtableTableAdminClient.createTableCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * CreateTableRequest request =
+ * CreateTableRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .setTableId("tableId-1552905847")
+ * .setTable(Table.newBuilder().build())
+ * .addAllInitialSplits(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.createTableCallable().futureCall(request);
+ * // Do something.
* Table response = future.get();
* }
- *
+ * }
*/
public final UnaryCallable createTableCallable() {
return stub.createTableCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new table from the specified snapshot. The target table must not exist. The snapshot
* and the table must be in the same instance.
@@ -287,14 +289,19 @@ public final UnaryCallable createTableCallable() {
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
* InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String tableId = "";
- * SnapshotName sourceSnapshot = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
- * Table response = baseBigtableTableAdminClient.createTableFromSnapshotAsync(parent, tableId, sourceSnapshot).get();
+ * String tableId = "tableId-1552905847";
+ * SnapshotName sourceSnapshot =
+ * SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
+ * Table response =
+ * baseBigtableTableAdminClient
+ * .createTableFromSnapshotAsync(parent, tableId, sourceSnapshot)
+ * .get();
* }
- *
+ * }
*
* @param parent Required. The unique name of the instance in which to create the table. Values
* are of the form `projects/{project}/instances/{instance}`.
@@ -305,8 +312,6 @@ public final UnaryCallable createTableCallable() {
* `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture createTableFromSnapshotAsync(
InstanceName parent, String tableId, SnapshotName sourceSnapshot) {
CreateTableFromSnapshotRequest request =
@@ -318,7 +323,7 @@ public final OperationFuture createTable
return createTableFromSnapshotAsync(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new table from the specified snapshot. The target table must not exist. The snapshot
* and the table must be in the same instance.
@@ -330,14 +335,111 @@ public final OperationFuture createTable
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
* InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String tableId = "";
- * SnapshotName sourceSnapshot = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
- * Table response = baseBigtableTableAdminClient.createTableFromSnapshotAsync(parent.toString(), tableId, sourceSnapshot.toString()).get();
+ * String tableId = "tableId-1552905847";
+ * String sourceSnapshot =
+ * SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString();
+ * Table response =
+ * baseBigtableTableAdminClient
+ * .createTableFromSnapshotAsync(parent, tableId, sourceSnapshot)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The unique name of the instance in which to create the table. Values
+ * are of the form `projects/{project}/instances/{instance}`.
+ * @param tableId Required. The name by which the new table should be referred to within the
+ * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
+ * @param sourceSnapshot Required. The unique name of the snapshot from which to restore the
+ * table. The snapshot and the table must be in the same instance. Values are of the form
+ * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createTableFromSnapshotAsync(
+ InstanceName parent, String tableId, String sourceSnapshot) {
+ CreateTableFromSnapshotRequest request =
+ CreateTableFromSnapshotRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setTableId(tableId)
+ .setSourceSnapshot(sourceSnapshot)
+ .build();
+ return createTableFromSnapshotAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new table from the specified snapshot. The target table must not exist. The snapshot
+ * and the table must be in the same instance.
+ *
+ * Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not
+ * currently available to most Cloud Bigtable customers. This feature might be changed in
+ * backward-incompatible ways and is not recommended for production use. It is not subject to any
+ * SLA or deprecation policy.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
+ * String tableId = "tableId-1552905847";
+ * SnapshotName sourceSnapshot =
+ * SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
+ * Table response =
+ * baseBigtableTableAdminClient
+ * .createTableFromSnapshotAsync(parent, tableId, sourceSnapshot)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The unique name of the instance in which to create the table. Values
+ * are of the form `projects/{project}/instances/{instance}`.
+ * @param tableId Required. The name by which the new table should be referred to within the
+ * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
+ * @param sourceSnapshot Required. The unique name of the snapshot from which to restore the
+ * table. The snapshot and the table must be in the same instance. Values are of the form
+ * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createTableFromSnapshotAsync(
+ String parent, String tableId, SnapshotName sourceSnapshot) {
+ CreateTableFromSnapshotRequest request =
+ CreateTableFromSnapshotRequest.newBuilder()
+ .setParent(parent)
+ .setTableId(tableId)
+ .setSourceSnapshot(sourceSnapshot == null ? null : sourceSnapshot.toString())
+ .build();
+ return createTableFromSnapshotAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new table from the specified snapshot. The target table must not exist. The snapshot
+ * and the table must be in the same instance.
+ *
+ * Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not
+ * currently available to most Cloud Bigtable customers. This feature might be changed in
+ * backward-incompatible ways and is not recommended for production use. It is not subject to any
+ * SLA or deprecation policy.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
+ * String tableId = "tableId-1552905847";
+ * String sourceSnapshot =
+ * SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString();
+ * Table response =
+ * baseBigtableTableAdminClient
+ * .createTableFromSnapshotAsync(parent, tableId, sourceSnapshot)
+ * .get();
* }
- *
+ * }
*
* @param parent Required. The unique name of the instance in which to create the table. Values
* are of the form `projects/{project}/instances/{instance}`.
@@ -348,8 +450,6 @@ public final OperationFuture createTable
* `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture createTableFromSnapshotAsync(
String parent, String tableId, String sourceSnapshot) {
CreateTableFromSnapshotRequest request =
@@ -361,7 +461,7 @@ public final OperationFuture createTable
return createTableFromSnapshotAsync(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new table from the specified snapshot. The target table must not exist. The snapshot
* and the table must be in the same instance.
@@ -373,31 +473,29 @@ public final OperationFuture createTable
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String tableId = "";
- * SnapshotName sourceSnapshot = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
- * CreateTableFromSnapshotRequest request = CreateTableFromSnapshotRequest.newBuilder()
- * .setParent(parent.toString())
- * .setTableId(tableId)
- * .setSourceSnapshot(sourceSnapshot.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * CreateTableFromSnapshotRequest request =
+ * CreateTableFromSnapshotRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .setTableId("tableId-1552905847")
+ * .setSourceSnapshot(
+ * SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString())
+ * .build();
* Table response = baseBigtableTableAdminClient.createTableFromSnapshotAsync(request).get();
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture createTableFromSnapshotAsync(
CreateTableFromSnapshotRequest request) {
return createTableFromSnapshotOperationCallable().futureCall(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new table from the specified snapshot. The target table must not exist. The snapshot
* and the table must be in the same instance.
@@ -409,30 +507,32 @@ public final OperationFuture createTable
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String tableId = "";
- * SnapshotName sourceSnapshot = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
- * CreateTableFromSnapshotRequest request = CreateTableFromSnapshotRequest.newBuilder()
- * .setParent(parent.toString())
- * .setTableId(tableId)
- * .setSourceSnapshot(sourceSnapshot.toString())
- * .build();
- * OperationFuture<Table, CreateTableFromSnapshotMetadata> future = baseBigtableTableAdminClient.createTableFromSnapshotOperationCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * CreateTableFromSnapshotRequest request =
+ * CreateTableFromSnapshotRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .setTableId("tableId-1552905847")
+ * .setSourceSnapshot(
+ * SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString())
+ * .build();
+ * OperationFuture
future =
+ * baseBigtableTableAdminClient
+ * .createTableFromSnapshotOperationCallable()
+ * .futureCall(request);
+ * // Do something.
* Table response = future.get();
* }
- *
+ * }
*/
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public final OperationCallable<
CreateTableFromSnapshotRequest, Table, CreateTableFromSnapshotMetadata>
createTableFromSnapshotOperationCallable() {
return stub.createTableFromSnapshotOperationCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new table from the specified snapshot. The target table must not exist. The snapshot
* and the table must be in the same instance.
@@ -444,41 +544,43 @@ public final OperationFuture createTable
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String tableId = "";
- * SnapshotName sourceSnapshot = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
- * CreateTableFromSnapshotRequest request = CreateTableFromSnapshotRequest.newBuilder()
- * .setParent(parent.toString())
- * .setTableId(tableId)
- * .setSourceSnapshot(sourceSnapshot.toString())
- * .build();
- * ApiFuture<Operation> future = baseBigtableTableAdminClient.createTableFromSnapshotCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * CreateTableFromSnapshotRequest request =
+ * CreateTableFromSnapshotRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .setTableId("tableId-1552905847")
+ * .setSourceSnapshot(
+ * SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.createTableFromSnapshotCallable().futureCall(request);
+ * // Do something.
* Operation response = future.get();
* }
- *
+ * }
*/
public final UnaryCallable
createTableFromSnapshotCallable() {
return stub.createTableFromSnapshotCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all tables served from a specified instance.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
* InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
* for (Table element : baseBigtableTableAdminClient.listTables(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*
* @param parent Required. The unique name of the instance for which tables should be listed.
* Values are of the form `projects/{project}/instances/{instance}`.
@@ -490,20 +592,21 @@ public final ListTablesPagedResponse listTables(InstanceName parent) {
return listTables(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all tables served from a specified instance.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * for (Table element : baseBigtableTableAdminClient.listTables(parent.toString()).iterateAll()) {
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
+ * for (Table element : baseBigtableTableAdminClient.listTables(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*
* @param parent Required. The unique name of the instance for which tables should be listed.
* Values are of the form `projects/{project}/instances/{instance}`.
@@ -514,23 +617,26 @@ public final ListTablesPagedResponse listTables(String parent) {
return listTables(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all tables served from a specified instance.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * ListTablesRequest request = ListTablesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * ListTablesRequest request =
+ * ListTablesRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
* for (Table element : baseBigtableTableAdminClient.listTables(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -539,45 +645,47 @@ public final ListTablesPagedResponse listTables(ListTablesRequest request) {
return listTablesPagedCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all tables served from a specified instance.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * ListTablesRequest request = ListTablesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * ApiFuture<ListTablesPagedResponse> future = baseBigtableTableAdminClient.listTablesPagedCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * ListTablesRequest request =
+ * ListTablesRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
future =
+ * baseBigtableTableAdminClient.listTablesPagedCallable().futureCall(request);
+ * // Do something.
* for (Table element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*/
public final UnaryCallable listTablesPagedCallable() {
return stub.listTablesPagedCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all tables served from a specified instance.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * ListTablesRequest request = ListTablesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
* while (true) {
- * ListTablesResponse response = baseBigtableTableAdminClient.listTablesCallable().call(request);
- * for (Table element : response.getTablesList()) {
+ * ListTablesResponse response =
+ * baseBigtableTableAdminClient.listTablesCallable().call(request);
+ * for (Table element : response.getResponsesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
@@ -588,24 +696,25 @@ public final UnaryCallable listTable
* }
* }
* }
- *
+ * }
*/
public final UnaryCallable listTablesCallable() {
return stub.listTablesCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets metadata information about the specified table.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
* TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
* Table response = baseBigtableTableAdminClient.getTable(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the requested table. Values are of the form
* `projects/{project}/instances/{instance}/tables/{table}`.
@@ -617,18 +726,19 @@ public final Table getTable(TableName name) {
return getTable(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets metadata information about the specified table.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * Table response = baseBigtableTableAdminClient.getTable(name.toString());
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
+ * Table response = baseBigtableTableAdminClient.getTable(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the requested table. Values are of the form
* `projects/{project}/instances/{instance}/tables/{table}`.
@@ -639,21 +749,22 @@ public final Table getTable(String name) {
return getTable(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets metadata information about the specified table.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * GetTableRequest request = GetTableRequest.newBuilder()
- * .setName(name.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * GetTableRequest request =
+ * GetTableRequest.newBuilder()
+ * .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .build();
* Table response = baseBigtableTableAdminClient.getTable(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -662,40 +773,42 @@ public final Table getTable(GetTableRequest request) {
return getTableCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets metadata information about the specified table.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * GetTableRequest request = GetTableRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Table> future = baseBigtableTableAdminClient.getTableCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * GetTableRequest request =
+ * GetTableRequest.newBuilder()
+ * .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .build();
+ * ApiFuture
future = baseBigtableTableAdminClient.getTableCallable().futureCall(request);
+ * // Do something.
* Table response = future.get();
* }
- *
+ * }
*/
public final UnaryCallable getTableCallable() {
return stub.getTableCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Permanently deletes a specified table and all of its data.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
* TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
* baseBigtableTableAdminClient.deleteTable(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the table to be deleted. Values are of the form
* `projects/{project}/instances/{instance}/tables/{table}`.
@@ -707,18 +820,19 @@ public final void deleteTable(TableName name) {
deleteTable(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Permanently deletes a specified table and all of its data.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * baseBigtableTableAdminClient.deleteTable(name.toString());
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
+ * baseBigtableTableAdminClient.deleteTable(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the table to be deleted. Values are of the form
* `projects/{project}/instances/{instance}/tables/{table}`.
@@ -729,21 +843,22 @@ public final void deleteTable(String name) {
deleteTable(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Permanently deletes a specified table and all of its data.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * DeleteTableRequest request = DeleteTableRequest.newBuilder()
- * .setName(name.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * DeleteTableRequest request =
+ * DeleteTableRequest.newBuilder()
+ * .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .build();
* baseBigtableTableAdminClient.deleteTable(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -752,29 +867,31 @@ public final void deleteTable(DeleteTableRequest request) {
deleteTableCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Permanently deletes a specified table and all of its data.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * DeleteTableRequest request = DeleteTableRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Void> future = baseBigtableTableAdminClient.deleteTableCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * DeleteTableRequest request =
+ * DeleteTableRequest.newBuilder()
+ * .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.deleteTableCallable().futureCall(request);
+ * // Do something.
* future.get();
* }
- *
+ * }
*/
public final UnaryCallable deleteTableCallable() {
return stub.deleteTableCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Performs a series of column family modifications on the specified table. Either all or none of
* the modifications will occur before this method returns, but data requests received prior to
@@ -782,13 +899,14 @@ public final UnaryCallable deleteTableCallable() {
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
* TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * List<ModifyColumnFamiliesRequest.Modification> modifications = new ArrayList<>();
+ * List modifications = new ArrayList<>();
* Table response = baseBigtableTableAdminClient.modifyColumnFamilies(name, modifications);
* }
- *
+ * }
*
* @param name Required. The unique name of the table whose families should be modified. Values
* are of the form `projects/{project}/instances/{instance}/tables/{table}`.
@@ -807,7 +925,7 @@ public final Table modifyColumnFamilies(
return modifyColumnFamilies(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Performs a series of column family modifications on the specified table. Either all or none of
* the modifications will occur before this method returns, but data requests received prior to
@@ -815,13 +933,14 @@ public final Table modifyColumnFamilies(
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * List<ModifyColumnFamiliesRequest.Modification> modifications = new ArrayList<>();
- * Table response = baseBigtableTableAdminClient.modifyColumnFamilies(name.toString(), modifications);
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
+ * List modifications = new ArrayList<>();
+ * Table response = baseBigtableTableAdminClient.modifyColumnFamilies(name, modifications);
* }
- *
+ * }
*
* @param name Required. The unique name of the table whose families should be modified. Values
* are of the form `projects/{project}/instances/{instance}/tables/{table}`.
@@ -840,7 +959,7 @@ public final Table modifyColumnFamilies(
return modifyColumnFamilies(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Performs a series of column family modifications on the specified table. Either all or none of
* the modifications will occur before this method returns, but data requests received prior to
@@ -848,17 +967,17 @@ public final Table modifyColumnFamilies(
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * List<ModifyColumnFamiliesRequest.Modification> modifications = new ArrayList<>();
- * ModifyColumnFamiliesRequest request = ModifyColumnFamiliesRequest.newBuilder()
- * .setName(name.toString())
- * .addAllModifications(modifications)
- * .build();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * ModifyColumnFamiliesRequest request =
+ * ModifyColumnFamiliesRequest.newBuilder()
+ * .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .addAllModifications(new ArrayList())
+ * .build();
* Table response = baseBigtableTableAdminClient.modifyColumnFamilies(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -867,7 +986,7 @@ public final Table modifyColumnFamilies(ModifyColumnFamiliesRequest request) {
return modifyColumnFamiliesCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Performs a series of column family modifications on the specified table. Either all or none of
* the modifications will occur before this method returns, but data requests received prior to
@@ -875,40 +994,42 @@ public final Table modifyColumnFamilies(ModifyColumnFamiliesRequest request) {
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * List<ModifyColumnFamiliesRequest.Modification> modifications = new ArrayList<>();
- * ModifyColumnFamiliesRequest request = ModifyColumnFamiliesRequest.newBuilder()
- * .setName(name.toString())
- * .addAllModifications(modifications)
- * .build();
- * ApiFuture<Table> future = baseBigtableTableAdminClient.modifyColumnFamiliesCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * ModifyColumnFamiliesRequest request =
+ * ModifyColumnFamiliesRequest.newBuilder()
+ * .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .addAllModifications(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.modifyColumnFamiliesCallable().futureCall(request);
+ * // Do something.
* Table response = future.get();
* }
- *
+ * }
*/
public final UnaryCallable modifyColumnFamiliesCallable() {
return stub.modifyColumnFamiliesCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Permanently drop/delete a row range from a specified table. The request can specify whether to
* delete all rows in a table, or only those that match a particular prefix.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * DropRowRangeRequest request = DropRowRangeRequest.newBuilder()
- * .setName(name.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * DropRowRangeRequest request =
+ * DropRowRangeRequest.newBuilder()
+ * .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .build();
* baseBigtableTableAdminClient.dropRowRange(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -917,30 +1038,32 @@ public final void dropRowRange(DropRowRangeRequest request) {
dropRowRangeCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Permanently drop/delete a row range from a specified table. The request can specify whether to
* delete all rows in a table, or only those that match a particular prefix.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * DropRowRangeRequest request = DropRowRangeRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Void> future = baseBigtableTableAdminClient.dropRowRangeCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * DropRowRangeRequest request =
+ * DropRowRangeRequest.newBuilder()
+ * .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.dropRowRangeCallable().futureCall(request);
+ * // Do something.
* future.get();
* }
- *
+ * }
*/
public final UnaryCallable dropRowRangeCallable() {
return stub.dropRowRangeCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Generates a consistency token for a Table, which can be used in CheckConsistency to check
* whether mutations to the table that finished before this call started have been replicated. The
@@ -948,12 +1071,14 @@ public final UnaryCallable dropRowRangeCallable() {
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
* TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * GenerateConsistencyTokenResponse response = baseBigtableTableAdminClient.generateConsistencyToken(name);
+ * GenerateConsistencyTokenResponse response =
+ * baseBigtableTableAdminClient.generateConsistencyToken(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the Table for which to create a consistency token.
* Values are of the form `projects/{project}/instances/{instance}/tables/{table}`.
@@ -967,7 +1092,7 @@ public final GenerateConsistencyTokenResponse generateConsistencyToken(TableName
return generateConsistencyToken(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Generates a consistency token for a Table, which can be used in CheckConsistency to check
* whether mutations to the table that finished before this call started have been replicated. The
@@ -975,12 +1100,14 @@ public final GenerateConsistencyTokenResponse generateConsistencyToken(TableName
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * GenerateConsistencyTokenResponse response = baseBigtableTableAdminClient.generateConsistencyToken(name.toString());
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
+ * GenerateConsistencyTokenResponse response =
+ * baseBigtableTableAdminClient.generateConsistencyToken(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the Table for which to create a consistency token.
* Values are of the form `projects/{project}/instances/{instance}/tables/{table}`.
@@ -992,7 +1119,7 @@ public final GenerateConsistencyTokenResponse generateConsistencyToken(String na
return generateConsistencyToken(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Generates a consistency token for a Table, which can be used in CheckConsistency to check
* whether mutations to the table that finished before this call started have been replicated. The
@@ -1000,15 +1127,17 @@ public final GenerateConsistencyTokenResponse generateConsistencyToken(String na
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * GenerateConsistencyTokenRequest request = GenerateConsistencyTokenRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * GenerateConsistencyTokenResponse response = baseBigtableTableAdminClient.generateConsistencyToken(request);
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * GenerateConsistencyTokenRequest request =
+ * GenerateConsistencyTokenRequest.newBuilder()
+ * .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .build();
+ * GenerateConsistencyTokenResponse response =
+ * baseBigtableTableAdminClient.generateConsistencyToken(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -1018,7 +1147,7 @@ public final GenerateConsistencyTokenResponse generateConsistencyToken(
return generateConsistencyTokenCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Generates a consistency token for a Table, which can be used in CheckConsistency to check
* whether mutations to the table that finished before this call started have been replicated. The
@@ -1026,37 +1155,41 @@ public final GenerateConsistencyTokenResponse generateConsistencyToken(
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * GenerateConsistencyTokenRequest request = GenerateConsistencyTokenRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<GenerateConsistencyTokenResponse> future = baseBigtableTableAdminClient.generateConsistencyTokenCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * GenerateConsistencyTokenRequest request =
+ * GenerateConsistencyTokenRequest.newBuilder()
+ * .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.generateConsistencyTokenCallable().futureCall(request);
+ * // Do something.
* GenerateConsistencyTokenResponse response = future.get();
* }
- *
+ * }
*/
public final UnaryCallable
generateConsistencyTokenCallable() {
return stub.generateConsistencyTokenCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Checks replication consistency based on a consistency token, that is, if replication has caught
* up based on the conditions specified in the token and the check request.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
* TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * String consistencyToken = "";
- * CheckConsistencyResponse response = baseBigtableTableAdminClient.checkConsistency(name, consistencyToken);
+ * String consistencyToken = "consistencyToken-1985152319";
+ * CheckConsistencyResponse response =
+ * baseBigtableTableAdminClient.checkConsistency(name, consistencyToken);
* }
- *
+ * }
*
* @param name Required. The unique name of the Table for which to check replication consistency.
* Values are of the form `projects/{project}/instances/{instance}/tables/{table}`.
@@ -1073,20 +1206,22 @@ public final CheckConsistencyResponse checkConsistency(TableName name, String co
return checkConsistency(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Checks replication consistency based on a consistency token, that is, if replication has caught
* up based on the conditions specified in the token and the check request.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * String consistencyToken = "";
- * CheckConsistencyResponse response = baseBigtableTableAdminClient.checkConsistency(name.toString(), consistencyToken);
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
+ * String consistencyToken = "consistencyToken-1985152319";
+ * CheckConsistencyResponse response =
+ * baseBigtableTableAdminClient.checkConsistency(name, consistencyToken);
* }
- *
+ * }
*
* @param name Required. The unique name of the Table for which to check replication consistency.
* Values are of the form `projects/{project}/instances/{instance}/tables/{table}`.
@@ -1103,24 +1238,24 @@ public final CheckConsistencyResponse checkConsistency(String name, String consi
return checkConsistency(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Checks replication consistency based on a consistency token, that is, if replication has caught
* up based on the conditions specified in the token and the check request.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * String consistencyToken = "";
- * CheckConsistencyRequest request = CheckConsistencyRequest.newBuilder()
- * .setName(name.toString())
- * .setConsistencyToken(consistencyToken)
- * .build();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * CheckConsistencyRequest request =
+ * CheckConsistencyRequest.newBuilder()
+ * .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .setConsistencyToken("consistencyToken-1985152319")
+ * .build();
* CheckConsistencyResponse response = baseBigtableTableAdminClient.checkConsistency(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -1129,475 +1264,261 @@ public final CheckConsistencyResponse checkConsistency(CheckConsistencyRequest r
return checkConsistencyCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Checks replication consistency based on a consistency token, that is, if replication has caught
* up based on the conditions specified in the token and the check request.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * String consistencyToken = "";
- * CheckConsistencyRequest request = CheckConsistencyRequest.newBuilder()
- * .setName(name.toString())
- * .setConsistencyToken(consistencyToken)
- * .build();
- * ApiFuture<CheckConsistencyResponse> future = baseBigtableTableAdminClient.checkConsistencyCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * CheckConsistencyRequest request =
+ * CheckConsistencyRequest.newBuilder()
+ * .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .setConsistencyToken("consistencyToken-1985152319")
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.checkConsistencyCallable().futureCall(request);
+ * // Do something.
* CheckConsistencyResponse response = future.get();
* }
- *
+ * }
*/
public final UnaryCallable
checkConsistencyCallable() {
return stub.checkConsistencyCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Gets the access control policy for a Table or Backup resource. Returns an empty policy if the
- * resource exists but does not have a policy set.
+ * Creates a new snapshot in the specified cluster from the specified source table. The cluster
+ * and the table must be in the same instance.
+ *
+ * Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not
+ * currently available to most Cloud Bigtable customers. This feature might be changed in
+ * backward-incompatible ways and is not recommended for production use. It is not subject to any
+ * SLA or deprecation policy.
*
*
Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * Policy response = baseBigtableTableAdminClient.getIamPolicy(resource);
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
+ * ClusterName cluster = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
+ * String snapshotId = "snapshotId-1113817601";
+ * String description = "description-1724546052";
+ * Snapshot response =
+ * baseBigtableTableAdminClient
+ * .snapshotTableAsync(name, cluster, snapshotId, description)
+ * .get();
* }
- *
+ * }
*
- * @param resource REQUIRED: The resource for which the policy is being requested. See the
- * operation documentation for the appropriate value for this field.
+ * @param name Required. The unique name of the table to have the snapshot taken. Values are of
+ * the form `projects/{project}/instances/{instance}/tables/{table}`.
+ * @param cluster Required. The name of the cluster where the snapshot will be created in. Values
+ * are of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.
+ * @param snapshotId Required. The ID by which the new snapshot should be referred to within the
+ * parent cluster, e.g., `mysnapshot` of the form: `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather
+ * than `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
+ * @param description Description of the snapshot.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Policy getIamPolicy(ResourceName resource) {
- GetIamPolicyRequest request =
- GetIamPolicyRequest.newBuilder()
- .setResource(resource == null ? null : resource.toString())
+ public final OperationFuture snapshotTableAsync(
+ TableName name, ClusterName cluster, String snapshotId, String description) {
+ SnapshotTableRequest request =
+ SnapshotTableRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .setCluster(cluster == null ? null : cluster.toString())
+ .setSnapshotId(snapshotId)
+ .setDescription(description)
.build();
- return getIamPolicy(request);
+ return snapshotTableAsync(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Gets the access control policy for a Table or Backup resource. Returns an empty policy if the
- * resource exists but does not have a policy set.
+ * Creates a new snapshot in the specified cluster from the specified source table. The cluster
+ * and the table must be in the same instance.
+ *
+ * Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not
+ * currently available to most Cloud Bigtable customers. This feature might be changed in
+ * backward-incompatible ways and is not recommended for production use. It is not subject to any
+ * SLA or deprecation policy.
*
*
Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * Policy response = baseBigtableTableAdminClient.getIamPolicy(resource.toString());
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
+ * String cluster = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
+ * String snapshotId = "snapshotId-1113817601";
+ * String description = "description-1724546052";
+ * Snapshot response =
+ * baseBigtableTableAdminClient
+ * .snapshotTableAsync(name, cluster, snapshotId, description)
+ * .get();
* }
- *
+ * }
*
- * @param resource REQUIRED: The resource for which the policy is being requested. See the
- * operation documentation for the appropriate value for this field.
+ * @param name Required. The unique name of the table to have the snapshot taken. Values are of
+ * the form `projects/{project}/instances/{instance}/tables/{table}`.
+ * @param cluster Required. The name of the cluster where the snapshot will be created in. Values
+ * are of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.
+ * @param snapshotId Required. The ID by which the new snapshot should be referred to within the
+ * parent cluster, e.g., `mysnapshot` of the form: `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather
+ * than `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
+ * @param description Description of the snapshot.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Policy getIamPolicy(String resource) {
- GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build();
- return getIamPolicy(request);
+ public final OperationFuture snapshotTableAsync(
+ TableName name, String cluster, String snapshotId, String description) {
+ SnapshotTableRequest request =
+ SnapshotTableRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .setCluster(cluster)
+ .setSnapshotId(snapshotId)
+ .setDescription(description)
+ .build();
+ return snapshotTableAsync(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Gets the access control policy for a Table or Backup resource. Returns an empty policy if the
- * resource exists but does not have a policy set.
+ * Creates a new snapshot in the specified cluster from the specified source table. The cluster
+ * and the table must be in the same instance.
+ *
+ * Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not
+ * currently available to most Cloud Bigtable customers. This feature might be changed in
+ * backward-incompatible ways and is not recommended for production use. It is not subject to any
+ * SLA or deprecation policy.
*
*
Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
- * .setResource(resource.toString())
- * .build();
- * Policy response = baseBigtableTableAdminClient.getIamPolicy(request);
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
+ * ClusterName cluster = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
+ * String snapshotId = "snapshotId-1113817601";
+ * String description = "description-1724546052";
+ * Snapshot response =
+ * baseBigtableTableAdminClient
+ * .snapshotTableAsync(name, cluster, snapshotId, description)
+ * .get();
* }
- *
+ * }
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param name Required. The unique name of the table to have the snapshot taken. Values are of
+ * the form `projects/{project}/instances/{instance}/tables/{table}`.
+ * @param cluster Required. The name of the cluster where the snapshot will be created in. Values
+ * are of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.
+ * @param snapshotId Required. The ID by which the new snapshot should be referred to within the
+ * parent cluster, e.g., `mysnapshot` of the form: `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather
+ * than `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
+ * @param description Description of the snapshot.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Policy getIamPolicy(GetIamPolicyRequest request) {
- return getIamPolicyCallable().call(request);
+ public final OperationFuture snapshotTableAsync(
+ String name, ClusterName cluster, String snapshotId, String description) {
+ SnapshotTableRequest request =
+ SnapshotTableRequest.newBuilder()
+ .setName(name)
+ .setCluster(cluster == null ? null : cluster.toString())
+ .setSnapshotId(snapshotId)
+ .setDescription(description)
+ .build();
+ return snapshotTableAsync(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Gets the access control policy for a Table or Backup resource. Returns an empty policy if the
- * resource exists but does not have a policy set.
- *
- * Sample code:
+ * Creates a new snapshot in the specified cluster from the specified source table. The cluster
+ * and the table must be in the same instance.
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
- * .setResource(resource.toString())
- * .build();
- * ApiFuture<Policy> future = baseBigtableTableAdminClient.getIamPolicyCallable().futureCall(request);
- * // Do something
- * Policy response = future.get();
- * }
- *
- */
- public final UnaryCallable getIamPolicyCallable() {
- return stub.getIamPolicyCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Sets the access control policy on a Table or Backup resource. Replaces any existing policy.
+ * Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not
+ * currently available to most Cloud Bigtable customers. This feature might be changed in
+ * backward-incompatible ways and is not recommended for production use. It is not subject to any
+ * SLA or deprecation policy.
*
*
Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * Policy policy = Policy.newBuilder().build();
- * Policy response = baseBigtableTableAdminClient.setIamPolicy(resource, policy);
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
+ * String cluster = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
+ * String snapshotId = "snapshotId-1113817601";
+ * String description = "description-1724546052";
+ * Snapshot response =
+ * baseBigtableTableAdminClient
+ * .snapshotTableAsync(name, cluster, snapshotId, description)
+ * .get();
* }
- *
+ * }
*
- * @param resource REQUIRED: The resource for which the policy is being specified. See the
- * operation documentation for the appropriate value for this field.
- * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the
- * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud
- * Platform services (such as Projects) might reject them.
+ * @param name Required. The unique name of the table to have the snapshot taken. Values are of
+ * the form `projects/{project}/instances/{instance}/tables/{table}`.
+ * @param cluster Required. The name of the cluster where the snapshot will be created in. Values
+ * are of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.
+ * @param snapshotId Required. The ID by which the new snapshot should be referred to within the
+ * parent cluster, e.g., `mysnapshot` of the form: `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather
+ * than `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
+ * @param description Description of the snapshot.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Policy setIamPolicy(ResourceName resource, Policy policy) {
- SetIamPolicyRequest request =
- SetIamPolicyRequest.newBuilder()
- .setResource(resource == null ? null : resource.toString())
- .setPolicy(policy)
+ public final OperationFuture snapshotTableAsync(
+ String name, String cluster, String snapshotId, String description) {
+ SnapshotTableRequest request =
+ SnapshotTableRequest.newBuilder()
+ .setName(name)
+ .setCluster(cluster)
+ .setSnapshotId(snapshotId)
+ .setDescription(description)
.build();
- return setIamPolicy(request);
+ return snapshotTableAsync(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Sets the access control policy on a Table or Backup resource. Replaces any existing policy.
+ * Creates a new snapshot in the specified cluster from the specified source table. The cluster
+ * and the table must be in the same instance.
+ *
+ * Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not
+ * currently available to most Cloud Bigtable customers. This feature might be changed in
+ * backward-incompatible ways and is not recommended for production use. It is not subject to any
+ * SLA or deprecation policy.
*
*
Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * Policy policy = Policy.newBuilder().build();
- * Policy response = baseBigtableTableAdminClient.setIamPolicy(resource.toString(), policy);
- * }
- *
- *
- * @param resource REQUIRED: The resource for which the policy is being specified. See the
- * operation documentation for the appropriate value for this field.
- * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the
- * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud
- * Platform services (such as Projects) might reject them.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Policy setIamPolicy(String resource, Policy policy) {
- SetIamPolicyRequest request =
- SetIamPolicyRequest.newBuilder().setResource(resource).setPolicy(policy).build();
- return setIamPolicy(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Sets the access control policy on a Table or Backup resource. Replaces any existing policy.
- *
- * Sample code:
- *
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * Policy policy = Policy.newBuilder().build();
- * SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder()
- * .setResource(resource.toString())
- * .setPolicy(policy)
- * .build();
- * Policy response = baseBigtableTableAdminClient.setIamPolicy(request);
- * }
- *
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Policy setIamPolicy(SetIamPolicyRequest request) {
- return setIamPolicyCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Sets the access control policy on a Table or Backup resource. Replaces any existing policy.
- *
- * Sample code:
- *
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * Policy policy = Policy.newBuilder().build();
- * SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder()
- * .setResource(resource.toString())
- * .setPolicy(policy)
- * .build();
- * ApiFuture<Policy> future = baseBigtableTableAdminClient.setIamPolicyCallable().futureCall(request);
- * // Do something
- * Policy response = future.get();
- * }
- *
- */
- public final UnaryCallable setIamPolicyCallable() {
- return stub.setIamPolicyCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Returns permissions that the caller has on the specified Table or Backup resource.
- *
- * Sample code:
- *
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * List<String> permissions = new ArrayList<>();
- * TestIamPermissionsResponse response = baseBigtableTableAdminClient.testIamPermissions(resource, permissions);
- * }
- *
- *
- * @param resource REQUIRED: The resource for which the policy detail is being requested. See the
- * operation documentation for the appropriate value for this field.
- * @param permissions The set of permissions to check for the `resource`. Permissions with
- * wildcards (such as '*' or 'storage.*') are not allowed. For more information see
- * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final TestIamPermissionsResponse testIamPermissions(
- ResourceName resource, List permissions) {
- TestIamPermissionsRequest request =
- TestIamPermissionsRequest.newBuilder()
- .setResource(resource == null ? null : resource.toString())
- .addAllPermissions(permissions)
- .build();
- return testIamPermissions(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Returns permissions that the caller has on the specified Table or Backup resource.
- *
- * Sample code:
- *
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * List<String> permissions = new ArrayList<>();
- * TestIamPermissionsResponse response = baseBigtableTableAdminClient.testIamPermissions(resource.toString(), permissions);
- * }
- *
- *
- * @param resource REQUIRED: The resource for which the policy detail is being requested. See the
- * operation documentation for the appropriate value for this field.
- * @param permissions The set of permissions to check for the `resource`. Permissions with
- * wildcards (such as '*' or 'storage.*') are not allowed. For more information see
- * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final TestIamPermissionsResponse testIamPermissions(
- String resource, List permissions) {
- TestIamPermissionsRequest request =
- TestIamPermissionsRequest.newBuilder()
- .setResource(resource)
- .addAllPermissions(permissions)
- .build();
- return testIamPermissions(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Returns permissions that the caller has on the specified Table or Backup resource.
- *
- * Sample code:
- *
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * List<String> permissions = new ArrayList<>();
- * TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
- * .setResource(resource.toString())
- * .addAllPermissions(permissions)
- * .build();
- * TestIamPermissionsResponse response = baseBigtableTableAdminClient.testIamPermissions(request);
- * }
- *
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) {
- return testIamPermissionsCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Returns permissions that the caller has on the specified Table or Backup resource.
- *
- * Sample code:
- *
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
- * List<String> permissions = new ArrayList<>();
- * TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
- * .setResource(resource.toString())
- * .addAllPermissions(permissions)
- * .build();
- * ApiFuture<TestIamPermissionsResponse> future = baseBigtableTableAdminClient.testIamPermissionsCallable().futureCall(request);
- * // Do something
- * TestIamPermissionsResponse response = future.get();
- * }
- *
- */
- public final UnaryCallable
- testIamPermissionsCallable() {
- return stub.testIamPermissionsCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Creates a new snapshot in the specified cluster from the specified source table. The cluster
- * and the table must be in the same instance.
- *
- * Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not
- * currently available to most Cloud Bigtable customers. This feature might be changed in
- * backward-incompatible ways and is not recommended for production use. It is not subject to any
- * SLA or deprecation policy.
- *
- *
Sample code:
- *
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * ClusterName cluster = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * String snapshotId = "";
- * String description = "";
- * Snapshot response = baseBigtableTableAdminClient.snapshotTableAsync(name, cluster, snapshotId, description).get();
- * }
- *
- *
- * @param name Required. The unique name of the table to have the snapshot taken. Values are of
- * the form `projects/{project}/instances/{instance}/tables/{table}`.
- * @param cluster Required. The name of the cluster where the snapshot will be created in. Values
- * are of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.
- * @param snapshotId Required. The ID by which the new snapshot should be referred to within the
- * parent cluster, e.g., `mysnapshot` of the form: `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather
- * than `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
- * @param description Description of the snapshot.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture snapshotTableAsync(
- TableName name, ClusterName cluster, String snapshotId, String description) {
- SnapshotTableRequest request =
- SnapshotTableRequest.newBuilder()
- .setName(name == null ? null : name.toString())
- .setCluster(cluster == null ? null : cluster.toString())
- .setSnapshotId(snapshotId)
- .setDescription(description)
- .build();
- return snapshotTableAsync(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Creates a new snapshot in the specified cluster from the specified source table. The cluster
- * and the table must be in the same instance.
- *
- * Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not
- * currently available to most Cloud Bigtable customers. This feature might be changed in
- * backward-incompatible ways and is not recommended for production use. It is not subject to any
- * SLA or deprecation policy.
- *
- *
Sample code:
- *
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * ClusterName cluster = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * String snapshotId = "";
- * String description = "";
- * Snapshot response = baseBigtableTableAdminClient.snapshotTableAsync(name.toString(), cluster.toString(), snapshotId, description).get();
- * }
- *
- *
- * @param name Required. The unique name of the table to have the snapshot taken. Values are of
- * the form `projects/{project}/instances/{instance}/tables/{table}`.
- * @param cluster Required. The name of the cluster where the snapshot will be created in. Values
- * are of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.
- * @param snapshotId Required. The ID by which the new snapshot should be referred to within the
- * parent cluster, e.g., `mysnapshot` of the form: `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather
- * than `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
- * @param description Description of the snapshot.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture snapshotTableAsync(
- String name, String cluster, String snapshotId, String description) {
- SnapshotTableRequest request =
- SnapshotTableRequest.newBuilder()
- .setName(name)
- .setCluster(cluster)
- .setSnapshotId(snapshotId)
- .setDescription(description)
- .build();
- return snapshotTableAsync(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Creates a new snapshot in the specified cluster from the specified source table. The cluster
- * and the table must be in the same instance.
- *
- * Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not
- * currently available to most Cloud Bigtable customers. This feature might be changed in
- * backward-incompatible ways and is not recommended for production use. It is not subject to any
- * SLA or deprecation policy.
- *
- *
Sample code:
- *
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * ClusterName cluster = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * String snapshotId = "";
- * SnapshotTableRequest request = SnapshotTableRequest.newBuilder()
- * .setName(name.toString())
- * .setCluster(cluster.toString())
- * .setSnapshotId(snapshotId)
- * .build();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * SnapshotTableRequest request =
+ * SnapshotTableRequest.newBuilder()
+ * .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .setCluster(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
+ * .setSnapshotId("snapshotId-1113817601")
+ * .setTtl(Duration.newBuilder().build())
+ * .setDescription("description-1724546052")
+ * .build();
* Snapshot response = baseBigtableTableAdminClient.snapshotTableAsync(request).get();
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture snapshotTableAsync(
SnapshotTableRequest request) {
return snapshotTableOperationCallable().futureCall(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new snapshot in the specified cluster from the specified source table. The cluster
* and the table must be in the same instance.
@@ -1609,29 +1530,30 @@ public final OperationFuture snapshotTableAsync
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * ClusterName cluster = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * String snapshotId = "";
- * SnapshotTableRequest request = SnapshotTableRequest.newBuilder()
- * .setName(name.toString())
- * .setCluster(cluster.toString())
- * .setSnapshotId(snapshotId)
- * .build();
- * OperationFuture<Snapshot, SnapshotTableMetadata> future = baseBigtableTableAdminClient.snapshotTableOperationCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * SnapshotTableRequest request =
+ * SnapshotTableRequest.newBuilder()
+ * .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .setCluster(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
+ * .setSnapshotId("snapshotId-1113817601")
+ * .setTtl(Duration.newBuilder().build())
+ * .setDescription("description-1724546052")
+ * .build();
+ * OperationFuture future =
+ * baseBigtableTableAdminClient.snapshotTableOperationCallable().futureCall(request);
+ * // Do something.
* Snapshot response = future.get();
* }
- *
+ * }
*/
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public final OperationCallable
snapshotTableOperationCallable() {
return stub.snapshotTableOperationCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new snapshot in the specified cluster from the specified source table. The cluster
* and the table must be in the same instance.
@@ -1643,27 +1565,29 @@ public final OperationFuture snapshotTableAsync
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * ClusterName cluster = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * String snapshotId = "";
- * SnapshotTableRequest request = SnapshotTableRequest.newBuilder()
- * .setName(name.toString())
- * .setCluster(cluster.toString())
- * .setSnapshotId(snapshotId)
- * .build();
- * ApiFuture<Operation> future = baseBigtableTableAdminClient.snapshotTableCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * SnapshotTableRequest request =
+ * SnapshotTableRequest.newBuilder()
+ * .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .setCluster(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
+ * .setSnapshotId("snapshotId-1113817601")
+ * .setTtl(Duration.newBuilder().build())
+ * .setDescription("description-1724546052")
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.snapshotTableCallable().futureCall(request);
+ * // Do something.
* Operation response = future.get();
* }
- *
+ * }
*/
public final UnaryCallable snapshotTableCallable() {
return stub.snapshotTableCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets metadata information about the specified snapshot.
*
@@ -1674,12 +1598,13 @@ public final UnaryCallable snapshotTableCallabl
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
* SnapshotName name = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
* Snapshot response = baseBigtableTableAdminClient.getSnapshot(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the requested snapshot. Values are of the form
* `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
@@ -1691,7 +1616,7 @@ public final Snapshot getSnapshot(SnapshotName name) {
return getSnapshot(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets metadata information about the specified snapshot.
*
@@ -1702,12 +1627,14 @@ public final Snapshot getSnapshot(SnapshotName name) {
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * SnapshotName name = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
- * Snapshot response = baseBigtableTableAdminClient.getSnapshot(name.toString());
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String name =
+ * SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString();
+ * Snapshot response = baseBigtableTableAdminClient.getSnapshot(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the requested snapshot. Values are of the form
* `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
@@ -1718,7 +1645,7 @@ public final Snapshot getSnapshot(String name) {
return getSnapshot(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets metadata information about the specified snapshot.
*
@@ -1729,15 +1656,17 @@ public final Snapshot getSnapshot(String name) {
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * SnapshotName name = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
- * GetSnapshotRequest request = GetSnapshotRequest.newBuilder()
- * .setName(name.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * GetSnapshotRequest request =
+ * GetSnapshotRequest.newBuilder()
+ * .setName(
+ * SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString())
+ * .build();
* Snapshot response = baseBigtableTableAdminClient.getSnapshot(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -1746,7 +1675,7 @@ public final Snapshot getSnapshot(GetSnapshotRequest request) {
return getSnapshotCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets metadata information about the specified snapshot.
*
@@ -1757,23 +1686,26 @@ public final Snapshot getSnapshot(GetSnapshotRequest request) {
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * SnapshotName name = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
- * GetSnapshotRequest request = GetSnapshotRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Snapshot> future = baseBigtableTableAdminClient.getSnapshotCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * GetSnapshotRequest request =
+ * GetSnapshotRequest.newBuilder()
+ * .setName(
+ * SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.getSnapshotCallable().futureCall(request);
+ * // Do something.
* Snapshot response = future.get();
* }
- *
+ * }
*/
public final UnaryCallable getSnapshotCallable() {
return stub.getSnapshotCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all snapshots associated with the specified cluster.
*
@@ -1784,14 +1716,15 @@ public final UnaryCallable getSnapshotCallable() {
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
* ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
* for (Snapshot element : baseBigtableTableAdminClient.listSnapshots(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*
* @param parent Required. The unique name of the cluster for which snapshots should be listed.
* Values are of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. Use
@@ -1807,7 +1740,7 @@ public final ListSnapshotsPagedResponse listSnapshots(ClusterName parent) {
return listSnapshots(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all snapshots associated with the specified cluster.
*
@@ -1818,14 +1751,15 @@ public final ListSnapshotsPagedResponse listSnapshots(ClusterName parent) {
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * for (Snapshot element : baseBigtableTableAdminClient.listSnapshots(parent.toString()).iterateAll()) {
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
+ * for (Snapshot element : baseBigtableTableAdminClient.listSnapshots(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*
* @param parent Required. The unique name of the cluster for which snapshots should be listed.
* Values are of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. Use
@@ -1838,7 +1772,7 @@ public final ListSnapshotsPagedResponse listSnapshots(String parent) {
return listSnapshots(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all snapshots associated with the specified cluster.
*
@@ -1849,17 +1783,20 @@ public final ListSnapshotsPagedResponse listSnapshots(String parent) {
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * ListSnapshotsRequest request = ListSnapshotsRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * ListSnapshotsRequest request =
+ * ListSnapshotsRequest.newBuilder()
+ * .setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
* for (Snapshot element : baseBigtableTableAdminClient.listSnapshots(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -1868,7 +1805,7 @@ public final ListSnapshotsPagedResponse listSnapshots(ListSnapshotsRequest reque
return listSnapshotsPagedCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all snapshots associated with the specified cluster.
*
@@ -1879,26 +1816,30 @@ public final ListSnapshotsPagedResponse listSnapshots(ListSnapshotsRequest reque
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * ListSnapshotsRequest request = ListSnapshotsRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * ApiFuture<ListSnapshotsPagedResponse> future = baseBigtableTableAdminClient.listSnapshotsPagedCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * ListSnapshotsRequest request =
+ * ListSnapshotsRequest.newBuilder()
+ * .setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.listSnapshotsPagedCallable().futureCall(request);
+ * // Do something.
* for (Snapshot element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*/
public final UnaryCallable
listSnapshotsPagedCallable() {
return stub.listSnapshotsPagedCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all snapshots associated with the specified cluster.
*
@@ -1909,15 +1850,13 @@ public final ListSnapshotsPagedResponse listSnapshots(ListSnapshotsRequest reque
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * ListSnapshotsRequest request = ListSnapshotsRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
* while (true) {
- * ListSnapshotsResponse response = baseBigtableTableAdminClient.listSnapshotsCallable().call(request);
- * for (Snapshot element : response.getSnapshotsList()) {
+ * ListSnapshotsResponse response =
+ * baseBigtableTableAdminClient.listSnapshotsCallable().call(request);
+ * for (Snapshot element : response.getResponsesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
@@ -1928,13 +1867,13 @@ public final ListSnapshotsPagedResponse listSnapshots(ListSnapshotsRequest reque
* }
* }
* }
- *
+ * }
*/
public final UnaryCallable listSnapshotsCallable() {
return stub.listSnapshotsCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Permanently deletes the specified snapshot.
*
@@ -1945,12 +1884,13 @@ public final UnaryCallable listSnap
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
* SnapshotName name = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
* baseBigtableTableAdminClient.deleteSnapshot(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the snapshot to be deleted. Values are of the form
* `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
@@ -1962,7 +1902,7 @@ public final void deleteSnapshot(SnapshotName name) {
deleteSnapshot(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Permanently deletes the specified snapshot.
*
@@ -1973,12 +1913,14 @@ public final void deleteSnapshot(SnapshotName name) {
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * SnapshotName name = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
- * baseBigtableTableAdminClient.deleteSnapshot(name.toString());
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String name =
+ * SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString();
+ * baseBigtableTableAdminClient.deleteSnapshot(name);
* }
- *
+ * }
*
* @param name Required. The unique name of the snapshot to be deleted. Values are of the form
* `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
@@ -1989,7 +1931,7 @@ public final void deleteSnapshot(String name) {
deleteSnapshot(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Permanently deletes the specified snapshot.
*
@@ -2000,15 +1942,17 @@ public final void deleteSnapshot(String name) {
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * SnapshotName name = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
- * DeleteSnapshotRequest request = DeleteSnapshotRequest.newBuilder()
- * .setName(name.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * DeleteSnapshotRequest request =
+ * DeleteSnapshotRequest.newBuilder()
+ * .setName(
+ * SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString())
+ * .build();
* baseBigtableTableAdminClient.deleteSnapshot(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -2017,7 +1961,7 @@ public final void deleteSnapshot(DeleteSnapshotRequest request) {
deleteSnapshotCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Permanently deletes the specified snapshot.
*
@@ -2028,23 +1972,26 @@ public final void deleteSnapshot(DeleteSnapshotRequest request) {
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * SnapshotName name = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
- * DeleteSnapshotRequest request = DeleteSnapshotRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Void> future = baseBigtableTableAdminClient.deleteSnapshotCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * DeleteSnapshotRequest request =
+ * DeleteSnapshotRequest.newBuilder()
+ * .setName(
+ * SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]").toString())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.deleteSnapshotCallable().futureCall(request);
+ * // Do something.
* future.get();
* }
- *
+ * }
*/
public final UnaryCallable deleteSnapshotCallable() {
return stub.deleteSnapshotCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Starts creating a new Cloud Bigtable Backup. The returned backup [long-running
* operation][google.longrunning.Operation] can be used to track creation of the backup. The
@@ -2056,14 +2003,16 @@ public final UnaryCallable deleteSnapshotCallable(
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
* ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * String backupId = "";
+ * String backupId = "backupId2121930365";
* Backup backup = Backup.newBuilder().build();
- * Backup response = baseBigtableTableAdminClient.createBackupAsync(parent, backupId, backup).get();
+ * Backup response =
+ * baseBigtableTableAdminClient.createBackupAsync(parent, backupId, backup).get();
* }
- *
+ * }
*
* @param parent Required. This must be one of the clusters in the instance in which this table is
* located. The backup will be stored in this cluster. Values are of the form
@@ -2077,8 +2026,6 @@ public final UnaryCallable deleteSnapshotCallable(
* @param backup Required. The backup to create.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture createBackupAsync(
ClusterName parent, String backupId, Backup backup) {
CreateBackupRequest request =
@@ -2090,7 +2037,7 @@ public final OperationFuture createBackupAsync(
return createBackupAsync(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Starts creating a new Cloud Bigtable Backup. The returned backup [long-running
* operation][google.longrunning.Operation] can be used to track creation of the backup. The
@@ -2102,14 +2049,16 @@ public final OperationFuture createBackupAsync(
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * String backupId = "";
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
+ * String backupId = "backupId2121930365";
* Backup backup = Backup.newBuilder().build();
- * Backup response = baseBigtableTableAdminClient.createBackupAsync(parent.toString(), backupId, backup).get();
+ * Backup response =
+ * baseBigtableTableAdminClient.createBackupAsync(parent, backupId, backup).get();
* }
- *
+ * }
*
* @param parent Required. This must be one of the clusters in the instance in which this table is
* located. The backup will be stored in this cluster. Values are of the form
@@ -2123,8 +2072,6 @@ public final OperationFuture createBackupAsync(
* @param backup Required. The backup to create.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture createBackupAsync(
String parent, String backupId, Backup backup) {
CreateBackupRequest request =
@@ -2136,7 +2083,7 @@ public final OperationFuture createBackupAsync(
return createBackupAsync(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Starts creating a new Cloud Bigtable Backup. The returned backup [long-running
* operation][google.longrunning.Operation] can be used to track creation of the backup. The
@@ -2148,31 +2095,28 @@ public final OperationFuture createBackupAsync(
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * String backupId = "";
- * Backup backup = Backup.newBuilder().build();
- * CreateBackupRequest request = CreateBackupRequest.newBuilder()
- * .setParent(parent.toString())
- * .setBackupId(backupId)
- * .setBackup(backup)
- * .build();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * CreateBackupRequest request =
+ * CreateBackupRequest.newBuilder()
+ * .setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
+ * .setBackupId("backupId2121930365")
+ * .setBackup(Backup.newBuilder().build())
+ * .build();
* Backup response = baseBigtableTableAdminClient.createBackupAsync(request).get();
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture createBackupAsync(
CreateBackupRequest request) {
return createBackupOperationCallable().futureCall(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Starts creating a new Cloud Bigtable Backup. The returned backup [long-running
* operation][google.longrunning.Operation] can be used to track creation of the backup. The
@@ -2184,29 +2128,28 @@ public final OperationFuture createBackupAsync(
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * String backupId = "";
- * Backup backup = Backup.newBuilder().build();
- * CreateBackupRequest request = CreateBackupRequest.newBuilder()
- * .setParent(parent.toString())
- * .setBackupId(backupId)
- * .setBackup(backup)
- * .build();
- * OperationFuture<Backup, CreateBackupMetadata> future = baseBigtableTableAdminClient.createBackupOperationCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * CreateBackupRequest request =
+ * CreateBackupRequest.newBuilder()
+ * .setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
+ * .setBackupId("backupId2121930365")
+ * .setBackup(Backup.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * baseBigtableTableAdminClient.createBackupOperationCallable().futureCall(request);
+ * // Do something.
* Backup response = future.get();
* }
- *
+ * }
*/
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public final OperationCallable
createBackupOperationCallable() {
return stub.createBackupOperationCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Starts creating a new Cloud Bigtable Backup. The returned backup [long-running
* operation][google.longrunning.Operation] can be used to track creation of the backup. The
@@ -2218,38 +2161,39 @@ public final OperationFuture createBackupAsync(
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * String backupId = "";
- * Backup backup = Backup.newBuilder().build();
- * CreateBackupRequest request = CreateBackupRequest.newBuilder()
- * .setParent(parent.toString())
- * .setBackupId(backupId)
- * .setBackup(backup)
- * .build();
- * ApiFuture<Operation> future = baseBigtableTableAdminClient.createBackupCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * CreateBackupRequest request =
+ * CreateBackupRequest.newBuilder()
+ * .setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
+ * .setBackupId("backupId2121930365")
+ * .setBackup(Backup.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.createBackupCallable().futureCall(request);
+ * // Do something.
* Operation response = future.get();
* }
- *
+ * }
*/
public final UnaryCallable createBackupCallable() {
return stub.createBackupCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets metadata on a pending or completed Cloud Bigtable Backup.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
* BackupName name = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]");
* Backup response = baseBigtableTableAdminClient.getBackup(name);
* }
- *
+ * }
*
* @param name Required. Name of the backup. Values are of the form
* `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
@@ -2261,18 +2205,19 @@ public final Backup getBackup(BackupName name) {
return getBackup(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets metadata on a pending or completed Cloud Bigtable Backup.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * BackupName name = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]");
- * Backup response = baseBigtableTableAdminClient.getBackup(name.toString());
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String name = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString();
+ * Backup response = baseBigtableTableAdminClient.getBackup(name);
* }
- *
+ * }
*
* @param name Required. Name of the backup. Values are of the form
* `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
@@ -2283,21 +2228,22 @@ public final Backup getBackup(String name) {
return getBackup(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets metadata on a pending or completed Cloud Bigtable Backup.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * BackupName name = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]");
- * GetBackupRequest request = GetBackupRequest.newBuilder()
- * .setName(name.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * GetBackupRequest request =
+ * GetBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString())
+ * .build();
* Backup response = baseBigtableTableAdminClient.getBackup(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -2306,71 +2252,250 @@ public final Backup getBackup(GetBackupRequest request) {
return getBackupCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets metadata on a pending or completed Cloud Bigtable Backup.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * BackupName name = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]");
- * GetBackupRequest request = GetBackupRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Backup> future = baseBigtableTableAdminClient.getBackupCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * GetBackupRequest request =
+ * GetBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.getBackupCallable().futureCall(request);
+ * // Do something.
* Backup response = future.get();
* }
- *
+ * }
*/
public final UnaryCallable getBackupCallable() {
return stub.getBackupCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists Cloud Bigtable backups. Returns both completed and pending backups.
+ * Updates a pending or completed Cloud Bigtable Backup.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * for (Backup element : baseBigtableTableAdminClient.listBackups(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * Backup backup = Backup.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Backup response = baseBigtableTableAdminClient.updateBackup(backup, updateMask);
* }
- *
+ * }
*
- * @param parent Required. The cluster to list backups from. Values are of the form
- * `projects/{project}/instances/{instance}/clusters/{cluster}`. Use `{cluster} = '-'` to list
- * backups for all clusters in an instance, e.g.,
- * `projects/{project}/instances/{instance}/clusters/-`.
+ * @param backup Required. The backup to update. `backup.name`, and the fields to be updated as
+ * specified by `update_mask` are required. Other fields are ignored. Update is only supported
+ * for the following fields: * `backup.expire_time`.
+ * @param updateMask Required. A mask specifying which fields (e.g. `expire_time`) in the Backup
+ * resource should be updated. This mask is relative to the Backup resource, not to the
+ * request message. The field mask must always be specified; this prevents any future fields
+ * from being erased accidentally by clients that do not know about them.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListBackupsPagedResponse listBackups(ClusterName parent) {
- ListBackupsRequest request =
+ public final Backup updateBackup(Backup backup, FieldMask updateMask) {
+ UpdateBackupRequest request =
+ UpdateBackupRequest.newBuilder().setBackup(backup).setUpdateMask(updateMask).build();
+ return updateBackup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a pending or completed Cloud Bigtable Backup.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * UpdateBackupRequest request =
+ * UpdateBackupRequest.newBuilder()
+ * .setBackup(Backup.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Backup response = baseBigtableTableAdminClient.updateBackup(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Backup updateBackup(UpdateBackupRequest request) {
+ return updateBackupCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a pending or completed Cloud Bigtable Backup.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * UpdateBackupRequest request =
+ * UpdateBackupRequest.newBuilder()
+ * .setBackup(Backup.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.updateBackupCallable().futureCall(request);
+ * // Do something.
+ * Backup response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable updateBackupCallable() {
+ return stub.updateBackupCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a pending or completed Cloud Bigtable backup.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * BackupName name = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]");
+ * baseBigtableTableAdminClient.deleteBackup(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the backup to delete. Values are of the form
+ * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteBackup(BackupName name) {
+ DeleteBackupRequest request =
+ DeleteBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteBackup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a pending or completed Cloud Bigtable backup.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String name = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString();
+ * baseBigtableTableAdminClient.deleteBackup(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the backup to delete. Values are of the form
+ * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteBackup(String name) {
+ DeleteBackupRequest request = DeleteBackupRequest.newBuilder().setName(name).build();
+ deleteBackup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a pending or completed Cloud Bigtable backup.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * DeleteBackupRequest request =
+ * DeleteBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString())
+ * .build();
+ * baseBigtableTableAdminClient.deleteBackup(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteBackup(DeleteBackupRequest request) {
+ deleteBackupCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a pending or completed Cloud Bigtable backup.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * DeleteBackupRequest request =
+ * DeleteBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.deleteBackupCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable deleteBackupCallable() {
+ return stub.deleteBackupCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Cloud Bigtable backups. Returns both completed and pending backups.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
+ * for (Backup element : baseBigtableTableAdminClient.listBackups(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The cluster to list backups from. Values are of the form
+ * `projects/{project}/instances/{instance}/clusters/{cluster}`. Use `{cluster} = '-'` to list
+ * backups for all clusters in an instance, e.g.,
+ * `projects/{project}/instances/{instance}/clusters/-`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListBackupsPagedResponse listBackups(ClusterName parent) {
+ ListBackupsRequest request =
ListBackupsRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
return listBackups(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists Cloud Bigtable backups. Returns both completed and pending backups.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * for (Backup element : baseBigtableTableAdminClient.listBackups(parent.toString()).iterateAll()) {
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
+ * for (Backup element : baseBigtableTableAdminClient.listBackups(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*
* @param parent Required. The cluster to list backups from. Values are of the form
* `projects/{project}/instances/{instance}/clusters/{cluster}`. Use `{cluster} = '-'` to list
@@ -2383,23 +2508,28 @@ public final ListBackupsPagedResponse listBackups(String parent) {
return listBackups(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists Cloud Bigtable backups. Returns both completed and pending backups.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * ListBackupsRequest request = ListBackupsRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * ListBackupsRequest request =
+ * ListBackupsRequest.newBuilder()
+ * .setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
* for (Backup element : baseBigtableTableAdminClient.listBackups(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -2408,46 +2538,50 @@ public final ListBackupsPagedResponse listBackups(ListBackupsRequest request) {
return listBackupsPagedCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists Cloud Bigtable backups. Returns both completed and pending backups.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * ListBackupsRequest request = ListBackupsRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * ApiFuture<ListBackupsPagedResponse> future = baseBigtableTableAdminClient.listBackupsPagedCallable().futureCall(request);
- * // Do something
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * ListBackupsRequest request =
+ * ListBackupsRequest.newBuilder()
+ * .setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.listBackupsPagedCallable().futureCall(request);
+ * // Do something.
* for (Backup element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*/
public final UnaryCallable
listBackupsPagedCallable() {
return stub.listBackupsPagedCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists Cloud Bigtable backups. Returns both completed and pending backups.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
- * ListBackupsRequest request = ListBackupsRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
* while (true) {
- * ListBackupsResponse response = baseBigtableTableAdminClient.listBackupsCallable().call(request);
- * for (Backup element : response.getBackupsList()) {
+ * ListBackupsResponse response =
+ * baseBigtableTableAdminClient.listBackupsCallable().call(request);
+ * for (Backup element : response.getResponsesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
@@ -2458,274 +2592,435 @@ public final ListBackupsPagedResponse listBackups(ListBackupsRequest request) {
* }
* }
* }
- *
+ * }
*/
public final UnaryCallable listBackupsCallable() {
return stub.listBackupsCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Updates a pending or completed Cloud Bigtable Backup.
+ * Create a new table by restoring from a completed backup. The new table must be in the same
+ * instance as the instance containing the backup. The returned table [long-running
+ * operation][google.longrunning.Operation] can be used to track the progress of the operation,
+ * and to cancel it. The [metadata][google.longrunning.Operation.metadata] field type is
+ * [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
+ * [response][google.longrunning.Operation.response] type is
+ * [Table][google.bigtable.admin.v2.Table], if successful.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * Backup backup = Backup.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * Backup response = baseBigtableTableAdminClient.updateBackup(backup, updateMask);
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * RestoreTableRequest request =
+ * RestoreTableRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .setTableId("tableId-1552905847")
+ * .build();
+ * Table response = baseBigtableTableAdminClient.restoreTableAsync(request).get();
* }
- *
+ * }
*
- * @param backup Required. The backup to update. `backup.name`, and the fields to be updated as
- * specified by `update_mask` are required. Other fields are ignored. Update is only supported
- * for the following fields: * `backup.expire_time`.
- * @param updateMask Required. A mask specifying which fields (e.g. `expire_time`) in the Backup
- * resource should be updated. This mask is relative to the Backup resource, not to the
- * request message. The field mask must always be specified; this prevents any future fields
- * from being erased accidentally by clients that do not know about them.
+ * @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 Backup updateBackup(Backup backup, FieldMask updateMask) {
- UpdateBackupRequest request =
- UpdateBackupRequest.newBuilder().setBackup(backup).setUpdateMask(updateMask).build();
- return updateBackup(request);
+ public final OperationFuture restoreTableAsync(
+ RestoreTableRequest request) {
+ return restoreTableOperationCallable().futureCall(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Updates a pending or completed Cloud Bigtable Backup.
+ * Create a new table by restoring from a completed backup. The new table must be in the same
+ * instance as the instance containing the backup. The returned table [long-running
+ * operation][google.longrunning.Operation] can be used to track the progress of the operation,
+ * and to cancel it. The [metadata][google.longrunning.Operation.metadata] field type is
+ * [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
+ * [response][google.longrunning.Operation.response] type is
+ * [Table][google.bigtable.admin.v2.Table], if successful.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * Backup backup = Backup.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateBackupRequest request = UpdateBackupRequest.newBuilder()
- * .setBackup(backup)
- * .setUpdateMask(updateMask)
- * .build();
- * Backup response = baseBigtableTableAdminClient.updateBackup(request);
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * RestoreTableRequest request =
+ * RestoreTableRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .setTableId("tableId-1552905847")
+ * .build();
+ * OperationFuture
future =
+ * baseBigtableTableAdminClient.restoreTableOperationCallable().futureCall(request);
+ * // Do something.
+ * Table response = future.get();
* }
- *
+ * }
+ */
+ public final OperationCallable
+ restoreTableOperationCallable() {
+ return stub.restoreTableOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new table by restoring from a completed backup. The new table must be in the same
+ * instance as the instance containing the backup. The returned table [long-running
+ * operation][google.longrunning.Operation] can be used to track the progress of the operation,
+ * and to cancel it. The [metadata][google.longrunning.Operation.metadata] field type is
+ * [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
+ * [response][google.longrunning.Operation.response] type is
+ * [Table][google.bigtable.admin.v2.Table], if successful.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * RestoreTableRequest request =
+ * RestoreTableRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
+ * .setTableId("tableId-1552905847")
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.restoreTableCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable restoreTableCallable() {
+ return stub.restoreTableCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a Table or Backup resource. Returns an empty policy if the
+ * resource exists but does not have a policy set.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * ResourceName resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
+ * Policy response = baseBigtableTableAdminClient.getIamPolicy(resource);
+ * }
+ * }
+ *
+ * @param resource REQUIRED: The resource for which the policy is being requested. See the
+ * operation documentation for the appropriate value for this field.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy getIamPolicy(ResourceName resource) {
+ GetIamPolicyRequest request =
+ GetIamPolicyRequest.newBuilder()
+ .setResource(resource == null ? null : resource.toString())
+ .build();
+ return getIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a Table or Backup resource. Returns an empty policy if the
+ * resource exists but does not have a policy set.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
+ * Policy response = baseBigtableTableAdminClient.getIamPolicy(resource);
+ * }
+ * }
+ *
+ * @param resource REQUIRED: The resource for which the policy is being requested. See the
+ * operation documentation for the appropriate value for this field.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy getIamPolicy(String resource) {
+ GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build();
+ return getIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a Table or Backup resource. Returns an empty policy if the
+ * resource exists but does not have a policy set.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = baseBigtableTableAdminClient.getIamPolicy(request);
+ * }
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Backup updateBackup(UpdateBackupRequest request) {
- return updateBackupCallable().call(request);
+ public final Policy getIamPolicy(GetIamPolicyRequest request) {
+ return getIamPolicyCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Updates a pending or completed Cloud Bigtable Backup.
+ * Gets the access control policy for a Table or Backup resource. Returns an empty policy if the
+ * resource exists but does not have a policy set.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * Backup backup = Backup.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateBackupRequest request = UpdateBackupRequest.newBuilder()
- * .setBackup(backup)
- * .setUpdateMask(updateMask)
- * .build();
- * ApiFuture<Backup> future = baseBigtableTableAdminClient.updateBackupCallable().futureCall(request);
- * // Do something
- * Backup response = future.get();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.getIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
* }
- *
+ * }
*/
- public final UnaryCallable updateBackupCallable() {
- return stub.updateBackupCallable();
+ public final UnaryCallable getIamPolicyCallable() {
+ return stub.getIamPolicyCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Deletes a pending or completed Cloud Bigtable backup.
+ * Sets the access control policy on a Table or Backup resource. Replaces any existing policy.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * BackupName name = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]");
- * baseBigtableTableAdminClient.deleteBackup(name);
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * ResourceName resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
+ * Policy policy = Policy.newBuilder().build();
+ * Policy response = baseBigtableTableAdminClient.setIamPolicy(resource, policy);
* }
- *
+ * }
*
- * @param name Required. Name of the backup to delete. Values are of the form
- * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
+ * @param resource REQUIRED: The resource for which the policy is being specified. See the
+ * operation documentation for the appropriate value for this field.
+ * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the
+ * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud
+ * Platform services (such as Projects) might reject them.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void deleteBackup(BackupName name) {
- DeleteBackupRequest request =
- DeleteBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
- deleteBackup(request);
+ public final Policy setIamPolicy(ResourceName resource, Policy policy) {
+ SetIamPolicyRequest request =
+ SetIamPolicyRequest.newBuilder()
+ .setResource(resource == null ? null : resource.toString())
+ .setPolicy(policy)
+ .build();
+ return setIamPolicy(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Deletes a pending or completed Cloud Bigtable backup.
+ * Sets the access control policy on a Table or Backup resource. Replaces any existing policy.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * BackupName name = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]");
- * baseBigtableTableAdminClient.deleteBackup(name.toString());
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
+ * Policy policy = Policy.newBuilder().build();
+ * Policy response = baseBigtableTableAdminClient.setIamPolicy(resource, policy);
* }
- *
+ * }
*
- * @param name Required. Name of the backup to delete. Values are of the form
- * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
+ * @param resource REQUIRED: The resource for which the policy is being specified. See the
+ * operation documentation for the appropriate value for this field.
+ * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the
+ * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud
+ * Platform services (such as Projects) might reject them.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void deleteBackup(String name) {
- DeleteBackupRequest request = DeleteBackupRequest.newBuilder().setName(name).build();
- deleteBackup(request);
+ public final Policy setIamPolicy(String resource, Policy policy) {
+ SetIamPolicyRequest request =
+ SetIamPolicyRequest.newBuilder().setResource(resource).setPolicy(policy).build();
+ return setIamPolicy(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Deletes a pending or completed Cloud Bigtable backup.
+ * Sets the access control policy on a Table or Backup resource. Replaces any existing policy.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * BackupName name = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]");
- * DeleteBackupRequest request = DeleteBackupRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * baseBigtableTableAdminClient.deleteBackup(request);
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .build();
+ * Policy response = baseBigtableTableAdminClient.setIamPolicy(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void deleteBackup(DeleteBackupRequest request) {
- deleteBackupCallable().call(request);
+ public final Policy setIamPolicy(SetIamPolicyRequest request) {
+ return setIamPolicyCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Deletes a pending or completed Cloud Bigtable backup.
+ * Sets the access control policy on a Table or Backup resource. Replaces any existing policy.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * BackupName name = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]");
- * DeleteBackupRequest request = DeleteBackupRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Void> future = baseBigtableTableAdminClient.deleteBackupCallable().futureCall(request);
- * // Do something
- * future.get();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.setIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
* }
- *
+ * }
*/
- public final UnaryCallable deleteBackupCallable() {
- return stub.deleteBackupCallable();
+ public final UnaryCallable setIamPolicyCallable() {
+ return stub.setIamPolicyCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Create a new table by restoring from a completed backup. The new table must be in the same
- * instance as the instance containing the backup. The returned table [long-running
- * operation][google.longrunning.Operation] can be used to track the progress of the operation,
- * and to cancel it. The [metadata][google.longrunning.Operation.metadata] field type is
- * [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
- * [response][google.longrunning.Operation.response] type is
- * [Table][google.bigtable.admin.v2.Table], if successful.
+ * Returns permissions that the caller has on the specified Table or Backup resource.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String tableId = "";
- * RestoreTableRequest request = RestoreTableRequest.newBuilder()
- * .setParent(parent.toString())
- * .setTableId(tableId)
- * .build();
- * Table response = baseBigtableTableAdminClient.restoreTableAsync(request).get();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * ResourceName resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
+ * List permissions = new ArrayList<>();
+ * TestIamPermissionsResponse response =
+ * baseBigtableTableAdminClient.testIamPermissions(resource, permissions);
* }
- *
+ * }
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param resource REQUIRED: The resource for which the policy detail is being requested. See the
+ * operation documentation for the appropriate value for this field.
+ * @param permissions The set of permissions to check for the `resource`. Permissions with
+ * wildcards (such as '*' or 'storage.*') are not allowed. For more information see
+ * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture restoreTableAsync(
- RestoreTableRequest request) {
- return restoreTableOperationCallable().futureCall(request);
+ public final TestIamPermissionsResponse testIamPermissions(
+ ResourceName resource, List permissions) {
+ TestIamPermissionsRequest request =
+ TestIamPermissionsRequest.newBuilder()
+ .setResource(resource == null ? null : resource.toString())
+ .addAllPermissions(permissions)
+ .build();
+ return testIamPermissions(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Create a new table by restoring from a completed backup. The new table must be in the same
- * instance as the instance containing the backup. The returned table [long-running
- * operation][google.longrunning.Operation] can be used to track the progress of the operation,
- * and to cancel it. The [metadata][google.longrunning.Operation.metadata] field type is
- * [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
- * [response][google.longrunning.Operation.response] type is
- * [Table][google.bigtable.admin.v2.Table], if successful.
+ * Returns permissions that the caller has on the specified Table or Backup resource.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String tableId = "";
- * RestoreTableRequest request = RestoreTableRequest.newBuilder()
- * .setParent(parent.toString())
- * .setTableId(tableId)
- * .build();
- * OperationFuture<Table, RestoreTableMetadata> future = baseBigtableTableAdminClient.restoreTableOperationCallable().futureCall(request);
- * // Do something
- * Table response = future.get();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
+ * List permissions = new ArrayList<>();
+ * TestIamPermissionsResponse response =
+ * baseBigtableTableAdminClient.testIamPermissions(resource, permissions);
* }
- *
+ * }
+ *
+ * @param resource REQUIRED: The resource for which the policy detail is being requested. See the
+ * operation documentation for the appropriate value for this field.
+ * @param permissions The set of permissions to check for the `resource`. Permissions with
+ * wildcards (such as '*' or 'storage.*') are not allowed. For more information see
+ * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
- public final OperationCallable
- restoreTableOperationCallable() {
- return stub.restoreTableOperationCallable();
+ public final TestIamPermissionsResponse testIamPermissions(
+ String resource, List permissions) {
+ TestIamPermissionsRequest request =
+ TestIamPermissionsRequest.newBuilder()
+ .setResource(resource)
+ .addAllPermissions(permissions)
+ .build();
+ return testIamPermissions(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Create a new table by restoring from a completed backup. The new table must be in the same
- * instance as the instance containing the backup. The returned table [long-running
- * operation][google.longrunning.Operation] can be used to track the progress of the operation,
- * and to cancel it. The [metadata][google.longrunning.Operation.metadata] field type is
- * [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
- * [response][google.longrunning.Operation.response] type is
- * [Table][google.bigtable.admin.v2.Table], if successful.
+ * Returns permissions that the caller has on the specified Table or Backup resource.
*
* Sample code:
*
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String tableId = "";
- * RestoreTableRequest request = RestoreTableRequest.newBuilder()
- * .setParent(parent.toString())
- * .setTableId(tableId)
- * .build();
- * ApiFuture<Operation> future = baseBigtableTableAdminClient.restoreTableCallable().futureCall(request);
- * // Do something
- * Operation response = future.get();
+ * {@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * TestIamPermissionsResponse response =
+ * baseBigtableTableAdminClient.testIamPermissions(request);
* }
- *
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable restoreTableCallable() {
- return stub.restoreTableCallable();
+ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) {
+ return testIamPermissionsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that the caller has on the specified Table or Backup resource.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.testIamPermissionsCallable().futureCall(request);
+ * // Do something.
+ * TestIamPermissionsResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ testIamPermissionsCallable() {
+ return stub.testIamPermissionsCallable();
}
@Override
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java
index 69e05571f..9aa3add05 100644
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java
@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * https://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package com.google.cloud.bigtable.admin.v2;
import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListBackupsPagedResponse;
@@ -75,11 +76,12 @@
import java.util.List;
import javax.annotation.Generated;
-// AUTO-GENERATED DOCUMENTATION AND CLASS
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
/** For internal use only. */
@Generated("by gapic-generator")
@InternalApi
public class BaseBigtableTableAdminSettings extends ClientSettings {
+
/** Returns the object with the settings used for calls to createTable. */
public UnaryCallSettings createTableSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings()).createTableSettings();
@@ -92,8 +94,6 @@ public UnaryCallSettings createTableSettings() {
}
/** Returns the object with the settings used for calls to createTableFromSnapshot. */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<
CreateTableFromSnapshotRequest, Table, CreateTableFromSnapshotMetadata>
createTableFromSnapshotOperationSettings() {
@@ -139,30 +139,12 @@ public UnaryCallSettings dropRowRangeSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings()).checkConsistencySettings();
}
- /** Returns the object with the settings used for calls to getIamPolicy. */
- public UnaryCallSettings getIamPolicySettings() {
- return ((BigtableTableAdminStubSettings) getStubSettings()).getIamPolicySettings();
- }
-
- /** Returns the object with the settings used for calls to setIamPolicy. */
- public UnaryCallSettings setIamPolicySettings() {
- return ((BigtableTableAdminStubSettings) getStubSettings()).setIamPolicySettings();
- }
-
- /** Returns the object with the settings used for calls to testIamPermissions. */
- public UnaryCallSettings
- testIamPermissionsSettings() {
- return ((BigtableTableAdminStubSettings) getStubSettings()).testIamPermissionsSettings();
- }
-
/** Returns the object with the settings used for calls to snapshotTable. */
public UnaryCallSettings snapshotTableSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings()).snapshotTableSettings();
}
/** Returns the object with the settings used for calls to snapshotTable. */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings
snapshotTableOperationSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings()).snapshotTableOperationSettings();
@@ -190,8 +172,6 @@ public UnaryCallSettings createBackupSettings()
}
/** Returns the object with the settings used for calls to createBackup. */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings
createBackupOperationSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings()).createBackupOperationSettings();
@@ -202,12 +182,6 @@ public UnaryCallSettings getBackupSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings()).getBackupSettings();
}
- /** Returns the object with the settings used for calls to listBackups. */
- public PagedCallSettings
- listBackupsSettings() {
- return ((BigtableTableAdminStubSettings) getStubSettings()).listBackupsSettings();
- }
-
/** Returns the object with the settings used for calls to updateBackup. */
public UnaryCallSettings updateBackupSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings()).updateBackupSettings();
@@ -218,19 +192,39 @@ public UnaryCallSettings deleteBackupSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings()).deleteBackupSettings();
}
+ /** Returns the object with the settings used for calls to listBackups. */
+ public PagedCallSettings
+ listBackupsSettings() {
+ return ((BigtableTableAdminStubSettings) getStubSettings()).listBackupsSettings();
+ }
+
/** Returns the object with the settings used for calls to restoreTable. */
public UnaryCallSettings restoreTableSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings()).restoreTableSettings();
}
/** Returns the object with the settings used for calls to restoreTable. */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings
restoreTableOperationSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings()).restoreTableOperationSettings();
}
+ /** Returns the object with the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings getIamPolicySettings() {
+ return ((BigtableTableAdminStubSettings) getStubSettings()).getIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings setIamPolicySettings() {
+ return ((BigtableTableAdminStubSettings) getStubSettings()).setIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings
+ testIamPermissionsSettings() {
+ return ((BigtableTableAdminStubSettings) getStubSettings()).testIamPermissionsSettings();
+ }
+
public static final BaseBigtableTableAdminSettings create(BigtableTableAdminStubSettings stub)
throws IOException {
return new BaseBigtableTableAdminSettings.Builder(stub.toBuilder()).build();
@@ -292,18 +286,15 @@ protected BaseBigtableTableAdminSettings(Builder settingsBuilder) throws IOExcep
/** Builder for BaseBigtableTableAdminSettings. */
public static class Builder
extends ClientSettings.Builder {
+
protected Builder() throws IOException {
- this((ClientContext) null);
+ this(((ClientContext) null));
}
protected Builder(ClientContext clientContext) {
super(BigtableTableAdminStubSettings.newBuilder(clientContext));
}
- private static Builder createDefault() {
- return new Builder(BigtableTableAdminStubSettings.newBuilder());
- }
-
protected Builder(BaseBigtableTableAdminSettings settings) {
super(settings.getStubSettings().toBuilder());
}
@@ -312,11 +303,15 @@ protected Builder(BigtableTableAdminStubSettings.Builder stubSettings) {
super(stubSettings);
}
+ private static Builder createDefault() {
+ return new Builder(BigtableTableAdminStubSettings.newBuilder());
+ }
+
public BigtableTableAdminStubSettings.Builder getStubSettingsBuilder() {
return ((BigtableTableAdminStubSettings.Builder) getStubSettings());
}
- // NEXT_MAJOR_VER: remove 'throws Exception'
+ // NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
@@ -341,8 +336,6 @@ public UnaryCallSettings.Builder createTableSettings(
}
/** Returns the builder for the settings used for calls to createTableFromSnapshot. */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
CreateTableFromSnapshotRequest, Table, CreateTableFromSnapshotMetadata>
createTableFromSnapshotOperationSettings() {
@@ -389,30 +382,12 @@ public UnaryCallSettings.Builder dropRowRangeSetting
return getStubSettingsBuilder().checkConsistencySettings();
}
- /** Returns the builder for the settings used for calls to getIamPolicy. */
- public UnaryCallSettings.Builder getIamPolicySettings() {
- return getStubSettingsBuilder().getIamPolicySettings();
- }
-
- /** Returns the builder for the settings used for calls to setIamPolicy. */
- public UnaryCallSettings.Builder setIamPolicySettings() {
- return getStubSettingsBuilder().setIamPolicySettings();
- }
-
- /** Returns the builder for the settings used for calls to testIamPermissions. */
- public UnaryCallSettings.Builder
- testIamPermissionsSettings() {
- return getStubSettingsBuilder().testIamPermissionsSettings();
- }
-
/** Returns the builder for the settings used for calls to snapshotTable. */
public UnaryCallSettings.Builder snapshotTableSettings() {
return getStubSettingsBuilder().snapshotTableSettings();
}
/** Returns the builder for the settings used for calls to snapshotTable. */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder
snapshotTableOperationSettings() {
return getStubSettingsBuilder().snapshotTableOperationSettings();
@@ -441,8 +416,6 @@ public UnaryCallSettings.Builder createBackupSet
}
/** Returns the builder for the settings used for calls to createBackup. */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder
createBackupOperationSettings() {
return getStubSettingsBuilder().createBackupOperationSettings();
@@ -453,13 +426,6 @@ public UnaryCallSettings.Builder getBackupSettings() {
return getStubSettingsBuilder().getBackupSettings();
}
- /** Returns the builder for the settings used for calls to listBackups. */
- public PagedCallSettings.Builder<
- ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse>
- listBackupsSettings() {
- return getStubSettingsBuilder().listBackupsSettings();
- }
-
/** Returns the builder for the settings used for calls to updateBackup. */
public UnaryCallSettings.Builder updateBackupSettings() {
return getStubSettingsBuilder().updateBackupSettings();
@@ -470,19 +436,40 @@ public UnaryCallSettings.Builder deleteBackupSetting
return getStubSettingsBuilder().deleteBackupSettings();
}
+ /** Returns the builder for the settings used for calls to listBackups. */
+ public PagedCallSettings.Builder<
+ ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse>
+ listBackupsSettings() {
+ return getStubSettingsBuilder().listBackupsSettings();
+ }
+
/** Returns the builder for the settings used for calls to restoreTable. */
public UnaryCallSettings.Builder restoreTableSettings() {
return getStubSettingsBuilder().restoreTableSettings();
}
/** Returns the builder for the settings used for calls to restoreTable. */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder
restoreTableOperationSettings() {
return getStubSettingsBuilder().restoreTableOperationSettings();
}
+ /** Returns the builder for the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings.Builder getIamPolicySettings() {
+ return getStubSettingsBuilder().getIamPolicySettings();
+ }
+
+ /** Returns the builder for the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings.Builder setIamPolicySettings() {
+ return getStubSettingsBuilder().setIamPolicySettings();
+ }
+
+ /** Returns the builder for the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings.Builder
+ testIamPermissionsSettings() {
+ return getStubSettingsBuilder().testIamPermissionsSettings();
+ }
+
@Override
public BaseBigtableTableAdminSettings build() throws IOException {
return new BaseBigtableTableAdminSettings(this);
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStub.java
index 0b33e1550..2ab20acd6 100644
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStub.java
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStub.java
@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * https://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package com.google.cloud.bigtable.admin.v2.stub;
import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse;
-import com.google.api.core.BetaApi;
import com.google.api.core.InternalApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.rpc.OperationCallable;
@@ -57,18 +57,16 @@
import com.google.protobuf.Empty;
import javax.annotation.Generated;
-// AUTO-GENERATED DOCUMENTATION AND CLASS
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
/** For internal use only. */
@Generated("by gapic-generator")
@InternalApi
public abstract class BigtableInstanceAdminStub implements BackgroundResource {
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationsStub getOperationsStub() {
throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
}
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallable
createInstanceOperationCallable() {
throw new UnsupportedOperationException("Not implemented: createInstanceOperationCallable()");
@@ -86,7 +84,10 @@ public UnaryCallable listInstancesC
throw new UnsupportedOperationException("Not implemented: listInstancesCallable()");
}
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+ public UnaryCallable updateInstanceCallable() {
+ throw new UnsupportedOperationException("Not implemented: updateInstanceCallable()");
+ }
+
public OperationCallable
partialUpdateInstanceOperationCallable() {
throw new UnsupportedOperationException(
@@ -101,7 +102,6 @@ public UnaryCallable deleteInstanceCallable() {
throw new UnsupportedOperationException("Not implemented: deleteInstanceCallable()");
}
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallable
createClusterOperationCallable() {
throw new UnsupportedOperationException("Not implemented: createClusterOperationCallable()");
@@ -119,7 +119,6 @@ public UnaryCallable listClustersCall
throw new UnsupportedOperationException("Not implemented: listClustersCallable()");
}
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallable
updateClusterOperationCallable() {
throw new UnsupportedOperationException("Not implemented: updateClusterOperationCallable()");
@@ -150,7 +149,6 @@ public UnaryCallable listAppPro
throw new UnsupportedOperationException("Not implemented: listAppProfilesCallable()");
}
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallable
updateAppProfileOperationCallable() {
throw new UnsupportedOperationException("Not implemented: updateAppProfileOperationCallable()");
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java
index ee6a361cb..d178602d6 100644
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java
@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * https://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package com.google.cloud.bigtable.admin.v2.stub;
import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse;
@@ -84,7 +85,7 @@
import javax.annotation.Generated;
import org.threeten.bp.Duration;
-// AUTO-GENERATED DOCUMENTATION AND CLASS
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Settings class to configure an instance of {@link BigtableInstanceAdminStub}.
*
@@ -101,22 +102,23 @@
*
* For example, to set the total timeout of getInstance to 30 seconds:
*
- *
- *
+ * {@code
* BigtableInstanceAdminStubSettings.Builder baseBigtableInstanceAdminSettingsBuilder =
* BigtableInstanceAdminStubSettings.newBuilder();
* baseBigtableInstanceAdminSettingsBuilder
* .getInstanceSettings()
* .setRetrySettings(
- * baseBigtableInstanceAdminSettingsBuilder.getInstanceSettings().getRetrySettings().toBuilder()
+ * baseBigtableInstanceAdminSettingsBuilder
+ * .getInstanceSettings()
+ * .getRetrySettings()
+ * .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
- * BigtableInstanceAdminStubSettings baseBigtableInstanceAdminSettings = baseBigtableInstanceAdminSettingsBuilder.build();
- *
- *
+ * BigtableInstanceAdminStubSettings baseBigtableInstanceAdminSettings =
+ * baseBigtableInstanceAdminSettingsBuilder.build();
+ * }
*/
-@Generated("by gapic-generator")
-@BetaApi
+@Generated("by gapic-generator-java")
public class BigtableInstanceAdminStubSettings
extends StubSettings {
/** The default scopes of the service. */
@@ -125,10 +127,8 @@ public class BigtableInstanceAdminStubSettings
.add("https://www.googleapis.com/auth/bigtable.admin")
.add("https://www.googleapis.com/auth/bigtable.admin.cluster")
.add("https://www.googleapis.com/auth/bigtable.admin.instance")
- .add("https://www.googleapis.com/auth/bigtable.admin.table")
.add("https://www.googleapis.com/auth/cloud-bigtable.admin")
.add("https://www.googleapis.com/auth/cloud-bigtable.admin.cluster")
- .add("https://www.googleapis.com/auth/cloud-bigtable.admin.table")
.add("https://www.googleapis.com/auth/cloud-platform")
.add("https://www.googleapis.com/auth/cloud-platform.read-only")
.build();
@@ -139,6 +139,7 @@ public class BigtableInstanceAdminStubSettings
private final UnaryCallSettings getInstanceSettings;
private final UnaryCallSettings
listInstancesSettings;
+ private final UnaryCallSettings updateInstanceSettings;
private final UnaryCallSettings
partialUpdateInstanceSettings;
private final OperationCallSettings<
@@ -168,13 +169,68 @@ public class BigtableInstanceAdminStubSettings
private final UnaryCallSettings
testIamPermissionsSettings;
+ private static final PagedListDescriptor<
+ ListAppProfilesRequest, ListAppProfilesResponse, AppProfile>
+ LIST_APP_PROFILES_PAGE_STR_DESC =
+ new PagedListDescriptor() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListAppProfilesRequest injectToken(
+ ListAppProfilesRequest payload, String token) {
+ return ListAppProfilesRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListAppProfilesRequest injectPageSize(
+ ListAppProfilesRequest payload, int pageSize) {
+ return ListAppProfilesRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListAppProfilesRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListAppProfilesResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(ListAppProfilesResponse payload) {
+ return payload.getAppProfilesList() == null
+ ? ImmutableList.of()
+ : payload.getAppProfilesList();
+ }
+ };
+
+ private static final PagedListResponseFactory<
+ ListAppProfilesRequest, ListAppProfilesResponse, ListAppProfilesPagedResponse>
+ LIST_APP_PROFILES_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListAppProfilesRequest, ListAppProfilesResponse, ListAppProfilesPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListAppProfilesRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext pageContext =
+ PageContext.create(callable, LIST_APP_PROFILES_PAGE_STR_DESC, request, context);
+ return ListAppProfilesPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
/** Returns the object with the settings used for calls to createInstance. */
public UnaryCallSettings createInstanceSettings() {
return createInstanceSettings;
}
/** Returns the object with the settings used for calls to createInstance. */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings
createInstanceOperationSettings() {
return createInstanceOperationSettings;
@@ -190,6 +246,11 @@ public UnaryCallSettings listInstan
return listInstancesSettings;
}
+ /** Returns the object with the settings used for calls to updateInstance. */
+ public UnaryCallSettings updateInstanceSettings() {
+ return updateInstanceSettings;
+ }
+
/** Returns the object with the settings used for calls to partialUpdateInstance. */
public UnaryCallSettings
partialUpdateInstanceSettings() {
@@ -197,7 +258,6 @@ public UnaryCallSettings listInstan
}
/** Returns the object with the settings used for calls to partialUpdateInstance. */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings
partialUpdateInstanceOperationSettings() {
return partialUpdateInstanceOperationSettings;
@@ -214,7 +274,6 @@ public UnaryCallSettings createClusterSettings(
}
/** Returns the object with the settings used for calls to createCluster. */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings
createClusterOperationSettings() {
return createClusterOperationSettings;
@@ -236,7 +295,6 @@ public UnaryCallSettings updateClusterSettings() {
}
/** Returns the object with the settings used for calls to updateCluster. */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings
updateClusterOperationSettings() {
return updateClusterOperationSettings;
@@ -270,7 +328,6 @@ public UnaryCallSettings updateAppProfileSet
}
/** Returns the object with the settings used for calls to updateAppProfile. */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings
updateAppProfileOperationSettings() {
return updateAppProfileOperationSettings;
@@ -303,10 +360,10 @@ public BigtableInstanceAdminStub createStub() throws IOException {
.getTransportName()
.equals(GrpcTransportChannel.getGrpcTransportName())) {
return GrpcBigtableInstanceAdminStub.create(this);
- } else {
- throw new UnsupportedOperationException(
- "Transport not supported: " + getTransportChannelProvider().getTransportName());
}
+ throw new UnsupportedOperationException(
+ String.format(
+ "Transport not supported: %s", getTransportChannelProvider().getTransportName()));
}
/** Returns a builder for the default ExecutorProvider for this service. */
@@ -370,6 +427,7 @@ protected BigtableInstanceAdminStubSettings(Builder settingsBuilder) throws IOEx
createInstanceOperationSettings = settingsBuilder.createInstanceOperationSettings().build();
getInstanceSettings = settingsBuilder.getInstanceSettings().build();
listInstancesSettings = settingsBuilder.listInstancesSettings().build();
+ updateInstanceSettings = settingsBuilder.updateInstanceSettings().build();
partialUpdateInstanceSettings = settingsBuilder.partialUpdateInstanceSettings().build();
partialUpdateInstanceOperationSettings =
settingsBuilder.partialUpdateInstanceOperationSettings().build();
@@ -392,67 +450,10 @@ protected BigtableInstanceAdminStubSettings(Builder settingsBuilder) throws IOEx
testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build();
}
- private static final PagedListDescriptor<
- ListAppProfilesRequest, ListAppProfilesResponse, AppProfile>
- LIST_APP_PROFILES_PAGE_STR_DESC =
- new PagedListDescriptor() {
- @Override
- public String emptyToken() {
- return "";
- }
-
- @Override
- public ListAppProfilesRequest injectToken(
- ListAppProfilesRequest payload, String token) {
- return ListAppProfilesRequest.newBuilder(payload).setPageToken(token).build();
- }
-
- @Override
- public ListAppProfilesRequest injectPageSize(
- ListAppProfilesRequest payload, int pageSize) {
- return ListAppProfilesRequest.newBuilder(payload).setPageSize(pageSize).build();
- }
-
- @Override
- public Integer extractPageSize(ListAppProfilesRequest payload) {
- return payload.getPageSize();
- }
-
- @Override
- public String extractNextToken(ListAppProfilesResponse payload) {
- return payload.getNextPageToken();
- }
-
- @Override
- public Iterable extractResources(ListAppProfilesResponse payload) {
- return payload.getAppProfilesList() != null
- ? payload.getAppProfilesList()
- : ImmutableList.of();
- }
- };
-
- private static final PagedListResponseFactory<
- ListAppProfilesRequest, ListAppProfilesResponse, ListAppProfilesPagedResponse>
- LIST_APP_PROFILES_PAGE_STR_FACT =
- new PagedListResponseFactory<
- ListAppProfilesRequest, ListAppProfilesResponse, ListAppProfilesPagedResponse>() {
- @Override
- public ApiFuture getFuturePagedResponse(
- UnaryCallable callable,
- ListAppProfilesRequest request,
- ApiCallContext context,
- ApiFuture futureResponse) {
- PageContext pageContext =
- PageContext.create(callable, LIST_APP_PROFILES_PAGE_STR_DESC, request, context);
- return ListAppProfilesPagedResponse.createAsync(pageContext, futureResponse);
- }
- };
-
/** Builder for BigtableInstanceAdminStubSettings. */
public static class Builder
extends StubSettings.Builder {
private final ImmutableList