diff --git a/java-filestore/README.md b/java-filestore/README.md
index 574795ba2aa1..0c3be8423c51 100644
--- a/java-filestore/README.md
+++ b/java-filestore/README.md
@@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
Cloud Filestore Manager v1beta1. + *
Filestore Manager v1beta1. * - *
The `file.googleapis.com` service implements the Cloud Filestore API and defines the following - * model for managing resources: + *
The `file.googleapis.com` service implements the Filestore API and defines the following model + * for managing resources: * *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudFilestoreManagerClient cloudFilestoreManagerClient = + * CloudFilestoreManagerClient.create()) { + * RevertInstanceRequest request = + * RevertInstanceRequest.newBuilder() + * .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + * .setTargetSnapshotId("targetSnapshotId-2099459472") + * .build(); + * Instance response = cloudFilestoreManagerClient.revertInstanceAsync(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 OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudFilestoreManagerClient cloudFilestoreManagerClient = + * CloudFilestoreManagerClient.create()) { + * RevertInstanceRequest request = + * RevertInstanceRequest.newBuilder() + * .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + * .setTargetSnapshotId("targetSnapshotId-2099459472") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * cloudFilestoreManagerClient.revertInstanceOperationCallable().futureCall(request); + * // Do something. + * Instance response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudFilestoreManagerClient cloudFilestoreManagerClient = + * CloudFilestoreManagerClient.create()) { + * RevertInstanceRequest request = + * RevertInstanceRequest.newBuilder() + * .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + * .setTargetSnapshotId("targetSnapshotId-2099459472") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * cloudFilestoreManagerClient.revertInstanceCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code:
*
@@ -1112,30 +1207,28 @@ public final UnaryCallable Sample code:
*
@@ -1147,27 +1240,25 @@ public final ListBackupsPagedResponse listBackups(LocationName parent) {
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
* CloudFilestoreManagerClient.create()) {
- * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
- * for (Backup element : cloudFilestoreManagerClient.listBackups(parent).iterateAll()) {
+ * String parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+ * for (Snapshot element : cloudFilestoreManagerClient.listSnapshots(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
- * @param parent Required. The project and location for which to retrieve backup information, in
- * the format `projects/{project_id}/locations/{location}`. In Cloud Filestore, backup
- * locations map to GCP regions, for example **us-west1**. To retrieve backup
- * information for all locations, use "-" for the `{location}` value.
+ * @param parent Required. The instance for which to retrieve snapshot information, in the format
+ * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListBackupsPagedResponse listBackups(String parent) {
- ListBackupsRequest request = ListBackupsRequest.newBuilder().setParent(parent).build();
- return listBackups(request);
+ public final ListSnapshotsPagedResponse listSnapshots(String parent) {
+ ListSnapshotsRequest request = ListSnapshotsRequest.newBuilder().setParent(parent).build();
+ return listSnapshots(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists all backups in a project for either a specified location or for all locations.
+ * Lists all snapshots in a project for either a specified location or for all locations.
*
* Sample code:
*
@@ -1179,15 +1270,15 @@ public final ListBackupsPagedResponse listBackups(String parent) {
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
* CloudFilestoreManagerClient.create()) {
- * ListBackupsRequest request =
- * ListBackupsRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * ListSnapshotsRequest request =
+ * ListSnapshotsRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setFilter("filter-1274492040")
* .build();
- * for (Backup element : cloudFilestoreManagerClient.listBackups(request).iterateAll()) {
+ * for (Snapshot element : cloudFilestoreManagerClient.listSnapshots(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
@@ -1196,13 +1287,13 @@ public final ListBackupsPagedResponse listBackups(String parent) {
* @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 ListBackupsPagedResponse listBackups(ListBackupsRequest request) {
- return listBackupsPagedCallable().call(request);
+ public final ListSnapshotsPagedResponse listSnapshots(ListSnapshotsRequest request) {
+ return listSnapshotsPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists all backups in a project for either a specified location or for all locations.
+ * Lists all snapshots in a project for either a specified location or for all locations.
*
* Sample code:
*
@@ -1214,31 +1305,31 @@ public final ListBackupsPagedResponse listBackups(ListBackupsRequest request) {
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
* CloudFilestoreManagerClient.create()) {
- * ListBackupsRequest request =
- * ListBackupsRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * ListSnapshotsRequest request =
+ * ListSnapshotsRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setFilter("filter-1274492040")
* .build();
- * ApiFuture Sample code:
*
@@ -1250,18 +1341,18 @@ public final ListBackupsPagedResponse listBackups(ListBackupsRequest request) {
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
* CloudFilestoreManagerClient.create()) {
- * ListBackupsRequest request =
- * ListBackupsRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * ListSnapshotsRequest request =
+ * ListSnapshotsRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setFilter("filter-1274492040")
* .build();
* while (true) {
- * ListBackupsResponse response =
- * cloudFilestoreManagerClient.listBackupsCallable().call(request);
- * for (Backup element : response.getBackupsList()) {
+ * ListSnapshotsResponse response =
+ * cloudFilestoreManagerClient.listSnapshotsCallable().call(request);
+ * for (Snapshot element : response.getSnapshotsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
@@ -1274,13 +1365,13 @@ public final ListBackupsPagedResponse listBackups(ListBackupsRequest request) {
* }
* }
*/
- public final UnaryCallable Sample code:
*
@@ -1292,24 +1383,24 @@ public final UnaryCallable Sample code:
*
@@ -1321,23 +1412,24 @@ public final Backup getBackup(BackupName name) {
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
* CloudFilestoreManagerClient.create()) {
- * String name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString();
- * Backup response = cloudFilestoreManagerClient.getBackup(name);
+ * String name =
+ * SnapshotName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[SNAPSHOT]").toString();
+ * Snapshot response = cloudFilestoreManagerClient.getSnapshot(name);
* }
* }
*
- * @param name Required. The backup resource name, in the format
- * `projects/{project_id}/locations/{location}/backups/{backup_id}`.
+ * @param name Required. The snapshot resource name, in the format
+ * `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Backup getBackup(String name) {
- GetBackupRequest request = GetBackupRequest.newBuilder().setName(name).build();
- return getBackup(request);
+ public final Snapshot getSnapshot(String name) {
+ GetSnapshotRequest request = GetSnapshotRequest.newBuilder().setName(name).build();
+ return getSnapshot(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Gets the details of a specific backup.
+ * Gets the details of a specific snapshot.
*
* Sample code:
*
@@ -1349,24 +1441,25 @@ public final Backup getBackup(String name) {
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
* CloudFilestoreManagerClient.create()) {
- * GetBackupRequest request =
- * GetBackupRequest.newBuilder()
- * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
+ * GetSnapshotRequest request =
+ * GetSnapshotRequest.newBuilder()
+ * .setName(
+ * SnapshotName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[SNAPSHOT]").toString())
* .build();
- * Backup response = cloudFilestoreManagerClient.getBackup(request);
+ * Snapshot response = cloudFilestoreManagerClient.getSnapshot(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 Backup getBackup(GetBackupRequest request) {
- return getBackupCallable().call(request);
+ public final Snapshot getSnapshot(GetSnapshotRequest request) {
+ return getSnapshotCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Gets the details of a specific backup.
+ * Gets the details of a specific snapshot.
*
* Sample code:
*
@@ -1378,24 +1471,25 @@ public final Backup getBackup(GetBackupRequest request) {
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
* CloudFilestoreManagerClient.create()) {
- * GetBackupRequest request =
- * GetBackupRequest.newBuilder()
- * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
+ * GetSnapshotRequest request =
+ * GetSnapshotRequest.newBuilder()
+ * .setName(
+ * SnapshotName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[SNAPSHOT]").toString())
* .build();
- * ApiFuture Sample code:
*
@@ -1407,38 +1501,37 @@ public final UnaryCallable This value must start with a lowercase letter followed by up to 62 lowercase letters,
* numbers, or hyphens, and cannot end with a hyphen.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final OperationFuture Sample code:
*
@@ -1450,38 +1543,37 @@ public final OperationFuture This value must start with a lowercase letter followed by up to 62 lowercase letters,
* numbers, or hyphens, and cannot end with a hyphen.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final OperationFuture Sample code:
*
@@ -1493,27 +1585,27 @@ public final OperationFuture Sample code:
*
@@ -1525,27 +1617,27 @@ public final OperationFuture Sample code:
*
@@ -1557,26 +1649,26 @@ public final OperationFuture Sample code:
*
@@ -1588,24 +1680,24 @@ public final UnaryCallable Sample code:
*
@@ -1617,23 +1709,24 @@ public final OperationFuture Sample code:
*
@@ -1645,25 +1738,26 @@ public final OperationFuture Sample code:
*
@@ -1675,25 +1769,26 @@ public final OperationFuture Sample code:
*
@@ -1705,24 +1800,25 @@ public final OperationFuture Sample code:
*
@@ -1734,13 +1830,760 @@ public final UnaryCallable Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * This value must start with a lowercase letter followed by up to 62 lowercase letters,
+ * numbers, or hyphens, and cannot end with a hyphen.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * This value must start with a lowercase letter followed by up to 62 lowercase letters,
+ * numbers, or hyphens, and cannot end with a hyphen.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * This value must start with a lowercase letter followed by up to 62 lowercase letters,
+ * numbers, or hyphens, and cannot end with a hyphen.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * This value must start with a lowercase letter followed by up to 62 lowercase letters,
+ * numbers, or hyphens, and cannot end with a hyphen.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
*
@@ -1766,26 +3134,242 @@ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
*
@@ -1797,26 +3381,26 @@ public final OperationFuture Sample code:
*
@@ -1828,20 +3412,20 @@ public final OperationFuture ======================= CloudFilestoreManagerClient =======================
*
- * Service Description: Configures and manages Cloud Filestore resources.
+ * Service Description: Configures and manages Filestore resources.
*
- * Cloud Filestore Manager v1beta1.
+ * Filestore Manager v1beta1.
*
- * The `file.googleapis.com` service implements the Cloud Filestore API and defines the following
- * model for managing resources:
+ * The `file.googleapis.com` service implements the Filestore API and defines the following model
+ * for managing resources:
*
* {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * UpdateSnapshotRequest request =
+ * UpdateSnapshotRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setSnapshot(Snapshot.newBuilder().build())
+ * .build();
+ * Snapshot response = cloudFilestoreManagerClient.updateSnapshotAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * UpdateSnapshotRequest request =
+ * UpdateSnapshotRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setSnapshot(Snapshot.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * UpdateSnapshotRequest request =
+ * UpdateSnapshotRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setSnapshot(Snapshot.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Backup element : cloudFilestoreManagerClient.listBackups(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The project and location for which to retrieve backup information, in
+ * the format `projects/{project_id}/locations/{location}`. In Filestore, backup locations map
+ * to GCP regions, for example **us-west1**. To retrieve backup information
+ * for all locations, use "-" for the `{location}` value.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListBackupsPagedResponse listBackups(LocationName parent) {
+ ListBackupsRequest request =
+ ListBackupsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listBackups(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all backups in a project for either a specified location or for all locations.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Backup element : cloudFilestoreManagerClient.listBackups(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The project and location for which to retrieve backup information, in
+ * the format `projects/{project_id}/locations/{location}`. In Filestore, backup locations map
+ * to GCP regions, for example **us-west1**. To retrieve backup information
+ * for all locations, use "-" for the `{location}` value.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListBackupsPagedResponse listBackups(String parent) {
+ ListBackupsRequest request = ListBackupsRequest.newBuilder().setParent(parent).build();
+ return listBackups(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all backups in a project for either a specified location or for all locations.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * ListBackupsRequest request =
+ * ListBackupsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOrderBy("orderBy-1207110587")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * for (Backup element : cloudFilestoreManagerClient.listBackups(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
+ */
+ public final ListBackupsPagedResponse listBackups(ListBackupsRequest request) {
+ return listBackupsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all backups in a project for either a specified location or for all locations.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * ListBackupsRequest request =
+ * ListBackupsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOrderBy("orderBy-1207110587")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * ListBackupsRequest request =
+ * ListBackupsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOrderBy("orderBy-1207110587")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * while (true) {
+ * ListBackupsResponse response =
+ * cloudFilestoreManagerClient.listBackupsCallable().call(request);
+ * for (Backup element : response.getBackupsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]");
+ * Backup response = cloudFilestoreManagerClient.getBackup(name);
+ * }
+ * }
+ *
+ * @param name Required. The backup resource name, in the format
+ * `projects/{project_id}/locations/{location}/backups/{backup_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Backup getBackup(BackupName name) {
+ GetBackupRequest request =
+ GetBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getBackup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a specific backup.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * String name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString();
+ * Backup response = cloudFilestoreManagerClient.getBackup(name);
+ * }
+ * }
+ *
+ * @param name Required. The backup resource name, in the format
+ * `projects/{project_id}/locations/{location}/backups/{backup_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Backup getBackup(String name) {
+ GetBackupRequest request = GetBackupRequest.newBuilder().setName(name).build();
+ return getBackup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a specific backup.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * GetBackupRequest request =
+ * GetBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
+ * .build();
+ * Backup response = cloudFilestoreManagerClient.getBackup(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 Backup getBackup(GetBackupRequest request) {
+ return getBackupCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a specific backup.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * GetBackupRequest request =
+ * GetBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Backup backup = Backup.newBuilder().build();
+ * String backupId = "backupId2121930365";
+ * Backup response =
+ * cloudFilestoreManagerClient.createBackupAsync(parent, backup, backupId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The backup's project and location, in the format
+ * `projects/{project_id}/locations/{location}`. In Filestore, backup locations map to GCP
+ * regions, for example **us-west1**.
+ * @param backup Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
+ * @param backupId Required. The ID to use for the backup. The ID must be unique within the
+ * specified project and location.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Backup backup = Backup.newBuilder().build();
+ * String backupId = "backupId2121930365";
+ * Backup response =
+ * cloudFilestoreManagerClient.createBackupAsync(parent, backup, backupId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The backup's project and location, in the format
+ * `projects/{project_id}/locations/{location}`. In Filestore, backup locations map to GCP
+ * regions, for example **us-west1**.
+ * @param backup Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
+ * @param backupId Required. The ID to use for the backup. The ID must be unique within the
+ * specified project and location.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * CreateBackupRequest request =
+ * CreateBackupRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setBackup(Backup.newBuilder().build())
+ * .setBackupId("backupId2121930365")
+ * .build();
+ * Backup response = cloudFilestoreManagerClient.createBackupAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * CreateBackupRequest request =
+ * CreateBackupRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setBackup(Backup.newBuilder().build())
+ * .setBackupId("backupId2121930365")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * CreateBackupRequest request =
+ * CreateBackupRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setBackup(Backup.newBuilder().build())
+ * .setBackupId("backupId2121930365")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]");
+ * cloudFilestoreManagerClient.deleteBackupAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The backup resource name, in the format
+ * `projects/{project_id}/locations/{location}/backups/{backup_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * String name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString();
+ * cloudFilestoreManagerClient.deleteBackupAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The backup resource name, in the format
+ * `projects/{project_id}/locations/{location}/backups/{backup_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * DeleteBackupRequest request =
+ * DeleteBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
+ * .build();
+ * cloudFilestoreManagerClient.deleteBackupAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * DeleteBackupRequest request =
+ * DeleteBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * DeleteBackupRequest request =
+ * DeleteBackupRequest.newBuilder()
+ * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * Backup backup = Backup.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Backup response = cloudFilestoreManagerClient.updateBackupAsync(backup, updateMask).get();
+ * }
+ * }
+ *
+ * @param backup Required. A [backup resource][google.cloud.filestore.v1beta1.Backup]
* @param updateMask Required. Mask of fields to update. At least one path must be supplied in
* this field.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -1754,7 +2597,532 @@ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * UpdateBackupRequest request =
+ * UpdateBackupRequest.newBuilder()
+ * .setBackup(Backup.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Backup response = cloudFilestoreManagerClient.updateBackupAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * UpdateBackupRequest request =
+ * UpdateBackupRequest.newBuilder()
+ * .setBackup(Backup.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * UpdateBackupRequest request =
+ * UpdateBackupRequest.newBuilder()
+ * .setBackup(Backup.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+ * for (Share element : cloudFilestoreManagerClient.listShares(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The instance for which to retrieve share information, in the format
+ * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSharesPagedResponse listShares(InstanceName parent) {
+ ListSharesRequest request =
+ ListSharesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listShares(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all shares for a specified instance.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * String parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+ * for (Share element : cloudFilestoreManagerClient.listShares(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The instance for which to retrieve share information, in the format
+ * `projects/{project_id}/locations/{location}/instances/{instance_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSharesPagedResponse listShares(String parent) {
+ ListSharesRequest request = ListSharesRequest.newBuilder().setParent(parent).build();
+ return listShares(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all shares for a specified instance.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * ListSharesRequest request =
+ * ListSharesRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOrderBy("orderBy-1207110587")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * for (Share element : cloudFilestoreManagerClient.listShares(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
+ */
+ public final ListSharesPagedResponse listShares(ListSharesRequest request) {
+ return listSharesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all shares for a specified instance.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * ListSharesRequest request =
+ * ListSharesRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOrderBy("orderBy-1207110587")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * ListSharesRequest request =
+ * ListSharesRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOrderBy("orderBy-1207110587")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * while (true) {
+ * ListSharesResponse response =
+ * cloudFilestoreManagerClient.listSharesCallable().call(request);
+ * for (Share element : response.getSharesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * ShareName name = ShareName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[SHARE]");
+ * Share response = cloudFilestoreManagerClient.getShare(name);
+ * }
+ * }
+ *
+ * @param name Required. The share resource name, in the format
+ * `projects/{project_id}/locations/{location}/instances/{instance_id}/shares/{share_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Share getShare(ShareName name) {
+ GetShareRequest request =
+ GetShareRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getShare(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a specific share.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * String name = ShareName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[SHARE]").toString();
+ * Share response = cloudFilestoreManagerClient.getShare(name);
+ * }
+ * }
+ *
+ * @param name Required. The share resource name, in the format
+ * `projects/{project_id}/locations/{location}/instances/{instance_id}/shares/{share_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Share getShare(String name) {
+ GetShareRequest request = GetShareRequest.newBuilder().setName(name).build();
+ return getShare(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a specific share.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * GetShareRequest request =
+ * GetShareRequest.newBuilder()
+ * .setName(ShareName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[SHARE]").toString())
+ * .build();
+ * Share response = cloudFilestoreManagerClient.getShare(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 Share getShare(GetShareRequest request) {
+ return getShareCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a specific share.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * GetShareRequest request =
+ * GetShareRequest.newBuilder()
+ * .setName(ShareName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[SHARE]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+ * Share share = Share.newBuilder().build();
+ * String shareId = "shareId2054217050";
+ * Share response = cloudFilestoreManagerClient.createShareAsync(parent, share, shareId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The Filestore Instance to create the share for, in the format
+ * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+ * @param share Required. A share resource
+ * @param shareId Required. The ID to use for the share. The ID must be unique within the
+ * specified instance.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * String parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+ * Share share = Share.newBuilder().build();
+ * String shareId = "shareId2054217050";
+ * Share response = cloudFilestoreManagerClient.createShareAsync(parent, share, shareId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The Filestore Instance to create the share for, in the format
+ * `projects/{project_id}/locations/{location}/instances/{instance_id}`
+ * @param share Required. A share resource
+ * @param shareId Required. The ID to use for the share. The ID must be unique within the
+ * specified instance.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * CreateShareRequest request =
+ * CreateShareRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+ * .setShareId("shareId2054217050")
+ * .setShare(Share.newBuilder().build())
+ * .build();
+ * Share response = cloudFilestoreManagerClient.createShareAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * CreateShareRequest request =
+ * CreateShareRequest.newBuilder()
+ * .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+ * .setShareId("shareId2054217050")
+ * .setShare(Share.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * ShareName name = ShareName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[SHARE]");
+ * cloudFilestoreManagerClient.deleteShareAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The share resource name, in the format
+ * `projects/{project_id}/locations/{location}/instances/{instance_id}/share/{share_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * String name = ShareName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[SHARE]").toString();
+ * cloudFilestoreManagerClient.deleteShareAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The share resource name, in the format
+ * `projects/{project_id}/locations/{location}/instances/{instance_id}/share/{share_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * DeleteShareRequest request =
+ * DeleteShareRequest.newBuilder()
+ * .setName(ShareName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[SHARE]").toString())
+ * .build();
+ * cloudFilestoreManagerClient.deleteShareAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * DeleteShareRequest request =
+ * DeleteShareRequest.newBuilder()
+ * .setName(ShareName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[SHARE]").toString())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * DeleteShareRequest request =
+ * DeleteShareRequest.newBuilder()
+ * .setName(ShareName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[SHARE]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * Share share = Share.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Share response = cloudFilestoreManagerClient.updateShareAsync(share, updateMask).get();
+ * }
+ * }
+ *
+ * @param share Required. A share resource. Only fields specified in update_mask are updated.
+ * @param updateMask Required. Mask of fields to update. At least one path must be supplied in
+ * this field. The elements of the repeated paths field may only include these fields:
+ *
+ *
+ *
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
+ * CloudFilestoreManagerClient.create()) {
+ * UpdateShareRequest request =
+ * UpdateShareRequest.newBuilder()
+ * .setShare(Share.newBuilder().build())
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
- * Backup response = cloudFilestoreManagerClient.updateBackupAsync(request).get();
+ * Share response = cloudFilestoreManagerClient.updateShareAsync(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 OperationFuture
*
diff --git a/java-filestore/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/CloudFilestoreManagerStub.java b/java-filestore/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/CloudFilestoreManagerStub.java
index 22e27ef5ad94..5bb08eca11f4 100644
--- a/java-filestore/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/CloudFilestoreManagerStub.java
+++ b/java-filestore/google-cloud-filestore/src/main/java/com/google/cloud/filestore/v1beta1/stub/CloudFilestoreManagerStub.java
@@ -18,6 +18,8 @@
import static com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient.ListBackupsPagedResponse;
import static com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient.ListInstancesPagedResponse;
+import static com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient.ListSharesPagedResponse;
+import static com.google.cloud.filestore.v1beta1.CloudFilestoreManagerClient.ListSnapshotsPagedResponse;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
@@ -27,18 +29,33 @@
import com.google.cloud.filestore.v1beta1.Backup;
import com.google.cloud.filestore.v1beta1.CreateBackupRequest;
import com.google.cloud.filestore.v1beta1.CreateInstanceRequest;
+import com.google.cloud.filestore.v1beta1.CreateShareRequest;
+import com.google.cloud.filestore.v1beta1.CreateSnapshotRequest;
import com.google.cloud.filestore.v1beta1.DeleteBackupRequest;
import com.google.cloud.filestore.v1beta1.DeleteInstanceRequest;
+import com.google.cloud.filestore.v1beta1.DeleteShareRequest;
+import com.google.cloud.filestore.v1beta1.DeleteSnapshotRequest;
import com.google.cloud.filestore.v1beta1.GetBackupRequest;
import com.google.cloud.filestore.v1beta1.GetInstanceRequest;
+import com.google.cloud.filestore.v1beta1.GetShareRequest;
+import com.google.cloud.filestore.v1beta1.GetSnapshotRequest;
import com.google.cloud.filestore.v1beta1.Instance;
import com.google.cloud.filestore.v1beta1.ListBackupsRequest;
import com.google.cloud.filestore.v1beta1.ListBackupsResponse;
import com.google.cloud.filestore.v1beta1.ListInstancesRequest;
import com.google.cloud.filestore.v1beta1.ListInstancesResponse;
+import com.google.cloud.filestore.v1beta1.ListSharesRequest;
+import com.google.cloud.filestore.v1beta1.ListSharesResponse;
+import com.google.cloud.filestore.v1beta1.ListSnapshotsRequest;
+import com.google.cloud.filestore.v1beta1.ListSnapshotsResponse;
import com.google.cloud.filestore.v1beta1.RestoreInstanceRequest;
+import com.google.cloud.filestore.v1beta1.RevertInstanceRequest;
+import com.google.cloud.filestore.v1beta1.Share;
+import com.google.cloud.filestore.v1beta1.Snapshot;
import com.google.cloud.filestore.v1beta1.UpdateBackupRequest;
import com.google.cloud.filestore.v1beta1.UpdateInstanceRequest;
+import com.google.cloud.filestore.v1beta1.UpdateShareRequest;
+import com.google.cloud.filestore.v1beta1.UpdateSnapshotRequest;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.OperationsStub;
import com.google.protobuf.Empty;
@@ -102,6 +119,15 @@ public UnaryCallable