/** * Creates the request protobuf. This method is considered an internal implementation detail and * not meant to be used by applications. */ @InternalApi public com.google.bigtable.admin.v2.UpdateAppProfileRequest toProto(String projectId) { String name = NameUtil.formatAppProfileName(projectId, instanceId, appProfileId); proto.getAppProfileBuilder().setName(name); return proto.build(); }
/** * Asynchronously get the app profile by id. * * <p>Sample code: * * <pre>{@code * ApiFuture<AppProfile> appProfileFuture = client.getAppProfileAsync("my-instance", "my-app-profile"); * * AppProfile appProfile = appProfileFuture.get(); * }</pre> * * @see AppProfile */ @SuppressWarnings("WeakerAccess") public ApiFuture<AppProfile> getAppProfileAsync(String instanceId, String appProfileId) { String name = NameUtil.formatAppProfileName(projectId, instanceId, appProfileId); GetAppProfileRequest request = GetAppProfileRequest.newBuilder().setName(name.toString()).build(); return ApiFutures.transform( stub.getAppProfileCallable().futureCall(request), new ApiFunction<com.google.bigtable.admin.v2.AppProfile, AppProfile>() { @Override public AppProfile apply(com.google.bigtable.admin.v2.AppProfile proto) { return AppProfile.fromProto(proto); } }, MoreExecutors.directExecutor()); }
/** * Asynchronously deletes the specified app profile. * * <p>Sample code: * * <pre>{@code * ApiFuture<Void> deleteFuture = client.deleteAppProfileAsync("my-instance", "my-app-profile"); * * deleteFuture.get(); * }</pre> */ @SuppressWarnings("WeakerAccess") public ApiFuture<Void> deleteAppProfileAsync(String instanceId, String appProfileId) { String name = NameUtil.formatAppProfileName(projectId, instanceId, appProfileId); DeleteAppProfileRequest request = DeleteAppProfileRequest.newBuilder().setName(name).build(); return ApiFutures.transform( stub.deleteAppProfileCallable().futureCall(request), new ApiFunction<Empty, Void>() { @Override public Void apply(Empty input) { return null; } }, MoreExecutors.directExecutor()); }
/** * Creates the request protobuf. This method is considered an internal implementation detail and * not meant to be used by applications. */ @InternalApi public com.google.bigtable.admin.v2.UpdateAppProfileRequest toProto(String projectId) { String name = NameUtil.formatAppProfileName(projectId, instanceId, appProfileId); proto.getAppProfileBuilder().setName(name); return proto.build(); }
/** * Asynchronously get the app profile by id. * * <p>Sample code: * * <pre>{@code * ApiFuture<AppProfile> appProfileFuture = client.getAppProfileAsync("my-instance", "my-app-profile"); * * AppProfile appProfile = appProfileFuture.get(); * }</pre> * * @see AppProfile */ @SuppressWarnings("WeakerAccess") public ApiFuture<AppProfile> getAppProfileAsync(String instanceId, String appProfileId) { String name = NameUtil.formatAppProfileName(projectId, instanceId, appProfileId); GetAppProfileRequest request = GetAppProfileRequest.newBuilder().setName(name.toString()).build(); return ApiFutures.transform( stub.getAppProfileCallable().futureCall(request), new ApiFunction<com.google.bigtable.admin.v2.AppProfile, AppProfile>() { @Override public AppProfile apply(com.google.bigtable.admin.v2.AppProfile proto) { return AppProfile.fromProto(proto); } }, MoreExecutors.directExecutor()); }
/** * Asynchronously deletes the specified app profile. * * <p>Sample code: * * <pre>{@code * ApiFuture<Void> deleteFuture = client.deleteAppProfileAsync("my-instance", "my-app-profile"); * * deleteFuture.get(); * }</pre> */ @SuppressWarnings("WeakerAccess") public ApiFuture<Void> deleteAppProfileAsync(String instanceId, String appProfileId) { String name = NameUtil.formatAppProfileName(projectId, instanceId, appProfileId); DeleteAppProfileRequest request = DeleteAppProfileRequest.newBuilder().setName(name).build(); return ApiFutures.transform( stub.deleteAppProfileCallable().futureCall(request), new ApiFunction<Empty, Void>() { @Override public Void apply(Empty input) { return null; } }, MoreExecutors.directExecutor()); }