@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.firestore.v1beta1.Precondition parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.firestore.v1beta1.Precondition) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
@java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.firestore.v1beta1.Precondition) { return mergeFrom((com.google.firestore.v1beta1.Precondition) other); } else { super.mergeFrom(other); return this; } }
com.google.firestore.v1beta1.Precondition.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(currentDocument_); currentDocument_ = subBuilder.buildPartial();
com.google.firestore.v1beta1.Precondition.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(currentDocument_); currentDocument_ = subBuilder.buildPartial();
com.google.firestore.v1beta1.Precondition.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(currentDocument_); currentDocument_ = subBuilder.buildPartial();
com.google.firestore.v1beta1.Precondition.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(precondition_); precondition_ = subBuilder.buildPartial();
com.google.firestore.v1beta1.Precondition.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(precondition_); precondition_ = subBuilder.buildPartial();
com.google.firestore.v1beta1.Precondition.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(precondition_); precondition_ = subBuilder.buildPartial();
/** * * * <pre> * An optional precondition on the document. * The request will fail if this is set and not met by the target document. * </pre> * * <code>.google.firestore.v1beta1.Precondition current_document = 4;</code> */ public Builder mergeCurrentDocument(com.google.firestore.v1beta1.Precondition value) { if (currentDocumentBuilder_ == null) { if (currentDocument_ != null) { currentDocument_ = com.google.firestore.v1beta1.Precondition.newBuilder(currentDocument_) .mergeFrom(value) .buildPartial(); } else { currentDocument_ = value; } onChanged(); } else { currentDocumentBuilder_.mergeFrom(value); } return this; } /**
/** * * * <pre> * An optional precondition on the document. * The request will fail if this is set and not met by the target document. * </pre> * * <code>.google.firestore.v1beta1.Precondition current_document = 2;</code> */ public Builder mergeCurrentDocument(com.google.firestore.v1beta1.Precondition value) { if (currentDocumentBuilder_ == null) { if (currentDocument_ != null) { currentDocument_ = com.google.firestore.v1beta1.Precondition.newBuilder(currentDocument_) .mergeFrom(value) .buildPartial(); } else { currentDocument_ = value; } onChanged(); } else { currentDocumentBuilder_.mergeFrom(value); } return this; } /**
/** * * * <pre> * precondition in call, if any * </pre> * * <code>.google.firestore.v1beta1.Precondition precondition = 2;</code> */ public Builder mergePrecondition(com.google.firestore.v1beta1.Precondition value) { if (preconditionBuilder_ == null) { if (precondition_ != null) { precondition_ = com.google.firestore.v1beta1.Precondition.newBuilder(precondition_) .mergeFrom(value) .buildPartial(); } else { precondition_ = value; } onChanged(); } else { preconditionBuilder_.mergeFrom(value); } return this; } /**
/** * * * <pre> * precondition in call, if any * </pre> * * <code>.google.firestore.v1beta1.Precondition precondition = 2;</code> */ public Builder mergePrecondition(com.google.firestore.v1beta1.Precondition value) { if (preconditionBuilder_ == null) { if (precondition_ != null) { precondition_ = com.google.firestore.v1beta1.Precondition.newBuilder(precondition_) .mergeFrom(value) .buildPartial(); } else { precondition_ = value; } onChanged(); } else { preconditionBuilder_.mergeFrom(value); } return this; } /**
/** * * * <pre> * An optional precondition on the document. * The write will fail if this is set and not met by the target document. * </pre> * * <code>.google.firestore.v1beta1.Precondition current_document = 4;</code> */ public Builder mergeCurrentDocument(com.google.firestore.v1beta1.Precondition value) { if (currentDocumentBuilder_ == null) { if (currentDocument_ != null) { currentDocument_ = com.google.firestore.v1beta1.Precondition.newBuilder(currentDocument_) .mergeFrom(value) .buildPartial(); } else { currentDocument_ = value; } onChanged(); } else { currentDocumentBuilder_.mergeFrom(value); } return this; } /**
/** <code>.google.firestore.v1beta1.Precondition precondition = 2;</code> */ public Builder mergePrecondition(com.google.firestore.v1beta1.Precondition value) { if (preconditionBuilder_ == null) { if (precondition_ != null) { precondition_ = com.google.firestore.v1beta1.Precondition.newBuilder(precondition_) .mergeFrom(value) .buildPartial(); } else { precondition_ = value; } onChanged(); } else { preconditionBuilder_.mergeFrom(value); } return this; } /** <code>.google.firestore.v1beta1.Precondition precondition = 2;</code> */
public static Builder newBuilder(com.google.firestore.v1beta1.Precondition prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }
@java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); }
public static Write delete(Precondition precondition) { Write.Builder write = Write.newBuilder(); write.setDelete(DOCUMENT_NAME); write.getCurrentDocumentBuilder().mergeFrom(precondition); return write.build(); }
public static Write update( Map<String, Value> fields, @Nullable List<String> fieldMap, Precondition precondition) { Write.Builder write = Write.newBuilder(); Document.Builder document = write.getUpdateBuilder(); document.setName(DOCUMENT_NAME); document.putAllFields(fields); write.getUpdateMaskBuilder().addAllFieldPaths(fieldMap); write.getCurrentDocumentBuilder().mergeFrom(precondition); return write.build(); }