/** * * * <pre> * The database name. In the format: * `projects/{project_id}/databases/{database_id}`. * </pre> * * <code>string database = 1;</code> */ public Builder clearDatabase() { database_ = getDefaultInstance().getDatabase(); 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) + DATABASE_FIELD_NUMBER; hash = (53 * hash) + getDatabase().hashCode(); if (!internalGetLabels().getMap().isEmpty()) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } switch (targetChangeCase_) { case 2: hash = (37 * hash) + ADD_TARGET_FIELD_NUMBER; hash = (53 * hash) + getAddTarget().hashCode(); break; case 3: hash = (37 * hash) + REMOVE_TARGET_FIELD_NUMBER; hash = (53 * hash) + getRemoveTarget(); break; case 0: default: } 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.ListenRequest)) { return super.equals(obj); } com.google.firestore.v1beta1.ListenRequest other = (com.google.firestore.v1beta1.ListenRequest) obj; boolean result = true; result = result && getDatabase().equals(other.getDatabase()); result = result && internalGetLabels().equals(other.internalGetLabels()); result = result && getTargetChangeCase().equals(other.getTargetChangeCase()); if (!result) return false; switch (targetChangeCase_) { case 2: result = result && getAddTarget().equals(other.getAddTarget()); break; case 3: result = result && (getRemoveTarget() == other.getRemoveTarget()); break; case 0: default: } result = result && unknownFields.equals(other.unknownFields); return result; }
private void awaitAddTarget() throws InterruptedException { ListenRequest listenRequest = requests.take(); assertEquals(DATABASE_NAME, listenRequest.getDatabase()); assertEquals(TARGET_ID, listenRequest.getAddTarget().getTargetId()); }
public Builder mergeFrom(com.google.firestore.v1beta1.ListenRequest other) { if (other == com.google.firestore.v1beta1.ListenRequest.getDefaultInstance()) return this; if (!other.getDatabase().isEmpty()) { database_ = other.database_; onChanged(); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); switch (other.getTargetChangeCase()) { case ADD_TARGET: { mergeAddTarget(other.getAddTarget()); break; } case REMOVE_TARGET: { setRemoveTarget(other.getRemoveTarget()); break; } case TARGETCHANGE_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
private void awaitResumeToken() throws InterruptedException { ListenRequest listenRequest = requests.take(); assertEquals(DATABASE_NAME, listenRequest.getDatabase()); assertEquals(TARGET_ID, listenRequest.getAddTarget().getTargetId()); assertEquals(RESUME_TOKEN, listenRequest.getAddTarget().getResumeToken()); }