Skip to content

Commit

Permalink
feat: expose Firestore PITR fields in Database to stable (#1495)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

feat: expose Firestore snapshot_time field in export API to stable
feat: expose Firestore namespace ID fields in import/export APIs to stable
docs: assorted typo fixes and whitespace updates

PiperOrigin-RevId: 587811576

Source-Link: https://togithub.com/googleapis/googleapis/commit/fbe1c8e68ea9acd93658aaaab414033096bf34f4

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/5fe704d94fa2d9a1dce752942b7308873124b7dd
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNWZlNzA0ZDk0ZmEyZDlhMWRjZTc1Mjk0MmI3MzA4ODczMTI0YjdkZCJ9
  • Loading branch information
gcf-owl-bot[bot] committed Dec 5, 2023
1 parent 1cfa03d commit 21ad25f
Show file tree
Hide file tree
Showing 27 changed files with 4,105 additions and 392 deletions.
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

0 comments on commit 21ad25f

Please sign in to comment.