@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@java.lang.Override public com.google.bigtable.v2.ReadModifyWriteRule buildPartial() { com.google.bigtable.v2.ReadModifyWriteRule result = new com.google.bigtable.v2.ReadModifyWriteRule(this); result.familyName_ = familyName_; result.columnQualifier_ = columnQualifier_; if (ruleCase_ == 3) { result.rule_ = rule_; } if (ruleCase_ == 4) { result.rule_ = rule_; } result.ruleCase_ = ruleCase_; onBuilt(); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.v2.ReadModifyWriteRule)) { return super.equals(obj); } com.google.bigtable.v2.ReadModifyWriteRule other = (com.google.bigtable.v2.ReadModifyWriteRule) obj; boolean result = true; result = result && getFamilyName().equals(other.getFamilyName()); result = result && getColumnQualifier().equals(other.getColumnQualifier()); result = result && getRuleCase().equals(other.getRuleCase()); if (!result) return false; switch (ruleCase_) { case 3: result = result && getAppendValue().equals(other.getAppendValue()); break; case 4: result = result && (getIncrementAmount() == other.getIncrementAmount()); break; case 0: default: } result = result && unknownFields.equals(other.unknownFields); return result; }
/** * * * <pre> * The qualifier of the column to which the read/modify/write should be * applied. * Can be any byte string, including the empty string. * </pre> * * <code>bytes column_qualifier = 2;</code> */ public Builder clearColumnQualifier() { columnQualifier_ = getDefaultInstance().getColumnQualifier(); onChanged(); return this; }
/** * * * <pre> * The name of the family to which the read/modify/write should be applied. * Must match `[-_.a-zA-Z0-9]+` * </pre> * * <code>string family_name = 1;</code> */ public Builder clearFamilyName() { familyName_ = getDefaultInstance().getFamilyName(); onChanged(); return this; } /**
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + FAMILY_NAME_FIELD_NUMBER; hash = (53 * hash) + getFamilyName().hashCode(); hash = (37 * hash) + COLUMN_QUALIFIER_FIELD_NUMBER; hash = (53 * hash) + getColumnQualifier().hashCode(); switch (ruleCase_) { case 3: hash = (37 * hash) + APPEND_VALUE_FIELD_NUMBER; hash = (53 * hash) + getAppendValue().hashCode(); break; case 4: hash = (37 * hash) + INCREMENT_AMOUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIncrementAmount()); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public com.google.bigtable.v2.ReadModifyWriteRule getDefaultInstanceForType() { return com.google.bigtable.v2.ReadModifyWriteRule.getDefaultInstance(); }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getFamilyNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, familyName_); } if (!columnQualifier_.isEmpty()) { output.writeBytes(2, columnQualifier_); } if (ruleCase_ == 3) { output.writeBytes(3, (com.google.protobuf.ByteString) rule_); } if (ruleCase_ == 4) { output.writeInt64(4, (long) ((java.lang.Long) rule_)); } unknownFields.writeTo(output); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + FAMILY_NAME_FIELD_NUMBER; hash = (53 * hash) + getFamilyName().hashCode(); hash = (37 * hash) + COLUMN_QUALIFIER_FIELD_NUMBER; hash = (53 * hash) + getColumnQualifier().hashCode(); switch (ruleCase_) { case 3: hash = (37 * hash) + APPEND_VALUE_FIELD_NUMBER; hash = (53 * hash) + getAppendValue().hashCode(); break; case 4: hash = (37 * hash) + INCREMENT_AMOUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getIncrementAmount()); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * <pre> * The qualifier of the column to which the read/modify/write should be * applied. * Can be any byte string, including the empty string. * </pre> * * <code>bytes column_qualifier = 2;</code> */ public Builder clearColumnQualifier() { columnQualifier_ = getDefaultInstance().getColumnQualifier(); onChanged(); return this; }
/** * <pre> * The name of the family to which the read/modify/write should be applied. * Must match `[-_.a-zA-Z0-9]+` * </pre> * * <code>string family_name = 1;</code> */ public Builder clearFamilyName() { familyName_ = getDefaultInstance().getFamilyName(); onChanged(); return this; } /**
/** * * * <pre> * Rules specifying how the specified row's contents are to be transformed * into writes. Entries are applied in order, meaning that earlier rules will * affect the results of later ones. * </pre> * * <code>repeated .google.bigtable.v2.ReadModifyWriteRule rules = 3;</code> */ public com.google.bigtable.v2.ReadModifyWriteRule.Builder addRulesBuilder(int index) { return getRulesFieldBuilder() .addBuilder(index, com.google.bigtable.v2.ReadModifyWriteRule.getDefaultInstance()); } /**
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getFamilyNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, familyName_); } if (!columnQualifier_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, columnQualifier_); } if (ruleCase_ == 3) { size += com.google.protobuf.CodedOutputStream.computeBytesSize( 3, (com.google.protobuf.ByteString) rule_); } if (ruleCase_ == 4) { size += com.google.protobuf.CodedOutputStream.computeInt64Size( 4, (long) ((java.lang.Long) rule_)); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
public Builder mergeFrom(com.google.bigtable.v2.ReadModifyWriteRule other) { if (other == com.google.bigtable.v2.ReadModifyWriteRule.getDefaultInstance()) return this; if (!other.getFamilyName().isEmpty()) { familyName_ = other.familyName_; onChanged(); } if (other.getColumnQualifier() != com.google.protobuf.ByteString.EMPTY) { setColumnQualifier(other.getColumnQualifier()); } switch (other.getRuleCase()) { case APPEND_VALUE: { setAppendValue(other.getAppendValue()); break; } case INCREMENT_AMOUNT: { setIncrementAmount(other.getIncrementAmount()); break; } case RULE_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + FAMILY_NAME_FIELD_NUMBER; hash = (53 * hash) + getFamilyName().hashCode(); hash = (37 * hash) + COLUMN_QUALIFIER_FIELD_NUMBER; hash = (53 * hash) + getColumnQualifier().hashCode(); switch (ruleCase_) { case 3: hash = (37 * hash) + APPEND_VALUE_FIELD_NUMBER; hash = (53 * hash) + getAppendValue().hashCode(); break; case 4: hash = (37 * hash) + INCREMENT_AMOUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIncrementAmount()); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * Appends the value to the existing value of the cell. If the targeted cell is unset, it will be * treated as containing the empty string. */ public ReadModifyWriteRow append( @Nonnull String familyName, @Nonnull ByteString qualifier, @Nonnull ByteString value) { Validations.validateFamily(familyName); Preconditions.checkNotNull(qualifier, "Qualifier can't be null"); Preconditions.checkNotNull(value, "Value can't be null"); Preconditions.checkArgument(!value.isEmpty(), "Value can't be empty"); ReadModifyWriteRule rule = ReadModifyWriteRule.newBuilder() .setFamilyName(familyName) .setColumnQualifier(qualifier) .setAppendValue(value) .build(); builder.addRules(rule); return this; }
/** * * * <pre> * The qualifier of the column to which the read/modify/write should be * applied. * Can be any byte string, including the empty string. * </pre> * * <code>bytes column_qualifier = 2;</code> */ public Builder clearColumnQualifier() { columnQualifier_ = getDefaultInstance().getColumnQualifier(); onChanged(); return this; }
/** * * * <pre> * The name of the family to which the read/modify/write should be applied. * Must match `[-_.a-zA-Z0-9]+` * </pre> * * <code>string family_name = 1;</code> */ public Builder clearFamilyName() { familyName_ = getDefaultInstance().getFamilyName(); onChanged(); return this; } /**
/** * * * <pre> * Rules specifying how the specified row's contents are to be transformed * into writes. Entries are applied in order, meaning that earlier rules will * affect the results of later ones. * </pre> * * <code>repeated .google.bigtable.v2.ReadModifyWriteRule rules = 3;</code> */ public com.google.bigtable.v2.ReadModifyWriteRule.Builder addRulesBuilder() { return getRulesFieldBuilder() .addBuilder(com.google.bigtable.v2.ReadModifyWriteRule.getDefaultInstance()); } /**
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getFamilyNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, familyName_); } if (!columnQualifier_.isEmpty()) { output.writeBytes(2, columnQualifier_); } if (ruleCase_ == 3) { output.writeBytes( 3, (com.google.protobuf.ByteString) rule_); } if (ruleCase_ == 4) { output.writeInt64( 4, (long)((java.lang.Long) rule_)); } }