if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged(); onChanged(); setRowKey(other.getRowKey()); mergePredicateFilter(other.getPredicateFilter()); bitField0_ = (bitField0_ & ~0x00000010); } else { ensureTrueMutationsIsMutable(); trueMutations_.addAll(other.trueMutations_); onChanged(); trueMutationsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTrueMutationsFieldBuilder() : null; } else { bitField0_ = (bitField0_ & ~0x00000020); } else { ensureFalseMutationsIsMutable(); falseMutations_.addAll(other.falseMutations_); onChanged();
/** * Creates the underlying {@link CheckAndMutateRowRequest} protobuf. * * <p>This method is considered an internal implementation detail and not meant to be used by * applications. */ @InternalApi public CheckAndMutateRowRequest toProto(RequestContext requestContext) { Preconditions.checkState( !builder.getTrueMutationsList().isEmpty() || !builder.getFalseMutationsList().isEmpty(), "ConditionalRowMutations must have `then` or `otherwise` mutations."); String tableName = NameUtil.formatTableName( requestContext.getProjectId(), requestContext.getInstanceId(), tableId); return builder .setTableName(tableName.toString()) .setAppProfileId(requestContext.getAppProfileId()) .build(); } }
@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.bigtable.v2.CheckAndMutateRowRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.bigtable.v2.CheckAndMutateRowRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged(); onChanged(); setRowKey(other.getRowKey()); mergePredicateFilter(other.getPredicateFilter()); bitField0_ = (bitField0_ & ~0x00000010); } else { ensureTrueMutationsIsMutable(); trueMutations_.addAll(other.trueMutations_); onChanged(); trueMutationsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTrueMutationsFieldBuilder() : null; } else { bitField0_ = (bitField0_ & ~0x00000020); } else { ensureFalseMutationsIsMutable(); falseMutations_.addAll(other.falseMutations_); onChanged();
if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged(); setRowKey(other.getRowKey()); mergePredicateFilter(other.getPredicateFilter()); bitField0_ = (bitField0_ & ~0x00000008); } else { ensureTrueMutationsIsMutable(); trueMutations_.addAll(other.trueMutations_); onChanged(); trueMutationsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTrueMutationsFieldBuilder() : null; } else { trueMutationsBuilder_.addAllMessages(other.trueMutations_); bitField0_ = (bitField0_ & ~0x00000010); } else { ensureFalseMutationsIsMutable(); falseMutations_.addAll(other.falseMutations_); onChanged(); falseMutationsBuilder_ =
.setTableName(tableName) .setRowKey(rowKey) .setPredicateFilter(predicateFilter) .addAllTrueMutations(trueMutations) .addAllFalseMutations(falseMutations) .build(); return checkAndMutateRow(request);
.setTableName(tableName == null ? null : tableName.toString()) .setRowKey(rowKey) .setPredicateFilter(predicateFilter) .addAllTrueMutations(trueMutations) .addAllFalseMutations(falseMutations) .build(); return checkAndMutateRow(request);
/** * * * <pre> * The filter to be applied to the contents of the specified row. Depending * on whether or not any results are yielded, either `true_mutations` or * `false_mutations` will be executed. If unset, checks that the row contains * any values at all. * </pre> * * <code>.google.bigtable.v2.RowFilter predicate_filter = 6;</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder> getPredicateFilterFieldBuilder() { if (predicateFilterBuilder_ == null) { predicateFilterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.bigtable.v2.RowFilter, com.google.bigtable.v2.RowFilter.Builder, com.google.bigtable.v2.RowFilterOrBuilder>( getPredicateFilter(), getParentForChildren(), isClean()); predicateFilter_ = null; } return predicateFilterBuilder_; }
/** * <pre> * Changes to be atomically applied to the specified row if `predicate_filter` * does not yield any cells when applied to `row_key`. Entries are applied in * order, meaning that earlier mutations can be masked by later ones. * Must contain at least one entry if `true_mutations` is empty, and at most * 100000. * </pre> * * <code>repeated .google.bigtable.v2.Mutation false_mutations = 5;</code> */ public Builder setFalseMutations( int index, com.google.bigtable.v2.Mutation value) { if (falseMutationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFalseMutationsIsMutable(); falseMutations_.set(index, value); onChanged(); } else { falseMutationsBuilder_.setMessage(index, value); } return this; } /**
/** * <pre> * Changes to be atomically applied to the specified row if `predicate_filter` * does not yield any cells when applied to `row_key`. Entries are applied in * order, meaning that earlier mutations can be masked by later ones. * Must contain at least one entry if `true_mutations` is empty, and at most * 100000. * </pre> * * <code>repeated .google.bigtable.v2.Mutation false_mutations = 5;</code> */ public Builder addFalseMutations(com.google.bigtable.v2.Mutation value) { if (falseMutationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFalseMutationsIsMutable(); falseMutations_.add(value); onChanged(); } else { falseMutationsBuilder_.addMessage(value); } return this; } /**
/** * <pre> * Changes to be atomically applied to the specified row if `predicate_filter` * yields at least one cell when applied to `row_key`. Entries are applied in * order, meaning that earlier mutations can be masked by later ones. * Must contain at least one entry if `false_mutations` is empty, and at most * 100000. * </pre> * * <code>repeated .google.bigtable.v2.Mutation true_mutations = 4;</code> */ public Builder addTrueMutations( int index, com.google.bigtable.v2.Mutation value) { if (trueMutationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTrueMutationsIsMutable(); trueMutations_.add(index, value); onChanged(); } else { trueMutationsBuilder_.addMessage(index, value); } return this; } /**
/** * * * <pre> * Changes to be atomically applied to the specified row if `predicate_filter` * does not yield any cells when applied to `row_key`. Entries are applied in * order, meaning that earlier mutations can be masked by later ones. * Must contain at least one entry if `true_mutations` is empty, and at most * 100000. * </pre> * * <code>repeated .google.bigtable.v2.Mutation false_mutations = 5;</code> */ public Builder addFalseMutations( int index, com.google.bigtable.v2.Mutation.Builder builderForValue) { if (falseMutationsBuilder_ == null) { ensureFalseMutationsIsMutable(); falseMutations_.add(index, builderForValue.build()); onChanged(); } else { falseMutationsBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * Changes to be atomically applied to the specified row if `predicate_filter` * yields at least one cell when applied to `row_key`. Entries are applied in * order, meaning that earlier mutations can be masked by later ones. * Must contain at least one entry if `false_mutations` is empty, and at most * 100000. * </pre> * * <code>repeated .google.bigtable.v2.Mutation true_mutations = 4;</code> */ public Builder addAllTrueMutations( java.lang.Iterable<? extends com.google.bigtable.v2.Mutation> values) { if (trueMutationsBuilder_ == null) { ensureTrueMutationsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, trueMutations_); onChanged(); } else { trueMutationsBuilder_.addAllMessages(values); } return this; } /**
/** * * * <pre> * Changes to be atomically applied to the specified row if `predicate_filter` * does not yield any cells when applied to `row_key`. Entries are applied in * order, meaning that earlier mutations can be masked by later ones. * Must contain at least one entry if `true_mutations` is empty, and at most * 100000. * </pre> * * <code>repeated .google.bigtable.v2.Mutation false_mutations = 5;</code> */ public Builder addAllFalseMutations( java.lang.Iterable<? extends com.google.bigtable.v2.Mutation> values) { if (falseMutationsBuilder_ == null) { ensureFalseMutationsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, falseMutations_); onChanged(); } else { falseMutationsBuilder_.addAllMessages(values); } return this; } /**
/** * * * <pre> * Changes to be atomically applied to the specified row if `predicate_filter` * does not yield any cells when applied to `row_key`. Entries are applied in * order, meaning that earlier mutations can be masked by later ones. * Must contain at least one entry if `true_mutations` is empty, and at most * 100000. * </pre> * * <code>repeated .google.bigtable.v2.Mutation false_mutations = 5;</code> */ public Builder setFalseMutations( int index, com.google.bigtable.v2.Mutation.Builder builderForValue) { if (falseMutationsBuilder_ == null) { ensureFalseMutationsIsMutable(); falseMutations_.set(index, builderForValue.build()); onChanged(); } else { falseMutationsBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * Changes to be atomically applied to the specified row if `predicate_filter` * yields at least one cell when applied to `row_key`. Entries are applied in * order, meaning that earlier mutations can be masked by later ones. * Must contain at least one entry if `false_mutations` is empty, and at most * 100000. * </pre> * * <code>repeated .google.bigtable.v2.Mutation true_mutations = 4;</code> */ public Builder addTrueMutations( int index, com.google.bigtable.v2.Mutation.Builder builderForValue) { if (trueMutationsBuilder_ == null) { ensureTrueMutationsIsMutable(); trueMutations_.add(index, builderForValue.build()); onChanged(); } else { trueMutationsBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * Changes to be atomically applied to the specified row if `predicate_filter` * yields at least one cell when applied to `row_key`. Entries are applied in * order, meaning that earlier mutations can be masked by later ones. * Must contain at least one entry if `false_mutations` is empty, and at most * 100000. * </pre> * * <code>repeated .google.bigtable.v2.Mutation true_mutations = 4;</code> */ public Builder setTrueMutations( int index, com.google.bigtable.v2.Mutation.Builder builderForValue) { if (trueMutationsBuilder_ == null) { ensureTrueMutationsIsMutable(); trueMutations_.set(index, builderForValue.build()); onChanged(); } else { trueMutationsBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * Changes to be atomically applied to the specified row if `predicate_filter` * does not yield any cells when applied to `row_key`. Entries are applied in * order, meaning that earlier mutations can be masked by later ones. * Must contain at least one entry if `true_mutations` is empty, and at most * 100000. * </pre> * * <code>repeated .google.bigtable.v2.Mutation false_mutations = 5;</code> */ public Builder addFalseMutations(com.google.bigtable.v2.Mutation.Builder builderForValue) { if (falseMutationsBuilder_ == null) { ensureFalseMutationsIsMutable(); falseMutations_.add(builderForValue.build()); onChanged(); } else { falseMutationsBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * Changes to be atomically applied to the specified row if `predicate_filter` * yields at least one cell when applied to `row_key`. Entries are applied in * order, meaning that earlier mutations can be masked by later ones. * Must contain at least one entry if `false_mutations` is empty, and at most * 100000. * </pre> * * <code>repeated .google.bigtable.v2.Mutation true_mutations = 4;</code> */ public Builder addTrueMutations(com.google.bigtable.v2.Mutation.Builder builderForValue) { if (trueMutationsBuilder_ == null) { ensureTrueMutationsIsMutable(); trueMutations_.add(builderForValue.build()); onChanged(); } else { trueMutationsBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * Changes to be atomically applied to the specified row if `predicate_filter` * does not yield any cells when applied to `row_key`. Entries are applied in * order, meaning that earlier mutations can be masked by later ones. * Must contain at least one entry if `true_mutations` is empty, and at most * 100000. * </pre> * * <code>repeated .google.bigtable.v2.Mutation false_mutations = 5;</code> */ public Builder removeFalseMutations(int index) { if (falseMutationsBuilder_ == null) { ensureFalseMutationsIsMutable(); falseMutations_.remove(index); onChanged(); } else { falseMutationsBuilder_.remove(index); } return this; } /**