/** * * * <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 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 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; }
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())); }
static QueryDocumentSnapshot fromDocument( FirestoreImpl firestore, Timestamp readTime, Document document) { return new QueryDocumentSnapshot( firestore, new DocumentReference(firestore, ResourcePath.create(document.getName())), document.getFieldsMap(), readTime, Timestamp.fromProto(document.getUpdateTime()), Timestamp.fromProto(document.getCreateTime())); }
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; }
documentReference = new DocumentReference( FirestoreImpl.this, ResourcePath.create(response.getFound().getName())); documentSnapshot = DocumentSnapshot.fromDocument(
ResourcePath name = ResourcePath.create(document.getName());
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())); }
static QueryDocumentSnapshot fromDocument( FirestoreImpl firestore, Timestamp readTime, Document document) { return new QueryDocumentSnapshot( firestore, new DocumentReference(firestore, ResourcePath.create(document.getName())), document.getFieldsMap(), readTime, Timestamp.fromProto(document.getUpdateTime()), Timestamp.fromProto(document.getCreateTime())); }
documentReference = new DocumentReference( FirestoreImpl.this, ResourcePath.create(response.getFound().getName())); documentSnapshot = DocumentSnapshot.fromDocument(
ResourcePath name = ResourcePath.create(document.getName());