This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * - *
- *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
* IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
- * firestoreAdminClient.deleteIndex(name);
+ * Index response = firestoreAdminClient.getIndex(name);
* }
- *
- *
+ * }
*
- * Note: close() needs to be called on the firestoreAdminClient object to clean up resources such + *
Note: close() needs to be called on the FirestoreAdminClient object to clean up resources such * as threads. In the example above, try-with-resources is used, which automatically calls close(). * *
The surface of this class includes several types of Java methods for each of the API's @@ -105,30 +104,25 @@ * *
To customize credentials: * - *
- *
+ * {@code
* FirestoreAdminSettings firestoreAdminSettings =
* FirestoreAdminSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
* .build();
- * FirestoreAdminClient firestoreAdminClient =
- * FirestoreAdminClient.create(firestoreAdminSettings);
- *
- *
+ * FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create(firestoreAdminSettings);
+ * }
*
- * To customize the endpoint:
+ * To customize the endpoint: * - *
- *
+ * {@code
* FirestoreAdminSettings firestoreAdminSettings =
* FirestoreAdminSettings.newBuilder().setEndpoint(myEndpoint).build();
- * FirestoreAdminClient firestoreAdminClient =
- * FirestoreAdminClient.create(firestoreAdminSettings);
- *
- *
+ * FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create(firestoreAdminSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. */ -@Generated("by gapic-generator") -@BetaApi +@Generated("by gapic-generator-java") public class FirestoreAdminClient implements BackgroundResource { private final FirestoreAdminSettings settings; private final FirestoreAdminStub stub; @@ -150,7 +144,7 @@ public static final FirestoreAdminClient create(FirestoreAdminSettings settings) /** * Constructs an instance of FirestoreAdminClient, using the given stub for making calls. This is - * for advanced usage - prefer to use FirestoreAdminSettings}. + * for advanced usage - prefer using create(FirestoreAdminSettings). */ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final FirestoreAdminClient create(FirestoreAdminStub stub) { @@ -188,246 +182,11 @@ public FirestoreAdminStub getStub() { * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") public final OperationsClient getOperationsClient() { return operationsClient; } - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes a composite index. - * - *
Sample code: - * - *
- * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
- * firestoreAdminClient.deleteIndex(name);
- * }
- *
- *
- * @param name Required. A name of the form
- * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteIndex(IndexName name) {
- DeleteIndexRequest request =
- DeleteIndexRequest.newBuilder().setName(name == null ? null : name.toString()).build();
- deleteIndex(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Deletes a composite index.
- *
- * Sample code: - * - *
- * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
- * firestoreAdminClient.deleteIndex(name.toString());
- * }
- *
- *
- * @param name Required. A name of the form
- * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteIndex(String name) {
- DeleteIndexRequest request = DeleteIndexRequest.newBuilder().setName(name).build();
- deleteIndex(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Deletes a composite index.
- *
- * Sample code: - * - *
- * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
- * DeleteIndexRequest request = DeleteIndexRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * firestoreAdminClient.deleteIndex(request);
- * }
- *
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteIndex(DeleteIndexRequest request) {
- deleteIndexCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Deletes a composite index.
- *
- * Sample code: - * - *
- * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
- * DeleteIndexRequest request = DeleteIndexRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Void> future = firestoreAdminClient.deleteIndexCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
- */
- public final UnaryCallableThis call returns a [google.longrunning.Operation][google.longrunning.Operation] which may - * be used to track the status of the field update. The metadata for the operation will be the - * type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. - * - *
To configure the default field settings for the database, use the special `Field` with - * resource name: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. - * - *
Sample code: - * - *
- * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * Field field = Field.newBuilder().build();
- * Field response = firestoreAdminClient.updateFieldAsync(field).get();
- * }
- *
- *
- * @param field Required. The field to be updated.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFutureThis call returns a [google.longrunning.Operation][google.longrunning.Operation] which may - * be used to track the status of the field update. The metadata for the operation will be the - * type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. - * - *
To configure the default field settings for the database, use the special `Field` with - * resource name: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. - * - *
Sample code: - * - *
- * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * Field field = Field.newBuilder().build();
- * UpdateFieldRequest request = UpdateFieldRequest.newBuilder()
- * .setField(field)
- * .build();
- * Field response = firestoreAdminClient.updateFieldAsync(request).get();
- * }
- *
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFutureThis call returns a [google.longrunning.Operation][google.longrunning.Operation] which may - * be used to track the status of the field update. The metadata for the operation will be the - * type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. - * - *
To configure the default field settings for the database, use the special `Field` with - * resource name: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. - * - *
Sample code: - * - *
- * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * Field field = Field.newBuilder().build();
- * UpdateFieldRequest request = UpdateFieldRequest.newBuilder()
- * .setField(field)
- * .build();
- * OperationFuture<Field, FieldOperationMetadata> future = firestoreAdminClient.updateFieldOperationCallable().futureCall(request);
- * // Do something
- * Field response = future.get();
- * }
- *
- */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
- public final OperationCallableThis call returns a [google.longrunning.Operation][google.longrunning.Operation] which may - * be used to track the status of the field update. The metadata for the operation will be the - * type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. - * - *
To configure the default field settings for the database, use the special `Field` with - * resource name: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. - * - *
Sample code: - * - *
- * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * Field field = Field.newBuilder().build();
- * UpdateFieldRequest request = UpdateFieldRequest.newBuilder()
- * .setField(field)
- * .build();
- * ApiFuture<Operation> future = firestoreAdminClient.updateFieldCallable().futureCall(request);
- * // Do something
- * Operation response = future.get();
- * }
- *
- */
- public final UnaryCallableSample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
+ * CollectionGroupName parent =
+ * CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
* Index index = Index.newBuilder().build();
* Index response = firestoreAdminClient.createIndexAsync(parent, index).get();
* }
- *
+ * }
*
* @param parent Required. A parent name of the form
* `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
* @param index Required. The composite index to create.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
+ * String parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]").toString();
* Index index = Index.newBuilder().build();
- * Index response = firestoreAdminClient.createIndexAsync(parent.toString(), index).get();
+ * Index response = firestoreAdminClient.createIndexAsync(parent, index).get();
* }
- *
+ * }
*
* @param parent Required. A parent name of the form
* `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
* @param index Required. The composite index to create.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
- * Index index = Index.newBuilder().build();
- * CreateIndexRequest request = CreateIndexRequest.newBuilder()
- * .setParent(parent.toString())
- * .setIndex(index)
- * .build();
+ * CreateIndexRequest request =
+ * CreateIndexRequest.newBuilder()
+ * .setParent(
+ * CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]").toString())
+ * .setIndex(Index.newBuilder().build())
+ * .build();
* Index response = firestoreAdminClient.createIndexAsync(request).get();
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
- * Index index = Index.newBuilder().build();
- * CreateIndexRequest request = CreateIndexRequest.newBuilder()
- * .setParent(parent.toString())
- * .setIndex(index)
- * .build();
- * OperationFuture<Index, IndexOperationMetadata> future = firestoreAdminClient.createIndexOperationCallable().futureCall(request);
- * // Do something
+ * CreateIndexRequest request =
+ * CreateIndexRequest.newBuilder()
+ * .setParent(
+ * CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]").toString())
+ * .setIndex(Index.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * firestoreAdminClient.createIndexOperationCallable().futureCall(request);
+ * // Do something.
* Index response = future.get();
* }
- *
+ * }
*/
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public final OperationCallableSample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
- * Index index = Index.newBuilder().build();
- * CreateIndexRequest request = CreateIndexRequest.newBuilder()
- * .setParent(parent.toString())
- * .setIndex(index)
- * .build();
- * ApiFuture<Operation> future = firestoreAdminClient.createIndexCallable().futureCall(request);
- * // Do something
+ * CreateIndexRequest request =
+ * CreateIndexRequest.newBuilder()
+ * .setParent(
+ * CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]").toString())
+ * .setIndex(Index.newBuilder().build())
+ * .build();
+ * ApiFuture future = firestoreAdminClient.createIndexCallable().futureCall(request);
+ * // Do something.
* Operation response = future.get();
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
+ * CollectionGroupName parent =
+ * CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
* for (Index element : firestoreAdminClient.listIndexes(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*
* @param parent Required. A parent name of the form
* `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
@@ -606,20 +361,20 @@ public final ListIndexesPagedResponse listIndexes(CollectionGroupName parent) {
return listIndexes(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists composite indexes.
*
* Sample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
- * for (Index element : firestoreAdminClient.listIndexes(parent.toString()).iterateAll()) {
+ * String parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]").toString();
+ * for (Index element : firestoreAdminClient.listIndexes(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*
* @param parent Required. A parent name of the form
* `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
@@ -630,23 +385,27 @@ public final ListIndexesPagedResponse listIndexes(String parent) {
return listIndexes(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists composite indexes.
*
* Sample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
- * ListIndexesRequest request = ListIndexesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
+ * ListIndexesRequest request =
+ * ListIndexesRequest.newBuilder()
+ * .setParent(
+ * CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
* for (Index element : firestoreAdminClient.listIndexes(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -655,46 +414,54 @@ public final ListIndexesPagedResponse listIndexes(ListIndexesRequest request) {
return listIndexesPagedCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists composite indexes.
*
* Sample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
- * ListIndexesRequest request = ListIndexesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * ApiFuture<ListIndexesPagedResponse> future = firestoreAdminClient.listIndexesPagedCallable().futureCall(request);
- * // Do something
+ * ListIndexesRequest request =
+ * ListIndexesRequest.newBuilder()
+ * .setParent(
+ * CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future = firestoreAdminClient.listIndexesPagedCallable().futureCall(request);
+ * // Do something.
* for (Index element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
- * ListIndexesRequest request = ListIndexesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
+ * ListIndexesRequest request =
+ * ListIndexesRequest.newBuilder()
+ * .setParent(
+ * CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
* while (true) {
* ListIndexesResponse response = firestoreAdminClient.listIndexesCallable().call(request);
- * for (Index element : response.getIndexesList()) {
+ * for (Index element : response.getResponsesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
@@ -705,24 +472,24 @@ public final ListIndexesPagedResponse listIndexes(ListIndexesRequest request) {
* }
* }
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
* IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
* Index response = firestoreAdminClient.getIndex(name);
* }
- *
+ * }
*
* @param name Required. A name of the form
* `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
@@ -734,18 +501,18 @@ public final Index getIndex(IndexName name) {
return getIndex(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets a composite index.
*
* Sample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
- * Index response = firestoreAdminClient.getIndex(name.toString());
+ * String name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]").toString();
+ * Index response = firestoreAdminClient.getIndex(name);
* }
- *
+ * }
*
* @param name Required. A name of the form
* `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
@@ -756,21 +523,22 @@ public final Index getIndex(String name) {
return getIndex(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets a composite index.
*
* Sample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
- * GetIndexRequest request = GetIndexRequest.newBuilder()
- * .setName(name.toString())
- * .build();
+ * GetIndexRequest request =
+ * GetIndexRequest.newBuilder()
+ * .setName(
+ * IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]").toString())
+ * .build();
* Index response = firestoreAdminClient.getIndex(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -779,40 +547,133 @@ public final Index getIndex(GetIndexRequest request) {
return getIndexCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets a composite index.
*
* Sample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
- * GetIndexRequest request = GetIndexRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Index> future = firestoreAdminClient.getIndexCallable().futureCall(request);
- * // Do something
+ * GetIndexRequest request =
+ * GetIndexRequest.newBuilder()
+ * .setName(
+ * IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]").toString())
+ * .build();
+ * ApiFuture future = firestoreAdminClient.getIndexCallable().futureCall(request);
+ * // Do something.
* Index response = future.get();
* }
- *
+ * }
*/
public final UnaryCallableSample code: + * + *
{@code
+ * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
+ * firestoreAdminClient.deleteIndex(name);
+ * }
+ * }
+ *
+ * @param name Required. A name of the form
+ * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteIndex(IndexName name) {
+ DeleteIndexRequest request =
+ DeleteIndexRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteIndex(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a composite index.
+ *
+ * Sample code: + * + *
{@code
+ * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * String name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]").toString();
+ * firestoreAdminClient.deleteIndex(name);
+ * }
+ * }
+ *
+ * @param name Required. A name of the form
+ * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteIndex(String name) {
+ DeleteIndexRequest request = DeleteIndexRequest.newBuilder().setName(name).build();
+ deleteIndex(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a composite index.
+ *
+ * Sample code: + * + *
{@code
+ * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * DeleteIndexRequest request =
+ * DeleteIndexRequest.newBuilder()
+ * .setName(
+ * IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]").toString())
+ * .build();
+ * firestoreAdminClient.deleteIndex(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteIndex(DeleteIndexRequest request) {
+ deleteIndexCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a composite index.
+ *
+ * Sample code: + * + *
{@code
+ * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * DeleteIndexRequest request =
+ * DeleteIndexRequest.newBuilder()
+ * .setName(
+ * IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]").toString())
+ * .build();
+ * ApiFuture future = firestoreAdminClient.deleteIndexCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
* FieldName name = FieldName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[FIELD]");
* Field response = firestoreAdminClient.getField(name);
* }
- *
+ * }
*
* @param name Required. A name of the form
* `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}`
@@ -824,18 +685,18 @@ public final Field getField(FieldName name) {
return getField(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the metadata and configuration for a Field.
*
* Sample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * FieldName name = FieldName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[FIELD]");
- * Field response = firestoreAdminClient.getField(name.toString());
+ * String name = FieldName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[FIELD]").toString();
+ * Field response = firestoreAdminClient.getField(name);
* }
- *
+ * }
*
* @param name Required. A name of the form
* `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}`
@@ -846,21 +707,22 @@ public final Field getField(String name) {
return getField(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the metadata and configuration for a Field.
*
* Sample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * FieldName name = FieldName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[FIELD]");
- * GetFieldRequest request = GetFieldRequest.newBuilder()
- * .setName(name.toString())
- * .build();
+ * GetFieldRequest request =
+ * GetFieldRequest.newBuilder()
+ * .setName(
+ * FieldName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[FIELD]").toString())
+ * .build();
* Field response = firestoreAdminClient.getField(request);
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -869,29 +731,172 @@ public final Field getField(GetFieldRequest request) {
return getFieldCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the metadata and configuration for a Field.
*
* Sample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * FieldName name = FieldName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[FIELD]");
- * GetFieldRequest request = GetFieldRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Field> future = firestoreAdminClient.getFieldCallable().futureCall(request);
- * // Do something
+ * GetFieldRequest request =
+ * GetFieldRequest.newBuilder()
+ * .setName(
+ * FieldName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[FIELD]").toString())
+ * .build();
+ * ApiFuture future = firestoreAdminClient.getFieldCallable().futureCall(request);
+ * // Do something.
* Field response = future.get();
* }
- *
+ * }
*/
public final UnaryCallableThis call returns a [google.longrunning.Operation][google.longrunning.Operation] which may + * be used to track the status of the field update. The metadata for the operation will be the + * type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. + * + *
To configure the default field settings for the database, use the special `Field` with + * resource name: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + * + *
Sample code: + * + *
{@code
+ * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * Field field = Field.newBuilder().build();
+ * Field response = firestoreAdminClient.updateFieldAsync(field).get();
+ * }
+ * }
+ *
+ * @param field Required. The field to be updated.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureThis call returns a [google.longrunning.Operation][google.longrunning.Operation] which may + * be used to track the status of the field update. The metadata for the operation will be the + * type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. + * + *
To configure the default field settings for the database, use the special `Field` with + * resource name: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + * + *
Sample code: + * + *
{@code
+ * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * UpdateFieldRequest request =
+ * UpdateFieldRequest.newBuilder()
+ * .setField(Field.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Field response = firestoreAdminClient.updateFieldAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureThis call returns a [google.longrunning.Operation][google.longrunning.Operation] which may + * be used to track the status of the field update. The metadata for the operation will be the + * type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. + * + *
To configure the default field settings for the database, use the special `Field` with + * resource name: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + * + *
Sample code: + * + *
{@code
+ * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * UpdateFieldRequest request =
+ * UpdateFieldRequest.newBuilder()
+ * .setField(Field.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * firestoreAdminClient.updateFieldOperationCallable().futureCall(request);
+ * // Do something.
+ * Field response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableThis call returns a [google.longrunning.Operation][google.longrunning.Operation] which may + * be used to track the status of the field update. The metadata for the operation will be the + * type [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. + * + *
To configure the default field settings for the database, use the special `Field` with + * resource name: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + * + *
Sample code: + * + *
{@code
+ * try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
+ * UpdateFieldRequest request =
+ * UpdateFieldRequest.newBuilder()
+ * .setField(Field.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future = firestoreAdminClient.updateFieldCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
+ * CollectionGroupName parent =
+ * CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
* for (Field element : firestoreAdminClient.listFields(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*
* @param parent Required. A parent name of the form
* `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
@@ -921,7 +927,7 @@ public final ListFieldsPagedResponse listFields(CollectionGroupName parent) {
return listFields(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists the field configuration and metadata for this database.
*
@@ -932,14 +938,14 @@ public final ListFieldsPagedResponse listFields(CollectionGroupName parent) {
*
* Sample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
- * for (Field element : firestoreAdminClient.listFields(parent.toString()).iterateAll()) {
+ * String parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]").toString();
+ * for (Field element : firestoreAdminClient.listFields(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*
* @param parent Required. A parent name of the form
* `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}`
@@ -950,7 +956,7 @@ public final ListFieldsPagedResponse listFields(String parent) {
return listFields(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists the field configuration and metadata for this database.
*
@@ -961,17 +967,21 @@ public final ListFieldsPagedResponse listFields(String parent) {
*
* Sample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
- * ListFieldsRequest request = ListFieldsRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
+ * ListFieldsRequest request =
+ * ListFieldsRequest.newBuilder()
+ * .setParent(
+ * CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
* for (Field element : firestoreAdminClient.listFields(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -980,7 +990,7 @@ public final ListFieldsPagedResponse listFields(ListFieldsRequest request) {
return listFieldsPagedCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists the field configuration and metadata for this database.
*
@@ -991,25 +1001,29 @@ public final ListFieldsPagedResponse listFields(ListFieldsRequest request) {
*
* Sample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
- * ListFieldsRequest request = ListFieldsRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * ApiFuture<ListFieldsPagedResponse> future = firestoreAdminClient.listFieldsPagedCallable().futureCall(request);
- * // Do something
+ * ListFieldsRequest request =
+ * ListFieldsRequest.newBuilder()
+ * .setParent(
+ * CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future = firestoreAdminClient.listFieldsPagedCallable().futureCall(request);
+ * // Do something.
* for (Field element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * CollectionGroupName parent = CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]");
- * ListFieldsRequest request = ListFieldsRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
+ * ListFieldsRequest request =
+ * ListFieldsRequest.newBuilder()
+ * .setParent(
+ * CollectionGroupName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
* while (true) {
* ListFieldsResponse response = firestoreAdminClient.listFieldsCallable().call(request);
- * for (Field element : response.getFieldsList()) {
+ * for (Field element : response.getResponsesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
@@ -1039,13 +1057,13 @@ public final UnaryCallable listField
* }
* }
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
* DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
* ExportDocumentsResponse response = firestoreAdminClient.exportDocumentsAsync(name).get();
* }
- *
+ * }
*
* @param name Required. Database to export. Should be of the form:
* `projects/{project_id}/databases/{database_id}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
- * ExportDocumentsResponse response = firestoreAdminClient.exportDocumentsAsync(name.toString()).get();
+ * String name = DatabaseName.of("[PROJECT]", "[DATABASE]").toString();
+ * ExportDocumentsResponse response = firestoreAdminClient.exportDocumentsAsync(name).get();
* }
- *
+ * }
*
* @param name Required. Database to export. Should be of the form:
* `projects/{project_id}/databases/{database_id}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
- * ExportDocumentsRequest request = ExportDocumentsRequest.newBuilder()
- * .setName(name.toString())
- * .build();
+ * ExportDocumentsRequest request =
+ * ExportDocumentsRequest.newBuilder()
+ * .setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
+ * .addAllCollectionIds(new ArrayList())
+ * .setOutputUriPrefix("outputUriPrefix499858205")
+ * .build();
* ExportDocumentsResponse response = firestoreAdminClient.exportDocumentsAsync(request).get();
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
- * ExportDocumentsRequest request = ExportDocumentsRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * OperationFuture<ExportDocumentsResponse, ExportDocumentsMetadata> future = firestoreAdminClient.exportDocumentsOperationCallable().futureCall(request);
- * // Do something
+ * ExportDocumentsRequest request =
+ * ExportDocumentsRequest.newBuilder()
+ * .setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
+ * .addAllCollectionIds(new ArrayList())
+ * .setOutputUriPrefix("outputUriPrefix499858205")
+ * .build();
+ * OperationFuture future =
+ * firestoreAdminClient.exportDocumentsOperationCallable().futureCall(request);
+ * // Do something.
* ExportDocumentsResponse response = future.get();
* }
- *
+ * }
*/
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public final OperationCallable<
ExportDocumentsRequest, ExportDocumentsResponse, ExportDocumentsMetadata>
exportDocumentsOperationCallable() {
return stub.exportDocumentsOperationCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage
* system, such as Google Cloud Storage. Recent updates to documents may not be reflected in the
@@ -1178,23 +1194,26 @@ public final UnaryCallableSample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
- * ExportDocumentsRequest request = ExportDocumentsRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Operation> future = firestoreAdminClient.exportDocumentsCallable().futureCall(request);
- * // Do something
+ * ExportDocumentsRequest request =
+ * ExportDocumentsRequest.newBuilder()
+ * .setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
+ * .addAllCollectionIds(new ArrayList())
+ * .setOutputUriPrefix("outputUriPrefix499858205")
+ * .build();
+ * ApiFuture future =
+ * firestoreAdminClient.exportDocumentsCallable().futureCall(request);
+ * // Do something.
* Operation response = future.get();
* }
- *
+ * }
*/
public final UnaryCallableSample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
* DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
* firestoreAdminClient.importDocumentsAsync(name).get();
* }
- *
+ * }
*
* @param name Required. Database to import into. Should be of the form:
* `projects/{project_id}/databases/{database_id}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
- * firestoreAdminClient.importDocumentsAsync(name.toString()).get();
+ * String name = DatabaseName.of("[PROJECT]", "[DATABASE]").toString();
+ * firestoreAdminClient.importDocumentsAsync(name).get();
* }
- *
+ * }
*
* @param name Required. Database to import into. Should be of the form:
* `projects/{project_id}/databases/{database_id}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
- * ImportDocumentsRequest request = ImportDocumentsRequest.newBuilder()
- * .setName(name.toString())
- * .build();
+ * ImportDocumentsRequest request =
+ * ImportDocumentsRequest.newBuilder()
+ * .setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
+ * .addAllCollectionIds(new ArrayList())
+ * .setInputUriPrefix("inputUriPrefix-97481100")
+ * .build();
* firestoreAdminClient.importDocumentsAsync(request).get();
* }
- *
+ * }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFutureSample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
- * ImportDocumentsRequest request = ImportDocumentsRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * OperationFuture<Empty, ImportDocumentsMetadata> future = firestoreAdminClient.importDocumentsOperationCallable().futureCall(request);
- * // Do something
+ * ImportDocumentsRequest request =
+ * ImportDocumentsRequest.newBuilder()
+ * .setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
+ * .addAllCollectionIds(new ArrayList())
+ * .setInputUriPrefix("inputUriPrefix-97481100")
+ * .build();
+ * OperationFuture future =
+ * firestoreAdminClient.importDocumentsOperationCallable().futureCall(request);
+ * // Do something.
* future.get();
* }
- *
+ * }
*/
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public final OperationCallableSample code: * - *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
- * DatabaseName name = DatabaseName.of("[PROJECT]", "[DATABASE]");
- * ImportDocumentsRequest request = ImportDocumentsRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Operation> future = firestoreAdminClient.importDocumentsCallable().futureCall(request);
- * // Do something
+ * ImportDocumentsRequest request =
+ * ImportDocumentsRequest.newBuilder()
+ * .setName(DatabaseName.of("[PROJECT]", "[DATABASE]").toString())
+ * .addAllCollectionIds(new ArrayList())
+ * .setInputUriPrefix("inputUriPrefix-97481100")
+ * .build();
+ * ApiFuture future =
+ * firestoreAdminClient.importDocumentsCallable().futureCall(request);
+ * // Do something.
* future.get();
* }
- *
+ * }
*/
public final UnaryCallableThe builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *
For example, to set the total timeout of deleteIndex to 30 seconds: + *
For example, to set the total timeout of getIndex to 30 seconds: * - *
- *
+ * {@code
* FirestoreAdminSettings.Builder firestoreAdminSettingsBuilder =
* FirestoreAdminSettings.newBuilder();
* firestoreAdminSettingsBuilder
- * .deleteIndexSettings()
+ * .getIndexSettings()
* .setRetrySettings(
- * firestoreAdminSettingsBuilder.deleteIndexSettings().getRetrySettings().toBuilder()
+ * firestoreAdminSettingsBuilder
+ * .getIndexSettings()
+ * .getRetrySettings()
+ * .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* FirestoreAdminSettings firestoreAdminSettings = firestoreAdminSettingsBuilder.build();
- *
- *
+ * }
*/
-@Generated("by gapic-generator")
-@BetaApi
+@Generated("by gapic-generator-java")
public class FirestoreAdminSettings extends ClientSettingsThe interfaces provided are listed below, along with usage samples. - * - *
==================== FirestoreAdminClient ==================== + *
======================= FirestoreAdminClient ======================= * *
Service Description: Operations are created by service `FirestoreAdmin`, but are accessed via * service `google.longrunning.Operations`. * *
Sample for FirestoreAdminClient: * - *
- *
+ * {@code
* try (FirestoreAdminClient firestoreAdminClient = FirestoreAdminClient.create()) {
* IndexName name = IndexName.of("[PROJECT]", "[DATABASE]", "[COLLECTION]", "[INDEX]");
- * firestoreAdminClient.deleteIndex(name);
+ * Index response = firestoreAdminClient.getIndex(name);
* }
- *
- *
+ * }
*/
-@Generated("by gapic-generator")
+@Generated("by gapic-generator-java")
package com.google.cloud.firestore.v1;
import javax.annotation.Generated;
diff --git a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java
index 579adc2c3..03764d639 100644
--- a/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java
+++ b/google-cloud-firestore-admin/src/main/java/com/google/cloud/firestore/v1/stub/FirestoreAdminStub.java
@@ -1,11 +1,11 @@
/*
- * Copyright 2020 Google LLC
+ * Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * https://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package com.google.cloud.firestore.v1.stub;
import static com.google.cloud.firestore.v1.FirestoreAdminClient.ListFieldsPagedResponse;
import static com.google.cloud.firestore.v1.FirestoreAdminClient.ListIndexesPagedResponse;
-import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.UnaryCallable;
@@ -45,36 +45,19 @@
import com.google.protobuf.Empty;
import javax.annotation.Generated;
-// AUTO-GENERATED DOCUMENTATION AND CLASS
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
- * Base stub class for Google Cloud Firestore Admin API.
+ * Base stub class for the FirestoreAdmin service API.
*
* This class is for advanced usage and reflects the underlying API directly.
*/
-@Generated("by gapic-generator")
-@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+@Generated("by gapic-generator-java")
public abstract class FirestoreAdminStub implements BackgroundResource {
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public OperationsStub getOperationsStub() {
throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
}
- public UnaryCallable The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
- * For example, to set the total timeout of deleteIndex to 30 seconds:
+ * For example, to set the total timeout of getIndex to 30 seconds:
*
- * This class is for advanced usage.
*/
-@Generated("by gapic-generator")
-@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+@Generated("by gapic-generator-java")
public class GrpcFirestoreAdminCallableFactory implements GrpcStubCallableFactory {
+
@Override
public This class is for advanced usage and reflects the underlying API directly.
*/
-@Generated("by gapic-generator")
-@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+@Generated("by gapic-generator-java")
public class GrpcFirestoreAdminStub extends FirestoreAdminStub {
-
- private static final MethodDescriptor
- *
+ * }
*/
-@Generated("by gapic-generator")
-@BetaApi
+@Generated("by gapic-generator-java")
public class FirestoreAdminStubSettings extends StubSettings
+ *
- * {@code
* FirestoreAdminStubSettings.Builder firestoreAdminSettingsBuilder =
* FirestoreAdminStubSettings.newBuilder();
* firestoreAdminSettingsBuilder
- * .deleteIndexSettings()
+ * .getIndexSettings()
* .setRetrySettings(
- * firestoreAdminSettingsBuilder.deleteIndexSettings().getRetrySettings().toBuilder()
+ * firestoreAdminSettingsBuilder
+ * .getIndexSettings()
+ * .getRetrySettings()
+ * .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* FirestoreAdminStubSettings firestoreAdminSettings = firestoreAdminSettingsBuilder.build();
- *