Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: expose Firestore PITR fields in Database to stable #1495

Merged
merged 2 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1390,6 +1390,8 @@ public final UnaryCallable<ListFieldsRequest, ListFieldsResponse> listFieldsCall
* .setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
* .addAllCollectionIds(new ArrayList<String>())
* .setOutputUriPrefix("outputUriPrefix499858205")
* .addAllNamespaceIds(new ArrayList<String>())
* .setSnapshotTime(Timestamp.newBuilder().build())
* .build();
* ExportDocumentsResponse response = firestoreAdminClient.exportDocumentsAsync(request).get();
* }
Expand Down Expand Up @@ -1429,6 +1431,8 @@ public final UnaryCallable<ListFieldsRequest, ListFieldsResponse> listFieldsCall
* .setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
* .addAllCollectionIds(new ArrayList<String>())
* .setOutputUriPrefix("outputUriPrefix499858205")
* .addAllNamespaceIds(new ArrayList<String>())
* .setSnapshotTime(Timestamp.newBuilder().build())
* .build();
* OperationFuture<ExportDocumentsResponse, ExportDocumentsMetadata> future =
* firestoreAdminClient.exportDocumentsOperationCallable().futureCall(request);
Expand Down Expand Up @@ -1469,6 +1473,8 @@ public final UnaryCallable<ListFieldsRequest, ListFieldsResponse> listFieldsCall
* .setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
* .addAllCollectionIds(new ArrayList<String>())
* .setOutputUriPrefix("outputUriPrefix499858205")
* .addAllNamespaceIds(new ArrayList<String>())
* .setSnapshotTime(Timestamp.newBuilder().build())
* .build();
* ApiFuture<Operation> future =
* firestoreAdminClient.exportDocumentsCallable().futureCall(request);
Expand Down Expand Up @@ -1564,6 +1570,7 @@ public final OperationFuture<Empty, ImportDocumentsMetadata> importDocumentsAsyn
* .setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
* .addAllCollectionIds(new ArrayList<String>())
* .setInputUriPrefix("inputUriPrefix-97481100")
* .addAllNamespaceIds(new ArrayList<String>())
* .build();
* firestoreAdminClient.importDocumentsAsync(request).get();
* }
Expand Down Expand Up @@ -1598,6 +1605,7 @@ public final OperationFuture<Empty, ImportDocumentsMetadata> importDocumentsAsyn
* .setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
* .addAllCollectionIds(new ArrayList<String>())
* .setInputUriPrefix("inputUriPrefix-97481100")
* .addAllNamespaceIds(new ArrayList<String>())
* .build();
* OperationFuture<Empty, ImportDocumentsMetadata> future =
* firestoreAdminClient.importDocumentsOperationCallable().futureCall(request);
Expand Down Expand Up @@ -1632,6 +1640,7 @@ public final OperationFuture<Empty, ImportDocumentsMetadata> importDocumentsAsyn
* .setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
* .addAllCollectionIds(new ArrayList<String>())
* .setInputUriPrefix("inputUriPrefix-97481100")
* .addAllNamespaceIds(new ArrayList<String>())
* .build();
* ApiFuture<Operation> future =
* firestoreAdminClient.importDocumentsCallable().futureCall(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,15 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.firestore.admin.v1.Database$PointInTimeRecoveryEnablement",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.firestore.admin.v1.DeleteIndexRequest",
"queryAllDeclaredConstructors": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@
import com.google.firestore.admin.v1.ProjectName;
import com.google.longrunning.Operation;
import com.google.protobuf.Any;
import com.google.protobuf.Duration;
import com.google.protobuf.Empty;
import com.google.protobuf.FieldMask;
import com.google.protobuf.Timestamp;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -927,6 +929,8 @@ public void createDatabaseTest() throws Exception {
Database.newBuilder()
.setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
.setLocationId("locationId1541836720")
.setVersionRetentionPeriod(Duration.newBuilder().build())
.setEarliestVersionTime(Timestamp.newBuilder().build())
.setKeyPrefix("keyPrefix-2076395055")
.setEtag("etag3123477")
.build();
Expand Down Expand Up @@ -983,6 +987,8 @@ public void createDatabaseTest2() throws Exception {
Database.newBuilder()
.setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
.setLocationId("locationId1541836720")
.setVersionRetentionPeriod(Duration.newBuilder().build())
.setEarliestVersionTime(Timestamp.newBuilder().build())
.setKeyPrefix("keyPrefix-2076395055")
.setEtag("etag3123477")
.build();
Expand Down Expand Up @@ -1039,6 +1045,8 @@ public void getDatabaseTest() throws Exception {
Database.newBuilder()
.setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
.setLocationId("locationId1541836720")
.setVersionRetentionPeriod(Duration.newBuilder().build())
.setEarliestVersionTime(Timestamp.newBuilder().build())
.setKeyPrefix("keyPrefix-2076395055")
.setEtag("etag3123477")
.build();
Expand Down Expand Up @@ -1086,6 +1094,8 @@ public void getDatabaseTest2() throws Exception {
Database.newBuilder()
.setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
.setLocationId("locationId1541836720")
.setVersionRetentionPeriod(Duration.newBuilder().build())
.setEarliestVersionTime(Timestamp.newBuilder().build())
.setKeyPrefix("keyPrefix-2076395055")
.setEtag("etag3123477")
.build();
Expand Down Expand Up @@ -1217,6 +1227,8 @@ public void updateDatabaseTest() throws Exception {
Database.newBuilder()
.setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
.setLocationId("locationId1541836720")
.setVersionRetentionPeriod(Duration.newBuilder().build())
.setEarliestVersionTime(Timestamp.newBuilder().build())
.setKeyPrefix("keyPrefix-2076395055")
.setEtag("etag3123477")
.build();
Expand All @@ -1232,6 +1244,8 @@ public void updateDatabaseTest() throws Exception {
Database.newBuilder()
.setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
.setLocationId("locationId1541836720")
.setVersionRetentionPeriod(Duration.newBuilder().build())
.setEarliestVersionTime(Timestamp.newBuilder().build())
.setKeyPrefix("keyPrefix-2076395055")
.setEtag("etag3123477")
.build();
Expand Down Expand Up @@ -1267,6 +1281,8 @@ public void updateDatabaseExceptionTest() throws Exception {
Database.newBuilder()
.setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
.setLocationId("locationId1541836720")
.setVersionRetentionPeriod(Duration.newBuilder().build())
.setEarliestVersionTime(Timestamp.newBuilder().build())
.setKeyPrefix("keyPrefix-2076395055")
.setEtag("etag3123477")
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@
import com.google.longrunning.Operation;
import com.google.protobuf.AbstractMessage;
import com.google.protobuf.Any;
import com.google.protobuf.Duration;
import com.google.protobuf.Empty;
import com.google.protobuf.FieldMask;
import com.google.protobuf.Timestamp;
import io.grpc.StatusRuntimeException;
import java.io.IOException;
import java.util.ArrayList;
Expand Down Expand Up @@ -845,6 +847,8 @@ public void createDatabaseTest() throws Exception {
Database.newBuilder()
.setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
.setLocationId("locationId1541836720")
.setVersionRetentionPeriod(Duration.newBuilder().build())
.setEarliestVersionTime(Timestamp.newBuilder().build())
.setKeyPrefix("keyPrefix-2076395055")
.setEtag("etag3123477")
.build();
Expand Down Expand Up @@ -900,6 +904,8 @@ public void createDatabaseTest2() throws Exception {
Database.newBuilder()
.setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
.setLocationId("locationId1541836720")
.setVersionRetentionPeriod(Duration.newBuilder().build())
.setEarliestVersionTime(Timestamp.newBuilder().build())
.setKeyPrefix("keyPrefix-2076395055")
.setEtag("etag3123477")
.build();
Expand Down Expand Up @@ -955,6 +961,8 @@ public void getDatabaseTest() throws Exception {
Database.newBuilder()
.setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
.setLocationId("locationId1541836720")
.setVersionRetentionPeriod(Duration.newBuilder().build())
.setEarliestVersionTime(Timestamp.newBuilder().build())
.setKeyPrefix("keyPrefix-2076395055")
.setEtag("etag3123477")
.build();
Expand Down Expand Up @@ -996,6 +1004,8 @@ public void getDatabaseTest2() throws Exception {
Database.newBuilder()
.setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
.setLocationId("locationId1541836720")
.setVersionRetentionPeriod(Duration.newBuilder().build())
.setEarliestVersionTime(Timestamp.newBuilder().build())
.setKeyPrefix("keyPrefix-2076395055")
.setEtag("etag3123477")
.build();
Expand Down Expand Up @@ -1109,6 +1119,8 @@ public void updateDatabaseTest() throws Exception {
Database.newBuilder()
.setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
.setLocationId("locationId1541836720")
.setVersionRetentionPeriod(Duration.newBuilder().build())
.setEarliestVersionTime(Timestamp.newBuilder().build())
.setKeyPrefix("keyPrefix-2076395055")
.setEtag("etag3123477")
.build();
Expand Down
Loading