@Override public Map<String, String> extract(CreateTableRequest request) { ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); params.put("parent", String.valueOf(request.getParent())); return params.build(); } })
/** * * * <pre> * The unique name of the instance in which to create the table. * Values are of the form `projects/<project>/instances/<instance>`. * </pre> * * <code>string parent = 1;</code> */ public Builder clearParent() { parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /**
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.admin.v2.CreateTableRequest)) { return super.equals(obj); } com.google.bigtable.admin.v2.CreateTableRequest other = (com.google.bigtable.admin.v2.CreateTableRequest) obj; boolean result = true; result = result && getParent().equals(other.getParent()); result = result && getTableId().equals(other.getTableId()); result = result && (hasTable() == other.hasTable()); if (hasTable()) { result = result && getTable().equals(other.getTable()); } result = result && getInitialSplitsList().equals(other.getInitialSplitsList()); 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) + TABLE_ID_FIELD_NUMBER; hash = (53 * hash) + getTableId().hashCode(); if (hasTable()) { hash = (37 * hash) + TABLE_FIELD_NUMBER; hash = (53 * hash) + getTable().hashCode(); } if (getInitialSplitsCount() > 0) { hash = (37 * hash) + INITIAL_SPLITS_FIELD_NUMBER; hash = (53 * hash) + getInitialSplitsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(com.google.bigtable.admin.v2.CreateTableRequest other) { if (other == com.google.bigtable.admin.v2.CreateTableRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged();
@Test @SuppressWarnings("all") public void createTableTest() { TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]"); Table expectedResponse = Table.newBuilder().setName(name.toString()).build(); mockBigtableTableAdmin.addResponse(expectedResponse); InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]"); String tableId = "tableId-895419604"; Table table = Table.newBuilder().build(); Table actualResponse = client.createTable(parent, tableId, table); Assert.assertEquals(expectedResponse, actualResponse); List<GeneratedMessageV3> actualRequests = mockBigtableTableAdmin.getRequests(); Assert.assertEquals(1, actualRequests.size()); CreateTableRequest actualRequest = (CreateTableRequest) actualRequests.get(0); Assert.assertEquals(parent, InstanceName.parse(actualRequest.getParent())); Assert.assertEquals(tableId, actualRequest.getTableId()); Assert.assertEquals(table, actualRequest.getTable()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
@Override public Map<String, String> extract(CreateTableRequest request) { ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); params.put("parent", String.valueOf(request.getParent())); return params.build(); } })
/** {@inheritDoc} */ @Override public void createTable(CreateTableRequest request) { createUnaryListener(request, createTableRpc, request.getParent()).getBlockingResult(); }
/** {@inheritDoc} * @return */ @Override public ListenableFuture<Table> createTableAsync(CreateTableRequest request) { return createUnaryListener(request, createTableRpc, request.getParent()).getAsyncResult(); }
/** * <pre> * The unique name of the instance in which to create the table. * Values are of the form projects/<project>/instances/<instance> * </pre> * * <code>string parent = 1;</code> */ public Builder clearParent() { parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /**
/** * * * <pre> * The unique name of the instance in which to create the table. * Values are of the form `projects/<project>/instances/<instance>`. * </pre> * * <code>string parent = 1;</code> */ public Builder clearParent() { parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /**
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.admin.v2.CreateTableRequest)) { return super.equals(obj); } com.google.bigtable.admin.v2.CreateTableRequest other = (com.google.bigtable.admin.v2.CreateTableRequest) obj; boolean result = true; result = result && getParent().equals(other.getParent()); result = result && getTableId().equals(other.getTableId()); result = result && (hasTable() == other.hasTable()); if (hasTable()) { result = result && getTable().equals(other.getTable()); } result = result && getInitialSplitsList().equals(other.getInitialSplitsList()); 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) + TABLE_ID_FIELD_NUMBER; hash = (53 * hash) + getTableId().hashCode(); if (hasTable()) { hash = (37 * hash) + TABLE_FIELD_NUMBER; hash = (53 * hash) + getTable().hashCode(); } if (getInitialSplitsCount() > 0) { hash = (37 * hash) + INITIAL_SPLITS_FIELD_NUMBER; hash = (53 * hash) + getInitialSplitsList().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) + TABLE_ID_FIELD_NUMBER; hash = (53 * hash) + getTableId().hashCode(); if (hasTable()) { hash = (37 * hash) + TABLE_FIELD_NUMBER; hash = (53 * hash) + getTable().hashCode(); } if (getInitialSplitsCount() > 0) { hash = (37 * hash) + INITIAL_SPLITS_FIELD_NUMBER; hash = (53 * hash) + getInitialSplitsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.admin.v2.CreateTableRequest)) { return super.equals(obj); } com.google.bigtable.admin.v2.CreateTableRequest other = (com.google.bigtable.admin.v2.CreateTableRequest) obj; boolean result = true; result = result && getParent() .equals(other.getParent()); result = result && getTableId() .equals(other.getTableId()); result = result && (hasTable() == other.hasTable()); if (hasTable()) { result = result && getTable() .equals(other.getTable()); } result = result && getInitialSplitsList() .equals(other.getInitialSplitsList()); return result; }
public Builder mergeFrom(com.google.bigtable.admin.v2.CreateTableRequest other) { if (other == com.google.bigtable.admin.v2.CreateTableRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged();
public Builder mergeFrom(com.google.bigtable.admin.v2.CreateTableRequest other) { if (other == com.google.bigtable.admin.v2.CreateTableRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged();