@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.bigtable.admin.v2.DeleteSnapshotRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.bigtable.admin.v2.DeleteSnapshotRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
public Builder mergeFrom(com.google.bigtable.admin.v2.DeleteSnapshotRequest other) { if (other == com.google.bigtable.admin.v2.DeleteSnapshotRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * Permanently deletes the specified snapshot. * * <p>Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not * currently available to most Cloud Bigtable customers. This feature might be changed in * backward-incompatible ways and is not recommended for production use. It is not subject to any * SLA or deprecation policy. * * <p>Sample code: * * <pre><code> * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) { * SnapshotName name = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]"); * baseBigtableTableAdminClient.deleteSnapshot(name.toString()); * } * </code></pre> * * @param name The unique name of the snapshot to be deleted. Values are of the form * `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSnapshot(String name) { DeleteSnapshotRequest request = DeleteSnapshotRequest.newBuilder().setName(name).build(); deleteSnapshot(request); }
/** * Permanently deletes the specified snapshot. * * <p>Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not * currently available to most Cloud Bigtable customers. This feature might be changed in * backward-incompatible ways and is not recommended for production use. It is not subject to any * SLA or deprecation policy. * * <p>Sample code: * * <pre><code> * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) { * SnapshotName name = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]"); * baseBigtableTableAdminClient.deleteSnapshot(name); * } * </code></pre> * * @param name The unique name of the snapshot to be deleted. Values are of the form * `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSnapshot(SnapshotName name) { DeleteSnapshotRequest request = DeleteSnapshotRequest.newBuilder().setName(name == null ? null : name.toString()).build(); deleteSnapshot(request); }
@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.bigtable.admin.v2.DeleteSnapshotRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.bigtable.admin.v2.DeleteSnapshotRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
private Builder() { maybeForceBuilderInitialization(); }
@Override public CompletableFuture<Void> deleteSnapshot(String snapshotName) { return CompletableFuture.supplyAsync(() -> { try { return DeleteSnapshotRequest.newBuilder() .setName(getClusterName().toSnapshotName(snapshotName)) .build(); } catch (IOException e) { throw new CompletionException(e); } }).thenCompose( d -> bigtableTableAdminClient.deleteSnapshotAsync(d).thenApply(r -> null)); }
public static Builder newBuilder(com.google.bigtable.admin.v2.DeleteSnapshotRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); }
/** {@inheritDoc} */ @Override public void deleteSnapshot(String snapshotName) throws IOException { String btSnapshotName = getClusterName().toSnapshotName(snapshotName); DeleteSnapshotRequest request = DeleteSnapshotRequest.newBuilder() .setName(btSnapshotName) .build(); Futures.getUnchecked(bigtableTableAdminClient.deleteSnapshotAsync(request)); }
@Override public CompletableFuture<Void> deleteSnapshot(String snapshotName) { return CompletableFuture.supplyAsync(() -> { try { return DeleteSnapshotRequest.newBuilder() .setName(getClusterName().toSnapshotName(snapshotName)) .build(); } catch (IOException e) { throw new CompletionException(e); } }).thenCompose( d -> bigtableTableAdminClient.deleteSnapshotAsync(d).thenApply(r -> null)); }
/** {@inheritDoc} */ @Override public void deleteSnapshot(String snapshotName) throws IOException { String btSnapshotName = getClusterName().toSnapshotName(snapshotName); DeleteSnapshotRequest request = DeleteSnapshotRequest.newBuilder() .setName(btSnapshotName) .build(); Futures.getUnchecked(bigtableTableAdminClient.deleteSnapshotAsync(request)); }
public Builder mergeFrom(com.google.bigtable.admin.v2.DeleteSnapshotRequest other) { if (other == com.google.bigtable.admin.v2.DeleteSnapshotRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@java.lang.Override public com.google.bigtable.admin.v2.DeleteSnapshotRequest buildPartial() { com.google.bigtable.admin.v2.DeleteSnapshotRequest result = new com.google.bigtable.admin.v2.DeleteSnapshotRequest(this); result.name_ = name_; onBuilt(); return result; }
@java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
@java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.bigtable.admin.v2.DeleteSnapshotRequest) { return mergeFrom((com.google.bigtable.admin.v2.DeleteSnapshotRequest) other); } else { super.mergeFrom(other); return this; } }
@java.lang.Override public com.google.bigtable.admin.v2.DeleteSnapshotRequest build() { com.google.bigtable.admin.v2.DeleteSnapshotRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
/** * Permanently deletes the specified snapshot. * * <p>Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not * currently available to most Cloud Bigtable customers. This feature might be changed in * backward-incompatible ways and is not recommended for production use. It is not subject to any * SLA or deprecation policy. * * <p>Sample code: * * <pre><code> * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) { * SnapshotName name = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]"); * baseBigtableTableAdminClient.deleteSnapshot(name); * } * </code></pre> * * @param name The unique name of the snapshot to be deleted. Values are of the form * `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSnapshot(SnapshotName name) { DeleteSnapshotRequest request = DeleteSnapshotRequest.newBuilder().setName(name == null ? null : name.toString()).build(); deleteSnapshot(request); }
/** * Permanently deletes the specified snapshot. * * <p>Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not * currently available to most Cloud Bigtable customers. This feature might be changed in * backward-incompatible ways and is not recommended for production use. It is not subject to any * SLA or deprecation policy. * * <p>Sample code: * * <pre><code> * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) { * SnapshotName name = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]"); * baseBigtableTableAdminClient.deleteSnapshot(name.toString()); * } * </code></pre> * * @param name The unique name of the snapshot to be deleted. Values are of the form * `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSnapshot(String name) { DeleteSnapshotRequest request = DeleteSnapshotRequest.newBuilder().setName(name).build(); deleteSnapshot(request); }