/** * * * <pre> * The Table to create. * </pre> * * <code>.google.bigtable.admin.v2.Table table = 3;</code> */ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { return getTable(); }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getParentBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } if (!getTableIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tableId_); } if (table_ != null) { output.writeMessage(3, getTable()); } for (int i = 0; i < initialSplits_.size(); i++) { output.writeMessage(4, initialSplits_.get(i)); } unknownFields.writeTo(output); }
@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 getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getParentBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (!getTableIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tableId_); } if (table_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTable()); } for (int i = 0; i < initialSplits_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, initialSplits_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
/** * <pre> * The Table to create. * </pre> * * <code>.google.bigtable.admin.v2.Table table = 3;</code> */ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { return getTable(); }
mergeTable(other.getTable());
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getParentBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } if (!getTableIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tableId_); } if (table_ != null) { output.writeMessage(3, getTable()); } for (int i = 0; i < initialSplits_.size(); i++) { output.writeMessage(4, initialSplits_.get(i)); } }
/** * * * <pre> * The Table to create. * </pre> * * <code>.google.bigtable.admin.v2.Table table = 3;</code> */ public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { return getTable(); }
@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())); }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getParentBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } if (!getTableIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tableId_); } if (table_ != null) { output.writeMessage(3, getTable()); } for (int i = 0; i < initialSplits_.size(); i++) { output.writeMessage(4, initialSplits_.get(i)); } unknownFields.writeTo(output); }
@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 getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getParentBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (!getTableIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tableId_); } if (table_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTable()); } for (int i = 0; i < initialSplits_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, initialSplits_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@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 int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getParentBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (!getTableIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tableId_); } if (table_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getTable()); } for (int i = 0; i < initialSplits_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, initialSplits_.get(i)); } memoizedSize = size; return size; }
@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; }
mergeTable(other.getTable());
mergeTable(other.getTable());