Skip to content

Commit b025d11

Browse files
feat: publish proto definitions for SUM/AVG in Firestore (#1304)
* feat: publish proto definitions for SUM/AVG in Firestore PiperOrigin-RevId: 552607134 Source-Link: googleapis/googleapis@88a9a5f Source-Link: https://github.com/googleapis/googleapis-gen/commit/047d73ae2fd4e526b474a617e168339d691b2510 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDQ3ZDczYWUyZmQ0ZTUyNmI0NzRhNjE3ZTE2ODMzOWQ2OTFiMjUxMCJ9 chore: Update the Java code generator (gapic-generator-java) to 2.23.1 PiperOrigin-RevId: 549674836 Source-Link: googleapis/googleapis@3b7a121 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2d643a4eff8c8ef4c9d5a2e59d2a0ca7c991eab6 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmQ2NDNhNGVmZjhjOGVmNGM5ZDVhMmU1OWQyYTBjYTdjOTkxZWFiNiJ9 chore: Add bloom filter related comments PiperOrigin-RevId: 538646627 Source-Link: googleapis/googleapis@1ceef69 Source-Link: https://github.com/googleapis/googleapis-gen/commit/fb7c4c4aef630f4957fa501c48587f983e17644a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZmI3YzRjNGFlZjYzMGY0OTU3ZmE1MDFjNDg1ODdmOTgzZTE3NjQ0YSJ9 chore(deps): Update gapic-generator-java to 2.21.0 PiperOrigin-RevId: 538365689 Source-Link: googleapis/googleapis@7ac8a24 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e58eedb75d3c07878097cdfbfd3ffdb7646763a3 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTU4ZWVkYjc1ZDNjMDc4NzgwOTdjZGZiZmQzZmZkYjc2NDY3NjNhMyJ9 feat: add CreateDatabase API PiperOrigin-RevId: 537397252 Source-Link: googleapis/googleapis@b4481e1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/6b4b12abe9ece6382ea8d6ffd5c50e36b32905f8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmI0YjEyYWJlOWVjZTYzODJlYThkNmZmZDVjNTBlMzZiMzI5MDVmOCJ9 chore: upgrading protobuf to 23.2 for code generation PiperOrigin-RevId: 537035741 Source-Link: googleapis/googleapis@640f743 Source-Link: https://github.com/googleapis/googleapis-gen/commit/5ec02ed2022878f99c94c763060ff6a018896b6e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNWVjMDJlZDIwMjI4NzhmOTljOTRjNzYzMDYwZmY2YTAxODg5NmI2ZSJ9 chore: upgrading Protobuf to 23.1 and gRPC to 1.55.0 in code generation PiperOrigin-RevId: 534084593 Source-Link: googleapis/googleapis@aa4559a Source-Link: https://github.com/googleapis/googleapis-gen/commit/370325af8236732f5885f5940e0ef481fee83003 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzcwMzI1YWY4MjM2NzMyZjU4ODVmNTk0MGUwZWY0ODFmZWU4MzAwMyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Accept interface change * Accept interface change * Accept interface change * Accept interface change * Accept interface change * Apply x-goog-request-params workaround. --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Tom Andersen <[email protected]>
1 parent ab082f4 commit b025d11

File tree

226 files changed

+14162
-2440
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+14162
-2440
lines changed

google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminClient.java

Lines changed: 173 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 Google LLC
2+
* Copyright 2023 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,6 +32,8 @@
3232
import com.google.cloud.firestore.v1.stub.FirestoreAdminStubSettings;
3333
import com.google.common.util.concurrent.MoreExecutors;
3434
import com.google.firestore.admin.v1.CollectionGroupName;
35+
import com.google.firestore.admin.v1.CreateDatabaseMetadata;
36+
import com.google.firestore.admin.v1.CreateDatabaseRequest;
3537
import com.google.firestore.admin.v1.CreateIndexRequest;
3638
import com.google.firestore.admin.v1.Database;
3739
import com.google.firestore.admin.v1.DatabaseName;
@@ -1642,6 +1644,176 @@ public final UnaryCallable<ImportDocumentsRequest, Operation> importDocumentsCal
16421644
return stub.importDocumentsCallable();
16431645
}
16441646

1647+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1648+
/**
1649+
* Create a database.
1650+
*
1651+
* <p>Sample code:
1652+
*
1653+
* <pre>{@code
1654+
* // This snippet has been automatically generated and should be regarded as a code template only.
1655+
* // It will require modifications to work:
1656+
* // - It may require correct/in-range values for request initialization.
1657+
* // - It may require specifying regional endpoints when creating the service client as shown in
1658+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1659+
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
1660+
* ProjectName parent = ProjectName.of("[PROJECT]");
1661+
* Database database = Database.newBuilder().build();
1662+
* String databaseId = "databaseId1688905718";
1663+
* Database response =
1664+
* firestoreAdminClient.createDatabaseAsync(parent, database, databaseId).get();
1665+
* }
1666+
* }</pre>
1667+
*
1668+
* @param parent Required. A parent name of the form `projects/{project_id}`
1669+
* @param database Required. The Database to create.
1670+
* @param databaseId Required. The ID to use for the database, which will become the final
1671+
* component of the database's resource name.
1672+
* <p>The value must be set to "(default)".
1673+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1674+
*/
1675+
public final OperationFuture<Database, CreateDatabaseMetadata> createDatabaseAsync(
1676+
ProjectName parent, Database database, String databaseId) {
1677+
CreateDatabaseRequest request =
1678+
CreateDatabaseRequest.newBuilder()
1679+
.setParent(parent == null ? null : parent.toString())
1680+
.setDatabase(database)
1681+
.setDatabaseId(databaseId)
1682+
.build();
1683+
return createDatabaseAsync(request);
1684+
}
1685+
1686+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1687+
/**
1688+
* Create a database.
1689+
*
1690+
* <p>Sample code:
1691+
*
1692+
* <pre>{@code
1693+
* // This snippet has been automatically generated and should be regarded as a code template only.
1694+
* // It will require modifications to work:
1695+
* // - It may require correct/in-range values for request initialization.
1696+
* // - It may require specifying regional endpoints when creating the service client as shown in
1697+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1698+
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
1699+
* String parent = ProjectName.of("[PROJECT]").toString();
1700+
* Database database = Database.newBuilder().build();
1701+
* String databaseId = "databaseId1688905718";
1702+
* Database response =
1703+
* firestoreAdminClient.createDatabaseAsync(parent, database, databaseId).get();
1704+
* }
1705+
* }</pre>
1706+
*
1707+
* @param parent Required. A parent name of the form `projects/{project_id}`
1708+
* @param database Required. The Database to create.
1709+
* @param databaseId Required. The ID to use for the database, which will become the final
1710+
* component of the database's resource name.
1711+
* <p>The value must be set to "(default)".
1712+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1713+
*/
1714+
public final OperationFuture<Database, CreateDatabaseMetadata> createDatabaseAsync(
1715+
String parent, Database database, String databaseId) {
1716+
CreateDatabaseRequest request =
1717+
CreateDatabaseRequest.newBuilder()
1718+
.setParent(parent)
1719+
.setDatabase(database)
1720+
.setDatabaseId(databaseId)
1721+
.build();
1722+
return createDatabaseAsync(request);
1723+
}
1724+
1725+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1726+
/**
1727+
* Create a database.
1728+
*
1729+
* <p>Sample code:
1730+
*
1731+
* <pre>{@code
1732+
* // This snippet has been automatically generated and should be regarded as a code template only.
1733+
* // It will require modifications to work:
1734+
* // - It may require correct/in-range values for request initialization.
1735+
* // - It may require specifying regional endpoints when creating the service client as shown in
1736+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1737+
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
1738+
* CreateDatabaseRequest request =
1739+
* CreateDatabaseRequest.newBuilder()
1740+
* .setParent(ProjectName.of("[PROJECT]").toString())
1741+
* .setDatabase(Database.newBuilder().build())
1742+
* .setDatabaseId("databaseId1688905718")
1743+
* .build();
1744+
* Database response = firestoreAdminClient.createDatabaseAsync(request).get();
1745+
* }
1746+
* }</pre>
1747+
*
1748+
* @param request The request object containing all of the parameters for the API call.
1749+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1750+
*/
1751+
public final OperationFuture<Database, CreateDatabaseMetadata> createDatabaseAsync(
1752+
CreateDatabaseRequest request) {
1753+
return createDatabaseOperationCallable().futureCall(request);
1754+
}
1755+
1756+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1757+
/**
1758+
* Create a database.
1759+
*
1760+
* <p>Sample code:
1761+
*
1762+
* <pre>{@code
1763+
* // This snippet has been automatically generated and should be regarded as a code template only.
1764+
* // It will require modifications to work:
1765+
* // - It may require correct/in-range values for request initialization.
1766+
* // - It may require specifying regional endpoints when creating the service client as shown in
1767+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1768+
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
1769+
* CreateDatabaseRequest request =
1770+
* CreateDatabaseRequest.newBuilder()
1771+
* .setParent(ProjectName.of("[PROJECT]").toString())
1772+
* .setDatabase(Database.newBuilder().build())
1773+
* .setDatabaseId("databaseId1688905718")
1774+
* .build();
1775+
* OperationFuture<Database, CreateDatabaseMetadata> future =
1776+
* firestoreAdminClient.createDatabaseOperationCallable().futureCall(request);
1777+
* // Do something.
1778+
* Database response = future.get();
1779+
* }
1780+
* }</pre>
1781+
*/
1782+
public final OperationCallable<CreateDatabaseRequest, Database, CreateDatabaseMetadata>
1783+
createDatabaseOperationCallable() {
1784+
return stub.createDatabaseOperationCallable();
1785+
}
1786+
1787+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1788+
/**
1789+
* Create a database.
1790+
*
1791+
* <p>Sample code:
1792+
*
1793+
* <pre>{@code
1794+
* // This snippet has been automatically generated and should be regarded as a code template only.
1795+
* // It will require modifications to work:
1796+
* // - It may require correct/in-range values for request initialization.
1797+
* // - It may require specifying regional endpoints when creating the service client as shown in
1798+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1799+
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
1800+
* CreateDatabaseRequest request =
1801+
* CreateDatabaseRequest.newBuilder()
1802+
* .setParent(ProjectName.of("[PROJECT]").toString())
1803+
* .setDatabase(Database.newBuilder().build())
1804+
* .setDatabaseId("databaseId1688905718")
1805+
* .build();
1806+
* ApiFuture<Operation> future =
1807+
* firestoreAdminClient.createDatabaseCallable().futureCall(request);
1808+
* // Do something.
1809+
* Operation response = future.get();
1810+
* }
1811+
* }</pre>
1812+
*/
1813+
public final UnaryCallable<CreateDatabaseRequest, Operation> createDatabaseCallable() {
1814+
return stub.createDatabaseCallable();
1815+
}
1816+
16451817
// AUTO-GENERATED DOCUMENTATION AND METHOD.
16461818
/**
16471819
* Gets information about a database.

google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/FirestoreAdminSettings.java

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 Google LLC
2+
* Copyright 2023 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -33,6 +33,8 @@
3333
import com.google.api.gax.rpc.TransportChannelProvider;
3434
import com.google.api.gax.rpc.UnaryCallSettings;
3535
import com.google.cloud.firestore.v1.stub.FirestoreAdminStubSettings;
36+
import com.google.firestore.admin.v1.CreateDatabaseMetadata;
37+
import com.google.firestore.admin.v1.CreateDatabaseRequest;
3638
import com.google.firestore.admin.v1.CreateIndexRequest;
3739
import com.google.firestore.admin.v1.Database;
3840
import com.google.firestore.admin.v1.DeleteIndexRequest;
@@ -175,6 +177,17 @@ public UnaryCallSettings<ImportDocumentsRequest, Operation> importDocumentsSetti
175177
return ((FirestoreAdminStubSettings) getStubSettings()).importDocumentsOperationSettings();
176178
}
177179

180+
/** Returns the object with the settings used for calls to createDatabase. */
181+
public UnaryCallSettings<CreateDatabaseRequest, Operation> createDatabaseSettings() {
182+
return ((FirestoreAdminStubSettings) getStubSettings()).createDatabaseSettings();
183+
}
184+
185+
/** Returns the object with the settings used for calls to createDatabase. */
186+
public OperationCallSettings<CreateDatabaseRequest, Database, CreateDatabaseMetadata>
187+
createDatabaseOperationSettings() {
188+
return ((FirestoreAdminStubSettings) getStubSettings()).createDatabaseOperationSettings();
189+
}
190+
178191
/** Returns the object with the settings used for calls to getDatabase. */
179192
public UnaryCallSettings<GetDatabaseRequest, Database> getDatabaseSettings() {
180193
return ((FirestoreAdminStubSettings) getStubSettings()).getDatabaseSettings();
@@ -384,6 +397,17 @@ public UnaryCallSettings.Builder<ImportDocumentsRequest, Operation> importDocume
384397
return getStubSettingsBuilder().importDocumentsOperationSettings();
385398
}
386399

400+
/** Returns the builder for the settings used for calls to createDatabase. */
401+
public UnaryCallSettings.Builder<CreateDatabaseRequest, Operation> createDatabaseSettings() {
402+
return getStubSettingsBuilder().createDatabaseSettings();
403+
}
404+
405+
/** Returns the builder for the settings used for calls to createDatabase. */
406+
public OperationCallSettings.Builder<CreateDatabaseRequest, Database, CreateDatabaseMetadata>
407+
createDatabaseOperationSettings() {
408+
return getStubSettingsBuilder().createDatabaseOperationSettings();
409+
}
410+
387411
/** Returns the builder for the settings used for calls to getDatabase. */
388412
public UnaryCallSettings.Builder<GetDatabaseRequest, Database> getDatabaseSettings() {
389413
return getStubSettingsBuilder().getDatabaseSettings();

google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/gapic_metadata.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
"grpc": {
1111
"libraryClient": "FirestoreAdminClient",
1212
"rpcs": {
13+
"CreateDatabase": {
14+
"methods": ["createDatabaseAsync", "createDatabaseAsync", "createDatabaseAsync", "createDatabaseOperationCallable", "createDatabaseCallable"]
15+
},
1316
"CreateIndex": {
1417
"methods": ["createIndexAsync", "createIndexAsync", "createIndexAsync", "createIndexOperationCallable", "createIndexCallable"]
1518
},

google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 Google LLC
2+
* Copyright 2023 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 Google LLC
2+
* Copyright 2023 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,6 +22,8 @@
2222
import com.google.api.gax.core.BackgroundResource;
2323
import com.google.api.gax.rpc.OperationCallable;
2424
import com.google.api.gax.rpc.UnaryCallable;
25+
import com.google.firestore.admin.v1.CreateDatabaseMetadata;
26+
import com.google.firestore.admin.v1.CreateDatabaseRequest;
2527
import com.google.firestore.admin.v1.CreateIndexRequest;
2628
import com.google.firestore.admin.v1.Database;
2729
import com.google.firestore.admin.v1.DeleteIndexRequest;
@@ -132,6 +134,15 @@ public UnaryCallable<ImportDocumentsRequest, Operation> importDocumentsCallable(
132134
throw new UnsupportedOperationException("Not implemented: importDocumentsCallable()");
133135
}
134136

137+
public OperationCallable<CreateDatabaseRequest, Database, CreateDatabaseMetadata>
138+
createDatabaseOperationCallable() {
139+
throw new UnsupportedOperationException("Not implemented: createDatabaseOperationCallable()");
140+
}
141+
142+
public UnaryCallable<CreateDatabaseRequest, Operation> createDatabaseCallable() {
143+
throw new UnsupportedOperationException("Not implemented: createDatabaseCallable()");
144+
}
145+
135146
public UnaryCallable<GetDatabaseRequest, Database> getDatabaseCallable() {
136147
throw new UnsupportedOperationException("Not implemented: getDatabaseCallable()");
137148
}

0 commit comments

Comments
 (0)