Skip to content

Commit aabd4ac

Browse files
gcf-owl-bot[bot]SurferJeffAtGooglesuztomo
authored
fix: change REST binding for ListDocuments to support root collection (#900)
* fix: change REST binding for ListDocuments to support root collection PiperOrigin-RevId: 432504691 Source-Link: googleapis/googleapis@3db3087 Source-Link: https://github.com/googleapis/googleapis-gen/commit/80f0375a1a82460532422e504a41ef2a3e2f72e1 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiODBmMDM3NWExYTgyNDYwNTMyNDIyZTUwNGE0MWVmMmEzZTJmNzJlMSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Jeffrey Rennie <rennie@google.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Tomo Suzuki <suztomo@google.com>
1 parent 0e1e3c5 commit aabd4ac

File tree

53 files changed

+8391
-531
lines changed

Some content is hidden

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

53 files changed

+8391
-531
lines changed

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

Lines changed: 332 additions & 7 deletions
Large diffs are not rendered by default.

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

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,28 @@
3333
import com.google.api.gax.rpc.UnaryCallSettings;
3434
import com.google.cloud.firestore.v1.stub.FirestoreAdminStubSettings;
3535
import com.google.firestore.admin.v1.CreateIndexRequest;
36+
import com.google.firestore.admin.v1.Database;
3637
import com.google.firestore.admin.v1.DeleteIndexRequest;
3738
import com.google.firestore.admin.v1.ExportDocumentsMetadata;
3839
import com.google.firestore.admin.v1.ExportDocumentsRequest;
3940
import com.google.firestore.admin.v1.ExportDocumentsResponse;
4041
import com.google.firestore.admin.v1.Field;
4142
import com.google.firestore.admin.v1.FieldOperationMetadata;
43+
import com.google.firestore.admin.v1.GetDatabaseRequest;
4244
import com.google.firestore.admin.v1.GetFieldRequest;
4345
import com.google.firestore.admin.v1.GetIndexRequest;
4446
import com.google.firestore.admin.v1.ImportDocumentsMetadata;
4547
import com.google.firestore.admin.v1.ImportDocumentsRequest;
4648
import com.google.firestore.admin.v1.Index;
4749
import com.google.firestore.admin.v1.IndexOperationMetadata;
50+
import com.google.firestore.admin.v1.ListDatabasesRequest;
51+
import com.google.firestore.admin.v1.ListDatabasesResponse;
4852
import com.google.firestore.admin.v1.ListFieldsRequest;
4953
import com.google.firestore.admin.v1.ListFieldsResponse;
5054
import com.google.firestore.admin.v1.ListIndexesRequest;
5155
import com.google.firestore.admin.v1.ListIndexesResponse;
56+
import com.google.firestore.admin.v1.UpdateDatabaseMetadata;
57+
import com.google.firestore.admin.v1.UpdateDatabaseRequest;
5258
import com.google.firestore.admin.v1.UpdateFieldRequest;
5359
import com.google.longrunning.Operation;
5460
import com.google.protobuf.Empty;
@@ -163,6 +169,27 @@ public UnaryCallSettings<ImportDocumentsRequest, Operation> importDocumentsSetti
163169
return ((FirestoreAdminStubSettings) getStubSettings()).importDocumentsOperationSettings();
164170
}
165171

172+
/** Returns the object with the settings used for calls to getDatabase. */
173+
public UnaryCallSettings<GetDatabaseRequest, Database> getDatabaseSettings() {
174+
return ((FirestoreAdminStubSettings) getStubSettings()).getDatabaseSettings();
175+
}
176+
177+
/** Returns the object with the settings used for calls to listDatabases. */
178+
public UnaryCallSettings<ListDatabasesRequest, ListDatabasesResponse> listDatabasesSettings() {
179+
return ((FirestoreAdminStubSettings) getStubSettings()).listDatabasesSettings();
180+
}
181+
182+
/** Returns the object with the settings used for calls to updateDatabase. */
183+
public UnaryCallSettings<UpdateDatabaseRequest, Operation> updateDatabaseSettings() {
184+
return ((FirestoreAdminStubSettings) getStubSettings()).updateDatabaseSettings();
185+
}
186+
187+
/** Returns the object with the settings used for calls to updateDatabase. */
188+
public OperationCallSettings<UpdateDatabaseRequest, Database, UpdateDatabaseMetadata>
189+
updateDatabaseOperationSettings() {
190+
return ((FirestoreAdminStubSettings) getStubSettings()).updateDatabaseOperationSettings();
191+
}
192+
166193
public static final FirestoreAdminSettings create(FirestoreAdminStubSettings stub)
167194
throws IOException {
168195
return new FirestoreAdminSettings.Builder(stub.toBuilder()).build();
@@ -333,6 +360,28 @@ public UnaryCallSettings.Builder<ImportDocumentsRequest, Operation> importDocume
333360
return getStubSettingsBuilder().importDocumentsOperationSettings();
334361
}
335362

363+
/** Returns the builder for the settings used for calls to getDatabase. */
364+
public UnaryCallSettings.Builder<GetDatabaseRequest, Database> getDatabaseSettings() {
365+
return getStubSettingsBuilder().getDatabaseSettings();
366+
}
367+
368+
/** Returns the builder for the settings used for calls to listDatabases. */
369+
public UnaryCallSettings.Builder<ListDatabasesRequest, ListDatabasesResponse>
370+
listDatabasesSettings() {
371+
return getStubSettingsBuilder().listDatabasesSettings();
372+
}
373+
374+
/** Returns the builder for the settings used for calls to updateDatabase. */
375+
public UnaryCallSettings.Builder<UpdateDatabaseRequest, Operation> updateDatabaseSettings() {
376+
return getStubSettingsBuilder().updateDatabaseSettings();
377+
}
378+
379+
/** Returns the builder for the settings used for calls to updateDatabase. */
380+
public OperationCallSettings.Builder<UpdateDatabaseRequest, Database, UpdateDatabaseMetadata>
381+
updateDatabaseOperationSettings() {
382+
return getStubSettingsBuilder().updateDatabaseOperationSettings();
383+
}
384+
336385
@Override
337386
public FirestoreAdminSettings build() throws IOException {
338387
return new FirestoreAdminSettings(this);

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
"ExportDocuments": {
2020
"methods": ["exportDocumentsAsync", "exportDocumentsAsync", "exportDocumentsAsync", "exportDocumentsOperationCallable", "exportDocumentsCallable"]
2121
},
22+
"GetDatabase": {
23+
"methods": ["getDatabase", "getDatabase", "getDatabase", "getDatabaseCallable"]
24+
},
2225
"GetField": {
2326
"methods": ["getField", "getField", "getField", "getFieldCallable"]
2427
},
@@ -28,12 +31,18 @@
2831
"ImportDocuments": {
2932
"methods": ["importDocumentsAsync", "importDocumentsAsync", "importDocumentsAsync", "importDocumentsOperationCallable", "importDocumentsCallable"]
3033
},
34+
"ListDatabases": {
35+
"methods": ["listDatabases", "listDatabases", "listDatabases", "listDatabasesCallable"]
36+
},
3137
"ListFields": {
3238
"methods": ["listFields", "listFields", "listFields", "listFieldsPagedCallable", "listFieldsCallable"]
3339
},
3440
"ListIndexes": {
3541
"methods": ["listIndexes", "listIndexes", "listIndexes", "listIndexesPagedCallable", "listIndexesCallable"]
3642
},
43+
"UpdateDatabase": {
44+
"methods": ["updateDatabaseAsync", "updateDatabaseAsync", "updateDatabaseOperationCallable", "updateDatabaseCallable"]
45+
},
3746
"UpdateField": {
3847
"methods": ["updateFieldAsync", "updateFieldAsync", "updateFieldOperationCallable", "updateFieldCallable"]
3948
}

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

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,38 @@
1515
*/
1616

1717
/**
18-
* The interfaces provided are listed below, along with usage samples.
18+
* A client to Cloud Firestore API
19+
*
20+
* <p>The interfaces provided are listed below, along with usage samples.
1921
*
2022
* <p>======================= FirestoreAdminClient =======================
2123
*
22-
* <p>Service Description: Operations are created by service `FirestoreAdmin`, but are accessed via
23-
* service `google.longrunning.Operations`.
24+
* <p>Service Description: The Cloud Firestore Admin API.
25+
*
26+
* <p>This API provides several administrative services for Cloud Firestore.
27+
*
28+
* <p>Project, Database, Namespace, Collection, Collection Group, and Document are used as defined
29+
* in the Google Cloud Firestore API.
30+
*
31+
* <p>Operation: An Operation represents work being performed in the background.
32+
*
33+
* <p>The index service manages Cloud Firestore indexes.
34+
*
35+
* <p>Index creation is performed asynchronously. An Operation resource is created for each such
36+
* asynchronous operation. The state of the operation (including any errors encountered) may be
37+
* queried via the Operation resource.
38+
*
39+
* <p>The Operations collection provides a record of actions performed for the specified Project
40+
* (including any Operations in progress). Operations are not created directly but through calls on
41+
* other collections or resources.
42+
*
43+
* <p>An Operation that is done may be deleted so that it is no longer listed as part of the
44+
* Operation collection. Operations are garbage collected after 30 days. By default, ListOperations
45+
* will only return in progress and failed operations. To list completed operation, issue a
46+
* ListOperations request with the filter `done: true`.
47+
*
48+
* <p>Operations are created by service `FirestoreAdmin`, but are accessed via service
49+
* `google.longrunning.Operations`.
2450
*
2551
* <p>Sample for FirestoreAdminClient:
2652
*

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,28 @@
2323
import com.google.api.gax.rpc.OperationCallable;
2424
import com.google.api.gax.rpc.UnaryCallable;
2525
import com.google.firestore.admin.v1.CreateIndexRequest;
26+
import com.google.firestore.admin.v1.Database;
2627
import com.google.firestore.admin.v1.DeleteIndexRequest;
2728
import com.google.firestore.admin.v1.ExportDocumentsMetadata;
2829
import com.google.firestore.admin.v1.ExportDocumentsRequest;
2930
import com.google.firestore.admin.v1.ExportDocumentsResponse;
3031
import com.google.firestore.admin.v1.Field;
3132
import com.google.firestore.admin.v1.FieldOperationMetadata;
33+
import com.google.firestore.admin.v1.GetDatabaseRequest;
3234
import com.google.firestore.admin.v1.GetFieldRequest;
3335
import com.google.firestore.admin.v1.GetIndexRequest;
3436
import com.google.firestore.admin.v1.ImportDocumentsMetadata;
3537
import com.google.firestore.admin.v1.ImportDocumentsRequest;
3638
import com.google.firestore.admin.v1.Index;
3739
import com.google.firestore.admin.v1.IndexOperationMetadata;
40+
import com.google.firestore.admin.v1.ListDatabasesRequest;
41+
import com.google.firestore.admin.v1.ListDatabasesResponse;
3842
import com.google.firestore.admin.v1.ListFieldsRequest;
3943
import com.google.firestore.admin.v1.ListFieldsResponse;
4044
import com.google.firestore.admin.v1.ListIndexesRequest;
4145
import com.google.firestore.admin.v1.ListIndexesResponse;
46+
import com.google.firestore.admin.v1.UpdateDatabaseMetadata;
47+
import com.google.firestore.admin.v1.UpdateDatabaseRequest;
4248
import com.google.firestore.admin.v1.UpdateFieldRequest;
4349
import com.google.longrunning.Operation;
4450
import com.google.longrunning.stub.OperationsStub;
@@ -122,6 +128,23 @@ public UnaryCallable<ImportDocumentsRequest, Operation> importDocumentsCallable(
122128
throw new UnsupportedOperationException("Not implemented: importDocumentsCallable()");
123129
}
124130

131+
public UnaryCallable<GetDatabaseRequest, Database> getDatabaseCallable() {
132+
throw new UnsupportedOperationException("Not implemented: getDatabaseCallable()");
133+
}
134+
135+
public UnaryCallable<ListDatabasesRequest, ListDatabasesResponse> listDatabasesCallable() {
136+
throw new UnsupportedOperationException("Not implemented: listDatabasesCallable()");
137+
}
138+
139+
public OperationCallable<UpdateDatabaseRequest, Database, UpdateDatabaseMetadata>
140+
updateDatabaseOperationCallable() {
141+
throw new UnsupportedOperationException("Not implemented: updateDatabaseOperationCallable()");
142+
}
143+
144+
public UnaryCallable<UpdateDatabaseRequest, Operation> updateDatabaseCallable() {
145+
throw new UnsupportedOperationException("Not implemented: updateDatabaseCallable()");
146+
}
147+
125148
@Override
126149
public abstract void close();
127150
}

0 commit comments

Comments
 (0)