what-the-bank/sources/com/google/firebase/firestore/SetOptions.java

50 lines
1.6 KiB
Java

package com.google.firebase.firestore;
import com.google.firebase.firestore.model.mutation.FieldMask;
import com.google.firebase.firestore.util.Preconditions;
/* loaded from: classes2.dex */
public final class SetOptions {
private final FieldMask fieldMask;
private final boolean merge;
static final SetOptions OVERWRITE = new SetOptions(false, null);
private static final SetOptions MERGE_ALL_FIELDS = new SetOptions(true, null);
private SetOptions(boolean z, FieldMask fieldMask) {
Preconditions.checkArgument(fieldMask == null || z, "Cannot specify a fieldMask for non-merge sets()", new Object[0]);
this.merge = z;
this.fieldMask = fieldMask;
}
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
SetOptions setOptions = (SetOptions) obj;
if (this.merge != setOptions.merge) {
return false;
}
FieldMask fieldMask = this.fieldMask;
FieldMask fieldMask2 = setOptions.fieldMask;
return fieldMask != null ? fieldMask.equals(fieldMask2) : fieldMask2 == null;
}
public final int hashCode() {
boolean z = this.merge;
FieldMask fieldMask = this.fieldMask;
return ((z ? 1 : 0) * 31) + (fieldMask != null ? fieldMask.hashCode() : 0);
}
/* JADX INFO: Access modifiers changed from: package-private */
public final boolean isMerge() {
return this.merge;
}
public final FieldMask getFieldMask() {
return this.fieldMask;
}
}