/** * * * <pre> * Targets have changed. * </pre> * * <code>.google.firestore.v1beta1.TargetChange target_change = 2;</code> */ public Builder setTargetChange( com.google.firestore.v1beta1.TargetChange.Builder builderForValue) { if (targetChangeBuilder_ == null) { responseType_ = builderForValue.build(); onChanged(); } else { targetChangeBuilder_.setMessage(builderForValue.build()); } responseTypeCase_ = 2; return this; } /**
com.google.firestore.v1beta1.TargetChange.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.firestore.v1beta1.TargetChange) responseType_); responseType_ = subBuilder.buildPartial();
/** * * * <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; } /**
com.google.firestore.v1beta1.TargetChange.newBuilder( (com.google.firestore.v1beta1.TargetChange) responseType_) .mergeFrom(value) .buildPartial(); } else { responseType_ = value;
com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getReadTime(), getParentForChildren(), isClean()); readTime_ = null;
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 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> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> getCauseFieldBuilder() { if (causeBuilder_ == null) { causeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>(getCause(), getParentForChildren(), isClean()); cause_ = null; } return causeBuilder_; }
/** * * * <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> * 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(); } /**
private ListenResponse current() { ListenResponse.Builder response = ListenResponse.newBuilder(); response.setTargetChange( TargetChange.newBuilder() .setTargetChangeType(TargetChangeType.CURRENT) .addTargetIds(TARGET_ID)); return response.build(); }
private ListenResponse addTarget() { ListenResponse.Builder response = ListenResponse.newBuilder(); response.setTargetChange( TargetChange.newBuilder() .setTargetChangeType(TargetChangeType.ADD) .addTargetIds(TARGET_ID)); return response.build(); }
private ListenResponse removeTarget(@Nullable Code code) { TargetChange.Builder targetChange = TargetChange.newBuilder() .setTargetChangeType(TargetChangeType.REMOVE) .addTargetIds(TARGET_ID); if (code != null) { targetChange.setCause(Status.newBuilder().setCode(code.value())); } ListenResponse.Builder response = ListenResponse.newBuilder(); response.setTargetChange(targetChange); return response.build(); }
private ListenResponse snapshot() { ListenResponse.Builder response = ListenResponse.newBuilder(); response.setTargetChange( TargetChange.newBuilder() .setTargetChangeType(TargetChangeType.NO_CHANGE) .setReadTime(Timestamp.getDefaultInstance()) .setResumeToken(RESUME_TOKEN)); return response.build(); }
@java.lang.Override public com.google.firestore.v1beta1.TargetChange build() { com.google.firestore.v1beta1.TargetChange result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
private ListenResponse reset() { ListenResponse.Builder response = ListenResponse.newBuilder(); response.setTargetChange( TargetChange.newBuilder() .setTargetChangeType(TargetChangeType.RESET) .addTargetIds(TARGET_ID)); return response.build(); }
@java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**