diff --git a/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableInstanceAdminGrpc.java b/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableInstanceAdminGrpc.java deleted file mode 100644 index f786bb0b33..0000000000 --- a/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableInstanceAdminGrpc.java +++ /dev/null @@ -1,2791 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.bigtable.admin.v2; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * Service for creating, configuring, and deleting Cloud Bigtable Instances and - * Clusters. Provides access to the Instance and Cluster schemas only, not the - * tables' metadata or data stored in those tables. - *- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/bigtable/admin/v2/bigtable_instance_admin.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class BigtableInstanceAdminGrpc { - - private BigtableInstanceAdminGrpc() {} - - public static final java.lang.String SERVICE_NAME = - "google.bigtable.admin.v2.BigtableInstanceAdmin"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.bigtable.admin.v2.CreateInstanceRequest, com.google.longrunning.Operation> - getCreateInstanceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateInstance", - requestType = com.google.bigtable.admin.v2.CreateInstanceRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.bigtable.admin.v2.CreateInstanceRequest, com.google.longrunning.Operation> - getCreateInstanceMethod() { - io.grpc.MethodDescriptor< - com.google.bigtable.admin.v2.CreateInstanceRequest, com.google.longrunning.Operation> - getCreateInstanceMethod; - if ((getCreateInstanceMethod = BigtableInstanceAdminGrpc.getCreateInstanceMethod) == null) { - synchronized (BigtableInstanceAdminGrpc.class) { - if ((getCreateInstanceMethod = BigtableInstanceAdminGrpc.getCreateInstanceMethod) == null) { - BigtableInstanceAdminGrpc.getCreateInstanceMethod = - getCreateInstanceMethod = - io.grpc.MethodDescriptor - .
- * Service for creating, configuring, and deleting Cloud Bigtable Instances and - * Clusters. Provides access to the Instance and Cluster schemas only, not the - * tables' metadata or data stored in those tables. - *- */ - public interface AsyncService { - - /** - * - * - *
- * Create an instance within a project. - * Note that exactly one of Cluster.serve_nodes and - * Cluster.cluster_config.cluster_autoscaling_config can be set. If - * serve_nodes is set to non-zero, then the cluster is manually scaled. If - * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is - * enabled. - *- */ - default void createInstance( - com.google.bigtable.admin.v2.CreateInstanceRequest request, - io.grpc.stub.StreamObserver
- * Gets information about an instance. - *- */ - default void getInstance( - com.google.bigtable.admin.v2.GetInstanceRequest request, - io.grpc.stub.StreamObserver
- * Lists information about instances in a project. - *- */ - default void listInstances( - com.google.bigtable.admin.v2.ListInstancesRequest request, - io.grpc.stub.StreamObserver
- * 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. - *- */ - default void updateInstance( - com.google.bigtable.admin.v2.Instance request, - io.grpc.stub.StreamObserver
- * Partially updates an instance within a project. This method can modify all - * fields of an Instance and is the preferred way to update an Instance. - *- */ - default void partialUpdateInstance( - com.google.bigtable.admin.v2.PartialUpdateInstanceRequest request, - io.grpc.stub.StreamObserver
- * Delete an instance from a project. - *- */ - default void deleteInstance( - com.google.bigtable.admin.v2.DeleteInstanceRequest request, - io.grpc.stub.StreamObserver
- * Creates a cluster within an instance. - * Note that exactly one of Cluster.serve_nodes and - * Cluster.cluster_config.cluster_autoscaling_config can be set. If - * serve_nodes is set to non-zero, then the cluster is manually scaled. If - * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is - * enabled. - *- */ - default void createCluster( - com.google.bigtable.admin.v2.CreateClusterRequest request, - io.grpc.stub.StreamObserver
- * Gets information about a cluster. - *- */ - default void getCluster( - com.google.bigtable.admin.v2.GetClusterRequest request, - io.grpc.stub.StreamObserver
- * Lists information about clusters in an instance. - *- */ - default void listClusters( - com.google.bigtable.admin.v2.ListClustersRequest request, - io.grpc.stub.StreamObserver
- * Updates a cluster within an instance. - * Note that UpdateCluster does not support updating - * cluster_config.cluster_autoscaling_config. In order to update it, you - * must use PartialUpdateCluster. - *- */ - default void updateCluster( - com.google.bigtable.admin.v2.Cluster request, - io.grpc.stub.StreamObserver
- * Partially updates a cluster within a project. This method is the preferred - * way to update a Cluster. - * To enable and update autoscaling, set - * cluster_config.cluster_autoscaling_config. When autoscaling is enabled, - * serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it - * are ignored. Note that an update cannot simultaneously set serve_nodes to - * non-zero and cluster_config.cluster_autoscaling_config to non-empty, and - * also specify both in the update_mask. - * To disable autoscaling, clear cluster_config.cluster_autoscaling_config, - * and explicitly set a serve_node count via the update_mask. - *- */ - default void partialUpdateCluster( - com.google.bigtable.admin.v2.PartialUpdateClusterRequest request, - io.grpc.stub.StreamObserver
- * Deletes a cluster from an instance. - *- */ - default void deleteCluster( - com.google.bigtable.admin.v2.DeleteClusterRequest request, - io.grpc.stub.StreamObserver
- * Creates an app profile within an instance. - *- */ - default void createAppProfile( - com.google.bigtable.admin.v2.CreateAppProfileRequest request, - io.grpc.stub.StreamObserver
- * Gets information about an app profile. - *- */ - default void getAppProfile( - com.google.bigtable.admin.v2.GetAppProfileRequest request, - io.grpc.stub.StreamObserver
- * Lists information about app profiles in an instance. - *- */ - default void listAppProfiles( - com.google.bigtable.admin.v2.ListAppProfilesRequest request, - io.grpc.stub.StreamObserver
- * Updates an app profile within an instance. - *- */ - default void updateAppProfile( - com.google.bigtable.admin.v2.UpdateAppProfileRequest request, - io.grpc.stub.StreamObserver
- * Deletes an app profile from an instance. - *- */ - default void deleteAppProfile( - com.google.bigtable.admin.v2.DeleteAppProfileRequest request, - io.grpc.stub.StreamObserver
- * Gets the access control policy for an instance resource. Returns an empty - * policy if an instance exists but does not have a policy set. - *- */ - default void getIamPolicy( - com.google.iam.v1.GetIamPolicyRequest request, - io.grpc.stub.StreamObserver
- * Sets the access control policy on an instance resource. Replaces any - * existing policy. - *- */ - default void setIamPolicy( - com.google.iam.v1.SetIamPolicyRequest request, - io.grpc.stub.StreamObserver
- * Returns permissions that the caller has on the specified instance resource. - *- */ - default void testIamPermissions( - com.google.iam.v1.TestIamPermissionsRequest request, - io.grpc.stub.StreamObserver
- * Lists hot tablets in a cluster, within the time range provided. Hot - * tablets are ordered based on CPU usage. - *- */ - default void listHotTablets( - com.google.bigtable.admin.v2.ListHotTabletsRequest request, - io.grpc.stub.StreamObserver
- * Service for creating, configuring, and deleting Cloud Bigtable Instances and - * Clusters. Provides access to the Instance and Cluster schemas only, not the - * tables' metadata or data stored in those tables. - *- */ - public abstract static class BigtableInstanceAdminImplBase - implements io.grpc.BindableService, AsyncService { - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return BigtableInstanceAdminGrpc.bindService(this); - } - } - - /** - * A stub to allow clients to do asynchronous rpc calls to service BigtableInstanceAdmin. - * - *
- * Service for creating, configuring, and deleting Cloud Bigtable Instances and - * Clusters. Provides access to the Instance and Cluster schemas only, not the - * tables' metadata or data stored in those tables. - *- */ - public static final class BigtableInstanceAdminStub - extends io.grpc.stub.AbstractAsyncStub
- * Create an instance within a project. - * Note that exactly one of Cluster.serve_nodes and - * Cluster.cluster_config.cluster_autoscaling_config can be set. If - * serve_nodes is set to non-zero, then the cluster is manually scaled. If - * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is - * enabled. - *- */ - public void createInstance( - com.google.bigtable.admin.v2.CreateInstanceRequest request, - io.grpc.stub.StreamObserver
- * Gets information about an instance. - *- */ - public void getInstance( - com.google.bigtable.admin.v2.GetInstanceRequest request, - io.grpc.stub.StreamObserver
- * Lists information about instances in a project. - *- */ - public void listInstances( - com.google.bigtable.admin.v2.ListInstancesRequest request, - io.grpc.stub.StreamObserver
- * 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. - *- */ - public void updateInstance( - com.google.bigtable.admin.v2.Instance request, - io.grpc.stub.StreamObserver
- * Partially updates an instance within a project. This method can modify all - * fields of an Instance and is the preferred way to update an Instance. - *- */ - public void partialUpdateInstance( - com.google.bigtable.admin.v2.PartialUpdateInstanceRequest request, - io.grpc.stub.StreamObserver
- * Delete an instance from a project. - *- */ - public void deleteInstance( - com.google.bigtable.admin.v2.DeleteInstanceRequest request, - io.grpc.stub.StreamObserver
- * Creates a cluster within an instance. - * Note that exactly one of Cluster.serve_nodes and - * Cluster.cluster_config.cluster_autoscaling_config can be set. If - * serve_nodes is set to non-zero, then the cluster is manually scaled. If - * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is - * enabled. - *- */ - public void createCluster( - com.google.bigtable.admin.v2.CreateClusterRequest request, - io.grpc.stub.StreamObserver
- * Gets information about a cluster. - *- */ - public void getCluster( - com.google.bigtable.admin.v2.GetClusterRequest request, - io.grpc.stub.StreamObserver
- * Lists information about clusters in an instance. - *- */ - public void listClusters( - com.google.bigtable.admin.v2.ListClustersRequest request, - io.grpc.stub.StreamObserver
- * Updates a cluster within an instance. - * Note that UpdateCluster does not support updating - * cluster_config.cluster_autoscaling_config. In order to update it, you - * must use PartialUpdateCluster. - *- */ - public void updateCluster( - com.google.bigtable.admin.v2.Cluster request, - io.grpc.stub.StreamObserver
- * Partially updates a cluster within a project. This method is the preferred - * way to update a Cluster. - * To enable and update autoscaling, set - * cluster_config.cluster_autoscaling_config. When autoscaling is enabled, - * serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it - * are ignored. Note that an update cannot simultaneously set serve_nodes to - * non-zero and cluster_config.cluster_autoscaling_config to non-empty, and - * also specify both in the update_mask. - * To disable autoscaling, clear cluster_config.cluster_autoscaling_config, - * and explicitly set a serve_node count via the update_mask. - *- */ - public void partialUpdateCluster( - com.google.bigtable.admin.v2.PartialUpdateClusterRequest request, - io.grpc.stub.StreamObserver
- * Deletes a cluster from an instance. - *- */ - public void deleteCluster( - com.google.bigtable.admin.v2.DeleteClusterRequest request, - io.grpc.stub.StreamObserver
- * Creates an app profile within an instance. - *- */ - public void createAppProfile( - com.google.bigtable.admin.v2.CreateAppProfileRequest request, - io.grpc.stub.StreamObserver
- * Gets information about an app profile. - *- */ - public void getAppProfile( - com.google.bigtable.admin.v2.GetAppProfileRequest request, - io.grpc.stub.StreamObserver
- * Lists information about app profiles in an instance. - *- */ - public void listAppProfiles( - com.google.bigtable.admin.v2.ListAppProfilesRequest request, - io.grpc.stub.StreamObserver
- * Updates an app profile within an instance. - *- */ - public void updateAppProfile( - com.google.bigtable.admin.v2.UpdateAppProfileRequest request, - io.grpc.stub.StreamObserver
- * Deletes an app profile from an instance. - *- */ - public void deleteAppProfile( - com.google.bigtable.admin.v2.DeleteAppProfileRequest request, - io.grpc.stub.StreamObserver
- * Gets the access control policy for an instance resource. Returns an empty - * policy if an instance exists but does not have a policy set. - *- */ - public void getIamPolicy( - com.google.iam.v1.GetIamPolicyRequest request, - io.grpc.stub.StreamObserver
- * Sets the access control policy on an instance resource. Replaces any - * existing policy. - *- */ - public void setIamPolicy( - com.google.iam.v1.SetIamPolicyRequest request, - io.grpc.stub.StreamObserver
- * Returns permissions that the caller has on the specified instance resource. - *- */ - public void testIamPermissions( - com.google.iam.v1.TestIamPermissionsRequest request, - io.grpc.stub.StreamObserver
- * Lists hot tablets in a cluster, within the time range provided. Hot - * tablets are ordered based on CPU usage. - *- */ - public void listHotTablets( - com.google.bigtable.admin.v2.ListHotTabletsRequest request, - io.grpc.stub.StreamObserver
- * Service for creating, configuring, and deleting Cloud Bigtable Instances and - * Clusters. Provides access to the Instance and Cluster schemas only, not the - * tables' metadata or data stored in those tables. - *- */ - public static final class BigtableInstanceAdminBlockingStub - extends io.grpc.stub.AbstractBlockingStub
- * Create an instance within a project. - * Note that exactly one of Cluster.serve_nodes and - * Cluster.cluster_config.cluster_autoscaling_config can be set. If - * serve_nodes is set to non-zero, then the cluster is manually scaled. If - * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is - * enabled. - *- */ - public com.google.longrunning.Operation createInstance( - com.google.bigtable.admin.v2.CreateInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateInstanceMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Gets information about an instance. - *- */ - public com.google.bigtable.admin.v2.Instance getInstance( - com.google.bigtable.admin.v2.GetInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetInstanceMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Lists information about instances in a project. - *- */ - public com.google.bigtable.admin.v2.ListInstancesResponse listInstances( - com.google.bigtable.admin.v2.ListInstancesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListInstancesMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * 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. - *- */ - public com.google.bigtable.admin.v2.Instance updateInstance( - com.google.bigtable.admin.v2.Instance request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateInstanceMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Partially updates an instance within a project. This method can modify all - * fields of an Instance and is the preferred way to update an Instance. - *- */ - public com.google.longrunning.Operation partialUpdateInstance( - com.google.bigtable.admin.v2.PartialUpdateInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getPartialUpdateInstanceMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Delete an instance from a project. - *- */ - public com.google.protobuf.Empty deleteInstance( - com.google.bigtable.admin.v2.DeleteInstanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteInstanceMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Creates a cluster within an instance. - * Note that exactly one of Cluster.serve_nodes and - * Cluster.cluster_config.cluster_autoscaling_config can be set. If - * serve_nodes is set to non-zero, then the cluster is manually scaled. If - * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is - * enabled. - *- */ - public com.google.longrunning.Operation createCluster( - com.google.bigtable.admin.v2.CreateClusterRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateClusterMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Gets information about a cluster. - *- */ - public com.google.bigtable.admin.v2.Cluster getCluster( - com.google.bigtable.admin.v2.GetClusterRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetClusterMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Lists information about clusters in an instance. - *- */ - public com.google.bigtable.admin.v2.ListClustersResponse listClusters( - com.google.bigtable.admin.v2.ListClustersRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListClustersMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Updates a cluster within an instance. - * Note that UpdateCluster does not support updating - * cluster_config.cluster_autoscaling_config. In order to update it, you - * must use PartialUpdateCluster. - *- */ - public com.google.longrunning.Operation updateCluster( - com.google.bigtable.admin.v2.Cluster request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateClusterMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Partially updates a cluster within a project. This method is the preferred - * way to update a Cluster. - * To enable and update autoscaling, set - * cluster_config.cluster_autoscaling_config. When autoscaling is enabled, - * serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it - * are ignored. Note that an update cannot simultaneously set serve_nodes to - * non-zero and cluster_config.cluster_autoscaling_config to non-empty, and - * also specify both in the update_mask. - * To disable autoscaling, clear cluster_config.cluster_autoscaling_config, - * and explicitly set a serve_node count via the update_mask. - *- */ - public com.google.longrunning.Operation partialUpdateCluster( - com.google.bigtable.admin.v2.PartialUpdateClusterRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getPartialUpdateClusterMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Deletes a cluster from an instance. - *- */ - public com.google.protobuf.Empty deleteCluster( - com.google.bigtable.admin.v2.DeleteClusterRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteClusterMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Creates an app profile within an instance. - *- */ - public com.google.bigtable.admin.v2.AppProfile createAppProfile( - com.google.bigtable.admin.v2.CreateAppProfileRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateAppProfileMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Gets information about an app profile. - *- */ - public com.google.bigtable.admin.v2.AppProfile getAppProfile( - com.google.bigtable.admin.v2.GetAppProfileRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetAppProfileMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Lists information about app profiles in an instance. - *- */ - public com.google.bigtable.admin.v2.ListAppProfilesResponse listAppProfiles( - com.google.bigtable.admin.v2.ListAppProfilesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListAppProfilesMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Updates an app profile within an instance. - *- */ - public com.google.longrunning.Operation updateAppProfile( - com.google.bigtable.admin.v2.UpdateAppProfileRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateAppProfileMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Deletes an app profile from an instance. - *- */ - public com.google.protobuf.Empty deleteAppProfile( - com.google.bigtable.admin.v2.DeleteAppProfileRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteAppProfileMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Gets the access control policy for an instance resource. Returns an empty - * policy if an instance exists but does not have a policy set. - *- */ - public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetIamPolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Sets the access control policy on an instance resource. Replaces any - * existing policy. - *- */ - public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSetIamPolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Returns permissions that the caller has on the specified instance resource. - *- */ - public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions( - com.google.iam.v1.TestIamPermissionsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Lists hot tablets in a cluster, within the time range provided. Hot - * tablets are ordered based on CPU usage. - *- */ - public com.google.bigtable.admin.v2.ListHotTabletsResponse listHotTablets( - com.google.bigtable.admin.v2.ListHotTabletsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListHotTabletsMethod(), getCallOptions(), request); - } - } - - /** - * A stub to allow clients to do ListenableFuture-style rpc calls to service - * BigtableInstanceAdmin. - * - *
- * Service for creating, configuring, and deleting Cloud Bigtable Instances and - * Clusters. Provides access to the Instance and Cluster schemas only, not the - * tables' metadata or data stored in those tables. - *- */ - public static final class BigtableInstanceAdminFutureStub - extends io.grpc.stub.AbstractFutureStub
- * Create an instance within a project. - * Note that exactly one of Cluster.serve_nodes and - * Cluster.cluster_config.cluster_autoscaling_config can be set. If - * serve_nodes is set to non-zero, then the cluster is manually scaled. If - * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is - * enabled. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Gets information about an instance. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Lists information about instances in a project. - *- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.bigtable.admin.v2.ListInstancesResponse> - listInstances(com.google.bigtable.admin.v2.ListInstancesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListInstancesMethod(), getCallOptions()), request); - } - - /** - * - * - *
- * 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. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Partially updates an instance within a project. This method can modify all - * fields of an Instance and is the preferred way to update an Instance. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Delete an instance from a project. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Creates a cluster within an instance. - * Note that exactly one of Cluster.serve_nodes and - * Cluster.cluster_config.cluster_autoscaling_config can be set. If - * serve_nodes is set to non-zero, then the cluster is manually scaled. If - * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is - * enabled. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Gets information about a cluster. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Lists information about clusters in an instance. - *- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.bigtable.admin.v2.ListClustersResponse> - listClusters(com.google.bigtable.admin.v2.ListClustersRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListClustersMethod(), getCallOptions()), request); - } - - /** - * - * - *
- * Updates a cluster within an instance. - * Note that UpdateCluster does not support updating - * cluster_config.cluster_autoscaling_config. In order to update it, you - * must use PartialUpdateCluster. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Partially updates a cluster within a project. This method is the preferred - * way to update a Cluster. - * To enable and update autoscaling, set - * cluster_config.cluster_autoscaling_config. When autoscaling is enabled, - * serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it - * are ignored. Note that an update cannot simultaneously set serve_nodes to - * non-zero and cluster_config.cluster_autoscaling_config to non-empty, and - * also specify both in the update_mask. - * To disable autoscaling, clear cluster_config.cluster_autoscaling_config, - * and explicitly set a serve_node count via the update_mask. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Deletes a cluster from an instance. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Creates an app profile within an instance. - *- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.bigtable.admin.v2.AppProfile> - createAppProfile(com.google.bigtable.admin.v2.CreateAppProfileRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateAppProfileMethod(), getCallOptions()), request); - } - - /** - * - * - *
- * Gets information about an app profile. - *- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.bigtable.admin.v2.AppProfile> - getAppProfile(com.google.bigtable.admin.v2.GetAppProfileRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetAppProfileMethod(), getCallOptions()), request); - } - - /** - * - * - *
- * Lists information about app profiles in an instance. - *- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.bigtable.admin.v2.ListAppProfilesResponse> - listAppProfiles(com.google.bigtable.admin.v2.ListAppProfilesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListAppProfilesMethod(), getCallOptions()), request); - } - - /** - * - * - *
- * Updates an app profile within an instance. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Deletes an app profile from an instance. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Gets the access control policy for an instance resource. Returns an empty - * policy if an instance exists but does not have a policy set. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Sets the access control policy on an instance resource. Replaces any - * existing policy. - *- */ - public com.google.common.util.concurrent.ListenableFuture
- * Returns permissions that the caller has on the specified instance resource. - *- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.iam.v1.TestIamPermissionsResponse> - testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), request); - } - - /** - * - * - *
- * Lists hot tablets in a cluster, within the time range provided. Hot - * tablets are ordered based on CPU usage. - *- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.bigtable.admin.v2.ListHotTabletsResponse> - listHotTablets(com.google.bigtable.admin.v2.ListHotTabletsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListHotTabletsMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_CREATE_INSTANCE = 0; - private static final int METHODID_GET_INSTANCE = 1; - private static final int METHODID_LIST_INSTANCES = 2; - private static final int METHODID_UPDATE_INSTANCE = 3; - private static final int METHODID_PARTIAL_UPDATE_INSTANCE = 4; - private static final int METHODID_DELETE_INSTANCE = 5; - private static final int METHODID_CREATE_CLUSTER = 6; - private static final int METHODID_GET_CLUSTER = 7; - private static final int METHODID_LIST_CLUSTERS = 8; - private static final int METHODID_UPDATE_CLUSTER = 9; - private static final int METHODID_PARTIAL_UPDATE_CLUSTER = 10; - private static final int METHODID_DELETE_CLUSTER = 11; - private static final int METHODID_CREATE_APP_PROFILE = 12; - private static final int METHODID_GET_APP_PROFILE = 13; - private static final int METHODID_LIST_APP_PROFILES = 14; - private static final int METHODID_UPDATE_APP_PROFILE = 15; - private static final int METHODID_DELETE_APP_PROFILE = 16; - private static final int METHODID_GET_IAM_POLICY = 17; - private static final int METHODID_SET_IAM_POLICY = 18; - private static final int METHODID_TEST_IAM_PERMISSIONS = 19; - private static final int METHODID_LIST_HOT_TABLETS = 20; - - private static final class MethodHandlers
- * Service for reading from and writing to existing Bigtable tables. - *- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/bigtable/v2/bigtable.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class BigtableGrpc { - - private BigtableGrpc() {} - - public static final java.lang.String SERVICE_NAME = "google.bigtable.v2.Bigtable"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.bigtable.v2.ReadRowsRequest, com.google.bigtable.v2.ReadRowsResponse> - getReadRowsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ReadRows", - requestType = com.google.bigtable.v2.ReadRowsRequest.class, - responseType = com.google.bigtable.v2.ReadRowsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor< - com.google.bigtable.v2.ReadRowsRequest, com.google.bigtable.v2.ReadRowsResponse> - getReadRowsMethod() { - io.grpc.MethodDescriptor< - com.google.bigtable.v2.ReadRowsRequest, com.google.bigtable.v2.ReadRowsResponse> - getReadRowsMethod; - if ((getReadRowsMethod = BigtableGrpc.getReadRowsMethod) == null) { - synchronized (BigtableGrpc.class) { - if ((getReadRowsMethod = BigtableGrpc.getReadRowsMethod) == null) { - BigtableGrpc.getReadRowsMethod = - getReadRowsMethod = - io.grpc.MethodDescriptor - .
- * Service for reading from and writing to existing Bigtable tables. - *- */ - public interface AsyncService { - - /** - * - * - *
- * Streams back the contents of all requested rows in key order, optionally - * applying the same Reader filter to each. Depending on their size, - * rows and cells may be broken up across multiple responses, but - * atomicity of each row will still be preserved. See the - * ReadRowsResponse documentation for details. - *- */ - default void readRows( - com.google.bigtable.v2.ReadRowsRequest request, - io.grpc.stub.StreamObserver
- * Returns a sample of row keys in the table. The returned row keys will - * delimit contiguous sections of the table of approximately equal size, - * which can be used to break up the data for distributed tasks like - * mapreduces. - *- */ - default void sampleRowKeys( - com.google.bigtable.v2.SampleRowKeysRequest request, - io.grpc.stub.StreamObserver
- * Mutates a row atomically. Cells already present in the row are left - * unchanged unless explicitly changed by `mutation`. - *- */ - default void mutateRow( - com.google.bigtable.v2.MutateRowRequest request, - io.grpc.stub.StreamObserver
- * Mutates multiple rows in a batch. Each individual row is mutated - * atomically as in MutateRow, but the entire batch is not executed - * atomically. - *- */ - default void mutateRows( - com.google.bigtable.v2.MutateRowsRequest request, - io.grpc.stub.StreamObserver
- * Mutates a row atomically based on the output of a predicate Reader filter. - *- */ - default void checkAndMutateRow( - com.google.bigtable.v2.CheckAndMutateRowRequest request, - io.grpc.stub.StreamObserver
- * Warm up associated instance metadata for this connection. - * This call is not required but may be useful for connection keep-alive. - *- */ - default void pingAndWarm( - com.google.bigtable.v2.PingAndWarmRequest request, - io.grpc.stub.StreamObserver
- * Modifies a row atomically on the server. The method reads the latest - * existing timestamp and value from the specified columns and writes a new - * entry based on pre-defined read/modify/write rules. The new value for the - * timestamp is the greater of the existing timestamp or the current server - * time. The method returns the new contents of all modified cells. - *- */ - default void readModifyWriteRow( - com.google.bigtable.v2.ReadModifyWriteRowRequest request, - io.grpc.stub.StreamObserver
- * NOTE: This API is intended to be used by Apache Beam BigtableIO. - * Returns the current list of partitions that make up the table's - * change stream. The union of partitions will cover the entire keyspace. - * Partitions can be read with `ReadChangeStream`. - *- */ - default void generateInitialChangeStreamPartitions( - com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest request, - io.grpc.stub.StreamObserver< - com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGenerateInitialChangeStreamPartitionsMethod(), responseObserver); - } - - /** - * - * - *
- * NOTE: This API is intended to be used by Apache Beam BigtableIO. - * Reads changes from a table's change stream. Changes will - * reflect both user-initiated mutations and mutations that are caused by - * garbage collection. - *- */ - default void readChangeStream( - com.google.bigtable.v2.ReadChangeStreamRequest request, - io.grpc.stub.StreamObserver
- * Service for reading from and writing to existing Bigtable tables. - *- */ - public abstract static class BigtableImplBase implements io.grpc.BindableService, AsyncService { - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return BigtableGrpc.bindService(this); - } - } - - /** - * A stub to allow clients to do asynchronous rpc calls to service Bigtable. - * - *
- * Service for reading from and writing to existing Bigtable tables. - *- */ - public static final class BigtableStub extends io.grpc.stub.AbstractAsyncStub
- * Streams back the contents of all requested rows in key order, optionally - * applying the same Reader filter to each. Depending on their size, - * rows and cells may be broken up across multiple responses, but - * atomicity of each row will still be preserved. See the - * ReadRowsResponse documentation for details. - *- */ - public void readRows( - com.google.bigtable.v2.ReadRowsRequest request, - io.grpc.stub.StreamObserver
- * Returns a sample of row keys in the table. The returned row keys will - * delimit contiguous sections of the table of approximately equal size, - * which can be used to break up the data for distributed tasks like - * mapreduces. - *- */ - public void sampleRowKeys( - com.google.bigtable.v2.SampleRowKeysRequest request, - io.grpc.stub.StreamObserver
- * Mutates a row atomically. Cells already present in the row are left - * unchanged unless explicitly changed by `mutation`. - *- */ - public void mutateRow( - com.google.bigtable.v2.MutateRowRequest request, - io.grpc.stub.StreamObserver
- * Mutates multiple rows in a batch. Each individual row is mutated - * atomically as in MutateRow, but the entire batch is not executed - * atomically. - *- */ - public void mutateRows( - com.google.bigtable.v2.MutateRowsRequest request, - io.grpc.stub.StreamObserver
- * Mutates a row atomically based on the output of a predicate Reader filter. - *- */ - public void checkAndMutateRow( - com.google.bigtable.v2.CheckAndMutateRowRequest request, - io.grpc.stub.StreamObserver
- * Warm up associated instance metadata for this connection. - * This call is not required but may be useful for connection keep-alive. - *- */ - public void pingAndWarm( - com.google.bigtable.v2.PingAndWarmRequest request, - io.grpc.stub.StreamObserver
- * Modifies a row atomically on the server. The method reads the latest - * existing timestamp and value from the specified columns and writes a new - * entry based on pre-defined read/modify/write rules. The new value for the - * timestamp is the greater of the existing timestamp or the current server - * time. The method returns the new contents of all modified cells. - *- */ - public void readModifyWriteRow( - com.google.bigtable.v2.ReadModifyWriteRowRequest request, - io.grpc.stub.StreamObserver
- * NOTE: This API is intended to be used by Apache Beam BigtableIO. - * Returns the current list of partitions that make up the table's - * change stream. The union of partitions will cover the entire keyspace. - * Partitions can be read with `ReadChangeStream`. - *- */ - public void generateInitialChangeStreamPartitions( - com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest request, - io.grpc.stub.StreamObserver< - com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse> - responseObserver) { - io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getGenerateInitialChangeStreamPartitionsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
- * NOTE: This API is intended to be used by Apache Beam BigtableIO. - * Reads changes from a table's change stream. Changes will - * reflect both user-initiated mutations and mutations that are caused by - * garbage collection. - *- */ - public void readChangeStream( - com.google.bigtable.v2.ReadChangeStreamRequest request, - io.grpc.stub.StreamObserver
- * Service for reading from and writing to existing Bigtable tables. - *- */ - public static final class BigtableBlockingStub - extends io.grpc.stub.AbstractBlockingStub
- * Streams back the contents of all requested rows in key order, optionally - * applying the same Reader filter to each. Depending on their size, - * rows and cells may be broken up across multiple responses, but - * atomicity of each row will still be preserved. See the - * ReadRowsResponse documentation for details. - *- */ - public java.util.Iterator
- * Returns a sample of row keys in the table. The returned row keys will - * delimit contiguous sections of the table of approximately equal size, - * which can be used to break up the data for distributed tasks like - * mapreduces. - *- */ - public java.util.Iterator
- * Mutates a row atomically. Cells already present in the row are left - * unchanged unless explicitly changed by `mutation`. - *- */ - public com.google.bigtable.v2.MutateRowResponse mutateRow( - com.google.bigtable.v2.MutateRowRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getMutateRowMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Mutates multiple rows in a batch. Each individual row is mutated - * atomically as in MutateRow, but the entire batch is not executed - * atomically. - *- */ - public java.util.Iterator
- * Mutates a row atomically based on the output of a predicate Reader filter. - *- */ - public com.google.bigtable.v2.CheckAndMutateRowResponse checkAndMutateRow( - com.google.bigtable.v2.CheckAndMutateRowRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCheckAndMutateRowMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Warm up associated instance metadata for this connection. - * This call is not required but may be useful for connection keep-alive. - *- */ - public com.google.bigtable.v2.PingAndWarmResponse pingAndWarm( - com.google.bigtable.v2.PingAndWarmRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getPingAndWarmMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * Modifies a row atomically on the server. The method reads the latest - * existing timestamp and value from the specified columns and writes a new - * entry based on pre-defined read/modify/write rules. The new value for the - * timestamp is the greater of the existing timestamp or the current server - * time. The method returns the new contents of all modified cells. - *- */ - public com.google.bigtable.v2.ReadModifyWriteRowResponse readModifyWriteRow( - com.google.bigtable.v2.ReadModifyWriteRowRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getReadModifyWriteRowMethod(), getCallOptions(), request); - } - - /** - * - * - *
- * NOTE: This API is intended to be used by Apache Beam BigtableIO. - * Returns the current list of partitions that make up the table's - * change stream. The union of partitions will cover the entire keyspace. - * Partitions can be read with `ReadChangeStream`. - *- */ - public java.util.Iterator
- * NOTE: This API is intended to be used by Apache Beam BigtableIO. - * Reads changes from a table's change stream. Changes will - * reflect both user-initiated mutations and mutations that are caused by - * garbage collection. - *- */ - public java.util.Iterator
- * Service for reading from and writing to existing Bigtable tables. - *- */ - public static final class BigtableFutureStub - extends io.grpc.stub.AbstractFutureStub
- * Mutates a row atomically. Cells already present in the row are left - * unchanged unless explicitly changed by `mutation`. - *- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.bigtable.v2.MutateRowResponse> - mutateRow(com.google.bigtable.v2.MutateRowRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getMutateRowMethod(), getCallOptions()), request); - } - - /** - * - * - *
- * Mutates a row atomically based on the output of a predicate Reader filter. - *- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.bigtable.v2.CheckAndMutateRowResponse> - checkAndMutateRow(com.google.bigtable.v2.CheckAndMutateRowRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCheckAndMutateRowMethod(), getCallOptions()), request); - } - - /** - * - * - *
- * Warm up associated instance metadata for this connection. - * This call is not required but may be useful for connection keep-alive. - *- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.bigtable.v2.PingAndWarmResponse> - pingAndWarm(com.google.bigtable.v2.PingAndWarmRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getPingAndWarmMethod(), getCallOptions()), request); - } - - /** - * - * - *
- * Modifies a row atomically on the server. The method reads the latest - * existing timestamp and value from the specified columns and writes a new - * entry based on pre-defined read/modify/write rules. The new value for the - * timestamp is the greater of the existing timestamp or the current server - * time. The method returns the new contents of all modified cells. - *- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.bigtable.v2.ReadModifyWriteRowResponse> - readModifyWriteRow(com.google.bigtable.v2.ReadModifyWriteRowRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getReadModifyWriteRowMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_READ_ROWS = 0; - private static final int METHODID_SAMPLE_ROW_KEYS = 1; - private static final int METHODID_MUTATE_ROW = 2; - private static final int METHODID_MUTATE_ROWS = 3; - private static final int METHODID_CHECK_AND_MUTATE_ROW = 4; - private static final int METHODID_PING_AND_WARM = 5; - private static final int METHODID_READ_MODIFY_WRITE_ROW = 6; - private static final int METHODID_GENERATE_INITIAL_CHANGE_STREAM_PARTITIONS = 7; - private static final int METHODID_READ_CHANGE_STREAM = 8; - - private static final class MethodHandlers
This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]"); + * Instance response = baseBigtableInstanceAdminClient.getInstance(name); + * } + * }+ * + *
Note: close() needs to be called on the BaseBigtableInstanceAdminClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + *
Method | + *Description | + *Method Variants | + *
---|---|---|
CreateInstance |
+ * Create an instance within a project. + * Note that exactly one of Cluster.serve_nodes and Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is enabled. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetInstance |
+ * Gets information about an instance. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListInstances |
+ * Lists information about instances in a project. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateInstance |
+ * 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. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
PartialUpdateInstance |
+ * Partially updates an instance within a project. This method can modify all fields of an Instance and is the preferred way to update an Instance. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteInstance |
+ * Delete an instance from a project. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateCluster |
+ * Creates a cluster within an instance. + * Note that exactly one of Cluster.serve_nodes and Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is enabled. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetCluster |
+ * Gets information about a cluster. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListClusters |
+ * Lists information about clusters in an instance. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateCluster |
+ * Updates a cluster within an instance. + * Note that UpdateCluster does not support updating cluster_config.cluster_autoscaling_config. In order to update it, you must use PartialUpdateCluster. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
PartialUpdateCluster |
+ * Partially updates a cluster within a project. This method is the preferred way to update a Cluster. + * To enable and update autoscaling, set cluster_config.cluster_autoscaling_config. When autoscaling is enabled, serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it are ignored. Note that an update cannot simultaneously set serve_nodes to non-zero and cluster_config.cluster_autoscaling_config to non-empty, and also specify both in the update_mask. + * To disable autoscaling, clear cluster_config.cluster_autoscaling_config, and explicitly set a serve_node count via the update_mask. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteCluster |
+ * Deletes a cluster from an instance. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateAppProfile |
+ * Creates an app profile within an instance. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetAppProfile |
+ * Gets information about an app profile. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListAppProfiles |
+ * Lists information about app profiles in an instance. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateAppProfile |
+ * Updates an app profile within an instance. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteAppProfile |
+ * Deletes an app profile from an instance. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetIamPolicy |
+ * Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
SetIamPolicy |
+ * Sets the access control policy on an instance resource. Replaces any existing policy. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
TestIamPermissions |
+ * Returns permissions that the caller has on the specified instance resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListHotTablets |
+ * Lists hot tablets in a cluster, within the time range provided. Hot tablets are ordered based on CPU usage. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of + * BaseBigtableInstanceAdminSettings to create(). For example: + * + *
To customize credentials: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * BaseBigtableInstanceAdminSettings baseBigtableInstanceAdminSettings = + * BaseBigtableInstanceAdminSettings.newBuilder() + * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + * .build(); + * BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create(baseBigtableInstanceAdminSettings); + * }+ * + *
To customize the endpoint: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * BaseBigtableInstanceAdminSettings baseBigtableInstanceAdminSettings = + * BaseBigtableInstanceAdminSettings.newBuilder().setEndpoint(myEndpoint).build(); + * BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create(baseBigtableInstanceAdminSettings); + * }+ * + *
Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class BaseBigtableInstanceAdminClient implements BackgroundResource { + private final BaseBigtableInstanceAdminSettings settings; + private final BigtableInstanceAdminStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of BaseBigtableInstanceAdminClient with default settings. */ + public static final BaseBigtableInstanceAdminClient create() throws IOException { + return create(BaseBigtableInstanceAdminSettings.newBuilder().build()); + } + + /** + * Constructs an instance of BaseBigtableInstanceAdminClient, using the given settings. The + * channels are created based on the settings passed in, or defaults for any settings that are not + * set. + */ + public static final BaseBigtableInstanceAdminClient create( + BaseBigtableInstanceAdminSettings settings) throws IOException { + return new BaseBigtableInstanceAdminClient(settings); + } + + /** + * Constructs an instance of BaseBigtableInstanceAdminClient, using the given stub for making + * calls. This is for advanced usage - prefer using create(BaseBigtableInstanceAdminSettings). + */ + public static final BaseBigtableInstanceAdminClient create(BigtableInstanceAdminStub stub) { + return new BaseBigtableInstanceAdminClient(stub); + } + + /** + * Constructs an instance of BaseBigtableInstanceAdminClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected BaseBigtableInstanceAdminClient(BaseBigtableInstanceAdminSettings settings) + throws IOException { + this.settings = settings; + this.stub = ((BigtableInstanceAdminStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + protected BaseBigtableInstanceAdminClient(BigtableInstanceAdminStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final BaseBigtableInstanceAdminSettings getSettings() { + return settings; + } + + public BigtableInstanceAdminStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create an instance within a project. + * + *
Note that exactly one of Cluster.serve_nodes and + * Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to + * non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is + * non-empty, then autoscaling is enabled. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * ProjectName parent = ProjectName.of("[PROJECT]"); + * String instanceId = "instanceId902024336"; + * Instance instance = Instance.newBuilder().build(); + * Map+ * + * @param parent Required. The unique name of the project in which to create the new instance. + * Values are of the form `projects/{project}`. + * @param instanceId Required. The ID to be used when referring to the new instance within its + * project, e.g., just `myinstance` rather than `projects/myproject/instances/myinstance`. + * @param instance Required. The instance to create. Fields marked `OutputOnly` must be left + * blank. + * @param clusters Required. The clusters to be created within the instance, mapped by desired + * cluster ID, e.g., just `mycluster` rather than + * `projects/myproject/instances/myinstance/clusters/mycluster`. Fields marked `OutputOnly` + * must be left blank. Currently, at most four clusters can be specified. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFutureclusters = new HashMap<>(); + * Instance response = + * baseBigtableInstanceAdminClient + * .createInstanceAsync(parent, instanceId, instance, clusters) + * .get(); + * } + * }
Note that exactly one of Cluster.serve_nodes and + * Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to + * non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is + * non-empty, then autoscaling is enabled. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * String parent = ProjectName.of("[PROJECT]").toString(); + * String instanceId = "instanceId902024336"; + * Instance instance = Instance.newBuilder().build(); + * Map+ * + * @param parent Required. The unique name of the project in which to create the new instance. + * Values are of the form `projects/{project}`. + * @param instanceId Required. The ID to be used when referring to the new instance within its + * project, e.g., just `myinstance` rather than `projects/myproject/instances/myinstance`. + * @param instance Required. The instance to create. Fields marked `OutputOnly` must be left + * blank. + * @param clusters Required. The clusters to be created within the instance, mapped by desired + * cluster ID, e.g., just `mycluster` rather than + * `projects/myproject/instances/myinstance/clusters/mycluster`. Fields marked `OutputOnly` + * must be left blank. Currently, at most four clusters can be specified. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFutureclusters = new HashMap<>(); + * Instance response = + * baseBigtableInstanceAdminClient + * .createInstanceAsync(parent, instanceId, instance, clusters) + * .get(); + * } + * }
Note that exactly one of Cluster.serve_nodes and + * Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to + * non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is + * non-empty, then autoscaling is enabled. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * CreateInstanceRequest request = + * CreateInstanceRequest.newBuilder() + * .setParent(ProjectName.of("[PROJECT]").toString()) + * .setInstanceId("instanceId902024336") + * .setInstance(Instance.newBuilder().build()) + * .putAllClusters(new HashMap+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture()) + * .build(); + * Instance response = baseBigtableInstanceAdminClient.createInstanceAsync(request).get(); + * } + * }
Note that exactly one of Cluster.serve_nodes and + * Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to + * non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is + * non-empty, then autoscaling is enabled. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * CreateInstanceRequest request = + * CreateInstanceRequest.newBuilder() + * .setParent(ProjectName.of("[PROJECT]").toString()) + * .setInstanceId("instanceId902024336") + * .setInstance(Instance.newBuilder().build()) + * .putAllClusters(new HashMap+ */ + public final OperationCallable()) + * .build(); + * OperationFuture future = + * baseBigtableInstanceAdminClient.createInstanceOperationCallable().futureCall(request); + * // Do something. + * Instance response = future.get(); + * } + * }
Note that exactly one of Cluster.serve_nodes and + * Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to + * non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is + * non-empty, then autoscaling is enabled. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * CreateInstanceRequest request = + * CreateInstanceRequest.newBuilder() + * .setParent(ProjectName.of("[PROJECT]").toString()) + * .setInstanceId("instanceId902024336") + * .setInstance(Instance.newBuilder().build()) + * .putAllClusters(new HashMap+ */ + public final UnaryCallable()) + * .build(); + * ApiFuture future = + * baseBigtableInstanceAdminClient.createInstanceCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Instance getInstance(InstanceName name) { + GetInstanceRequest request = + GetInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about an instance. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Instance getInstance(String name) { + GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name).build(); + return getInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about an instance. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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 + */ + public final Instance getInstance(GetInstanceRequest request) { + return getInstanceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about an instance. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * GetInstanceRequest request = + * GetInstanceRequest.newBuilder() + * .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * baseBigtableInstanceAdminClient.getInstanceCallable().futureCall(request); + * // Do something. + * Instance response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstancesResponse listInstances(ProjectName parent) { + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listInstances(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about instances in a project. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstancesResponse listInstances(String parent) { + ListInstancesRequest request = ListInstancesRequest.newBuilder().setParent(parent).build(); + return listInstances(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about instances in a project. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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 + */ + public final ListInstancesResponse listInstances(ListInstancesRequest request) { + return listInstancesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about instances in a project. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * ListInstancesRequest request = + * ListInstancesRequest.newBuilder() + * .setParent(ProjectName.of("[PROJECT]").toString()) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * baseBigtableInstanceAdminClient.listInstancesCallable().futureCall(request); + * // Do something. + * ListInstancesResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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. + * + *()) + * .setCreateTime(Timestamp.newBuilder().build()) + * .setSatisfiesPzs(true) + * .build(); + * Instance response = baseBigtableInstanceAdminClient.updateInstance(request); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * Instance request = + * Instance.newBuilder() + * .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + * .setDisplayName("displayName1714148973") + * .putAllLabels(new HashMap+ */ + public final UnaryCallable()) + * .setCreateTime(Timestamp.newBuilder().build()) + * .setSatisfiesPzs(true) + * .build(); + * ApiFuture future = + * baseBigtableInstanceAdminClient.updateInstanceCallable().futureCall(request); + * // Do something. + * Instance response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * Instance instance = Instance.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * 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 + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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 + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * PartialUpdateInstanceRequest request = + * PartialUpdateInstanceRequest.newBuilder() + * .setInstance(Instance.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * baseBigtableInstanceAdminClient + * .partialUpdateInstanceOperationCallable() + * .futureCall(request); + * // Do something. + * Instance response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * PartialUpdateInstanceRequest request = + * PartialUpdateInstanceRequest.newBuilder() + * .setInstance(Instance.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * baseBigtableInstanceAdminClient.partialUpdateInstanceCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteInstance(InstanceName name) { + DeleteInstanceRequest request = + DeleteInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an instance from a project. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteInstance(String name) { + DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder().setName(name).build(); + deleteInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an instance from a project. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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 + */ + public final void deleteInstance(DeleteInstanceRequest request) { + deleteInstanceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an instance from a project. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * DeleteInstanceRequest request = + * DeleteInstanceRequest.newBuilder() + * .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * baseBigtableInstanceAdminClient.deleteInstanceCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Note that exactly one of Cluster.serve_nodes and + * Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to + * non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is + * non-empty, then autoscaling is enabled. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + * String clusterId = "clusterId561939637"; + * Cluster cluster = Cluster.newBuilder().build(); + * 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}`. + * @param clusterId Required. The ID to be used when referring to the new cluster within its + * instance, e.g., just `mycluster` rather than + * `projects/myproject/instances/myinstance/clusters/mycluster`. + * @param cluster Required. The cluster to be created. Fields marked `OutputOnly` must be left + * blank. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Note that exactly one of Cluster.serve_nodes and + * Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to + * non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is + * non-empty, then autoscaling is enabled. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString(); + * String clusterId = "clusterId561939637"; + * Cluster cluster = Cluster.newBuilder().build(); + * 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}`. + * @param clusterId Required. The ID to be used when referring to the new cluster within its + * instance, e.g., just `mycluster` rather than + * `projects/myproject/instances/myinstance/clusters/mycluster`. + * @param cluster Required. The cluster to be created. Fields marked `OutputOnly` must be left + * blank. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Note that exactly one of Cluster.serve_nodes and + * Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to + * non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is + * non-empty, then autoscaling is enabled. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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 + */ + public final OperationFuture
Note that exactly one of Cluster.serve_nodes and + * Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to + * non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is + * non-empty, then autoscaling is enabled. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * CreateClusterRequest request = + * CreateClusterRequest.newBuilder() + * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + * .setClusterId("clusterId561939637") + * .setCluster(Cluster.newBuilder().build()) + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * baseBigtableInstanceAdminClient.createClusterOperationCallable().futureCall(request); + * // Do something. + * Cluster response = future.get(); + * } + * }
Note that exactly one of Cluster.serve_nodes and + * Cluster.cluster_config.cluster_autoscaling_config can be set. If serve_nodes is set to + * non-zero, then the cluster is manually scaled. If cluster_config.cluster_autoscaling_config is + * non-empty, then autoscaling is enabled. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * CreateClusterRequest request = + * CreateClusterRequest.newBuilder() + * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + * .setClusterId("clusterId561939637") + * .setCluster(Cluster.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * baseBigtableInstanceAdminClient.createClusterCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Cluster getCluster(ClusterName name) { + GetClusterRequest request = + GetClusterRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getCluster(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a cluster. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Cluster getCluster(String name) { + GetClusterRequest request = GetClusterRequest.newBuilder().setName(name).build(); + return getCluster(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a cluster. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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 + */ + public final Cluster getCluster(GetClusterRequest request) { + return getClusterCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a cluster. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * GetClusterRequest request = + * GetClusterRequest.newBuilder() + * .setName(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * baseBigtableInstanceAdminClient.getClusterCallable().futureCall(request); + * // Do something. + * Cluster response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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 + * `{instance} = '-'` to list Clusters for all Instances in a project, e.g., + * `projects/myproject/instances/-`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListClustersResponse listClusters(InstanceName parent) { + ListClustersRequest request = + ListClustersRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listClusters(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about clusters in an instance. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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 + * `{instance} = '-'` to list Clusters for all Instances in a project, e.g., + * `projects/myproject/instances/-`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListClustersResponse listClusters(String parent) { + ListClustersRequest request = ListClustersRequest.newBuilder().setParent(parent).build(); + return listClusters(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about clusters in an instance. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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 + */ + public final ListClustersResponse listClusters(ListClustersRequest request) { + return listClustersCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about clusters in an instance. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * ListClustersRequest request = + * ListClustersRequest.newBuilder() + * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * baseBigtableInstanceAdminClient.listClustersCallable().futureCall(request); + * // Do something. + * ListClustersResponse response = future.get(); + * } + * }
Note that UpdateCluster does not support updating cluster_config.cluster_autoscaling_config. + * In order to update it, you must use PartialUpdateCluster. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * Cluster request = + * Cluster.newBuilder() + * .setName(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString()) + * .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setServeNodes(-1288838783) + * .setDefaultStorageType(StorageType.forNumber(0)) + * .setEncryptionConfig(Cluster.EncryptionConfig.newBuilder().build()) + * .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 + */ + public final OperationFuture
Note that UpdateCluster does not support updating cluster_config.cluster_autoscaling_config. + * In order to update it, you must use PartialUpdateCluster. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * Cluster request = + * Cluster.newBuilder() + * .setName(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString()) + * .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setServeNodes(-1288838783) + * .setDefaultStorageType(StorageType.forNumber(0)) + * .setEncryptionConfig(Cluster.EncryptionConfig.newBuilder().build()) + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * baseBigtableInstanceAdminClient.updateClusterOperationCallable().futureCall(request); + * // Do something. + * Cluster response = future.get(); + * } + * }
Note that UpdateCluster does not support updating cluster_config.cluster_autoscaling_config. + * In order to update it, you must use PartialUpdateCluster. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * Cluster request = + * Cluster.newBuilder() + * .setName(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString()) + * .setLocation(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setServeNodes(-1288838783) + * .setDefaultStorageType(StorageType.forNumber(0)) + * .setEncryptionConfig(Cluster.EncryptionConfig.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * baseBigtableInstanceAdminClient.updateClusterCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
To enable and update autoscaling, set cluster_config.cluster_autoscaling_config. When + * autoscaling is enabled, serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to + * it are ignored. Note that an update cannot simultaneously set serve_nodes to non-zero and + * cluster_config.cluster_autoscaling_config to non-empty, and also specify both in the + * update_mask. + * + *
To disable autoscaling, clear cluster_config.cluster_autoscaling_config, and explicitly set + * a serve_node count via the update_mask. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * Cluster cluster = Cluster.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * Cluster response = + * baseBigtableInstanceAdminClient.partialUpdateClusterAsync(cluster, updateMask).get(); + * } + * }+ * + * @param cluster Required. The Cluster which contains the partial updates to be applied, subject + * to the update_mask. + * @param updateMask Required. The subset of Cluster fields which should be replaced. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
To enable and update autoscaling, set cluster_config.cluster_autoscaling_config. When + * autoscaling is enabled, serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to + * it are ignored. Note that an update cannot simultaneously set serve_nodes to non-zero and + * cluster_config.cluster_autoscaling_config to non-empty, and also specify both in the + * update_mask. + * + *
To disable autoscaling, clear cluster_config.cluster_autoscaling_config, and explicitly set + * a serve_node count via the update_mask. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * PartialUpdateClusterRequest request = + * PartialUpdateClusterRequest.newBuilder() + * .setCluster(Cluster.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * Cluster response = baseBigtableInstanceAdminClient.partialUpdateClusterAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
To enable and update autoscaling, set cluster_config.cluster_autoscaling_config. When + * autoscaling is enabled, serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to + * it are ignored. Note that an update cannot simultaneously set serve_nodes to non-zero and + * cluster_config.cluster_autoscaling_config to non-empty, and also specify both in the + * update_mask. + * + *
To disable autoscaling, clear cluster_config.cluster_autoscaling_config, and explicitly set + * a serve_node count via the update_mask. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * PartialUpdateClusterRequest request = + * PartialUpdateClusterRequest.newBuilder() + * .setCluster(Cluster.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * baseBigtableInstanceAdminClient + * .partialUpdateClusterOperationCallable() + * .futureCall(request); + * // Do something. + * Cluster response = future.get(); + * } + * }
To enable and update autoscaling, set cluster_config.cluster_autoscaling_config. When + * autoscaling is enabled, serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to + * it are ignored. Note that an update cannot simultaneously set serve_nodes to non-zero and + * cluster_config.cluster_autoscaling_config to non-empty, and also specify both in the + * update_mask. + * + *
To disable autoscaling, clear cluster_config.cluster_autoscaling_config, and explicitly set + * a serve_node count via the update_mask. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * PartialUpdateClusterRequest request = + * PartialUpdateClusterRequest.newBuilder() + * .setCluster(Cluster.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * baseBigtableInstanceAdminClient.partialUpdateClusterCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteCluster(ClusterName name) { + DeleteClusterRequest request = + DeleteClusterRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteCluster(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a cluster from an instance. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteCluster(String name) { + DeleteClusterRequest request = DeleteClusterRequest.newBuilder().setName(name).build(); + deleteCluster(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a cluster from an instance. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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 + */ + public final void deleteCluster(DeleteClusterRequest request) { + deleteClusterCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a cluster from an instance. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * DeleteClusterRequest request = + * DeleteClusterRequest.newBuilder() + * .setName(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * baseBigtableInstanceAdminClient.deleteClusterCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + * String appProfileId = "appProfileId704923523"; + * AppProfile appProfile = AppProfile.newBuilder().build(); + * 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}`. + * @param appProfileId Required. The ID to be used when referring to the new app profile within + * its instance, e.g., just `myprofile` rather than + * `projects/myproject/instances/myinstance/appProfiles/myprofile`. + * @param appProfile Required. The app profile to be created. Fields marked `OutputOnly` will be + * ignored. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AppProfile createAppProfile( + InstanceName parent, String appProfileId, AppProfile appProfile) { + CreateAppProfileRequest request = + CreateAppProfileRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAppProfileId(appProfileId) + .setAppProfile(appProfile) + .build(); + return createAppProfile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an app profile within an instance. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString(); + * String appProfileId = "appProfileId704923523"; + * AppProfile appProfile = AppProfile.newBuilder().build(); + * 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}`. + * @param appProfileId Required. The ID to be used when referring to the new app profile within + * its instance, e.g., just `myprofile` rather than + * `projects/myproject/instances/myinstance/appProfiles/myprofile`. + * @param appProfile Required. The app profile to be created. Fields marked `OutputOnly` will be + * ignored. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AppProfile createAppProfile( + String parent, String appProfileId, AppProfile appProfile) { + CreateAppProfileRequest request = + CreateAppProfileRequest.newBuilder() + .setParent(parent) + .setAppProfileId(appProfileId) + .setAppProfile(appProfile) + .build(); + return createAppProfile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an app profile within an instance. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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 + */ + public final AppProfile createAppProfile(CreateAppProfileRequest request) { + return createAppProfileCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an app profile within an instance. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * CreateAppProfileRequest request = + * CreateAppProfileRequest.newBuilder() + * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + * .setAppProfileId("appProfileId704923523") + * .setAppProfile(AppProfile.newBuilder().build()) + * .setIgnoreWarnings(true) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * baseBigtableInstanceAdminClient.createAppProfileCallable().futureCall(request); + * // Do something. + * AppProfile response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AppProfile getAppProfile(AppProfileName name) { + GetAppProfileRequest request = + GetAppProfileRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAppProfile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about an app profile. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AppProfile getAppProfile(String name) { + GetAppProfileRequest request = GetAppProfileRequest.newBuilder().setName(name).build(); + return getAppProfile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about an app profile. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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 + */ + public final AppProfile getAppProfile(GetAppProfileRequest request) { + return getAppProfileCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about an app profile. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * GetAppProfileRequest request = + * GetAppProfileRequest.newBuilder() + * .setName(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * baseBigtableInstanceAdminClient.getAppProfileCallable().futureCall(request); + * // Do something. + * AppProfile response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); + * 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 + * `{instance} = '-'` to list AppProfiles for all Instances in a project, e.g., + * `projects/myproject/instances/-`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAppProfilesPagedResponse listAppProfiles(InstanceName parent) { + ListAppProfilesRequest request = + ListAppProfilesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAppProfiles(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about app profiles in an instance. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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 + * `{instance} = '-'` to list AppProfiles for all Instances in a project, e.g., + * `projects/myproject/instances/-`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAppProfilesPagedResponse listAppProfiles(String parent) { + ListAppProfilesRequest request = ListAppProfilesRequest.newBuilder().setParent(parent).build(); + return listAppProfiles(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about app profiles in an instance. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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 + */ + public final ListAppProfilesPagedResponse listAppProfiles(ListAppProfilesRequest request) { + return listAppProfilesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about app profiles in an instance. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * ListAppProfilesRequest request = + * ListAppProfilesRequest.newBuilder() + * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * baseBigtableInstanceAdminClient.listAppProfilesPagedCallable().futureCall(request); + * // Do something. + * for (AppProfile element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * ListAppProfilesRequest request = + * ListAppProfilesRequest.newBuilder() + * .setParent(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListAppProfilesResponse response = + * baseBigtableInstanceAdminClient.listAppProfilesCallable().call(request); + * for (AppProfile element : response.getAppProfilesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * AppProfile appProfile = AppProfile.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * 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 + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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 + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * UpdateAppProfileRequest request = + * UpdateAppProfileRequest.newBuilder() + * .setAppProfile(AppProfile.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setIgnoreWarnings(true) + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * baseBigtableInstanceAdminClient.updateAppProfileOperationCallable().futureCall(request); + * // Do something. + * AppProfile response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * UpdateAppProfileRequest request = + * UpdateAppProfileRequest.newBuilder() + * .setAppProfile(AppProfile.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setIgnoreWarnings(true) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * baseBigtableInstanceAdminClient.updateAppProfileCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAppProfile(AppProfileName name) { + DeleteAppProfileRequest request = + DeleteAppProfileRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteAppProfile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an app profile from an instance. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAppProfile(String name) { + DeleteAppProfileRequest request = DeleteAppProfileRequest.newBuilder().setName(name).build(); + deleteAppProfile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an app profile from an instance. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (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 + */ + public final void deleteAppProfile(DeleteAppProfileRequest request) { + deleteAppProfileCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an app profile from an instance. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * DeleteAppProfileRequest request = + * DeleteAppProfileRequest.newBuilder() + * .setName(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString()) + * .setIgnoreWarnings(true) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * baseBigtableInstanceAdminClient.deleteAppProfileCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * ResourceName resource = InstanceName.of("[PROJECT]", "[INSTANCE]"); + * 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. + * @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 an instance resource. Returns an empty policy if an instance + * exists but does not have a policy set. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * String resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").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. + * @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 an instance resource. Returns an empty policy if an instance + * exists but does not have a policy set. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * GetIamPolicyRequest request = + * GetIamPolicyRequest.newBuilder() + * .setResource(InstanceName.of("[PROJECT]", "[INSTANCE]").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 + */ + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // 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: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * GetIamPolicyRequest request = + * GetIamPolicyRequest.newBuilder() + * .setResource(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + * .setOptions(GetPolicyOptions.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * baseBigtableInstanceAdminClient.getIamPolicyCallable().futureCall(request); + * // Do something. + * Policy response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * ResourceName resource = InstanceName.of("[PROJECT]", "[INSTANCE]"); + * 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. + * @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(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. + /** + * Sets the access control policy on an instance resource. Replaces any existing policy. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * String resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString(); + * 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. + * @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 an instance resource. Replaces any existing policy. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * SetIamPolicyRequest request = + * SetIamPolicyRequest.newBuilder() + * .setResource(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + * .setPolicy(Policy.newBuilder().build()) + * .setUpdateMask(FieldMask.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 + */ + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on an instance resource. Replaces any existing policy. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * SetIamPolicyRequest request = + * SetIamPolicyRequest.newBuilder() + * .setResource(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + * .setPolicy(Policy.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * baseBigtableInstanceAdminClient.setIamPolicyCallable().futureCall(request); + * // Do something. + * Policy response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * ResourceName resource = InstanceName.of("[PROJECT]", "[INSTANCE]"); + * List+ * + * @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, Listpermissions = new ArrayList<>(); + * TestIamPermissionsResponse response = + * baseBigtableInstanceAdminClient.testIamPermissions(resource, permissions); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * String resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString(); + * List+ * + * @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, Listpermissions = new ArrayList<>(); + * TestIamPermissionsResponse response = + * baseBigtableInstanceAdminClient.testIamPermissions(resource, permissions); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * TestIamPermissionsRequest request = + * TestIamPermissionsRequest.newBuilder() + * .setResource(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + * .addAllPermissions(new ArrayList+ * + * @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 instance resource. + * + *()) + * .build(); + * TestIamPermissionsResponse response = + * baseBigtableInstanceAdminClient.testIamPermissions(request); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * TestIamPermissionsRequest request = + * TestIamPermissionsRequest.newBuilder() + * .setResource(InstanceName.of("[PROJECT]", "[INSTANCE]").toString()) + * .addAllPermissions(new ArrayList+ */ + public final UnaryCallable()) + * .build(); + * ApiFuture future = + * baseBigtableInstanceAdminClient.testIamPermissionsCallable().futureCall(request); + * // Do something. + * TestIamPermissionsResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]"); + * for (HotTablet element : + * baseBigtableInstanceAdminClient.listHotTablets(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The cluster name to list hot tablets. Value is in the following form: + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListHotTabletsPagedResponse listHotTablets(ClusterName parent) { + ListHotTabletsRequest request = + ListHotTabletsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listHotTablets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists hot tablets in a cluster, within the time range provided. Hot tablets are ordered based + * on CPU usage. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * String parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString(); + * for (HotTablet element : + * baseBigtableInstanceAdminClient.listHotTablets(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The cluster name to list hot tablets. Value is in the following form: + * `projects/{project}/instances/{instance}/clusters/{cluster}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListHotTabletsPagedResponse listHotTablets(String parent) { + ListHotTabletsRequest request = ListHotTabletsRequest.newBuilder().setParent(parent).build(); + return listHotTablets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists hot tablets in a cluster, within the time range provided. Hot tablets are ordered based + * on CPU usage. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * ListHotTabletsRequest request = + * ListHotTabletsRequest.newBuilder() + * .setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString()) + * .setStartTime(Timestamp.newBuilder().build()) + * .setEndTime(Timestamp.newBuilder().build()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (HotTablet element : + * baseBigtableInstanceAdminClient.listHotTablets(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListHotTabletsPagedResponse listHotTablets(ListHotTabletsRequest request) { + return listHotTabletsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists hot tablets in a cluster, within the time range provided. Hot tablets are ordered based + * on CPU usage. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * ListHotTabletsRequest request = + * ListHotTabletsRequest.newBuilder() + * .setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString()) + * .setStartTime(Timestamp.newBuilder().build()) + * .setEndTime(Timestamp.newBuilder().build()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * baseBigtableInstanceAdminClient.listHotTabletsPagedCallable().futureCall(request); + * // Do something. + * for (HotTablet element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = + * BaseBigtableInstanceAdminClient.create()) { + * ListHotTabletsRequest request = + * ListHotTabletsRequest.newBuilder() + * .setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString()) + * .setStartTime(Timestamp.newBuilder().build()) + * .setEndTime(Timestamp.newBuilder().build()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListHotTabletsResponse response = + * baseBigtableInstanceAdminClient.listHotTabletsCallable().call(request); + * for (HotTablet element : response.getHotTabletsList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
The default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the total timeout of getInstance to 30 seconds: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * BaseBigtableInstanceAdminSettings.Builder baseBigtableInstanceAdminSettingsBuilder = + * BaseBigtableInstanceAdminSettings.newBuilder(); + * baseBigtableInstanceAdminSettingsBuilder + * .getInstanceSettings() + * .setRetrySettings( + * baseBigtableInstanceAdminSettingsBuilder + * .getInstanceSettings() + * .getRetrySettings() + * .toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); + * BaseBigtableInstanceAdminSettings baseBigtableInstanceAdminSettings = + * baseBigtableInstanceAdminSettingsBuilder.build(); + * }+ */ +@Generated("by gapic-generator-java") +public class BaseBigtableInstanceAdminSettings + extends ClientSettings