diff --git a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentReference.java b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentReference.java index 152cef0e7571..2da052d40b1e 100644 --- a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentReference.java +++ b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentReference.java @@ -46,7 +46,8 @@ public class DocumentReference { private final ResourcePath path; private final FirestoreImpl firestore; - DocumentReference(FirestoreImpl firestore, ResourcePath path) { + protected DocumentReference( + FirestoreImpl firestore, ResourcePath path) { // Elevated access level for mocking. this.path = path; this.firestore = firestore; } diff --git a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentSnapshot.java b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentSnapshot.java index 7fd51f5d2903..295dc1d4b804 100644 --- a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentSnapshot.java +++ b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentSnapshot.java @@ -53,13 +53,13 @@ public class DocumentSnapshot { @Nullable private final Timestamp updateTime; @Nullable private final Timestamp createTime; - DocumentSnapshot( + protected DocumentSnapshot( FirestoreImpl firestore, DocumentReference docRef, @Nullable Map fields, @Nullable Timestamp readTime, @Nullable Timestamp updateTime, - @Nullable Timestamp createTime) { + @Nullable Timestamp createTime) { // Elevated access level for mocking. this.firestore = firestore; this.docRef = docRef; this.fields = fields; diff --git a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Query.java b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Query.java index 61296123d044..aaa67f730cc7 100644 --- a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Query.java +++ b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Query.java @@ -255,7 +255,10 @@ public int hashCode() { this(firestore, path, new QueryOptions()); } - private Query(FirestoreImpl firestore, ResourcePath path, QueryOptions queryOptions) { + protected Query( + FirestoreImpl firestore, + ResourcePath path, + QueryOptions queryOptions) { // Elevated access level for mocking. Preconditions.checkArgument( path.isCollection(), "Invalid path specified. Path should point to a collection"); diff --git a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/QueryDocumentSnapshot.java b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/QueryDocumentSnapshot.java index 1f1126fab9f5..7a434f20c18f 100644 --- a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/QueryDocumentSnapshot.java +++ b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/QueryDocumentSnapshot.java @@ -37,13 +37,13 @@ * that does so. */ public class QueryDocumentSnapshot extends DocumentSnapshot { - private QueryDocumentSnapshot( + protected QueryDocumentSnapshot( FirestoreImpl firestore, DocumentReference docRef, Map fields, Timestamp readTime, Timestamp updateTime, - Timestamp createTime) { + Timestamp createTime) { // Elevated access level for mocking. super(firestore, docRef, fields, readTime, updateTime, createTime); } diff --git a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/QuerySnapshot.java b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/QuerySnapshot.java index b73dda84741d..64e2987f514d 100644 --- a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/QuerySnapshot.java +++ b/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/QuerySnapshot.java @@ -34,7 +34,7 @@ public abstract class QuerySnapshot implements Iterable { private final Query query; private final Timestamp readTime; - private QuerySnapshot(Query query, Timestamp readTime) { + protected QuerySnapshot(Query query, Timestamp readTime) { // Elevated access level for mocking. this.query = query; this.readTime = readTime; }