@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.admin.v2.DeleteSnapshotRequest)) { return super.equals(obj); } com.google.bigtable.admin.v2.DeleteSnapshotRequest other = (com.google.bigtable.admin.v2.DeleteSnapshotRequest) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && unknownFields.equals(other.unknownFields); return result; }
@Override public Map<String, String> extract(DeleteSnapshotRequest request) { ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); params.put("name", String.valueOf(request.getName())); return params.build(); } })
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * The unique name of the snapshot to be deleted. * Values are of the form * `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); 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; }
@Test @SuppressWarnings("all") public void deleteSnapshotTest() { Empty expectedResponse = Empty.newBuilder().build(); mockBigtableTableAdmin.addResponse(expectedResponse); SnapshotName name = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]"); client.deleteSnapshot(name); List<GeneratedMessageV3> actualRequests = mockBigtableTableAdmin.getRequests(); Assert.assertEquals(1, actualRequests.size()); DeleteSnapshotRequest actualRequest = (DeleteSnapshotRequest) actualRequests.get(0); Assert.assertEquals(name, SnapshotName.parse(actualRequest.getName())); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.admin.v2.DeleteSnapshotRequest)) { return super.equals(obj); } com.google.bigtable.admin.v2.DeleteSnapshotRequest other = (com.google.bigtable.admin.v2.DeleteSnapshotRequest) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && unknownFields.equals(other.unknownFields); return result; }
@Override public Map<String, String> extract(DeleteSnapshotRequest request) { ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); params.put("name", String.valueOf(request.getName())); return params.build(); } })
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** {@inheritDoc} */ @Override public ListenableFuture<Empty> deleteSnapshotAsync(DeleteSnapshotRequest request) { return createUnaryListener(request, deleteSnapshotRpc, request.getName()).getAsyncResult(); }
/** * * * <pre> * The unique name of the snapshot to be deleted. * Values are of the form * `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); 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; }