@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(); if (getModificationsCount() > 0) { hash = (37 * hash) + MODIFICATIONS_FIELD_NUMBER; hash = (53 * hash) + getModificationsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
/** * * * <pre> * The unique name of the table whose families should be modified. * 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; } /**
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest)) { return super.equals(obj); } com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest other = (com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && getModificationsList().equals(other.getModificationsList()); result = result && unknownFields.equals(other.unknownFields); return result; }
@Override public Map<String, String> extract(ModifyColumnFamiliesRequest 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.ModifyColumnFamiliesRequest getDefaultInstanceForType() { return com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.getDefaultInstance(); }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } for (int i = 0; i < modifications_.size(); i++) { output.writeMessage(2, modifications_.get(i)); } unknownFields.writeTo(output); }
if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { done = true; makeExtensionsImmutable();
@java.lang.Override public com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest build() { com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
@java.lang.Override public com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest buildPartial() { com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest result = new com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.name_ = name_; if (modificationsBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002)) { modifications_ = java.util.Collections.unmodifiableList(modifications_); bitField0_ = (bitField0_ & ~0x00000002); } result.modifications_ = modifications_; } else { result.modifications_ = modificationsBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; }
modifications_ = java.util.Collections.unmodifiableList(modifications_); makeExtensionsImmutable();
@Test @SuppressWarnings("all") public void modifyColumnFamiliesTest() { TableName name2 = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]"); Table expectedResponse = Table.newBuilder().setName(name2.toString()).build(); mockBigtableTableAdmin.addResponse(expectedResponse); TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]"); List<ModifyColumnFamiliesRequest.Modification> modifications = new ArrayList<>(); Table actualResponse = client.modifyColumnFamilies(name, modifications); Assert.assertEquals(expectedResponse, actualResponse); List<GeneratedMessageV3> actualRequests = mockBigtableTableAdmin.getRequests(); Assert.assertEquals(1, actualRequests.size()); ModifyColumnFamiliesRequest actualRequest = (ModifyColumnFamiliesRequest) actualRequests.get(0); Assert.assertEquals(name, TableName.parse(actualRequest.getName())); Assert.assertEquals(modifications, actualRequest.getModificationsList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
@Override public Map<String, String> extract(ModifyColumnFamiliesRequest request) { ImmutableMap.Builder<String, String> params = ImmutableMap.builder(); params.put("name", String.valueOf(request.getName())); return params.build(); } })
io.grpc.protobuf.ProtoUtils.marshaller( com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } for (int i = 0; i < modifications_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, modifications_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { done = true; makeExtensionsImmutable();
@java.lang.Override public com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest build() { com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
public com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest buildPartial() { com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest result = new com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.name_ = name_; if (modificationsBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002)) { modifications_ = java.util.Collections.unmodifiableList(modifications_); bitField0_ = (bitField0_ & ~0x00000002); } result.modifications_ = modifications_; } else { result.modifications_ = modificationsBuilder_.build(); } result.bitField0_ = to_bitField0_; 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(); if (getModificationsCount() > 0) { hash = (37 * hash) + MODIFICATIONS_FIELD_NUMBER; hash = (53 * hash) + getModificationsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest other) { if (other == com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged();