/** * * * <pre> * The error that resulted in this change, if applicable. * </pre> * * <code>.google.rpc.Status cause = 3;</code> */ public Builder setCause(com.google.rpc.Status value) { if (causeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } cause_ = value; onChanged(); } else { causeBuilder_.setMessage(value); } return this; } /**
/** * * * <pre> * The consistent `read_time` for the given `target_ids` (omitted when the * target_ids are not at a consistent snapshot). * The stream is guaranteed to send a `read_time` with `target_ids` empty * whenever the entire stream reaches a new consistent snapshot. ADD, * CURRENT, and RESET messages are guaranteed to (eventually) result in a * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). * For a given stream, `read_time` is guaranteed to be monotonically * increasing. * </pre> * * <code>.google.protobuf.Timestamp read_time = 6;</code> */ public Builder setReadTime(com.google.protobuf.Timestamp value) { if (readTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } readTime_ = value; onChanged(); } else { readTimeBuilder_.setMessage(value); } return this; } /**
/** * * * <pre> * A token that can be used to resume the stream for the given `target_ids`, * or all targets if `target_ids` is empty. * Not set on every target change. * </pre> * * <code>bytes resume_token = 4;</code> */ public Builder setResumeToken(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } resumeToken_ = value; onChanged(); return this; } /**
readTime_ = value; onChanged(); } else { readTimeBuilder_.mergeFrom(value);
public Builder mergeFrom(com.google.firestore.v1beta1.TargetChange other) { if (other == com.google.firestore.v1beta1.TargetChange.getDefaultInstance()) return this; if (other.targetChangeType_ != 0) { setTargetChangeTypeValue(other.getTargetChangeTypeValue()); } if (!other.targetIds_.isEmpty()) { if (targetIds_.isEmpty()) { targetIds_ = other.targetIds_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureTargetIdsIsMutable(); targetIds_.addAll(other.targetIds_); } onChanged(); } if (other.hasCause()) { mergeCause(other.getCause()); } if (other.getResumeToken() != com.google.protobuf.ByteString.EMPTY) { setResumeToken(other.getResumeToken()); } if (other.hasReadTime()) { mergeReadTime(other.getReadTime()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * * * <pre> * The consistent `read_time` for the given `target_ids` (omitted when the * target_ids are not at a consistent snapshot). * The stream is guaranteed to send a `read_time` with `target_ids` empty * whenever the entire stream reaches a new consistent snapshot. ADD, * CURRENT, and RESET messages are guaranteed to (eventually) result in a * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). * For a given stream, `read_time` is guaranteed to be monotonically * increasing. * </pre> * * <code>.google.protobuf.Timestamp read_time = 6;</code> */ public Builder clearReadTime() { if (readTimeBuilder_ == null) { readTime_ = null; onChanged(); } else { readTime_ = null; readTimeBuilder_ = null; } return this; } /**
/** * * * <pre> * The consistent `read_time` for the given `target_ids` (omitted when the * target_ids are not at a consistent snapshot). * The stream is guaranteed to send a `read_time` with `target_ids` empty * whenever the entire stream reaches a new consistent snapshot. ADD, * CURRENT, and RESET messages are guaranteed to (eventually) result in a * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). * For a given stream, `read_time` is guaranteed to be monotonically * increasing. * </pre> * * <code>.google.protobuf.Timestamp read_time = 6;</code> */ public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (readTimeBuilder_ == null) { readTime_ = builderForValue.build(); onChanged(); } else { readTimeBuilder_.setMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * The target IDs of targets that have changed. * If empty, the change applies to all targets. * For `target_change_type=ADD`, the order of the target IDs matches the order * of the requests to add the targets. This allows clients to unambiguously * associate server-assigned target IDs with added targets. * For other states, the order of the target IDs is not defined. * </pre> * * <code>repeated int32 target_ids = 2;</code> */ public Builder addTargetIds(int value) { ensureTargetIdsIsMutable(); targetIds_.add(value); onChanged(); return this; } /**
/** * * * <pre> * The error that resulted in this change, if applicable. * </pre> * * <code>.google.rpc.Status cause = 3;</code> */ public Builder clearCause() { if (causeBuilder_ == null) { cause_ = null; onChanged(); } else { cause_ = null; causeBuilder_ = null; } return this; } /**
/** * * * <pre> * The target IDs of targets that have changed. * If empty, the change applies to all targets. * For `target_change_type=ADD`, the order of the target IDs matches the order * of the requests to add the targets. This allows clients to unambiguously * associate server-assigned target IDs with added targets. * For other states, the order of the target IDs is not defined. * </pre> * * <code>repeated int32 target_ids = 2;</code> */ public Builder clearTargetIds() { targetIds_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; }
/** * * * <pre> * The consistent `read_time` for the given `target_ids` (omitted when the * target_ids are not at a consistent snapshot). * The stream is guaranteed to send a `read_time` with `target_ids` empty * whenever the entire stream reaches a new consistent snapshot. ADD, * CURRENT, and RESET messages are guaranteed to (eventually) result in a * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). * For a given stream, `read_time` is guaranteed to be monotonically * increasing. * </pre> * * <code>.google.protobuf.Timestamp read_time = 6;</code> */ public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { onChanged(); return getReadTimeFieldBuilder().getBuilder(); } /**
/** * * * <pre> * The target IDs of targets that have changed. * If empty, the change applies to all targets. * For `target_change_type=ADD`, the order of the target IDs matches the order * of the requests to add the targets. This allows clients to unambiguously * associate server-assigned target IDs with added targets. * For other states, the order of the target IDs is not defined. * </pre> * * <code>repeated int32 target_ids = 2;</code> */ public Builder setTargetIds(int index, int value) { ensureTargetIdsIsMutable(); targetIds_.set(index, value); onChanged(); return this; } /**
/** * * * <pre> * The error that resulted in this change, if applicable. * </pre> * * <code>.google.rpc.Status cause = 3;</code> */ public Builder setCause(com.google.rpc.Status.Builder builderForValue) { if (causeBuilder_ == null) { cause_ = builderForValue.build(); onChanged(); } else { causeBuilder_.setMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * The type of change that occurred. * </pre> * * <code>.google.firestore.v1beta1.TargetChange.TargetChangeType target_change_type = 1;</code> */ public Builder setTargetChangeType( com.google.firestore.v1beta1.TargetChange.TargetChangeType value) { if (value == null) { throw new NullPointerException(); } targetChangeType_ = value.getNumber(); onChanged(); return this; } /**
/** * * * <pre> * The error that resulted in this change, if applicable. * </pre> * * <code>.google.rpc.Status cause = 3;</code> */ public Builder mergeCause(com.google.rpc.Status value) { if (causeBuilder_ == null) { if (cause_ != null) { cause_ = com.google.rpc.Status.newBuilder(cause_).mergeFrom(value).buildPartial(); } else { cause_ = value; } onChanged(); } else { causeBuilder_.mergeFrom(value); } return this; } /**
/** * * * <pre> * The target IDs of targets that have changed. * If empty, the change applies to all targets. * For `target_change_type=ADD`, the order of the target IDs matches the order * of the requests to add the targets. This allows clients to unambiguously * associate server-assigned target IDs with added targets. * For other states, the order of the target IDs is not defined. * </pre> * * <code>repeated int32 target_ids = 2;</code> */ public Builder addAllTargetIds(java.lang.Iterable<? extends java.lang.Integer> values) { ensureTargetIdsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, targetIds_); onChanged(); return this; } /**
/** * * * <pre> * A token that can be used to resume the stream for the given `target_ids`, * or all targets if `target_ids` is empty. * Not set on every target change. * </pre> * * <code>bytes resume_token = 4;</code> */ public Builder clearResumeToken() { resumeToken_ = getDefaultInstance().getResumeToken(); onChanged(); return this; }
/** * * * <pre> * The error that resulted in this change, if applicable. * </pre> * * <code>.google.rpc.Status cause = 3;</code> */ public com.google.rpc.Status.Builder getCauseBuilder() { onChanged(); return getCauseFieldBuilder().getBuilder(); } /**
/** * * * <pre> * The type of change that occurred. * </pre> * * <code>.google.firestore.v1beta1.TargetChange.TargetChangeType target_change_type = 1;</code> */ public Builder clearTargetChangeType() { targetChangeType_ = 0; onChanged(); return this; }
/** * * * <pre> * The type of change that occurred. * </pre> * * <code>.google.firestore.v1beta1.TargetChange.TargetChangeType target_change_type = 1;</code> */ public Builder setTargetChangeTypeValue(int value) { targetChangeType_ = value; onChanged(); return this; } /**