@Override public Map<String, String> extract(ListClustersRequest request) { ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); params.put("parent", String.valueOf(request.getParent())); return params.build(); } })
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.admin.v2.ListClustersRequest)) { return super.equals(obj); } com.google.bigtable.admin.v2.ListClustersRequest other = (com.google.bigtable.admin.v2.ListClustersRequest) obj; boolean result = true; result = result && getParent().equals(other.getParent()); result = result && getPageToken().equals(other.getPageToken()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * 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/-`. * </pre> * * <code>string parent = 1;</code> */ public Builder clearParent() { parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /**
public Builder mergeFrom(com.google.bigtable.admin.v2.ListClustersRequest other) { if (other == com.google.bigtable.admin.v2.ListClustersRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); } if (!other.getPageToken().isEmpty()) { pageToken_ = other.pageToken_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@Test @SuppressWarnings("all") public void listClustersTest() { String nextPageToken = "nextPageToken-1530815211"; ListClustersResponse expectedResponse = ListClustersResponse.newBuilder().setNextPageToken(nextPageToken).build(); mockBigtableInstanceAdmin.addResponse(expectedResponse); InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); ListClustersResponse actualResponse = client.listClusters(parent); Assert.assertEquals(expectedResponse, actualResponse); List<GeneratedMessageV3> actualRequests = mockBigtableInstanceAdmin.getRequests(); Assert.assertEquals(1, actualRequests.size()); ListClustersRequest actualRequest = (ListClustersRequest) actualRequests.get(0); Assert.assertEquals(parent, InstanceName.parse(actualRequest.getParent())); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
@Override public Map<String, String> extract(ListClustersRequest request) { ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); params.put("parent", String.valueOf(request.getParent())); return params.build(); } })
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.admin.v2.ListClustersRequest)) { return super.equals(obj); } com.google.bigtable.admin.v2.ListClustersRequest other = (com.google.bigtable.admin.v2.ListClustersRequest) obj; boolean result = true; result = result && getParent() .equals(other.getParent()); result = result && getPageToken() .equals(other.getPageToken()); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.admin.v2.ListClustersRequest)) { return super.equals(obj); } com.google.bigtable.admin.v2.ListClustersRequest other = (com.google.bigtable.admin.v2.ListClustersRequest) obj; boolean result = true; result = result && getParent().equals(other.getParent()); result = result && getPageToken().equals(other.getPageToken()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * <pre> * 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/-`. * </pre> * * <code>string parent = 1;</code> */ public Builder clearParent() { parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /**
/** * * * <pre> * 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/-`. * </pre> * * <code>string parent = 1;</code> */ public Builder clearParent() { parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /**
public Builder mergeFrom(com.google.bigtable.admin.v2.ListClustersRequest other) { if (other == com.google.bigtable.admin.v2.ListClustersRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); } if (!other.getPageToken().isEmpty()) { pageToken_ = other.pageToken_; onChanged(); } onChanged(); return this; }
public Builder mergeFrom(com.google.bigtable.admin.v2.ListClustersRequest other) { if (other == com.google.bigtable.admin.v2.ListClustersRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); } if (!other.getPageToken().isEmpty()) { pageToken_ = other.pageToken_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }