@java.lang.Override public com.google.firestore.v1beta1.Document getDefaultInstanceForType() { return com.google.firestore.v1beta1.Document.getDefaultInstance(); }
static DocumentSnapshot fromDocument( FirestoreImpl firestore, Timestamp readTime, Document document) { return new DocumentSnapshot( firestore, new DocumentReference(firestore, ResourcePath.create(document.getName())), document.getFieldsMap(), readTime, Timestamp.fromProto(document.getUpdateTime()), Timestamp.fromProto(document.getCreateTime())); }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.firestore.v1beta1.Document)) { return super.equals(obj); } com.google.firestore.v1beta1.Document other = (com.google.firestore.v1beta1.Document) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && internalGetFields().equals(other.internalGetFields()); result = result && (hasCreateTime() == other.hasCreateTime()); if (hasCreateTime()) { result = result && getCreateTime().equals(other.getCreateTime()); } result = result && (hasUpdateTime() == other.hasUpdateTime()); if (hasUpdateTime()) { result = result && getUpdateTime().equals(other.getUpdateTime()); } result = result && unknownFields.equals(other.unknownFields); return result; }
/** * * * <pre> * The resource name of the document, for example * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetFields(), FieldsDefaultEntryHolder.defaultEntry, 2); if (createTime_ != null) { output.writeMessage(3, getCreateTime()); } if (updateTime_ != null) { output.writeMessage(4, getUpdateTime()); } unknownFields.writeTo(output); }
public Builder mergeFrom(com.google.firestore.v1beta1.Document other) { if (other == com.google.firestore.v1beta1.Document.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } internalGetMutableFields().mergeFrom(other.internalGetFields()); if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } if (other.hasUpdateTime()) { mergeUpdateTime(other.getUpdateTime()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
if (foundBuilder_ == null) { if (resultCase_ == 1 && result_ != com.google.firestore.v1beta1.Document.getDefaultInstance()) { result_ = com.google.firestore.v1beta1.Document.newBuilder( (com.google.firestore.v1beta1.Document) result_) .mergeFrom(value)
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.firestore.v1beta1.DocumentChange)) { return super.equals(obj); } com.google.firestore.v1beta1.DocumentChange other = (com.google.firestore.v1beta1.DocumentChange) obj; boolean result = true; result = result && (hasDocument() == other.hasDocument()); if (hasDocument()) { result = result && getDocument().equals(other.getDocument()); } result = result && getTargetIdsList().equals(other.getTargetIdsList()); result = result && getRemovedTargetIdsList().equals(other.getRemovedTargetIdsList()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasDocument()) { hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; hash = (53 * hash) + getDocument().hashCode(); } if (getTargetIdsCount() > 0) { hash = (37 * hash) + TARGET_IDS_FIELD_NUMBER; hash = (53 * hash) + getTargetIdsList().hashCode(); } if (getRemovedTargetIdsCount() > 0) { hash = (37 * hash) + REMOVED_TARGET_IDS_FIELD_NUMBER; hash = (53 * hash) + getRemovedTargetIdsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
documentReference = new DocumentReference( FirestoreImpl.this, ResourcePath.create(response.getFound().getName())); documentSnapshot = DocumentSnapshot.fromDocument(
public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); }
com.google.firestore.v1beta1.Document.parser(), extensionRegistry)); break;
/** * * * <pre> * Output only. The time at which the document was last changed. * This value is initially set to the `create_time` then increases * monotonically with each change to the document. It can also be * compared to values from other documents and the `read_time` of a query. * </pre> * * <code>.google.protobuf.Timestamp update_time = 4;</code> */ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return getUpdateTime(); }
/** * * * <pre> * Output only. The time at which the document was created. * This value increases monotonically when a document is deleted then * recreated. It can also be compared to values from other documents and * the `read_time` of a query. * </pre> * * <code>.google.protobuf.Timestamp create_time = 3;</code> */ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return getCreateTime(); }
/** Use {@link #getFieldsMap()} instead. */ @java.lang.Deprecated public java.util.Map<java.lang.String, com.google.firestore.v1beta1.Value> getFields() { return getFieldsMap(); } /**
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); if (!internalGetFields().getMap().isEmpty()) { hash = (37 * hash) + FIELDS_FIELD_NUMBER; hash = (53 * hash) + internalGetFields().hashCode(); } if (hasCreateTime()) { hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getCreateTime().hashCode(); } if (hasUpdateTime()) { hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getUpdateTime().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } for (java.util.Map.Entry<java.lang.String, com.google.firestore.v1beta1.Value> entry : internalGetFields().getMap().entrySet()) { com.google.protobuf.MapEntry<java.lang.String, com.google.firestore.v1beta1.Value> fields__ = FieldsDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, fields__); } if (createTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); } if (updateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }