/** * * * <pre> * The name by which the new table should be referred to within the parent * instance, e.g., `foobar` rather than `<parent>/tables/foobar`. * </pre> * * <code>string table_id = 2;</code> */ public Builder clearTableId() { tableId_ = getDefaultInstance().getTableId(); 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; }
onChanged(); if (!other.getTableId().isEmpty()) { tableId_ = other.tableId_; 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())); }
/** * <pre> * The name by which the new table should be referred to within the parent * instance, e.g. "foobar" rather than "<parent>/tables/foobar". * </pre> * * <code>string table_id = 2;</code> */ public Builder clearTableId() { tableId_ = getDefaultInstance().getTableId(); onChanged(); return this; } /**
/** * * * <pre> * The name by which the new table should be referred to within the parent * instance, e.g., `foobar` rather than `<parent>/tables/foobar`. * </pre> * * <code>string table_id = 2;</code> */ public Builder clearTableId() { tableId_ = getDefaultInstance().getTableId(); 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 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; }
@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; }
/** {@inheritDoc} */ @Override public Table createTable(CreateTableRequest request) { com.google.bigtable.admin.v2.CreateTableRequest requestProto = request.toProto(instanceName.getProjectId(), instanceName.getInstanceId()); adminClient.createTable(requestProto); return getTable(requestProto.getTableId()); }
onChanged(); if (!other.getTableId().isEmpty()) { tableId_ = other.tableId_; onChanged();
onChanged(); if (!other.getTableId().isEmpty()) { tableId_ = other.tableId_; onChanged();