@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.admin.v2.SnapshotTableRequest)) { return super.equals(obj); } com.google.bigtable.admin.v2.SnapshotTableRequest other = (com.google.bigtable.admin.v2.SnapshotTableRequest) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && getCluster().equals(other.getCluster()); result = result && getSnapshotId().equals(other.getSnapshotId()); result = result && (hasTtl() == other.hasTtl()); if (hasTtl()) { result = result && getTtl().equals(other.getTtl()); } result = result && getDescription().equals(other.getDescription()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
/** * * * <pre> * The unique name of the table to have the snapshot taken. * Values are of the form * `projects/<project>/instances/<instance>/tables/<table>`. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
/** * * * <pre> * Description of the snapshot. * </pre> * * <code>string description = 5;</code> */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); onChanged(); return this; } /**
SnapshotTableRequest actualRequest = (SnapshotTableRequest) actualRequests.get(0); Assert.assertEquals(name, TableName.parse(actualRequest.getName())); Assert.assertEquals(cluster, ClusterName.parse(actualRequest.getCluster())); Assert.assertEquals(snapshotId, SnapshotName.parse(actualRequest.getSnapshotId())); Assert.assertEquals(description, actualRequest.getDescription()); Assert.assertTrue( channelProvider.isHeaderSent(
@Override public Map<String, String> extract(SnapshotTableRequest request) { ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); params.put("name", String.valueOf(request.getName())); return params.build(); } })
@java.lang.Override public com.google.bigtable.admin.v2.SnapshotTableRequest getDefaultInstanceForType() { return com.google.bigtable.admin.v2.SnapshotTableRequest.getDefaultInstance(); }
/** * * * <pre> * The name of the cluster where the snapshot will be created in. * Values are of the form * `projects/<project>/instances/<instance>/clusters/<cluster>`. * </pre> * * <code>string cluster = 2;</code> */ public Builder clearCluster() { cluster_ = getDefaultInstance().getCluster(); onChanged(); return this; } /**
/** * * * <pre> * The ID by which the new snapshot should be referred to within the parent * cluster, e.g., `mysnapshot` of the form: `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` * rather than * `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/mysnapshot`. * </pre> * * <code>string snapshot_id = 3;</code> */ public Builder clearSnapshotId() { snapshotId_ = getDefaultInstance().getSnapshotId(); onChanged(); return this; } /**
@java.lang.Override public com.google.bigtable.admin.v2.SnapshotTableRequest buildPartial() { com.google.bigtable.admin.v2.SnapshotTableRequest result = new com.google.bigtable.admin.v2.SnapshotTableRequest(this); result.name_ = name_; result.cluster_ = cluster_; result.snapshotId_ = snapshotId_; if (ttlBuilder_ == null) { result.ttl_ = ttl_; } else { result.ttl_ = ttlBuilder_.build(); } result.description_ = description_; onBuilt(); return result; }
@Override public Map<String, String> extract(SnapshotTableRequest request) { ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); params.put("name", String.valueOf(request.getName())); return params.build(); } })
/** * * * <pre> * The request that prompted the initiation of this SnapshotTable operation. * </pre> * * <code>.google.bigtable.admin.v2.SnapshotTableRequest original_request = 1;</code> */ public com.google.bigtable.admin.v2.SnapshotTableRequest getOriginalRequest() { return originalRequest_ == null ? com.google.bigtable.admin.v2.SnapshotTableRequest.getDefaultInstance() : originalRequest_; } /**
/** * * * <pre> * Description of the snapshot. * </pre> * * <code>string description = 5;</code> */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); onChanged(); return this; } /**
/** * * * <pre> * The name of the cluster where the snapshot will be created in. * Values are of the form * `projects/<project>/instances/<instance>/clusters/<cluster>`. * </pre> * * <code>string cluster = 2;</code> */ public Builder clearCluster() { cluster_ = getDefaultInstance().getCluster(); onChanged(); return this; } /**
/** * * * <pre> * The ID by which the new snapshot should be referred to within the parent * cluster, e.g., `mysnapshot` of the form: `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` * rather than * `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/mysnapshot`. * </pre> * * <code>string snapshot_id = 3;</code> */ public Builder clearSnapshotId() { snapshotId_ = getDefaultInstance().getSnapshotId(); onChanged(); return this; } /**
@java.lang.Override public com.google.bigtable.admin.v2.SnapshotTableRequest buildPartial() { com.google.bigtable.admin.v2.SnapshotTableRequest result = new com.google.bigtable.admin.v2.SnapshotTableRequest(this); result.name_ = name_; result.cluster_ = cluster_; result.snapshotId_ = snapshotId_; if (ttlBuilder_ == null) { result.ttl_ = ttl_; } else { result.ttl_ = ttlBuilder_.build(); } result.description_ = description_; onBuilt(); return result; }
@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 = (37 * hash) + CLUSTER_FIELD_NUMBER; hash = (53 * hash) + getCluster().hashCode(); hash = (37 * hash) + SNAPSHOT_ID_FIELD_NUMBER; hash = (53 * hash) + getSnapshotId().hashCode(); if (hasTtl()) { hash = (37 * hash) + TTL_FIELD_NUMBER; hash = (53 * hash) + getTtl().hashCode(); } hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * The request that prompted the initiation of this SnapshotTable operation. * </pre> * * <code>.google.bigtable.admin.v2.SnapshotTableRequest original_request = 1;</code> */ public Builder mergeOriginalRequest(com.google.bigtable.admin.v2.SnapshotTableRequest value) { if (originalRequestBuilder_ == null) { if (originalRequest_ != null) { originalRequest_ = com.google.bigtable.admin.v2.SnapshotTableRequest.newBuilder(originalRequest_) .mergeFrom(value) .buildPartial(); } else { originalRequest_ = value; } onChanged(); } else { originalRequestBuilder_.mergeFrom(value); } return this; } /**
/** * * * <pre> * The unique name of the table to have the snapshot taken. * Values are of the form * `projects/<project>/instances/<instance>/tables/<table>`. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
/** {@inheritDoc} */ @Override public ListenableFuture<Operation> snapshotTableAsync(SnapshotTableRequest request) { return createUnaryListener(request, snapshotTableRpc, request.getName()).getAsyncResult(); }