diff --git a/java-netapp/README.md b/java-netapp/README.md index 8a436277cc76..22a695c980d2 100644 --- a/java-netapp/README.md +++ b/java-netapp/README.md @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-netapp/java11.html [stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-netapp.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-netapp/0.9.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-netapp/0.11.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/NetAppClient.java b/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/NetAppClient.java index 3db3c08a837a..1761586cc55d 100644 --- a/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/NetAppClient.java +++ b/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/NetAppClient.java @@ -5013,6 +5013,2187 @@ public final OperationFuture reverseReplicationD return stub.reverseReplicationDirectionCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new backup vault + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   BackupVault backupVault = BackupVault.newBuilder().build();
+   *   String backupVaultId = "backupVaultId-1897432373";
+   *   BackupVault response =
+   *       netAppClient.createBackupVaultAsync(parent, backupVault, backupVaultId).get();
+   * }
+   * }
+ * + * @param parent Required. The location to create the backup vaults, in the format + * `projects/{project_id}/locations/{location}` + * @param backupVault Required. A backupVault resource + * @param backupVaultId Required. The ID to use for the backupVault. The ID must be unique within + * the specified location. The max supported length is 63 characters. This value must start + * with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and + * cannot end with a hyphen. Values that do not match this pattern will trigger an + * INVALID_ARGUMENT error. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createBackupVaultAsync( + LocationName parent, BackupVault backupVault, String backupVaultId) { + CreateBackupVaultRequest request = + CreateBackupVaultRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setBackupVault(backupVault) + .setBackupVaultId(backupVaultId) + .build(); + return createBackupVaultAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new backup vault + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   BackupVault backupVault = BackupVault.newBuilder().build();
+   *   String backupVaultId = "backupVaultId-1897432373";
+   *   BackupVault response =
+   *       netAppClient.createBackupVaultAsync(parent, backupVault, backupVaultId).get();
+   * }
+   * }
+ * + * @param parent Required. The location to create the backup vaults, in the format + * `projects/{project_id}/locations/{location}` + * @param backupVault Required. A backupVault resource + * @param backupVaultId Required. The ID to use for the backupVault. The ID must be unique within + * the specified location. The max supported length is 63 characters. This value must start + * with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and + * cannot end with a hyphen. Values that do not match this pattern will trigger an + * INVALID_ARGUMENT error. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createBackupVaultAsync( + String parent, BackupVault backupVault, String backupVaultId) { + CreateBackupVaultRequest request = + CreateBackupVaultRequest.newBuilder() + .setParent(parent) + .setBackupVault(backupVault) + .setBackupVaultId(backupVaultId) + .build(); + return createBackupVaultAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new backup vault + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   CreateBackupVaultRequest request =
+   *       CreateBackupVaultRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBackupVaultId("backupVaultId-1897432373")
+   *           .setBackupVault(BackupVault.newBuilder().build())
+   *           .build();
+   *   BackupVault response = netAppClient.createBackupVaultAsync(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 createBackupVaultAsync( + CreateBackupVaultRequest request) { + return createBackupVaultOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new backup vault + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   CreateBackupVaultRequest request =
+   *       CreateBackupVaultRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBackupVaultId("backupVaultId-1897432373")
+   *           .setBackupVault(BackupVault.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       netAppClient.createBackupVaultOperationCallable().futureCall(request);
+   *   // Do something.
+   *   BackupVault response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createBackupVaultOperationCallable() { + return stub.createBackupVaultOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new backup vault + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   CreateBackupVaultRequest request =
+   *       CreateBackupVaultRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBackupVaultId("backupVaultId-1897432373")
+   *           .setBackupVault(BackupVault.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = netAppClient.createBackupVaultCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createBackupVaultCallable() { + return stub.createBackupVaultCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the description of the specified backup vault + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]");
+   *   BackupVault response = netAppClient.getBackupVault(name);
+   * }
+   * }
+ * + * @param name Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BackupVault getBackupVault(BackupVaultName name) { + GetBackupVaultRequest request = + GetBackupVaultRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getBackupVault(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the description of the specified backup vault + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   String name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString();
+   *   BackupVault response = netAppClient.getBackupVault(name);
+   * }
+   * }
+ * + * @param name Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BackupVault getBackupVault(String name) { + GetBackupVaultRequest request = GetBackupVaultRequest.newBuilder().setName(name).build(); + return getBackupVault(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the description of the specified backup vault + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   GetBackupVaultRequest request =
+   *       GetBackupVaultRequest.newBuilder()
+   *           .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
+   *           .build();
+   *   BackupVault response = netAppClient.getBackupVault(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 BackupVault getBackupVault(GetBackupVaultRequest request) { + return getBackupVaultCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the description of the specified backup vault + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   GetBackupVaultRequest request =
+   *       GetBackupVaultRequest.newBuilder()
+   *           .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
+   *           .build();
+   *   ApiFuture future = netAppClient.getBackupVaultCallable().futureCall(request);
+   *   // Do something.
+   *   BackupVault response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getBackupVaultCallable() { + return stub.getBackupVaultCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns list of all available backup vaults. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (BackupVault element : netAppClient.listBackupVaults(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The location for which to retrieve backupVault information, in the + * format `projects/{project_id}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBackupVaultsPagedResponse listBackupVaults(LocationName parent) { + ListBackupVaultsRequest request = + ListBackupVaultsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listBackupVaults(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns list of all available backup vaults. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (BackupVault element : netAppClient.listBackupVaults(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The location for which to retrieve backupVault information, in the + * format `projects/{project_id}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBackupVaultsPagedResponse listBackupVaults(String parent) { + ListBackupVaultsRequest request = + ListBackupVaultsRequest.newBuilder().setParent(parent).build(); + return listBackupVaults(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns list of all available backup vaults. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   ListBackupVaultsRequest request =
+   *       ListBackupVaultsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (BackupVault element : netAppClient.listBackupVaults(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 ListBackupVaultsPagedResponse listBackupVaults(ListBackupVaultsRequest request) { + return listBackupVaultsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns list of all available backup vaults. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   ListBackupVaultsRequest request =
+   *       ListBackupVaultsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       netAppClient.listBackupVaultsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (BackupVault element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listBackupVaultsPagedCallable() { + return stub.listBackupVaultsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns list of all available backup vaults. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   ListBackupVaultsRequest request =
+   *       ListBackupVaultsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListBackupVaultsResponse response = netAppClient.listBackupVaultsCallable().call(request);
+   *     for (BackupVault element : response.getBackupVaultsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listBackupVaultsCallable() { + return stub.listBackupVaultsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the settings of a specific backup vault. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   BackupVault backupVault = BackupVault.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   BackupVault response = netAppClient.updateBackupVaultAsync(backupVault, updateMask).get();
+   * }
+   * }
+ * + * @param backupVault Required. The backupVault being updated + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. The fields specified in the update_mask are relative to the + * resource, not the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateBackupVaultAsync( + BackupVault backupVault, FieldMask updateMask) { + UpdateBackupVaultRequest request = + UpdateBackupVaultRequest.newBuilder() + .setBackupVault(backupVault) + .setUpdateMask(updateMask) + .build(); + return updateBackupVaultAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the settings of a specific backup vault. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   UpdateBackupVaultRequest request =
+   *       UpdateBackupVaultRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setBackupVault(BackupVault.newBuilder().build())
+   *           .build();
+   *   BackupVault response = netAppClient.updateBackupVaultAsync(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 updateBackupVaultAsync( + UpdateBackupVaultRequest request) { + return updateBackupVaultOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the settings of a specific backup vault. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   UpdateBackupVaultRequest request =
+   *       UpdateBackupVaultRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setBackupVault(BackupVault.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       netAppClient.updateBackupVaultOperationCallable().futureCall(request);
+   *   // Do something.
+   *   BackupVault response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateBackupVaultOperationCallable() { + return stub.updateBackupVaultOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the settings of a specific backup vault. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   UpdateBackupVaultRequest request =
+   *       UpdateBackupVaultRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setBackupVault(BackupVault.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = netAppClient.updateBackupVaultCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateBackupVaultCallable() { + return stub.updateBackupVaultCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Warning! This operation will permanently delete the backup vault. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]");
+   *   netAppClient.deleteBackupVaultAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteBackupVaultAsync( + BackupVaultName name) { + DeleteBackupVaultRequest request = + DeleteBackupVaultRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteBackupVaultAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Warning! This operation will permanently delete the backup vault. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   String name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString();
+   *   netAppClient.deleteBackupVaultAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteBackupVaultAsync(String name) { + DeleteBackupVaultRequest request = DeleteBackupVaultRequest.newBuilder().setName(name).build(); + return deleteBackupVaultAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Warning! This operation will permanently delete the backup vault. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   DeleteBackupVaultRequest request =
+   *       DeleteBackupVaultRequest.newBuilder()
+   *           .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
+   *           .build();
+   *   netAppClient.deleteBackupVaultAsync(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 deleteBackupVaultAsync( + DeleteBackupVaultRequest request) { + return deleteBackupVaultOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Warning! This operation will permanently delete the backup vault. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   DeleteBackupVaultRequest request =
+   *       DeleteBackupVaultRequest.newBuilder()
+   *           .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       netAppClient.deleteBackupVaultOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteBackupVaultOperationCallable() { + return stub.deleteBackupVaultOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Warning! This operation will permanently delete the backup vault. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   DeleteBackupVaultRequest request =
+   *       DeleteBackupVaultRequest.newBuilder()
+   *           .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
+   *           .build();
+   *   ApiFuture future = netAppClient.deleteBackupVaultCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteBackupVaultCallable() { + return stub.deleteBackupVaultCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a backup from the volume specified in the request The backup can be created from the + * given snapshot if specified in the request. If no snapshot specified, there'll be a new + * snapshot taken to initiate the backup creation. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]");
+   *   Backup backup = Backup.newBuilder().build();
+   *   String backupId = "backupId2121930365";
+   *   Backup response = netAppClient.createBackupAsync(parent, backup, backupId).get();
+   * }
+   * }
+ * + * @param parent Required. The NetApp backupVault to create the backups of, in the format + * `projects/*/locations/*/backupVaults/{backup_vault_id}` + * @param backup Required. A backup resource + * @param backupId Required. The ID to use for the backup. The ID must be unique within the + * specified backupVault. This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. Values that do not + * match this pattern will trigger an INVALID_ARGUMENT error. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createBackupAsync( + BackupVaultName parent, Backup backup, String backupId) { + CreateBackupRequest request = + CreateBackupRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setBackup(backup) + .setBackupId(backupId) + .build(); + return createBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a backup from the volume specified in the request The backup can be created from the + * given snapshot if specified in the request. If no snapshot specified, there'll be a new + * snapshot taken to initiate the backup creation. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   String parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString();
+   *   Backup backup = Backup.newBuilder().build();
+   *   String backupId = "backupId2121930365";
+   *   Backup response = netAppClient.createBackupAsync(parent, backup, backupId).get();
+   * }
+   * }
+ * + * @param parent Required. The NetApp backupVault to create the backups of, in the format + * `projects/*/locations/*/backupVaults/{backup_vault_id}` + * @param backup Required. A backup resource + * @param backupId Required. The ID to use for the backup. The ID must be unique within the + * specified backupVault. This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. Values that do not + * match this pattern will trigger an INVALID_ARGUMENT error. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createBackupAsync( + String parent, Backup backup, String backupId) { + CreateBackupRequest request = + CreateBackupRequest.newBuilder() + .setParent(parent) + .setBackup(backup) + .setBackupId(backupId) + .build(); + return createBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a backup from the volume specified in the request The backup can be created from the + * given snapshot if specified in the request. If no snapshot specified, there'll be a new + * snapshot taken to initiate the backup creation. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   CreateBackupRequest request =
+   *       CreateBackupRequest.newBuilder()
+   *           .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
+   *           .setBackupId("backupId2121930365")
+   *           .setBackup(Backup.newBuilder().build())
+   *           .build();
+   *   Backup response = netAppClient.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 createBackupAsync( + CreateBackupRequest request) { + return createBackupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a backup from the volume specified in the request The backup can be created from the + * given snapshot if specified in the request. If no snapshot specified, there'll be a new + * snapshot taken to initiate the backup creation. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   CreateBackupRequest request =
+   *       CreateBackupRequest.newBuilder()
+   *           .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
+   *           .setBackupId("backupId2121930365")
+   *           .setBackup(Backup.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       netAppClient.createBackupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Backup response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createBackupOperationCallable() { + return stub.createBackupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a backup from the volume specified in the request The backup can be created from the + * given snapshot if specified in the request. If no snapshot specified, there'll be a new + * snapshot taken to initiate the backup creation. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   CreateBackupRequest request =
+   *       CreateBackupRequest.newBuilder()
+   *           .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
+   *           .setBackupId("backupId2121930365")
+   *           .setBackup(Backup.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = netAppClient.createBackupCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createBackupCallable() { + return stub.createBackupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the description of the specified backup + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]");
+   *   Backup response = netAppClient.getBackup(name);
+   * }
+   * }
+ * + * @param name Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/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. + /** + * Returns the description of the specified backup + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   String name =
+   *       BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString();
+   *   Backup response = netAppClient.getBackup(name);
+   * }
+   * }
+ * + * @param name Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/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. + /** + * Returns the description of the specified backup + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   GetBackupRequest request =
+   *       GetBackupRequest.newBuilder()
+   *           .setName(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString())
+   *           .build();
+   *   Backup response = netAppClient.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. + /** + * Returns the description of the specified backup + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   GetBackupRequest request =
+   *       GetBackupRequest.newBuilder()
+   *           .setName(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString())
+   *           .build();
+   *   ApiFuture future = netAppClient.getBackupCallable().futureCall(request);
+   *   // Do something.
+   *   Backup response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getBackupCallable() { + return stub.getBackupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns descriptions of all backups for a backupVault. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]");
+   *   for (Backup element : netAppClient.listBackups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The backupVault for which to retrieve backup information, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. To retrieve + * backup information for all locations, use "-" for the `{location}` value. To retrieve + * backup information for all backupVaults, use "-" for the `{backup_vault_id}` value. To + * retrieve backup information for a volume, use "-" for the `{backup_vault_id}` value and + * specify volume full name with the filter. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBackupsPagedResponse listBackups(BackupVaultName parent) { + ListBackupsRequest request = + ListBackupsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listBackups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns descriptions of all backups for a backupVault. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   String parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString();
+   *   for (Backup element : netAppClient.listBackups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The backupVault for which to retrieve backup information, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. To retrieve + * backup information for all locations, use "-" for the `{location}` value. To retrieve + * backup information for all backupVaults, use "-" for the `{backup_vault_id}` value. To + * retrieve backup information for a volume, use "-" for the `{backup_vault_id}` value and + * specify volume full name with the filter. + * @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. + /** + * Returns descriptions of all backups for a backupVault. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   ListBackupsRequest request =
+   *       ListBackupsRequest.newBuilder()
+   *           .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (Backup element : netAppClient.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. + /** + * Returns descriptions of all backups for a backupVault. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   ListBackupsRequest request =
+   *       ListBackupsRequest.newBuilder()
+   *           .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future = netAppClient.listBackupsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Backup element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listBackupsPagedCallable() { + return stub.listBackupsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns descriptions of all backups for a backupVault. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   ListBackupsRequest request =
+   *       ListBackupsRequest.newBuilder()
+   *           .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListBackupsResponse response = netAppClient.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 listBackupsCallable() { + return stub.listBackupsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Warning! This operation will permanently delete the backup. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]");
+   *   netAppClient.deleteBackupAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteBackupAsync(BackupName name) { + DeleteBackupRequest request = + DeleteBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Warning! This operation will permanently delete the backup. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   String name =
+   *       BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString();
+   *   netAppClient.deleteBackupAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteBackupAsync(String name) { + DeleteBackupRequest request = DeleteBackupRequest.newBuilder().setName(name).build(); + return deleteBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Warning! This operation will permanently delete the backup. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   DeleteBackupRequest request =
+   *       DeleteBackupRequest.newBuilder()
+   *           .setName(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString())
+   *           .build();
+   *   netAppClient.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 deleteBackupAsync( + DeleteBackupRequest request) { + return deleteBackupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Warning! This operation will permanently delete the backup. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   DeleteBackupRequest request =
+   *       DeleteBackupRequest.newBuilder()
+   *           .setName(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       netAppClient.deleteBackupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteBackupOperationCallable() { + return stub.deleteBackupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Warning! This operation will permanently delete the backup. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   DeleteBackupRequest request =
+   *       DeleteBackupRequest.newBuilder()
+   *           .setName(
+   *               BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString())
+   *           .build();
+   *   ApiFuture future = netAppClient.deleteBackupCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteBackupCallable() { + return stub.deleteBackupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update backup with full spec. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   Backup backup = Backup.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Backup response = netAppClient.updateBackupAsync(backup, updateMask).get();
+   * }
+   * }
+ * + * @param backup Required. The backup being updated + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. The fields specified in the update_mask are relative to the + * resource, not the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateBackupAsync( + Backup backup, FieldMask updateMask) { + UpdateBackupRequest request = + UpdateBackupRequest.newBuilder().setBackup(backup).setUpdateMask(updateMask).build(); + return updateBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update backup with full spec. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   UpdateBackupRequest request =
+   *       UpdateBackupRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setBackup(Backup.newBuilder().build())
+   *           .build();
+   *   Backup response = netAppClient.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 updateBackupAsync( + UpdateBackupRequest request) { + return updateBackupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update backup with full spec. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   UpdateBackupRequest request =
+   *       UpdateBackupRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setBackup(Backup.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       netAppClient.updateBackupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Backup response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateBackupOperationCallable() { + return stub.updateBackupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update backup with full spec. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   UpdateBackupRequest request =
+   *       UpdateBackupRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setBackup(Backup.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = netAppClient.updateBackupCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateBackupCallable() { + return stub.updateBackupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new backup policy + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   BackupPolicy backupPolicy = BackupPolicy.newBuilder().build();
+   *   String backupPolicyId = "backupPolicyId-1278533169";
+   *   BackupPolicy response =
+   *       netAppClient.createBackupPolicyAsync(parent, backupPolicy, backupPolicyId).get();
+   * }
+   * }
+ * + * @param parent Required. The location to create the backup policies of, in the format + * `projects/{project_id}/locations/{location}` + * @param backupPolicy Required. A backupPolicy resource + * @param backupPolicyId Required. The ID to use for the backup policy. The ID must be unique + * within the specified location. 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 createBackupPolicyAsync( + LocationName parent, BackupPolicy backupPolicy, String backupPolicyId) { + CreateBackupPolicyRequest request = + CreateBackupPolicyRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setBackupPolicy(backupPolicy) + .setBackupPolicyId(backupPolicyId) + .build(); + return createBackupPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new backup policy + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   BackupPolicy backupPolicy = BackupPolicy.newBuilder().build();
+   *   String backupPolicyId = "backupPolicyId-1278533169";
+   *   BackupPolicy response =
+   *       netAppClient.createBackupPolicyAsync(parent, backupPolicy, backupPolicyId).get();
+   * }
+   * }
+ * + * @param parent Required. The location to create the backup policies of, in the format + * `projects/{project_id}/locations/{location}` + * @param backupPolicy Required. A backupPolicy resource + * @param backupPolicyId Required. The ID to use for the backup policy. The ID must be unique + * within the specified location. 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 createBackupPolicyAsync( + String parent, BackupPolicy backupPolicy, String backupPolicyId) { + CreateBackupPolicyRequest request = + CreateBackupPolicyRequest.newBuilder() + .setParent(parent) + .setBackupPolicy(backupPolicy) + .setBackupPolicyId(backupPolicyId) + .build(); + return createBackupPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new backup policy + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   CreateBackupPolicyRequest request =
+   *       CreateBackupPolicyRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBackupPolicy(BackupPolicy.newBuilder().build())
+   *           .setBackupPolicyId("backupPolicyId-1278533169")
+   *           .build();
+   *   BackupPolicy response = netAppClient.createBackupPolicyAsync(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 createBackupPolicyAsync( + CreateBackupPolicyRequest request) { + return createBackupPolicyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new backup policy + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   CreateBackupPolicyRequest request =
+   *       CreateBackupPolicyRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBackupPolicy(BackupPolicy.newBuilder().build())
+   *           .setBackupPolicyId("backupPolicyId-1278533169")
+   *           .build();
+   *   OperationFuture future =
+   *       netAppClient.createBackupPolicyOperationCallable().futureCall(request);
+   *   // Do something.
+   *   BackupPolicy response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createBackupPolicyOperationCallable() { + return stub.createBackupPolicyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates new backup policy + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   CreateBackupPolicyRequest request =
+   *       CreateBackupPolicyRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBackupPolicy(BackupPolicy.newBuilder().build())
+   *           .setBackupPolicyId("backupPolicyId-1278533169")
+   *           .build();
+   *   ApiFuture future = netAppClient.createBackupPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createBackupPolicyCallable() { + return stub.createBackupPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the description of the specified backup policy by backup_policy_id. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   BackupPolicyName name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]");
+   *   BackupPolicy response = netAppClient.getBackupPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The backupPolicy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BackupPolicy getBackupPolicy(BackupPolicyName name) { + GetBackupPolicyRequest request = + GetBackupPolicyRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getBackupPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the description of the specified backup policy by backup_policy_id. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   String name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString();
+   *   BackupPolicy response = netAppClient.getBackupPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The backupPolicy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BackupPolicy getBackupPolicy(String name) { + GetBackupPolicyRequest request = GetBackupPolicyRequest.newBuilder().setName(name).build(); + return getBackupPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the description of the specified backup policy by backup_policy_id. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   GetBackupPolicyRequest request =
+   *       GetBackupPolicyRequest.newBuilder()
+   *           .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString())
+   *           .build();
+   *   BackupPolicy response = netAppClient.getBackupPolicy(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 BackupPolicy getBackupPolicy(GetBackupPolicyRequest request) { + return getBackupPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the description of the specified backup policy by backup_policy_id. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   GetBackupPolicyRequest request =
+   *       GetBackupPolicyRequest.newBuilder()
+   *           .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString())
+   *           .build();
+   *   ApiFuture future = netAppClient.getBackupPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   BackupPolicy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getBackupPolicyCallable() { + return stub.getBackupPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns list of all available backup policies. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (BackupPolicy element : netAppClient.listBackupPolicies(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListBackupPoliciesRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBackupPoliciesPagedResponse listBackupPolicies(LocationName parent) { + ListBackupPoliciesRequest request = + ListBackupPoliciesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listBackupPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns list of all available backup policies. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (BackupPolicy element : netAppClient.listBackupPolicies(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListBackupPoliciesRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBackupPoliciesPagedResponse listBackupPolicies(String parent) { + ListBackupPoliciesRequest request = + ListBackupPoliciesRequest.newBuilder().setParent(parent).build(); + return listBackupPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns list of all available backup policies. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   ListBackupPoliciesRequest request =
+   *       ListBackupPoliciesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (BackupPolicy element : netAppClient.listBackupPolicies(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 ListBackupPoliciesPagedResponse listBackupPolicies( + ListBackupPoliciesRequest request) { + return listBackupPoliciesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns list of all available backup policies. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   ListBackupPoliciesRequest request =
+   *       ListBackupPoliciesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       netAppClient.listBackupPoliciesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (BackupPolicy element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listBackupPoliciesPagedCallable() { + return stub.listBackupPoliciesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns list of all available backup policies. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   ListBackupPoliciesRequest request =
+   *       ListBackupPoliciesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListBackupPoliciesResponse response =
+   *         netAppClient.listBackupPoliciesCallable().call(request);
+   *     for (BackupPolicy element : response.getBackupPoliciesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listBackupPoliciesCallable() { + return stub.listBackupPoliciesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates settings of a specific backup policy. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   BackupPolicy backupPolicy = BackupPolicy.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   BackupPolicy response = netAppClient.updateBackupPolicyAsync(backupPolicy, updateMask).get();
+   * }
+   * }
+ * + * @param backupPolicy Required. The backup policy being updated + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Backup Policy resource by the update. The fields specified in the update_mask are relative + * to the resource, not the full request. A field will be overwritten if it is in the mask. If + * the user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateBackupPolicyAsync( + BackupPolicy backupPolicy, FieldMask updateMask) { + UpdateBackupPolicyRequest request = + UpdateBackupPolicyRequest.newBuilder() + .setBackupPolicy(backupPolicy) + .setUpdateMask(updateMask) + .build(); + return updateBackupPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates settings of a specific backup policy. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   UpdateBackupPolicyRequest request =
+   *       UpdateBackupPolicyRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setBackupPolicy(BackupPolicy.newBuilder().build())
+   *           .build();
+   *   BackupPolicy response = netAppClient.updateBackupPolicyAsync(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 updateBackupPolicyAsync( + UpdateBackupPolicyRequest request) { + return updateBackupPolicyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates settings of a specific backup policy. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   UpdateBackupPolicyRequest request =
+   *       UpdateBackupPolicyRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setBackupPolicy(BackupPolicy.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       netAppClient.updateBackupPolicyOperationCallable().futureCall(request);
+   *   // Do something.
+   *   BackupPolicy response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateBackupPolicyOperationCallable() { + return stub.updateBackupPolicyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates settings of a specific backup policy. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   UpdateBackupPolicyRequest request =
+   *       UpdateBackupPolicyRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setBackupPolicy(BackupPolicy.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = netAppClient.updateBackupPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateBackupPolicyCallable() { + return stub.updateBackupPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Warning! This operation will permanently delete the backup policy. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   BackupPolicyName name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]");
+   *   netAppClient.deleteBackupPolicyAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The backup policy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteBackupPolicyAsync( + BackupPolicyName name) { + DeleteBackupPolicyRequest request = + DeleteBackupPolicyRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteBackupPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Warning! This operation will permanently delete the backup policy. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   String name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString();
+   *   netAppClient.deleteBackupPolicyAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The backup policy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteBackupPolicyAsync(String name) { + DeleteBackupPolicyRequest request = + DeleteBackupPolicyRequest.newBuilder().setName(name).build(); + return deleteBackupPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Warning! This operation will permanently delete the backup policy. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   DeleteBackupPolicyRequest request =
+   *       DeleteBackupPolicyRequest.newBuilder()
+   *           .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString())
+   *           .build();
+   *   netAppClient.deleteBackupPolicyAsync(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 deleteBackupPolicyAsync( + DeleteBackupPolicyRequest request) { + return deleteBackupPolicyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Warning! This operation will permanently delete the backup policy. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   DeleteBackupPolicyRequest request =
+   *       DeleteBackupPolicyRequest.newBuilder()
+   *           .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       netAppClient.deleteBackupPolicyOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteBackupPolicyOperationCallable() { + return stub.deleteBackupPolicyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Warning! This operation will permanently delete the backup policy. + * + *

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 (NetAppClient netAppClient = NetAppClient.create()) {
+   *   DeleteBackupPolicyRequest request =
+   *       DeleteBackupPolicyRequest.newBuilder()
+   *           .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString())
+   *           .build();
+   *   ApiFuture future = netAppClient.deleteBackupPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteBackupPolicyCallable() { + return stub.deleteBackupPolicyCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. @@ -5660,6 +7841,236 @@ protected ListReplicationsFixedSizeCollection createCollection( } } + public static class ListBackupVaultsPagedResponse + extends AbstractPagedListResponse< + ListBackupVaultsRequest, + ListBackupVaultsResponse, + BackupVault, + ListBackupVaultsPage, + ListBackupVaultsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListBackupVaultsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListBackupVaultsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListBackupVaultsPagedResponse(ListBackupVaultsPage page) { + super(page, ListBackupVaultsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListBackupVaultsPage + extends AbstractPage< + ListBackupVaultsRequest, ListBackupVaultsResponse, BackupVault, ListBackupVaultsPage> { + + private ListBackupVaultsPage( + PageContext context, + ListBackupVaultsResponse response) { + super(context, response); + } + + private static ListBackupVaultsPage createEmptyPage() { + return new ListBackupVaultsPage(null, null); + } + + @Override + protected ListBackupVaultsPage createPage( + PageContext context, + ListBackupVaultsResponse response) { + return new ListBackupVaultsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListBackupVaultsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListBackupVaultsRequest, + ListBackupVaultsResponse, + BackupVault, + ListBackupVaultsPage, + ListBackupVaultsFixedSizeCollection> { + + private ListBackupVaultsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListBackupVaultsFixedSizeCollection createEmptyCollection() { + return new ListBackupVaultsFixedSizeCollection(null, 0); + } + + @Override + protected ListBackupVaultsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListBackupVaultsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListBackupsPagedResponse + extends AbstractPagedListResponse< + ListBackupsRequest, + ListBackupsResponse, + Backup, + ListBackupsPage, + ListBackupsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListBackupsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListBackupsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListBackupsPagedResponse(ListBackupsPage page) { + super(page, ListBackupsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListBackupsPage + extends AbstractPage { + + private ListBackupsPage( + PageContext context, + ListBackupsResponse response) { + super(context, response); + } + + private static ListBackupsPage createEmptyPage() { + return new ListBackupsPage(null, null); + } + + @Override + protected ListBackupsPage createPage( + PageContext context, + ListBackupsResponse response) { + return new ListBackupsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListBackupsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListBackupsRequest, + ListBackupsResponse, + Backup, + ListBackupsPage, + ListBackupsFixedSizeCollection> { + + private ListBackupsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListBackupsFixedSizeCollection createEmptyCollection() { + return new ListBackupsFixedSizeCollection(null, 0); + } + + @Override + protected ListBackupsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListBackupsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListBackupPoliciesPagedResponse + extends AbstractPagedListResponse< + ListBackupPoliciesRequest, + ListBackupPoliciesResponse, + BackupPolicy, + ListBackupPoliciesPage, + ListBackupPoliciesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListBackupPoliciesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListBackupPoliciesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListBackupPoliciesPagedResponse(ListBackupPoliciesPage page) { + super(page, ListBackupPoliciesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListBackupPoliciesPage + extends AbstractPage< + ListBackupPoliciesRequest, + ListBackupPoliciesResponse, + BackupPolicy, + ListBackupPoliciesPage> { + + private ListBackupPoliciesPage( + PageContext context, + ListBackupPoliciesResponse response) { + super(context, response); + } + + private static ListBackupPoliciesPage createEmptyPage() { + return new ListBackupPoliciesPage(null, null); + } + + @Override + protected ListBackupPoliciesPage createPage( + PageContext context, + ListBackupPoliciesResponse response) { + return new ListBackupPoliciesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListBackupPoliciesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListBackupPoliciesRequest, + ListBackupPoliciesResponse, + BackupPolicy, + ListBackupPoliciesPage, + ListBackupPoliciesFixedSizeCollection> { + + private ListBackupPoliciesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListBackupPoliciesFixedSizeCollection createEmptyCollection() { + return new ListBackupPoliciesFixedSizeCollection(null, 0); + } + + @Override + protected ListBackupPoliciesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListBackupPoliciesFixedSizeCollection(pages, collectionSize); + } + } + public static class ListLocationsPagedResponse extends AbstractPagedListResponse< ListLocationsRequest, diff --git a/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/NetAppSettings.java b/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/NetAppSettings.java index 58e93de0bf33..0d1e17fa67e6 100644 --- a/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/NetAppSettings.java +++ b/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/NetAppSettings.java @@ -17,6 +17,9 @@ package com.google.cloud.netapp.v1; import static com.google.cloud.netapp.v1.NetAppClient.ListActiveDirectoriesPagedResponse; +import static com.google.cloud.netapp.v1.NetAppClient.ListBackupPoliciesPagedResponse; +import static com.google.cloud.netapp.v1.NetAppClient.ListBackupVaultsPagedResponse; +import static com.google.cloud.netapp.v1.NetAppClient.ListBackupsPagedResponse; import static com.google.cloud.netapp.v1.NetAppClient.ListKmsConfigsPagedResponse; import static com.google.cloud.netapp.v1.NetAppClient.ListLocationsPagedResponse; import static com.google.cloud.netapp.v1.NetAppClient.ListReplicationsPagedResponse; @@ -423,6 +426,140 @@ public UnaryCallSettings resumeReplicationS return ((NetAppStubSettings) getStubSettings()).reverseReplicationDirectionOperationSettings(); } + /** Returns the object with the settings used for calls to createBackupVault. */ + public UnaryCallSettings createBackupVaultSettings() { + return ((NetAppStubSettings) getStubSettings()).createBackupVaultSettings(); + } + + /** Returns the object with the settings used for calls to createBackupVault. */ + public OperationCallSettings + createBackupVaultOperationSettings() { + return ((NetAppStubSettings) getStubSettings()).createBackupVaultOperationSettings(); + } + + /** Returns the object with the settings used for calls to getBackupVault. */ + public UnaryCallSettings getBackupVaultSettings() { + return ((NetAppStubSettings) getStubSettings()).getBackupVaultSettings(); + } + + /** Returns the object with the settings used for calls to listBackupVaults. */ + public PagedCallSettings< + ListBackupVaultsRequest, ListBackupVaultsResponse, ListBackupVaultsPagedResponse> + listBackupVaultsSettings() { + return ((NetAppStubSettings) getStubSettings()).listBackupVaultsSettings(); + } + + /** Returns the object with the settings used for calls to updateBackupVault. */ + public UnaryCallSettings updateBackupVaultSettings() { + return ((NetAppStubSettings) getStubSettings()).updateBackupVaultSettings(); + } + + /** Returns the object with the settings used for calls to updateBackupVault. */ + public OperationCallSettings + updateBackupVaultOperationSettings() { + return ((NetAppStubSettings) getStubSettings()).updateBackupVaultOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteBackupVault. */ + public UnaryCallSettings deleteBackupVaultSettings() { + return ((NetAppStubSettings) getStubSettings()).deleteBackupVaultSettings(); + } + + /** Returns the object with the settings used for calls to deleteBackupVault. */ + public OperationCallSettings + deleteBackupVaultOperationSettings() { + return ((NetAppStubSettings) getStubSettings()).deleteBackupVaultOperationSettings(); + } + + /** Returns the object with the settings used for calls to createBackup. */ + public UnaryCallSettings createBackupSettings() { + return ((NetAppStubSettings) getStubSettings()).createBackupSettings(); + } + + /** Returns the object with the settings used for calls to createBackup. */ + public OperationCallSettings + createBackupOperationSettings() { + return ((NetAppStubSettings) getStubSettings()).createBackupOperationSettings(); + } + + /** Returns the object with the settings used for calls to getBackup. */ + public UnaryCallSettings getBackupSettings() { + return ((NetAppStubSettings) getStubSettings()).getBackupSettings(); + } + + /** Returns the object with the settings used for calls to listBackups. */ + public PagedCallSettings + listBackupsSettings() { + return ((NetAppStubSettings) getStubSettings()).listBackupsSettings(); + } + + /** Returns the object with the settings used for calls to deleteBackup. */ + public UnaryCallSettings deleteBackupSettings() { + return ((NetAppStubSettings) getStubSettings()).deleteBackupSettings(); + } + + /** Returns the object with the settings used for calls to deleteBackup. */ + public OperationCallSettings + deleteBackupOperationSettings() { + return ((NetAppStubSettings) getStubSettings()).deleteBackupOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateBackup. */ + public UnaryCallSettings updateBackupSettings() { + return ((NetAppStubSettings) getStubSettings()).updateBackupSettings(); + } + + /** Returns the object with the settings used for calls to updateBackup. */ + public OperationCallSettings + updateBackupOperationSettings() { + return ((NetAppStubSettings) getStubSettings()).updateBackupOperationSettings(); + } + + /** Returns the object with the settings used for calls to createBackupPolicy. */ + public UnaryCallSettings createBackupPolicySettings() { + return ((NetAppStubSettings) getStubSettings()).createBackupPolicySettings(); + } + + /** Returns the object with the settings used for calls to createBackupPolicy. */ + public OperationCallSettings + createBackupPolicyOperationSettings() { + return ((NetAppStubSettings) getStubSettings()).createBackupPolicyOperationSettings(); + } + + /** Returns the object with the settings used for calls to getBackupPolicy. */ + public UnaryCallSettings getBackupPolicySettings() { + return ((NetAppStubSettings) getStubSettings()).getBackupPolicySettings(); + } + + /** Returns the object with the settings used for calls to listBackupPolicies. */ + public PagedCallSettings< + ListBackupPoliciesRequest, ListBackupPoliciesResponse, ListBackupPoliciesPagedResponse> + listBackupPoliciesSettings() { + return ((NetAppStubSettings) getStubSettings()).listBackupPoliciesSettings(); + } + + /** Returns the object with the settings used for calls to updateBackupPolicy. */ + public UnaryCallSettings updateBackupPolicySettings() { + return ((NetAppStubSettings) getStubSettings()).updateBackupPolicySettings(); + } + + /** Returns the object with the settings used for calls to updateBackupPolicy. */ + public OperationCallSettings + updateBackupPolicyOperationSettings() { + return ((NetAppStubSettings) getStubSettings()).updateBackupPolicyOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteBackupPolicy. */ + public UnaryCallSettings deleteBackupPolicySettings() { + return ((NetAppStubSettings) getStubSettings()).deleteBackupPolicySettings(); + } + + /** Returns the object with the settings used for calls to deleteBackupPolicy. */ + public OperationCallSettings + deleteBackupPolicyOperationSettings() { + return ((NetAppStubSettings) getStubSettings()).deleteBackupPolicyOperationSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -896,6 +1033,148 @@ public UnaryCallSettings.Builder stopReplicat return getStubSettingsBuilder().reverseReplicationDirectionOperationSettings(); } + /** Returns the builder for the settings used for calls to createBackupVault. */ + public UnaryCallSettings.Builder + createBackupVaultSettings() { + return getStubSettingsBuilder().createBackupVaultSettings(); + } + + /** Returns the builder for the settings used for calls to createBackupVault. */ + public OperationCallSettings.Builder + createBackupVaultOperationSettings() { + return getStubSettingsBuilder().createBackupVaultOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getBackupVault. */ + public UnaryCallSettings.Builder getBackupVaultSettings() { + return getStubSettingsBuilder().getBackupVaultSettings(); + } + + /** Returns the builder for the settings used for calls to listBackupVaults. */ + public PagedCallSettings.Builder< + ListBackupVaultsRequest, ListBackupVaultsResponse, ListBackupVaultsPagedResponse> + listBackupVaultsSettings() { + return getStubSettingsBuilder().listBackupVaultsSettings(); + } + + /** Returns the builder for the settings used for calls to updateBackupVault. */ + public UnaryCallSettings.Builder + updateBackupVaultSettings() { + return getStubSettingsBuilder().updateBackupVaultSettings(); + } + + /** Returns the builder for the settings used for calls to updateBackupVault. */ + public OperationCallSettings.Builder + updateBackupVaultOperationSettings() { + return getStubSettingsBuilder().updateBackupVaultOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteBackupVault. */ + public UnaryCallSettings.Builder + deleteBackupVaultSettings() { + return getStubSettingsBuilder().deleteBackupVaultSettings(); + } + + /** Returns the builder for the settings used for calls to deleteBackupVault. */ + public OperationCallSettings.Builder + deleteBackupVaultOperationSettings() { + return getStubSettingsBuilder().deleteBackupVaultOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createBackup. */ + public UnaryCallSettings.Builder createBackupSettings() { + return getStubSettingsBuilder().createBackupSettings(); + } + + /** Returns the builder for the settings used for calls to createBackup. */ + public OperationCallSettings.Builder + createBackupOperationSettings() { + return getStubSettingsBuilder().createBackupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getBackup. */ + public UnaryCallSettings.Builder getBackupSettings() { + return getStubSettingsBuilder().getBackupSettings(); + } + + /** Returns the builder for the settings used for calls to listBackups. */ + public PagedCallSettings.Builder< + ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> + listBackupsSettings() { + return getStubSettingsBuilder().listBackupsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteBackup. */ + public UnaryCallSettings.Builder deleteBackupSettings() { + return getStubSettingsBuilder().deleteBackupSettings(); + } + + /** Returns the builder for the settings used for calls to deleteBackup. */ + public OperationCallSettings.Builder + deleteBackupOperationSettings() { + return getStubSettingsBuilder().deleteBackupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateBackup. */ + public UnaryCallSettings.Builder updateBackupSettings() { + return getStubSettingsBuilder().updateBackupSettings(); + } + + /** Returns the builder for the settings used for calls to updateBackup. */ + public OperationCallSettings.Builder + updateBackupOperationSettings() { + return getStubSettingsBuilder().updateBackupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createBackupPolicy. */ + public UnaryCallSettings.Builder + createBackupPolicySettings() { + return getStubSettingsBuilder().createBackupPolicySettings(); + } + + /** Returns the builder for the settings used for calls to createBackupPolicy. */ + public OperationCallSettings.Builder + createBackupPolicyOperationSettings() { + return getStubSettingsBuilder().createBackupPolicyOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getBackupPolicy. */ + public UnaryCallSettings.Builder + getBackupPolicySettings() { + return getStubSettingsBuilder().getBackupPolicySettings(); + } + + /** Returns the builder for the settings used for calls to listBackupPolicies. */ + public PagedCallSettings.Builder< + ListBackupPoliciesRequest, ListBackupPoliciesResponse, ListBackupPoliciesPagedResponse> + listBackupPoliciesSettings() { + return getStubSettingsBuilder().listBackupPoliciesSettings(); + } + + /** Returns the builder for the settings used for calls to updateBackupPolicy. */ + public UnaryCallSettings.Builder + updateBackupPolicySettings() { + return getStubSettingsBuilder().updateBackupPolicySettings(); + } + + /** Returns the builder for the settings used for calls to updateBackupPolicy. */ + public OperationCallSettings.Builder + updateBackupPolicyOperationSettings() { + return getStubSettingsBuilder().updateBackupPolicyOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteBackupPolicy. */ + public UnaryCallSettings.Builder + deleteBackupPolicySettings() { + return getStubSettingsBuilder().deleteBackupPolicySettings(); + } + + /** Returns the builder for the settings used for calls to deleteBackupPolicy. */ + public OperationCallSettings.Builder + deleteBackupPolicyOperationSettings() { + return getStubSettingsBuilder().deleteBackupPolicyOperationSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/gapic_metadata.json b/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/gapic_metadata.json index 994709332957..16db5d4b0898 100644 --- a/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/gapic_metadata.json +++ b/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/gapic_metadata.json @@ -13,6 +13,15 @@ "CreateActiveDirectory": { "methods": ["createActiveDirectoryAsync", "createActiveDirectoryAsync", "createActiveDirectoryAsync", "createActiveDirectoryOperationCallable", "createActiveDirectoryCallable"] }, + "CreateBackup": { + "methods": ["createBackupAsync", "createBackupAsync", "createBackupAsync", "createBackupOperationCallable", "createBackupCallable"] + }, + "CreateBackupPolicy": { + "methods": ["createBackupPolicyAsync", "createBackupPolicyAsync", "createBackupPolicyAsync", "createBackupPolicyOperationCallable", "createBackupPolicyCallable"] + }, + "CreateBackupVault": { + "methods": ["createBackupVaultAsync", "createBackupVaultAsync", "createBackupVaultAsync", "createBackupVaultOperationCallable", "createBackupVaultCallable"] + }, "CreateKmsConfig": { "methods": ["createKmsConfigAsync", "createKmsConfigAsync", "createKmsConfigAsync", "createKmsConfigOperationCallable", "createKmsConfigCallable"] }, @@ -31,6 +40,15 @@ "DeleteActiveDirectory": { "methods": ["deleteActiveDirectoryAsync", "deleteActiveDirectoryAsync", "deleteActiveDirectoryAsync", "deleteActiveDirectoryOperationCallable", "deleteActiveDirectoryCallable"] }, + "DeleteBackup": { + "methods": ["deleteBackupAsync", "deleteBackupAsync", "deleteBackupAsync", "deleteBackupOperationCallable", "deleteBackupCallable"] + }, + "DeleteBackupPolicy": { + "methods": ["deleteBackupPolicyAsync", "deleteBackupPolicyAsync", "deleteBackupPolicyAsync", "deleteBackupPolicyOperationCallable", "deleteBackupPolicyCallable"] + }, + "DeleteBackupVault": { + "methods": ["deleteBackupVaultAsync", "deleteBackupVaultAsync", "deleteBackupVaultAsync", "deleteBackupVaultOperationCallable", "deleteBackupVaultCallable"] + }, "DeleteKmsConfig": { "methods": ["deleteKmsConfigAsync", "deleteKmsConfigAsync", "deleteKmsConfigAsync", "deleteKmsConfigOperationCallable", "deleteKmsConfigCallable"] }, @@ -52,6 +70,15 @@ "GetActiveDirectory": { "methods": ["getActiveDirectory", "getActiveDirectory", "getActiveDirectory", "getActiveDirectoryCallable"] }, + "GetBackup": { + "methods": ["getBackup", "getBackup", "getBackup", "getBackupCallable"] + }, + "GetBackupPolicy": { + "methods": ["getBackupPolicy", "getBackupPolicy", "getBackupPolicy", "getBackupPolicyCallable"] + }, + "GetBackupVault": { + "methods": ["getBackupVault", "getBackupVault", "getBackupVault", "getBackupVaultCallable"] + }, "GetKmsConfig": { "methods": ["getKmsConfig", "getKmsConfig", "getKmsConfig", "getKmsConfigCallable"] }, @@ -73,6 +100,15 @@ "ListActiveDirectories": { "methods": ["listActiveDirectories", "listActiveDirectories", "listActiveDirectories", "listActiveDirectoriesPagedCallable", "listActiveDirectoriesCallable"] }, + "ListBackupPolicies": { + "methods": ["listBackupPolicies", "listBackupPolicies", "listBackupPolicies", "listBackupPoliciesPagedCallable", "listBackupPoliciesCallable"] + }, + "ListBackupVaults": { + "methods": ["listBackupVaults", "listBackupVaults", "listBackupVaults", "listBackupVaultsPagedCallable", "listBackupVaultsCallable"] + }, + "ListBackups": { + "methods": ["listBackups", "listBackups", "listBackups", "listBackupsPagedCallable", "listBackupsCallable"] + }, "ListKmsConfigs": { "methods": ["listKmsConfigs", "listKmsConfigs", "listKmsConfigs", "listKmsConfigsPagedCallable", "listKmsConfigsCallable"] }, @@ -106,6 +142,15 @@ "UpdateActiveDirectory": { "methods": ["updateActiveDirectoryAsync", "updateActiveDirectoryAsync", "updateActiveDirectoryOperationCallable", "updateActiveDirectoryCallable"] }, + "UpdateBackup": { + "methods": ["updateBackupAsync", "updateBackupAsync", "updateBackupOperationCallable", "updateBackupCallable"] + }, + "UpdateBackupPolicy": { + "methods": ["updateBackupPolicyAsync", "updateBackupPolicyAsync", "updateBackupPolicyOperationCallable", "updateBackupPolicyCallable"] + }, + "UpdateBackupVault": { + "methods": ["updateBackupVaultAsync", "updateBackupVaultAsync", "updateBackupVaultOperationCallable", "updateBackupVaultCallable"] + }, "UpdateKmsConfig": { "methods": ["updateKmsConfigAsync", "updateKmsConfigAsync", "updateKmsConfigOperationCallable", "updateKmsConfigCallable"] }, diff --git a/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/stub/GrpcNetAppStub.java b/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/stub/GrpcNetAppStub.java index 5ad34db4aeb9..9432bf2a55f5 100644 --- a/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/stub/GrpcNetAppStub.java +++ b/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/stub/GrpcNetAppStub.java @@ -17,6 +17,9 @@ package com.google.cloud.netapp.v1.stub; import static com.google.cloud.netapp.v1.NetAppClient.ListActiveDirectoriesPagedResponse; +import static com.google.cloud.netapp.v1.NetAppClient.ListBackupPoliciesPagedResponse; +import static com.google.cloud.netapp.v1.NetAppClient.ListBackupVaultsPagedResponse; +import static com.google.cloud.netapp.v1.NetAppClient.ListBackupsPagedResponse; import static com.google.cloud.netapp.v1.NetAppClient.ListKmsConfigsPagedResponse; import static com.google.cloud.netapp.v1.NetAppClient.ListLocationsPagedResponse; import static com.google.cloud.netapp.v1.NetAppClient.ListReplicationsPagedResponse; @@ -37,13 +40,22 @@ import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; import com.google.cloud.netapp.v1.ActiveDirectory; +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.BackupVault; import com.google.cloud.netapp.v1.CreateActiveDirectoryRequest; +import com.google.cloud.netapp.v1.CreateBackupPolicyRequest; +import com.google.cloud.netapp.v1.CreateBackupRequest; +import com.google.cloud.netapp.v1.CreateBackupVaultRequest; import com.google.cloud.netapp.v1.CreateKmsConfigRequest; import com.google.cloud.netapp.v1.CreateReplicationRequest; import com.google.cloud.netapp.v1.CreateSnapshotRequest; import com.google.cloud.netapp.v1.CreateStoragePoolRequest; import com.google.cloud.netapp.v1.CreateVolumeRequest; import com.google.cloud.netapp.v1.DeleteActiveDirectoryRequest; +import com.google.cloud.netapp.v1.DeleteBackupPolicyRequest; +import com.google.cloud.netapp.v1.DeleteBackupRequest; +import com.google.cloud.netapp.v1.DeleteBackupVaultRequest; import com.google.cloud.netapp.v1.DeleteKmsConfigRequest; import com.google.cloud.netapp.v1.DeleteReplicationRequest; import com.google.cloud.netapp.v1.DeleteSnapshotRequest; @@ -51,6 +63,9 @@ import com.google.cloud.netapp.v1.DeleteVolumeRequest; import com.google.cloud.netapp.v1.EncryptVolumesRequest; import com.google.cloud.netapp.v1.GetActiveDirectoryRequest; +import com.google.cloud.netapp.v1.GetBackupPolicyRequest; +import com.google.cloud.netapp.v1.GetBackupRequest; +import com.google.cloud.netapp.v1.GetBackupVaultRequest; import com.google.cloud.netapp.v1.GetKmsConfigRequest; import com.google.cloud.netapp.v1.GetReplicationRequest; import com.google.cloud.netapp.v1.GetSnapshotRequest; @@ -59,6 +74,12 @@ import com.google.cloud.netapp.v1.KmsConfig; import com.google.cloud.netapp.v1.ListActiveDirectoriesRequest; import com.google.cloud.netapp.v1.ListActiveDirectoriesResponse; +import com.google.cloud.netapp.v1.ListBackupPoliciesRequest; +import com.google.cloud.netapp.v1.ListBackupPoliciesResponse; +import com.google.cloud.netapp.v1.ListBackupVaultsRequest; +import com.google.cloud.netapp.v1.ListBackupVaultsResponse; +import com.google.cloud.netapp.v1.ListBackupsRequest; +import com.google.cloud.netapp.v1.ListBackupsResponse; import com.google.cloud.netapp.v1.ListKmsConfigsRequest; import com.google.cloud.netapp.v1.ListKmsConfigsResponse; import com.google.cloud.netapp.v1.ListReplicationsRequest; @@ -78,6 +99,9 @@ import com.google.cloud.netapp.v1.StopReplicationRequest; import com.google.cloud.netapp.v1.StoragePool; import com.google.cloud.netapp.v1.UpdateActiveDirectoryRequest; +import com.google.cloud.netapp.v1.UpdateBackupPolicyRequest; +import com.google.cloud.netapp.v1.UpdateBackupRequest; +import com.google.cloud.netapp.v1.UpdateBackupVaultRequest; import com.google.cloud.netapp.v1.UpdateKmsConfigRequest; import com.google.cloud.netapp.v1.UpdateReplicationRequest; import com.google.cloud.netapp.v1.UpdateSnapshotRequest; @@ -460,6 +484,153 @@ public class GrpcNetAppStub extends NetAppStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + createBackupVaultMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.netapp.v1.NetApp/CreateBackupVault") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateBackupVaultRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getBackupVaultMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.netapp.v1.NetApp/GetBackupVault") + .setRequestMarshaller( + ProtoUtils.marshaller(GetBackupVaultRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(BackupVault.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listBackupVaultsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.netapp.v1.NetApp/ListBackupVaults") + .setRequestMarshaller( + ProtoUtils.marshaller(ListBackupVaultsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListBackupVaultsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateBackupVaultMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.netapp.v1.NetApp/UpdateBackupVault") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateBackupVaultRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteBackupVaultMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.netapp.v1.NetApp/DeleteBackupVault") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteBackupVaultRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createBackupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.netapp.v1.NetApp/CreateBackup") + .setRequestMarshaller(ProtoUtils.marshaller(CreateBackupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getBackupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.netapp.v1.NetApp/GetBackup") + .setRequestMarshaller(ProtoUtils.marshaller(GetBackupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Backup.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listBackupsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.netapp.v1.NetApp/ListBackups") + .setRequestMarshaller(ProtoUtils.marshaller(ListBackupsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListBackupsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteBackupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.netapp.v1.NetApp/DeleteBackup") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteBackupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateBackupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.netapp.v1.NetApp/UpdateBackup") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateBackupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createBackupPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.netapp.v1.NetApp/CreateBackupPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateBackupPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getBackupPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.netapp.v1.NetApp/GetBackupPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(GetBackupPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(BackupPolicy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listBackupPoliciesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.netapp.v1.NetApp/ListBackupPolicies") + .setRequestMarshaller( + ProtoUtils.marshaller(ListBackupPoliciesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListBackupPoliciesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateBackupPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.netapp.v1.NetApp/UpdateBackupPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateBackupPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteBackupPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.netapp.v1.NetApp/DeleteBackupPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteBackupPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -583,6 +754,47 @@ public class GrpcNetAppStub extends NetAppStub { private final OperationCallable< ReverseReplicationDirectionRequest, Replication, OperationMetadata> reverseReplicationDirectionOperationCallable; + private final UnaryCallable createBackupVaultCallable; + private final OperationCallable + createBackupVaultOperationCallable; + private final UnaryCallable getBackupVaultCallable; + private final UnaryCallable + listBackupVaultsCallable; + private final UnaryCallable + listBackupVaultsPagedCallable; + private final UnaryCallable updateBackupVaultCallable; + private final OperationCallable + updateBackupVaultOperationCallable; + private final UnaryCallable deleteBackupVaultCallable; + private final OperationCallable + deleteBackupVaultOperationCallable; + private final UnaryCallable createBackupCallable; + private final OperationCallable + createBackupOperationCallable; + private final UnaryCallable getBackupCallable; + private final UnaryCallable listBackupsCallable; + private final UnaryCallable + listBackupsPagedCallable; + private final UnaryCallable deleteBackupCallable; + private final OperationCallable + deleteBackupOperationCallable; + private final UnaryCallable updateBackupCallable; + private final OperationCallable + updateBackupOperationCallable; + private final UnaryCallable createBackupPolicyCallable; + private final OperationCallable + createBackupPolicyOperationCallable; + private final UnaryCallable getBackupPolicyCallable; + private final UnaryCallable + listBackupPoliciesCallable; + private final UnaryCallable + listBackupPoliciesPagedCallable; + private final UnaryCallable updateBackupPolicyCallable; + private final OperationCallable + updateBackupPolicyOperationCallable; + private final UnaryCallable deleteBackupPolicyCallable; + private final OperationCallable + deleteBackupPolicyOperationCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -1002,6 +1214,160 @@ protected GrpcNetAppStub( return builder.build(); }) .build(); + GrpcCallSettings createBackupVaultTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createBackupVaultMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getBackupVaultTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getBackupVaultMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listBackupVaultsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listBackupVaultsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateBackupVaultTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateBackupVaultMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "backup_vault.name", String.valueOf(request.getBackupVault().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteBackupVaultTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteBackupVaultMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createBackupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createBackupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getBackupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getBackupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listBackupsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listBackupsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteBackupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteBackupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateBackupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateBackupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("backup.name", String.valueOf(request.getBackup().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createBackupPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createBackupPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getBackupPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getBackupPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listBackupPoliciesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listBackupPoliciesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateBackupPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateBackupPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "backup_policy.name", String.valueOf(request.getBackupPolicy().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteBackupPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteBackupPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -1315,6 +1681,130 @@ protected GrpcNetAppStub( settings.reverseReplicationDirectionOperationSettings(), clientContext, operationsStub); + this.createBackupVaultCallable = + callableFactory.createUnaryCallable( + createBackupVaultTransportSettings, + settings.createBackupVaultSettings(), + clientContext); + this.createBackupVaultOperationCallable = + callableFactory.createOperationCallable( + createBackupVaultTransportSettings, + settings.createBackupVaultOperationSettings(), + clientContext, + operationsStub); + this.getBackupVaultCallable = + callableFactory.createUnaryCallable( + getBackupVaultTransportSettings, settings.getBackupVaultSettings(), clientContext); + this.listBackupVaultsCallable = + callableFactory.createUnaryCallable( + listBackupVaultsTransportSettings, settings.listBackupVaultsSettings(), clientContext); + this.listBackupVaultsPagedCallable = + callableFactory.createPagedCallable( + listBackupVaultsTransportSettings, settings.listBackupVaultsSettings(), clientContext); + this.updateBackupVaultCallable = + callableFactory.createUnaryCallable( + updateBackupVaultTransportSettings, + settings.updateBackupVaultSettings(), + clientContext); + this.updateBackupVaultOperationCallable = + callableFactory.createOperationCallable( + updateBackupVaultTransportSettings, + settings.updateBackupVaultOperationSettings(), + clientContext, + operationsStub); + this.deleteBackupVaultCallable = + callableFactory.createUnaryCallable( + deleteBackupVaultTransportSettings, + settings.deleteBackupVaultSettings(), + clientContext); + this.deleteBackupVaultOperationCallable = + callableFactory.createOperationCallable( + deleteBackupVaultTransportSettings, + settings.deleteBackupVaultOperationSettings(), + clientContext, + operationsStub); + this.createBackupCallable = + callableFactory.createUnaryCallable( + createBackupTransportSettings, settings.createBackupSettings(), clientContext); + this.createBackupOperationCallable = + callableFactory.createOperationCallable( + createBackupTransportSettings, + settings.createBackupOperationSettings(), + clientContext, + operationsStub); + this.getBackupCallable = + callableFactory.createUnaryCallable( + getBackupTransportSettings, settings.getBackupSettings(), clientContext); + this.listBackupsCallable = + callableFactory.createUnaryCallable( + listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); + this.listBackupsPagedCallable = + callableFactory.createPagedCallable( + listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); + this.deleteBackupCallable = + callableFactory.createUnaryCallable( + deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); + this.deleteBackupOperationCallable = + callableFactory.createOperationCallable( + deleteBackupTransportSettings, + settings.deleteBackupOperationSettings(), + clientContext, + operationsStub); + this.updateBackupCallable = + callableFactory.createUnaryCallable( + updateBackupTransportSettings, settings.updateBackupSettings(), clientContext); + this.updateBackupOperationCallable = + callableFactory.createOperationCallable( + updateBackupTransportSettings, + settings.updateBackupOperationSettings(), + clientContext, + operationsStub); + this.createBackupPolicyCallable = + callableFactory.createUnaryCallable( + createBackupPolicyTransportSettings, + settings.createBackupPolicySettings(), + clientContext); + this.createBackupPolicyOperationCallable = + callableFactory.createOperationCallable( + createBackupPolicyTransportSettings, + settings.createBackupPolicyOperationSettings(), + clientContext, + operationsStub); + this.getBackupPolicyCallable = + callableFactory.createUnaryCallable( + getBackupPolicyTransportSettings, settings.getBackupPolicySettings(), clientContext); + this.listBackupPoliciesCallable = + callableFactory.createUnaryCallable( + listBackupPoliciesTransportSettings, + settings.listBackupPoliciesSettings(), + clientContext); + this.listBackupPoliciesPagedCallable = + callableFactory.createPagedCallable( + listBackupPoliciesTransportSettings, + settings.listBackupPoliciesSettings(), + clientContext); + this.updateBackupPolicyCallable = + callableFactory.createUnaryCallable( + updateBackupPolicyTransportSettings, + settings.updateBackupPolicySettings(), + clientContext); + this.updateBackupPolicyOperationCallable = + callableFactory.createOperationCallable( + updateBackupPolicyTransportSettings, + settings.updateBackupPolicyOperationSettings(), + clientContext, + operationsStub); + this.deleteBackupPolicyCallable = + callableFactory.createUnaryCallable( + deleteBackupPolicyTransportSettings, + settings.deleteBackupPolicySettings(), + clientContext); + this.deleteBackupPolicyOperationCallable = + callableFactory.createOperationCallable( + deleteBackupPolicyTransportSettings, + settings.deleteBackupPolicyOperationSettings(), + clientContext, + operationsStub); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -1690,6 +2180,154 @@ public UnaryCallable resumeReplicationCalla return reverseReplicationDirectionOperationCallable; } + @Override + public UnaryCallable createBackupVaultCallable() { + return createBackupVaultCallable; + } + + @Override + public OperationCallable + createBackupVaultOperationCallable() { + return createBackupVaultOperationCallable; + } + + @Override + public UnaryCallable getBackupVaultCallable() { + return getBackupVaultCallable; + } + + @Override + public UnaryCallable + listBackupVaultsCallable() { + return listBackupVaultsCallable; + } + + @Override + public UnaryCallable + listBackupVaultsPagedCallable() { + return listBackupVaultsPagedCallable; + } + + @Override + public UnaryCallable updateBackupVaultCallable() { + return updateBackupVaultCallable; + } + + @Override + public OperationCallable + updateBackupVaultOperationCallable() { + return updateBackupVaultOperationCallable; + } + + @Override + public UnaryCallable deleteBackupVaultCallable() { + return deleteBackupVaultCallable; + } + + @Override + public OperationCallable + deleteBackupVaultOperationCallable() { + return deleteBackupVaultOperationCallable; + } + + @Override + public UnaryCallable createBackupCallable() { + return createBackupCallable; + } + + @Override + public OperationCallable + createBackupOperationCallable() { + return createBackupOperationCallable; + } + + @Override + public UnaryCallable getBackupCallable() { + return getBackupCallable; + } + + @Override + public UnaryCallable listBackupsCallable() { + return listBackupsCallable; + } + + @Override + public UnaryCallable listBackupsPagedCallable() { + return listBackupsPagedCallable; + } + + @Override + public UnaryCallable deleteBackupCallable() { + return deleteBackupCallable; + } + + @Override + public OperationCallable + deleteBackupOperationCallable() { + return deleteBackupOperationCallable; + } + + @Override + public UnaryCallable updateBackupCallable() { + return updateBackupCallable; + } + + @Override + public OperationCallable + updateBackupOperationCallable() { + return updateBackupOperationCallable; + } + + @Override + public UnaryCallable createBackupPolicyCallable() { + return createBackupPolicyCallable; + } + + @Override + public OperationCallable + createBackupPolicyOperationCallable() { + return createBackupPolicyOperationCallable; + } + + @Override + public UnaryCallable getBackupPolicyCallable() { + return getBackupPolicyCallable; + } + + @Override + public UnaryCallable + listBackupPoliciesCallable() { + return listBackupPoliciesCallable; + } + + @Override + public UnaryCallable + listBackupPoliciesPagedCallable() { + return listBackupPoliciesPagedCallable; + } + + @Override + public UnaryCallable updateBackupPolicyCallable() { + return updateBackupPolicyCallable; + } + + @Override + public OperationCallable + updateBackupPolicyOperationCallable() { + return updateBackupPolicyOperationCallable; + } + + @Override + public UnaryCallable deleteBackupPolicyCallable() { + return deleteBackupPolicyCallable; + } + + @Override + public OperationCallable + deleteBackupPolicyOperationCallable() { + return deleteBackupPolicyOperationCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/stub/HttpJsonNetAppStub.java b/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/stub/HttpJsonNetAppStub.java index d0df66c823df..1034c9918e80 100644 --- a/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/stub/HttpJsonNetAppStub.java +++ b/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/stub/HttpJsonNetAppStub.java @@ -17,6 +17,9 @@ package com.google.cloud.netapp.v1.stub; import static com.google.cloud.netapp.v1.NetAppClient.ListActiveDirectoriesPagedResponse; +import static com.google.cloud.netapp.v1.NetAppClient.ListBackupPoliciesPagedResponse; +import static com.google.cloud.netapp.v1.NetAppClient.ListBackupVaultsPagedResponse; +import static com.google.cloud.netapp.v1.NetAppClient.ListBackupsPagedResponse; import static com.google.cloud.netapp.v1.NetAppClient.ListKmsConfigsPagedResponse; import static com.google.cloud.netapp.v1.NetAppClient.ListLocationsPagedResponse; import static com.google.cloud.netapp.v1.NetAppClient.ListReplicationsPagedResponse; @@ -46,13 +49,22 @@ import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; import com.google.cloud.netapp.v1.ActiveDirectory; +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.BackupVault; import com.google.cloud.netapp.v1.CreateActiveDirectoryRequest; +import com.google.cloud.netapp.v1.CreateBackupPolicyRequest; +import com.google.cloud.netapp.v1.CreateBackupRequest; +import com.google.cloud.netapp.v1.CreateBackupVaultRequest; import com.google.cloud.netapp.v1.CreateKmsConfigRequest; import com.google.cloud.netapp.v1.CreateReplicationRequest; import com.google.cloud.netapp.v1.CreateSnapshotRequest; import com.google.cloud.netapp.v1.CreateStoragePoolRequest; import com.google.cloud.netapp.v1.CreateVolumeRequest; import com.google.cloud.netapp.v1.DeleteActiveDirectoryRequest; +import com.google.cloud.netapp.v1.DeleteBackupPolicyRequest; +import com.google.cloud.netapp.v1.DeleteBackupRequest; +import com.google.cloud.netapp.v1.DeleteBackupVaultRequest; import com.google.cloud.netapp.v1.DeleteKmsConfigRequest; import com.google.cloud.netapp.v1.DeleteReplicationRequest; import com.google.cloud.netapp.v1.DeleteSnapshotRequest; @@ -60,6 +72,9 @@ import com.google.cloud.netapp.v1.DeleteVolumeRequest; import com.google.cloud.netapp.v1.EncryptVolumesRequest; import com.google.cloud.netapp.v1.GetActiveDirectoryRequest; +import com.google.cloud.netapp.v1.GetBackupPolicyRequest; +import com.google.cloud.netapp.v1.GetBackupRequest; +import com.google.cloud.netapp.v1.GetBackupVaultRequest; import com.google.cloud.netapp.v1.GetKmsConfigRequest; import com.google.cloud.netapp.v1.GetReplicationRequest; import com.google.cloud.netapp.v1.GetSnapshotRequest; @@ -68,6 +83,12 @@ import com.google.cloud.netapp.v1.KmsConfig; import com.google.cloud.netapp.v1.ListActiveDirectoriesRequest; import com.google.cloud.netapp.v1.ListActiveDirectoriesResponse; +import com.google.cloud.netapp.v1.ListBackupPoliciesRequest; +import com.google.cloud.netapp.v1.ListBackupPoliciesResponse; +import com.google.cloud.netapp.v1.ListBackupVaultsRequest; +import com.google.cloud.netapp.v1.ListBackupVaultsResponse; +import com.google.cloud.netapp.v1.ListBackupsRequest; +import com.google.cloud.netapp.v1.ListBackupsResponse; import com.google.cloud.netapp.v1.ListKmsConfigsRequest; import com.google.cloud.netapp.v1.ListKmsConfigsResponse; import com.google.cloud.netapp.v1.ListReplicationsRequest; @@ -87,6 +108,9 @@ import com.google.cloud.netapp.v1.StopReplicationRequest; import com.google.cloud.netapp.v1.StoragePool; import com.google.cloud.netapp.v1.UpdateActiveDirectoryRequest; +import com.google.cloud.netapp.v1.UpdateBackupPolicyRequest; +import com.google.cloud.netapp.v1.UpdateBackupRequest; +import com.google.cloud.netapp.v1.UpdateBackupVaultRequest; import com.google.cloud.netapp.v1.UpdateKmsConfigRequest; import com.google.cloud.netapp.v1.UpdateReplicationRequest; import com.google.cloud.netapp.v1.UpdateSnapshotRequest; @@ -121,11 +145,14 @@ public class HttpJsonNetAppStub extends NetAppStub { .add(StoragePool.getDescriptor()) .add(Empty.getDescriptor()) .add(OperationMetadata.getDescriptor()) + .add(BackupPolicy.getDescriptor()) .add(Volume.getDescriptor()) .add(KmsConfig.getDescriptor()) .add(Snapshot.getDescriptor()) + .add(BackupVault.getDescriptor()) .add(ActiveDirectory.getDescriptor()) .add(Replication.getDescriptor()) + .add(Backup.getDescriptor()) .build(); private static final ApiMethodDescriptor @@ -1525,6 +1552,583 @@ public class HttpJsonNetAppStub extends NetAppStub { HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor + createBackupVaultMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.netapp.v1.NetApp/CreateBackupVault") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/backupVaults", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "backupVaultId", request.getBackupVaultId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("backupVault", request.getBackupVault(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateBackupVaultRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getBackupVaultMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.netapp.v1.NetApp/GetBackupVault") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/backupVaults/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BackupVault.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listBackupVaultsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.netapp.v1.NetApp/ListBackupVaults") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/backupVaults", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListBackupVaultsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateBackupVaultMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.netapp.v1.NetApp/UpdateBackupVault") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{backupVault.name=projects/*/locations/*/backupVaults/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "backupVault.name", request.getBackupVault().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("backupVault", request.getBackupVault(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateBackupVaultRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteBackupVaultMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.netapp.v1.NetApp/DeleteBackupVault") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/backupVaults/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteBackupVaultRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + createBackupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.netapp.v1.NetApp/CreateBackup") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/backupVaults/*}/backups", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "backupId", request.getBackupId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("backup", request.getBackup(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateBackupRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor getBackupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.netapp.v1.NetApp/GetBackup") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Backup.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listBackupsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.netapp.v1.NetApp/ListBackups") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/backupVaults/*}/backups", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListBackupsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteBackupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.netapp.v1.NetApp/DeleteBackup") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteBackupRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateBackupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.netapp.v1.NetApp/UpdateBackup") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{backup.name=projects/*/locations/*/backupVaults/*/backups/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "backup.name", request.getBackup().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("backup", request.getBackup(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateBackupRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + createBackupPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.netapp.v1.NetApp/CreateBackupPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/backupPolicies", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "backupPolicyId", request.getBackupPolicyId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("backupPolicy", request.getBackupPolicy(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateBackupPolicyRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getBackupPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.netapp.v1.NetApp/GetBackupPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/backupPolicies/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BackupPolicy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listBackupPoliciesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.netapp.v1.NetApp/ListBackupPolicies") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/backupPolicies", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListBackupPoliciesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateBackupPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.netapp.v1.NetApp/UpdateBackupPolicy") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{backupPolicy.name=projects/*/locations/*/backupPolicies/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "backupPolicy.name", request.getBackupPolicy().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("backupPolicy", request.getBackupPolicy(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateBackupPolicyRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteBackupPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.netapp.v1.NetApp/DeleteBackupPolicy") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/backupPolicies/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteBackupPolicyRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -1697,6 +2301,47 @@ public class HttpJsonNetAppStub extends NetAppStub { private final OperationCallable< ReverseReplicationDirectionRequest, Replication, OperationMetadata> reverseReplicationDirectionOperationCallable; + private final UnaryCallable createBackupVaultCallable; + private final OperationCallable + createBackupVaultOperationCallable; + private final UnaryCallable getBackupVaultCallable; + private final UnaryCallable + listBackupVaultsCallable; + private final UnaryCallable + listBackupVaultsPagedCallable; + private final UnaryCallable updateBackupVaultCallable; + private final OperationCallable + updateBackupVaultOperationCallable; + private final UnaryCallable deleteBackupVaultCallable; + private final OperationCallable + deleteBackupVaultOperationCallable; + private final UnaryCallable createBackupCallable; + private final OperationCallable + createBackupOperationCallable; + private final UnaryCallable getBackupCallable; + private final UnaryCallable listBackupsCallable; + private final UnaryCallable + listBackupsPagedCallable; + private final UnaryCallable deleteBackupCallable; + private final OperationCallable + deleteBackupOperationCallable; + private final UnaryCallable updateBackupCallable; + private final OperationCallable + updateBackupOperationCallable; + private final UnaryCallable createBackupPolicyCallable; + private final OperationCallable + createBackupPolicyOperationCallable; + private final UnaryCallable getBackupPolicyCallable; + private final UnaryCallable + listBackupPoliciesCallable; + private final UnaryCallable + listBackupPoliciesPagedCallable; + private final UnaryCallable updateBackupPolicyCallable; + private final OperationCallable + updateBackupPolicyOperationCallable; + private final UnaryCallable deleteBackupPolicyCallable; + private final OperationCallable + deleteBackupPolicyOperationCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -2181,6 +2826,175 @@ protected HttpJsonNetAppStub( return builder.build(); }) .build(); + HttpJsonCallSettings createBackupVaultTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createBackupVaultMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getBackupVaultTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getBackupVaultMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listBackupVaultsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listBackupVaultsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateBackupVaultTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateBackupVaultMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "backup_vault.name", String.valueOf(request.getBackupVault().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteBackupVaultTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteBackupVaultMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createBackupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createBackupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getBackupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getBackupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listBackupsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listBackupsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteBackupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteBackupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateBackupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateBackupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("backup.name", String.valueOf(request.getBackup().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createBackupPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createBackupPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getBackupPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getBackupPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listBackupPoliciesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listBackupPoliciesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateBackupPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateBackupPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "backup_policy.name", String.valueOf(request.getBackupPolicy().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteBackupPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteBackupPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -2497,6 +3311,130 @@ protected HttpJsonNetAppStub( settings.reverseReplicationDirectionOperationSettings(), clientContext, httpJsonOperationsStub); + this.createBackupVaultCallable = + callableFactory.createUnaryCallable( + createBackupVaultTransportSettings, + settings.createBackupVaultSettings(), + clientContext); + this.createBackupVaultOperationCallable = + callableFactory.createOperationCallable( + createBackupVaultTransportSettings, + settings.createBackupVaultOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getBackupVaultCallable = + callableFactory.createUnaryCallable( + getBackupVaultTransportSettings, settings.getBackupVaultSettings(), clientContext); + this.listBackupVaultsCallable = + callableFactory.createUnaryCallable( + listBackupVaultsTransportSettings, settings.listBackupVaultsSettings(), clientContext); + this.listBackupVaultsPagedCallable = + callableFactory.createPagedCallable( + listBackupVaultsTransportSettings, settings.listBackupVaultsSettings(), clientContext); + this.updateBackupVaultCallable = + callableFactory.createUnaryCallable( + updateBackupVaultTransportSettings, + settings.updateBackupVaultSettings(), + clientContext); + this.updateBackupVaultOperationCallable = + callableFactory.createOperationCallable( + updateBackupVaultTransportSettings, + settings.updateBackupVaultOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteBackupVaultCallable = + callableFactory.createUnaryCallable( + deleteBackupVaultTransportSettings, + settings.deleteBackupVaultSettings(), + clientContext); + this.deleteBackupVaultOperationCallable = + callableFactory.createOperationCallable( + deleteBackupVaultTransportSettings, + settings.deleteBackupVaultOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.createBackupCallable = + callableFactory.createUnaryCallable( + createBackupTransportSettings, settings.createBackupSettings(), clientContext); + this.createBackupOperationCallable = + callableFactory.createOperationCallable( + createBackupTransportSettings, + settings.createBackupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getBackupCallable = + callableFactory.createUnaryCallable( + getBackupTransportSettings, settings.getBackupSettings(), clientContext); + this.listBackupsCallable = + callableFactory.createUnaryCallable( + listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); + this.listBackupsPagedCallable = + callableFactory.createPagedCallable( + listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); + this.deleteBackupCallable = + callableFactory.createUnaryCallable( + deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); + this.deleteBackupOperationCallable = + callableFactory.createOperationCallable( + deleteBackupTransportSettings, + settings.deleteBackupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateBackupCallable = + callableFactory.createUnaryCallable( + updateBackupTransportSettings, settings.updateBackupSettings(), clientContext); + this.updateBackupOperationCallable = + callableFactory.createOperationCallable( + updateBackupTransportSettings, + settings.updateBackupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.createBackupPolicyCallable = + callableFactory.createUnaryCallable( + createBackupPolicyTransportSettings, + settings.createBackupPolicySettings(), + clientContext); + this.createBackupPolicyOperationCallable = + callableFactory.createOperationCallable( + createBackupPolicyTransportSettings, + settings.createBackupPolicyOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getBackupPolicyCallable = + callableFactory.createUnaryCallable( + getBackupPolicyTransportSettings, settings.getBackupPolicySettings(), clientContext); + this.listBackupPoliciesCallable = + callableFactory.createUnaryCallable( + listBackupPoliciesTransportSettings, + settings.listBackupPoliciesSettings(), + clientContext); + this.listBackupPoliciesPagedCallable = + callableFactory.createPagedCallable( + listBackupPoliciesTransportSettings, + settings.listBackupPoliciesSettings(), + clientContext); + this.updateBackupPolicyCallable = + callableFactory.createUnaryCallable( + updateBackupPolicyTransportSettings, + settings.updateBackupPolicySettings(), + clientContext); + this.updateBackupPolicyOperationCallable = + callableFactory.createOperationCallable( + updateBackupPolicyTransportSettings, + settings.updateBackupPolicyOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteBackupPolicyCallable = + callableFactory.createUnaryCallable( + deleteBackupPolicyTransportSettings, + settings.deleteBackupPolicySettings(), + clientContext); + this.deleteBackupPolicyOperationCallable = + callableFactory.createOperationCallable( + deleteBackupPolicyTransportSettings, + settings.deleteBackupPolicyOperationSettings(), + clientContext, + httpJsonOperationsStub); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -2550,6 +3488,21 @@ public static List getMethodDescriptors() { methodDescriptors.add(stopReplicationMethodDescriptor); methodDescriptors.add(resumeReplicationMethodDescriptor); methodDescriptors.add(reverseReplicationDirectionMethodDescriptor); + methodDescriptors.add(createBackupVaultMethodDescriptor); + methodDescriptors.add(getBackupVaultMethodDescriptor); + methodDescriptors.add(listBackupVaultsMethodDescriptor); + methodDescriptors.add(updateBackupVaultMethodDescriptor); + methodDescriptors.add(deleteBackupVaultMethodDescriptor); + methodDescriptors.add(createBackupMethodDescriptor); + methodDescriptors.add(getBackupMethodDescriptor); + methodDescriptors.add(listBackupsMethodDescriptor); + methodDescriptors.add(deleteBackupMethodDescriptor); + methodDescriptors.add(updateBackupMethodDescriptor); + methodDescriptors.add(createBackupPolicyMethodDescriptor); + methodDescriptors.add(getBackupPolicyMethodDescriptor); + methodDescriptors.add(listBackupPoliciesMethodDescriptor); + methodDescriptors.add(updateBackupPolicyMethodDescriptor); + methodDescriptors.add(deleteBackupPolicyMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; @@ -2916,6 +3869,154 @@ public UnaryCallable resumeReplicationCalla return reverseReplicationDirectionOperationCallable; } + @Override + public UnaryCallable createBackupVaultCallable() { + return createBackupVaultCallable; + } + + @Override + public OperationCallable + createBackupVaultOperationCallable() { + return createBackupVaultOperationCallable; + } + + @Override + public UnaryCallable getBackupVaultCallable() { + return getBackupVaultCallable; + } + + @Override + public UnaryCallable + listBackupVaultsCallable() { + return listBackupVaultsCallable; + } + + @Override + public UnaryCallable + listBackupVaultsPagedCallable() { + return listBackupVaultsPagedCallable; + } + + @Override + public UnaryCallable updateBackupVaultCallable() { + return updateBackupVaultCallable; + } + + @Override + public OperationCallable + updateBackupVaultOperationCallable() { + return updateBackupVaultOperationCallable; + } + + @Override + public UnaryCallable deleteBackupVaultCallable() { + return deleteBackupVaultCallable; + } + + @Override + public OperationCallable + deleteBackupVaultOperationCallable() { + return deleteBackupVaultOperationCallable; + } + + @Override + public UnaryCallable createBackupCallable() { + return createBackupCallable; + } + + @Override + public OperationCallable + createBackupOperationCallable() { + return createBackupOperationCallable; + } + + @Override + public UnaryCallable getBackupCallable() { + return getBackupCallable; + } + + @Override + public UnaryCallable listBackupsCallable() { + return listBackupsCallable; + } + + @Override + public UnaryCallable listBackupsPagedCallable() { + return listBackupsPagedCallable; + } + + @Override + public UnaryCallable deleteBackupCallable() { + return deleteBackupCallable; + } + + @Override + public OperationCallable + deleteBackupOperationCallable() { + return deleteBackupOperationCallable; + } + + @Override + public UnaryCallable updateBackupCallable() { + return updateBackupCallable; + } + + @Override + public OperationCallable + updateBackupOperationCallable() { + return updateBackupOperationCallable; + } + + @Override + public UnaryCallable createBackupPolicyCallable() { + return createBackupPolicyCallable; + } + + @Override + public OperationCallable + createBackupPolicyOperationCallable() { + return createBackupPolicyOperationCallable; + } + + @Override + public UnaryCallable getBackupPolicyCallable() { + return getBackupPolicyCallable; + } + + @Override + public UnaryCallable + listBackupPoliciesCallable() { + return listBackupPoliciesCallable; + } + + @Override + public UnaryCallable + listBackupPoliciesPagedCallable() { + return listBackupPoliciesPagedCallable; + } + + @Override + public UnaryCallable updateBackupPolicyCallable() { + return updateBackupPolicyCallable; + } + + @Override + public OperationCallable + updateBackupPolicyOperationCallable() { + return updateBackupPolicyOperationCallable; + } + + @Override + public UnaryCallable deleteBackupPolicyCallable() { + return deleteBackupPolicyCallable; + } + + @Override + public OperationCallable + deleteBackupPolicyOperationCallable() { + return deleteBackupPolicyOperationCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/stub/NetAppStub.java b/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/stub/NetAppStub.java index c10df7d5b561..439667801126 100644 --- a/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/stub/NetAppStub.java +++ b/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/stub/NetAppStub.java @@ -17,6 +17,9 @@ package com.google.cloud.netapp.v1.stub; import static com.google.cloud.netapp.v1.NetAppClient.ListActiveDirectoriesPagedResponse; +import static com.google.cloud.netapp.v1.NetAppClient.ListBackupPoliciesPagedResponse; +import static com.google.cloud.netapp.v1.NetAppClient.ListBackupVaultsPagedResponse; +import static com.google.cloud.netapp.v1.NetAppClient.ListBackupsPagedResponse; import static com.google.cloud.netapp.v1.NetAppClient.ListKmsConfigsPagedResponse; import static com.google.cloud.netapp.v1.NetAppClient.ListLocationsPagedResponse; import static com.google.cloud.netapp.v1.NetAppClient.ListReplicationsPagedResponse; @@ -32,13 +35,22 @@ import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; import com.google.cloud.netapp.v1.ActiveDirectory; +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.BackupVault; import com.google.cloud.netapp.v1.CreateActiveDirectoryRequest; +import com.google.cloud.netapp.v1.CreateBackupPolicyRequest; +import com.google.cloud.netapp.v1.CreateBackupRequest; +import com.google.cloud.netapp.v1.CreateBackupVaultRequest; import com.google.cloud.netapp.v1.CreateKmsConfigRequest; import com.google.cloud.netapp.v1.CreateReplicationRequest; import com.google.cloud.netapp.v1.CreateSnapshotRequest; import com.google.cloud.netapp.v1.CreateStoragePoolRequest; import com.google.cloud.netapp.v1.CreateVolumeRequest; import com.google.cloud.netapp.v1.DeleteActiveDirectoryRequest; +import com.google.cloud.netapp.v1.DeleteBackupPolicyRequest; +import com.google.cloud.netapp.v1.DeleteBackupRequest; +import com.google.cloud.netapp.v1.DeleteBackupVaultRequest; import com.google.cloud.netapp.v1.DeleteKmsConfigRequest; import com.google.cloud.netapp.v1.DeleteReplicationRequest; import com.google.cloud.netapp.v1.DeleteSnapshotRequest; @@ -46,6 +58,9 @@ import com.google.cloud.netapp.v1.DeleteVolumeRequest; import com.google.cloud.netapp.v1.EncryptVolumesRequest; import com.google.cloud.netapp.v1.GetActiveDirectoryRequest; +import com.google.cloud.netapp.v1.GetBackupPolicyRequest; +import com.google.cloud.netapp.v1.GetBackupRequest; +import com.google.cloud.netapp.v1.GetBackupVaultRequest; import com.google.cloud.netapp.v1.GetKmsConfigRequest; import com.google.cloud.netapp.v1.GetReplicationRequest; import com.google.cloud.netapp.v1.GetSnapshotRequest; @@ -54,6 +69,12 @@ import com.google.cloud.netapp.v1.KmsConfig; import com.google.cloud.netapp.v1.ListActiveDirectoriesRequest; import com.google.cloud.netapp.v1.ListActiveDirectoriesResponse; +import com.google.cloud.netapp.v1.ListBackupPoliciesRequest; +import com.google.cloud.netapp.v1.ListBackupPoliciesResponse; +import com.google.cloud.netapp.v1.ListBackupVaultsRequest; +import com.google.cloud.netapp.v1.ListBackupVaultsResponse; +import com.google.cloud.netapp.v1.ListBackupsRequest; +import com.google.cloud.netapp.v1.ListBackupsResponse; import com.google.cloud.netapp.v1.ListKmsConfigsRequest; import com.google.cloud.netapp.v1.ListKmsConfigsResponse; import com.google.cloud.netapp.v1.ListReplicationsRequest; @@ -73,6 +94,9 @@ import com.google.cloud.netapp.v1.StopReplicationRequest; import com.google.cloud.netapp.v1.StoragePool; import com.google.cloud.netapp.v1.UpdateActiveDirectoryRequest; +import com.google.cloud.netapp.v1.UpdateBackupPolicyRequest; +import com.google.cloud.netapp.v1.UpdateBackupRequest; +import com.google.cloud.netapp.v1.UpdateBackupVaultRequest; import com.google.cloud.netapp.v1.UpdateKmsConfigRequest; import com.google.cloud.netapp.v1.UpdateReplicationRequest; import com.google.cloud.netapp.v1.UpdateSnapshotRequest; @@ -408,6 +432,133 @@ public UnaryCallable resumeReplicationCalla "Not implemented: reverseReplicationDirectionCallable()"); } + public OperationCallable + createBackupVaultOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createBackupVaultOperationCallable()"); + } + + public UnaryCallable createBackupVaultCallable() { + throw new UnsupportedOperationException("Not implemented: createBackupVaultCallable()"); + } + + public UnaryCallable getBackupVaultCallable() { + throw new UnsupportedOperationException("Not implemented: getBackupVaultCallable()"); + } + + public UnaryCallable + listBackupVaultsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listBackupVaultsPagedCallable()"); + } + + public UnaryCallable + listBackupVaultsCallable() { + throw new UnsupportedOperationException("Not implemented: listBackupVaultsCallable()"); + } + + public OperationCallable + updateBackupVaultOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateBackupVaultOperationCallable()"); + } + + public UnaryCallable updateBackupVaultCallable() { + throw new UnsupportedOperationException("Not implemented: updateBackupVaultCallable()"); + } + + public OperationCallable + deleteBackupVaultOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteBackupVaultOperationCallable()"); + } + + public UnaryCallable deleteBackupVaultCallable() { + throw new UnsupportedOperationException("Not implemented: deleteBackupVaultCallable()"); + } + + public OperationCallable + createBackupOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createBackupOperationCallable()"); + } + + public UnaryCallable createBackupCallable() { + throw new UnsupportedOperationException("Not implemented: createBackupCallable()"); + } + + public UnaryCallable getBackupCallable() { + throw new UnsupportedOperationException("Not implemented: getBackupCallable()"); + } + + public UnaryCallable listBackupsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listBackupsPagedCallable()"); + } + + public UnaryCallable listBackupsCallable() { + throw new UnsupportedOperationException("Not implemented: listBackupsCallable()"); + } + + public OperationCallable + deleteBackupOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteBackupOperationCallable()"); + } + + public UnaryCallable deleteBackupCallable() { + throw new UnsupportedOperationException("Not implemented: deleteBackupCallable()"); + } + + public OperationCallable + updateBackupOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateBackupOperationCallable()"); + } + + public UnaryCallable updateBackupCallable() { + throw new UnsupportedOperationException("Not implemented: updateBackupCallable()"); + } + + public OperationCallable + createBackupPolicyOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createBackupPolicyOperationCallable()"); + } + + public UnaryCallable createBackupPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: createBackupPolicyCallable()"); + } + + public UnaryCallable getBackupPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getBackupPolicyCallable()"); + } + + public UnaryCallable + listBackupPoliciesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listBackupPoliciesPagedCallable()"); + } + + public UnaryCallable + listBackupPoliciesCallable() { + throw new UnsupportedOperationException("Not implemented: listBackupPoliciesCallable()"); + } + + public OperationCallable + updateBackupPolicyOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateBackupPolicyOperationCallable()"); + } + + public UnaryCallable updateBackupPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: updateBackupPolicyCallable()"); + } + + public OperationCallable + deleteBackupPolicyOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteBackupPolicyOperationCallable()"); + } + + public UnaryCallable deleteBackupPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: deleteBackupPolicyCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/stub/NetAppStubSettings.java b/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/stub/NetAppStubSettings.java index e2a45ef1d41c..42a562870586 100644 --- a/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/stub/NetAppStubSettings.java +++ b/java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/stub/NetAppStubSettings.java @@ -17,6 +17,9 @@ package com.google.cloud.netapp.v1.stub; import static com.google.cloud.netapp.v1.NetAppClient.ListActiveDirectoriesPagedResponse; +import static com.google.cloud.netapp.v1.NetAppClient.ListBackupPoliciesPagedResponse; +import static com.google.cloud.netapp.v1.NetAppClient.ListBackupVaultsPagedResponse; +import static com.google.cloud.netapp.v1.NetAppClient.ListBackupsPagedResponse; import static com.google.cloud.netapp.v1.NetAppClient.ListKmsConfigsPagedResponse; import static com.google.cloud.netapp.v1.NetAppClient.ListLocationsPagedResponse; import static com.google.cloud.netapp.v1.NetAppClient.ListReplicationsPagedResponse; @@ -58,13 +61,22 @@ import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; import com.google.cloud.netapp.v1.ActiveDirectory; +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.BackupVault; import com.google.cloud.netapp.v1.CreateActiveDirectoryRequest; +import com.google.cloud.netapp.v1.CreateBackupPolicyRequest; +import com.google.cloud.netapp.v1.CreateBackupRequest; +import com.google.cloud.netapp.v1.CreateBackupVaultRequest; import com.google.cloud.netapp.v1.CreateKmsConfigRequest; import com.google.cloud.netapp.v1.CreateReplicationRequest; import com.google.cloud.netapp.v1.CreateSnapshotRequest; import com.google.cloud.netapp.v1.CreateStoragePoolRequest; import com.google.cloud.netapp.v1.CreateVolumeRequest; import com.google.cloud.netapp.v1.DeleteActiveDirectoryRequest; +import com.google.cloud.netapp.v1.DeleteBackupPolicyRequest; +import com.google.cloud.netapp.v1.DeleteBackupRequest; +import com.google.cloud.netapp.v1.DeleteBackupVaultRequest; import com.google.cloud.netapp.v1.DeleteKmsConfigRequest; import com.google.cloud.netapp.v1.DeleteReplicationRequest; import com.google.cloud.netapp.v1.DeleteSnapshotRequest; @@ -72,6 +84,9 @@ import com.google.cloud.netapp.v1.DeleteVolumeRequest; import com.google.cloud.netapp.v1.EncryptVolumesRequest; import com.google.cloud.netapp.v1.GetActiveDirectoryRequest; +import com.google.cloud.netapp.v1.GetBackupPolicyRequest; +import com.google.cloud.netapp.v1.GetBackupRequest; +import com.google.cloud.netapp.v1.GetBackupVaultRequest; import com.google.cloud.netapp.v1.GetKmsConfigRequest; import com.google.cloud.netapp.v1.GetReplicationRequest; import com.google.cloud.netapp.v1.GetSnapshotRequest; @@ -80,6 +95,12 @@ import com.google.cloud.netapp.v1.KmsConfig; import com.google.cloud.netapp.v1.ListActiveDirectoriesRequest; import com.google.cloud.netapp.v1.ListActiveDirectoriesResponse; +import com.google.cloud.netapp.v1.ListBackupPoliciesRequest; +import com.google.cloud.netapp.v1.ListBackupPoliciesResponse; +import com.google.cloud.netapp.v1.ListBackupVaultsRequest; +import com.google.cloud.netapp.v1.ListBackupVaultsResponse; +import com.google.cloud.netapp.v1.ListBackupsRequest; +import com.google.cloud.netapp.v1.ListBackupsResponse; import com.google.cloud.netapp.v1.ListKmsConfigsRequest; import com.google.cloud.netapp.v1.ListKmsConfigsResponse; import com.google.cloud.netapp.v1.ListReplicationsRequest; @@ -99,6 +120,9 @@ import com.google.cloud.netapp.v1.StopReplicationRequest; import com.google.cloud.netapp.v1.StoragePool; import com.google.cloud.netapp.v1.UpdateActiveDirectoryRequest; +import com.google.cloud.netapp.v1.UpdateBackupPolicyRequest; +import com.google.cloud.netapp.v1.UpdateBackupRequest; +import com.google.cloud.netapp.v1.UpdateBackupVaultRequest; import com.google.cloud.netapp.v1.UpdateKmsConfigRequest; import com.google.cloud.netapp.v1.UpdateReplicationRequest; import com.google.cloud.netapp.v1.UpdateSnapshotRequest; @@ -264,6 +288,44 @@ public class NetAppStubSettings extends StubSettings { private final OperationCallSettings< ReverseReplicationDirectionRequest, Replication, OperationMetadata> reverseReplicationDirectionOperationSettings; + private final UnaryCallSettings createBackupVaultSettings; + private final OperationCallSettings + createBackupVaultOperationSettings; + private final UnaryCallSettings getBackupVaultSettings; + private final PagedCallSettings< + ListBackupVaultsRequest, ListBackupVaultsResponse, ListBackupVaultsPagedResponse> + listBackupVaultsSettings; + private final UnaryCallSettings updateBackupVaultSettings; + private final OperationCallSettings + updateBackupVaultOperationSettings; + private final UnaryCallSettings deleteBackupVaultSettings; + private final OperationCallSettings + deleteBackupVaultOperationSettings; + private final UnaryCallSettings createBackupSettings; + private final OperationCallSettings + createBackupOperationSettings; + private final UnaryCallSettings getBackupSettings; + private final PagedCallSettings + listBackupsSettings; + private final UnaryCallSettings deleteBackupSettings; + private final OperationCallSettings + deleteBackupOperationSettings; + private final UnaryCallSettings updateBackupSettings; + private final OperationCallSettings + updateBackupOperationSettings; + private final UnaryCallSettings createBackupPolicySettings; + private final OperationCallSettings + createBackupPolicyOperationSettings; + private final UnaryCallSettings getBackupPolicySettings; + private final PagedCallSettings< + ListBackupPoliciesRequest, ListBackupPoliciesResponse, ListBackupPoliciesPagedResponse> + listBackupPoliciesSettings; + private final UnaryCallSettings updateBackupPolicySettings; + private final OperationCallSettings + updateBackupPolicyOperationSettings; + private final UnaryCallSettings deleteBackupPolicySettings; + private final OperationCallSettings + deleteBackupPolicyOperationSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -499,6 +561,122 @@ public Iterable extractResources(ListReplicationsResponse payload) } }; + private static final PagedListDescriptor< + ListBackupVaultsRequest, ListBackupVaultsResponse, BackupVault> + LIST_BACKUP_VAULTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListBackupVaultsRequest, ListBackupVaultsResponse, BackupVault>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListBackupVaultsRequest injectToken( + ListBackupVaultsRequest payload, String token) { + return ListBackupVaultsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListBackupVaultsRequest injectPageSize( + ListBackupVaultsRequest payload, int pageSize) { + return ListBackupVaultsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListBackupVaultsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListBackupVaultsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListBackupVaultsResponse payload) { + return payload.getBackupVaultsList() == null + ? ImmutableList.of() + : payload.getBackupVaultsList(); + } + }; + + private static final PagedListDescriptor + LIST_BACKUPS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListBackupsRequest injectToken(ListBackupsRequest payload, String token) { + return ListBackupsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListBackupsRequest injectPageSize(ListBackupsRequest payload, int pageSize) { + return ListBackupsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListBackupsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListBackupsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListBackupsResponse payload) { + return payload.getBackupsList() == null + ? ImmutableList.of() + : payload.getBackupsList(); + } + }; + + private static final PagedListDescriptor< + ListBackupPoliciesRequest, ListBackupPoliciesResponse, BackupPolicy> + LIST_BACKUP_POLICIES_PAGE_STR_DESC = + new PagedListDescriptor< + ListBackupPoliciesRequest, ListBackupPoliciesResponse, BackupPolicy>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListBackupPoliciesRequest injectToken( + ListBackupPoliciesRequest payload, String token) { + return ListBackupPoliciesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListBackupPoliciesRequest injectPageSize( + ListBackupPoliciesRequest payload, int pageSize) { + return ListBackupPoliciesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListBackupPoliciesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListBackupPoliciesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListBackupPoliciesResponse payload) { + return payload.getBackupPoliciesList() == null + ? ImmutableList.of() + : payload.getBackupPoliciesList(); + } + }; + private static final PagedListDescriptor LIST_LOCATIONS_PAGE_STR_DESC = new PagedListDescriptor() { @@ -648,6 +826,63 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListBackupVaultsRequest, ListBackupVaultsResponse, ListBackupVaultsPagedResponse> + LIST_BACKUP_VAULTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListBackupVaultsRequest, ListBackupVaultsResponse, ListBackupVaultsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListBackupVaultsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_BACKUP_VAULTS_PAGE_STR_DESC, request, context); + return ListBackupVaultsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> + LIST_BACKUPS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListBackupsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_BACKUPS_PAGE_STR_DESC, request, context); + return ListBackupsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListBackupPoliciesRequest, ListBackupPoliciesResponse, ListBackupPoliciesPagedResponse> + LIST_BACKUP_POLICIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListBackupPoliciesRequest, + ListBackupPoliciesResponse, + ListBackupPoliciesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListBackupPoliciesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_BACKUP_POLICIES_PAGE_STR_DESC, request, context); + return ListBackupPoliciesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + private static final PagedListResponseFactory< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> LIST_LOCATIONS_PAGE_STR_FACT = @@ -1001,6 +1236,140 @@ public UnaryCallSettings resumeReplicationS return reverseReplicationDirectionOperationSettings; } + /** Returns the object with the settings used for calls to createBackupVault. */ + public UnaryCallSettings createBackupVaultSettings() { + return createBackupVaultSettings; + } + + /** Returns the object with the settings used for calls to createBackupVault. */ + public OperationCallSettings + createBackupVaultOperationSettings() { + return createBackupVaultOperationSettings; + } + + /** Returns the object with the settings used for calls to getBackupVault. */ + public UnaryCallSettings getBackupVaultSettings() { + return getBackupVaultSettings; + } + + /** Returns the object with the settings used for calls to listBackupVaults. */ + public PagedCallSettings< + ListBackupVaultsRequest, ListBackupVaultsResponse, ListBackupVaultsPagedResponse> + listBackupVaultsSettings() { + return listBackupVaultsSettings; + } + + /** Returns the object with the settings used for calls to updateBackupVault. */ + public UnaryCallSettings updateBackupVaultSettings() { + return updateBackupVaultSettings; + } + + /** Returns the object with the settings used for calls to updateBackupVault. */ + public OperationCallSettings + updateBackupVaultOperationSettings() { + return updateBackupVaultOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteBackupVault. */ + public UnaryCallSettings deleteBackupVaultSettings() { + return deleteBackupVaultSettings; + } + + /** Returns the object with the settings used for calls to deleteBackupVault. */ + public OperationCallSettings + deleteBackupVaultOperationSettings() { + return deleteBackupVaultOperationSettings; + } + + /** Returns the object with the settings used for calls to createBackup. */ + public UnaryCallSettings createBackupSettings() { + return createBackupSettings; + } + + /** Returns the object with the settings used for calls to createBackup. */ + public OperationCallSettings + createBackupOperationSettings() { + return createBackupOperationSettings; + } + + /** Returns the object with the settings used for calls to getBackup. */ + public UnaryCallSettings getBackupSettings() { + return getBackupSettings; + } + + /** Returns the object with the settings used for calls to listBackups. */ + public PagedCallSettings + listBackupsSettings() { + return listBackupsSettings; + } + + /** Returns the object with the settings used for calls to deleteBackup. */ + public UnaryCallSettings deleteBackupSettings() { + return deleteBackupSettings; + } + + /** Returns the object with the settings used for calls to deleteBackup. */ + public OperationCallSettings + deleteBackupOperationSettings() { + return deleteBackupOperationSettings; + } + + /** Returns the object with the settings used for calls to updateBackup. */ + public UnaryCallSettings updateBackupSettings() { + return updateBackupSettings; + } + + /** Returns the object with the settings used for calls to updateBackup. */ + public OperationCallSettings + updateBackupOperationSettings() { + return updateBackupOperationSettings; + } + + /** Returns the object with the settings used for calls to createBackupPolicy. */ + public UnaryCallSettings createBackupPolicySettings() { + return createBackupPolicySettings; + } + + /** Returns the object with the settings used for calls to createBackupPolicy. */ + public OperationCallSettings + createBackupPolicyOperationSettings() { + return createBackupPolicyOperationSettings; + } + + /** Returns the object with the settings used for calls to getBackupPolicy. */ + public UnaryCallSettings getBackupPolicySettings() { + return getBackupPolicySettings; + } + + /** Returns the object with the settings used for calls to listBackupPolicies. */ + public PagedCallSettings< + ListBackupPoliciesRequest, ListBackupPoliciesResponse, ListBackupPoliciesPagedResponse> + listBackupPoliciesSettings() { + return listBackupPoliciesSettings; + } + + /** Returns the object with the settings used for calls to updateBackupPolicy. */ + public UnaryCallSettings updateBackupPolicySettings() { + return updateBackupPolicySettings; + } + + /** Returns the object with the settings used for calls to updateBackupPolicy. */ + public OperationCallSettings + updateBackupPolicyOperationSettings() { + return updateBackupPolicyOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteBackupPolicy. */ + public UnaryCallSettings deleteBackupPolicySettings() { + return deleteBackupPolicySettings; + } + + /** Returns the object with the settings used for calls to deleteBackupPolicy. */ + public OperationCallSettings + deleteBackupPolicyOperationSettings() { + return deleteBackupPolicyOperationSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -1187,6 +1556,36 @@ protected NetAppStubSettings(Builder settingsBuilder) throws IOException { settingsBuilder.reverseReplicationDirectionSettings().build(); reverseReplicationDirectionOperationSettings = settingsBuilder.reverseReplicationDirectionOperationSettings().build(); + createBackupVaultSettings = settingsBuilder.createBackupVaultSettings().build(); + createBackupVaultOperationSettings = + settingsBuilder.createBackupVaultOperationSettings().build(); + getBackupVaultSettings = settingsBuilder.getBackupVaultSettings().build(); + listBackupVaultsSettings = settingsBuilder.listBackupVaultsSettings().build(); + updateBackupVaultSettings = settingsBuilder.updateBackupVaultSettings().build(); + updateBackupVaultOperationSettings = + settingsBuilder.updateBackupVaultOperationSettings().build(); + deleteBackupVaultSettings = settingsBuilder.deleteBackupVaultSettings().build(); + deleteBackupVaultOperationSettings = + settingsBuilder.deleteBackupVaultOperationSettings().build(); + createBackupSettings = settingsBuilder.createBackupSettings().build(); + createBackupOperationSettings = settingsBuilder.createBackupOperationSettings().build(); + getBackupSettings = settingsBuilder.getBackupSettings().build(); + listBackupsSettings = settingsBuilder.listBackupsSettings().build(); + deleteBackupSettings = settingsBuilder.deleteBackupSettings().build(); + deleteBackupOperationSettings = settingsBuilder.deleteBackupOperationSettings().build(); + updateBackupSettings = settingsBuilder.updateBackupSettings().build(); + updateBackupOperationSettings = settingsBuilder.updateBackupOperationSettings().build(); + createBackupPolicySettings = settingsBuilder.createBackupPolicySettings().build(); + createBackupPolicyOperationSettings = + settingsBuilder.createBackupPolicyOperationSettings().build(); + getBackupPolicySettings = settingsBuilder.getBackupPolicySettings().build(); + listBackupPoliciesSettings = settingsBuilder.listBackupPoliciesSettings().build(); + updateBackupPolicySettings = settingsBuilder.updateBackupPolicySettings().build(); + updateBackupPolicyOperationSettings = + settingsBuilder.updateBackupPolicyOperationSettings().build(); + deleteBackupPolicySettings = settingsBuilder.deleteBackupPolicySettings().build(); + deleteBackupPolicyOperationSettings = + settingsBuilder.deleteBackupPolicyOperationSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -1325,6 +1724,57 @@ public static class Builder extends StubSettings.Builder reverseReplicationDirectionOperationSettings; + private final UnaryCallSettings.Builder + createBackupVaultSettings; + private final OperationCallSettings.Builder< + CreateBackupVaultRequest, BackupVault, OperationMetadata> + createBackupVaultOperationSettings; + private final UnaryCallSettings.Builder + getBackupVaultSettings; + private final PagedCallSettings.Builder< + ListBackupVaultsRequest, ListBackupVaultsResponse, ListBackupVaultsPagedResponse> + listBackupVaultsSettings; + private final UnaryCallSettings.Builder + updateBackupVaultSettings; + private final OperationCallSettings.Builder< + UpdateBackupVaultRequest, BackupVault, OperationMetadata> + updateBackupVaultOperationSettings; + private final UnaryCallSettings.Builder + deleteBackupVaultSettings; + private final OperationCallSettings.Builder + deleteBackupVaultOperationSettings; + private final UnaryCallSettings.Builder createBackupSettings; + private final OperationCallSettings.Builder + createBackupOperationSettings; + private final UnaryCallSettings.Builder getBackupSettings; + private final PagedCallSettings.Builder< + ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> + listBackupsSettings; + private final UnaryCallSettings.Builder deleteBackupSettings; + private final OperationCallSettings.Builder + deleteBackupOperationSettings; + private final UnaryCallSettings.Builder updateBackupSettings; + private final OperationCallSettings.Builder + updateBackupOperationSettings; + private final UnaryCallSettings.Builder + createBackupPolicySettings; + private final OperationCallSettings.Builder< + CreateBackupPolicyRequest, BackupPolicy, OperationMetadata> + createBackupPolicyOperationSettings; + private final UnaryCallSettings.Builder + getBackupPolicySettings; + private final PagedCallSettings.Builder< + ListBackupPoliciesRequest, ListBackupPoliciesResponse, ListBackupPoliciesPagedResponse> + listBackupPoliciesSettings; + private final UnaryCallSettings.Builder + updateBackupPolicySettings; + private final OperationCallSettings.Builder< + UpdateBackupPolicyRequest, BackupPolicy, OperationMetadata> + updateBackupPolicyOperationSettings; + private final UnaryCallSettings.Builder + deleteBackupPolicySettings; + private final OperationCallSettings.Builder + deleteBackupPolicyOperationSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -1440,6 +1890,30 @@ protected Builder(ClientContext clientContext) { resumeReplicationOperationSettings = OperationCallSettings.newBuilder(); reverseReplicationDirectionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); reverseReplicationDirectionOperationSettings = OperationCallSettings.newBuilder(); + createBackupVaultSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createBackupVaultOperationSettings = OperationCallSettings.newBuilder(); + getBackupVaultSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listBackupVaultsSettings = PagedCallSettings.newBuilder(LIST_BACKUP_VAULTS_PAGE_STR_FACT); + updateBackupVaultSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateBackupVaultOperationSettings = OperationCallSettings.newBuilder(); + deleteBackupVaultSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteBackupVaultOperationSettings = OperationCallSettings.newBuilder(); + createBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createBackupOperationSettings = OperationCallSettings.newBuilder(); + getBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listBackupsSettings = PagedCallSettings.newBuilder(LIST_BACKUPS_PAGE_STR_FACT); + deleteBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteBackupOperationSettings = OperationCallSettings.newBuilder(); + updateBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateBackupOperationSettings = OperationCallSettings.newBuilder(); + createBackupPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createBackupPolicyOperationSettings = OperationCallSettings.newBuilder(); + getBackupPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listBackupPoliciesSettings = PagedCallSettings.newBuilder(LIST_BACKUP_POLICIES_PAGE_STR_FACT); + updateBackupPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateBackupPolicyOperationSettings = OperationCallSettings.newBuilder(); + deleteBackupPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteBackupPolicyOperationSettings = OperationCallSettings.newBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -1481,6 +1955,21 @@ protected Builder(ClientContext clientContext) { stopReplicationSettings, resumeReplicationSettings, reverseReplicationDirectionSettings, + createBackupVaultSettings, + getBackupVaultSettings, + listBackupVaultsSettings, + updateBackupVaultSettings, + deleteBackupVaultSettings, + createBackupSettings, + getBackupSettings, + listBackupsSettings, + deleteBackupSettings, + updateBackupSettings, + createBackupPolicySettings, + getBackupPolicySettings, + listBackupPoliciesSettings, + updateBackupPolicySettings, + deleteBackupPolicySettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -1553,6 +2042,33 @@ protected Builder(NetAppStubSettings settings) { settings.reverseReplicationDirectionSettings.toBuilder(); reverseReplicationDirectionOperationSettings = settings.reverseReplicationDirectionOperationSettings.toBuilder(); + createBackupVaultSettings = settings.createBackupVaultSettings.toBuilder(); + createBackupVaultOperationSettings = settings.createBackupVaultOperationSettings.toBuilder(); + getBackupVaultSettings = settings.getBackupVaultSettings.toBuilder(); + listBackupVaultsSettings = settings.listBackupVaultsSettings.toBuilder(); + updateBackupVaultSettings = settings.updateBackupVaultSettings.toBuilder(); + updateBackupVaultOperationSettings = settings.updateBackupVaultOperationSettings.toBuilder(); + deleteBackupVaultSettings = settings.deleteBackupVaultSettings.toBuilder(); + deleteBackupVaultOperationSettings = settings.deleteBackupVaultOperationSettings.toBuilder(); + createBackupSettings = settings.createBackupSettings.toBuilder(); + createBackupOperationSettings = settings.createBackupOperationSettings.toBuilder(); + getBackupSettings = settings.getBackupSettings.toBuilder(); + listBackupsSettings = settings.listBackupsSettings.toBuilder(); + deleteBackupSettings = settings.deleteBackupSettings.toBuilder(); + deleteBackupOperationSettings = settings.deleteBackupOperationSettings.toBuilder(); + updateBackupSettings = settings.updateBackupSettings.toBuilder(); + updateBackupOperationSettings = settings.updateBackupOperationSettings.toBuilder(); + createBackupPolicySettings = settings.createBackupPolicySettings.toBuilder(); + createBackupPolicyOperationSettings = + settings.createBackupPolicyOperationSettings.toBuilder(); + getBackupPolicySettings = settings.getBackupPolicySettings.toBuilder(); + listBackupPoliciesSettings = settings.listBackupPoliciesSettings.toBuilder(); + updateBackupPolicySettings = settings.updateBackupPolicySettings.toBuilder(); + updateBackupPolicyOperationSettings = + settings.updateBackupPolicyOperationSettings.toBuilder(); + deleteBackupPolicySettings = settings.deleteBackupPolicySettings.toBuilder(); + deleteBackupPolicyOperationSettings = + settings.deleteBackupPolicyOperationSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); @@ -1594,6 +2110,21 @@ protected Builder(NetAppStubSettings settings) { stopReplicationSettings, resumeReplicationSettings, reverseReplicationDirectionSettings, + createBackupVaultSettings, + getBackupVaultSettings, + listBackupVaultsSettings, + updateBackupVaultSettings, + deleteBackupVaultSettings, + createBackupSettings, + getBackupSettings, + listBackupsSettings, + deleteBackupSettings, + updateBackupSettings, + createBackupPolicySettings, + getBackupPolicySettings, + listBackupPoliciesSettings, + updateBackupPolicySettings, + deleteBackupPolicySettings, listLocationsSettings, getLocationSettings); } @@ -1805,6 +2336,81 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder + .createBackupVaultSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getBackupVaultSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listBackupVaultsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateBackupVaultSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteBackupVaultSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createBackupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getBackupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listBackupsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteBackupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateBackupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createBackupPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getBackupPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listBackupPoliciesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateBackupPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteBackupPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder .listLocationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -2368,6 +2974,222 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder + .createBackupVaultOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(BackupVault.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateBackupVaultOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(BackupVault.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteBackupVaultOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createBackupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Backup.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteBackupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateBackupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Backup.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createBackupPolicyOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(BackupPolicy.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateBackupPolicyOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(BackupPolicy.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteBackupPolicyOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + return builder; } @@ -2780,6 +3602,166 @@ public UnaryCallSettings.Builder stopReplicat return reverseReplicationDirectionOperationSettings; } + /** Returns the builder for the settings used for calls to createBackupVault. */ + public UnaryCallSettings.Builder + createBackupVaultSettings() { + return createBackupVaultSettings; + } + + /** Returns the builder for the settings used for calls to createBackupVault. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createBackupVaultOperationSettings() { + return createBackupVaultOperationSettings; + } + + /** Returns the builder for the settings used for calls to getBackupVault. */ + public UnaryCallSettings.Builder getBackupVaultSettings() { + return getBackupVaultSettings; + } + + /** Returns the builder for the settings used for calls to listBackupVaults. */ + public PagedCallSettings.Builder< + ListBackupVaultsRequest, ListBackupVaultsResponse, ListBackupVaultsPagedResponse> + listBackupVaultsSettings() { + return listBackupVaultsSettings; + } + + /** Returns the builder for the settings used for calls to updateBackupVault. */ + public UnaryCallSettings.Builder + updateBackupVaultSettings() { + return updateBackupVaultSettings; + } + + /** Returns the builder for the settings used for calls to updateBackupVault. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateBackupVaultOperationSettings() { + return updateBackupVaultOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteBackupVault. */ + public UnaryCallSettings.Builder + deleteBackupVaultSettings() { + return deleteBackupVaultSettings; + } + + /** Returns the builder for the settings used for calls to deleteBackupVault. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteBackupVaultOperationSettings() { + return deleteBackupVaultOperationSettings; + } + + /** Returns the builder for the settings used for calls to createBackup. */ + public UnaryCallSettings.Builder createBackupSettings() { + return createBackupSettings; + } + + /** Returns the builder for the settings used for calls to createBackup. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createBackupOperationSettings() { + return createBackupOperationSettings; + } + + /** Returns the builder for the settings used for calls to getBackup. */ + public UnaryCallSettings.Builder getBackupSettings() { + return getBackupSettings; + } + + /** Returns the builder for the settings used for calls to listBackups. */ + public PagedCallSettings.Builder< + ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> + listBackupsSettings() { + return listBackupsSettings; + } + + /** Returns the builder for the settings used for calls to deleteBackup. */ + public UnaryCallSettings.Builder deleteBackupSettings() { + return deleteBackupSettings; + } + + /** Returns the builder for the settings used for calls to deleteBackup. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteBackupOperationSettings() { + return deleteBackupOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateBackup. */ + public UnaryCallSettings.Builder updateBackupSettings() { + return updateBackupSettings; + } + + /** Returns the builder for the settings used for calls to updateBackup. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateBackupOperationSettings() { + return updateBackupOperationSettings; + } + + /** Returns the builder for the settings used for calls to createBackupPolicy. */ + public UnaryCallSettings.Builder + createBackupPolicySettings() { + return createBackupPolicySettings; + } + + /** Returns the builder for the settings used for calls to createBackupPolicy. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createBackupPolicyOperationSettings() { + return createBackupPolicyOperationSettings; + } + + /** Returns the builder for the settings used for calls to getBackupPolicy. */ + public UnaryCallSettings.Builder + getBackupPolicySettings() { + return getBackupPolicySettings; + } + + /** Returns the builder for the settings used for calls to listBackupPolicies. */ + public PagedCallSettings.Builder< + ListBackupPoliciesRequest, ListBackupPoliciesResponse, ListBackupPoliciesPagedResponse> + listBackupPoliciesSettings() { + return listBackupPoliciesSettings; + } + + /** Returns the builder for the settings used for calls to updateBackupPolicy. */ + public UnaryCallSettings.Builder + updateBackupPolicySettings() { + return updateBackupPolicySettings; + } + + /** Returns the builder for the settings used for calls to updateBackupPolicy. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateBackupPolicyOperationSettings() { + return updateBackupPolicyOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteBackupPolicy. */ + public UnaryCallSettings.Builder + deleteBackupPolicySettings() { + return deleteBackupPolicySettings; + } + + /** Returns the builder for the settings used for calls to deleteBackupPolicy. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteBackupPolicyOperationSettings() { + return deleteBackupPolicyOperationSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-netapp/google-cloud-netapp/src/main/resources/META-INF/native-image/com.google.cloud.netapp.v1/reflect-config.json b/java-netapp/google-cloud-netapp/src/main/resources/META-INF/native-image/com.google.cloud.netapp.v1/reflect-config.json index 333b8a104fcf..42863664c68c 100644 --- a/java-netapp/google-cloud-netapp/src/main/resources/META-INF/native-image/com.google.cloud.netapp.v1/reflect-config.json +++ b/java-netapp/google-cloud-netapp/src/main/resources/META-INF/native-image/com.google.cloud.netapp.v1/reflect-config.json @@ -485,6 +485,114 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.netapp.v1.Backup", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.Backup$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.Backup$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.Backup$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.BackupConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.BackupConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.BackupPolicy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.BackupPolicy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.BackupPolicy$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.BackupVault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.BackupVault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.BackupVault$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.netapp.v1.CreateActiveDirectoryRequest", "queryAllDeclaredConstructors": true, @@ -503,6 +611,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.netapp.v1.CreateBackupPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.CreateBackupPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.CreateBackupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.CreateBackupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.CreateBackupVaultRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.CreateBackupVaultRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.netapp.v1.CreateKmsConfigRequest", "queryAllDeclaredConstructors": true, @@ -629,6 +791,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.netapp.v1.DeleteBackupPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.DeleteBackupPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.DeleteBackupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.DeleteBackupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.DeleteBackupVaultRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.DeleteBackupVaultRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.netapp.v1.DeleteKmsConfigRequest", "queryAllDeclaredConstructors": true, @@ -800,6 +1016,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.netapp.v1.GetBackupPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.GetBackupPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.GetBackupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.GetBackupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.GetBackupVaultRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.GetBackupVaultRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.netapp.v1.GetKmsConfigRequest", "queryAllDeclaredConstructors": true, @@ -971,6 +1241,114 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.netapp.v1.ListBackupPoliciesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.ListBackupPoliciesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.ListBackupPoliciesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.ListBackupPoliciesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.ListBackupVaultsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.ListBackupVaultsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.ListBackupVaultsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.ListBackupVaultsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.ListBackupsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.ListBackupsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.ListBackupsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.ListBackupsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.netapp.v1.ListKmsConfigsRequest", "queryAllDeclaredConstructors": true, @@ -1520,6 +1898,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.netapp.v1.UpdateBackupPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.UpdateBackupPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.UpdateBackupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.UpdateBackupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.UpdateBackupVaultRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.netapp.v1.UpdateBackupVaultRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.netapp.v1.UpdateKmsConfigRequest", "queryAllDeclaredConstructors": true, diff --git a/java-netapp/google-cloud-netapp/src/test/java/com/google/cloud/netapp/v1/MockNetAppImpl.java b/java-netapp/google-cloud-netapp/src/test/java/com/google/cloud/netapp/v1/MockNetAppImpl.java index 649b1701ed35..0e3a8fe3f008 100644 --- a/java-netapp/google-cloud-netapp/src/test/java/com/google/cloud/netapp/v1/MockNetAppImpl.java +++ b/java-netapp/google-cloud-netapp/src/test/java/com/google/cloud/netapp/v1/MockNetAppImpl.java @@ -813,4 +813,319 @@ public void reverseReplicationDirection( Exception.class.getName()))); } } + + @Override + public void createBackupVault( + CreateBackupVaultRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateBackupVault, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getBackupVault( + GetBackupVaultRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BackupVault) { + requests.add(request); + responseObserver.onNext(((BackupVault) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetBackupVault, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BackupVault.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listBackupVaults( + ListBackupVaultsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListBackupVaultsResponse) { + requests.add(request); + responseObserver.onNext(((ListBackupVaultsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListBackupVaults, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListBackupVaultsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateBackupVault( + UpdateBackupVaultRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateBackupVault, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteBackupVault( + DeleteBackupVaultRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteBackupVault, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createBackup( + CreateBackupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateBackup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getBackup(GetBackupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Backup) { + requests.add(request); + responseObserver.onNext(((Backup) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetBackup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Backup.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listBackups( + ListBackupsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListBackupsResponse) { + requests.add(request); + responseObserver.onNext(((ListBackupsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListBackups, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListBackupsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteBackup( + DeleteBackupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteBackup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateBackup( + UpdateBackupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateBackup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createBackupPolicy( + CreateBackupPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateBackupPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getBackupPolicy( + GetBackupPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BackupPolicy) { + requests.add(request); + responseObserver.onNext(((BackupPolicy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetBackupPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BackupPolicy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listBackupPolicies( + ListBackupPoliciesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListBackupPoliciesResponse) { + requests.add(request); + responseObserver.onNext(((ListBackupPoliciesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListBackupPolicies, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListBackupPoliciesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateBackupPolicy( + UpdateBackupPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateBackupPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteBackupPolicy( + DeleteBackupPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteBackupPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-netapp/google-cloud-netapp/src/test/java/com/google/cloud/netapp/v1/NetAppClientHttpJsonTest.java b/java-netapp/google-cloud-netapp/src/test/java/com/google/cloud/netapp/v1/NetAppClientHttpJsonTest.java index 0557820d86c6..e22b16f4f46b 100644 --- a/java-netapp/google-cloud-netapp/src/test/java/com/google/cloud/netapp/v1/NetAppClientHttpJsonTest.java +++ b/java-netapp/google-cloud-netapp/src/test/java/com/google/cloud/netapp/v1/NetAppClientHttpJsonTest.java @@ -17,6 +17,9 @@ package com.google.cloud.netapp.v1; import static com.google.cloud.netapp.v1.NetAppClient.ListActiveDirectoriesPagedResponse; +import static com.google.cloud.netapp.v1.NetAppClient.ListBackupPoliciesPagedResponse; +import static com.google.cloud.netapp.v1.NetAppClient.ListBackupVaultsPagedResponse; +import static com.google.cloud.netapp.v1.NetAppClient.ListBackupsPagedResponse; import static com.google.cloud.netapp.v1.NetAppClient.ListKmsConfigsPagedResponse; import static com.google.cloud.netapp.v1.NetAppClient.ListLocationsPagedResponse; import static com.google.cloud.netapp.v1.NetAppClient.ListReplicationsPagedResponse; @@ -782,6 +785,7 @@ public void getVolumeTest() throws Exception { .setKmsConfig(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .setEncryptionType(EncryptionType.forNumber(0)) .setHasReplication(true) + .setBackupConfig(BackupConfig.newBuilder().build()) .addAllRestrictedActions(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -856,6 +860,7 @@ public void getVolumeTest2() throws Exception { .setKmsConfig(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .setEncryptionType(EncryptionType.forNumber(0)) .setHasReplication(true) + .setBackupConfig(BackupConfig.newBuilder().build()) .addAllRestrictedActions(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -930,6 +935,7 @@ public void createVolumeTest() throws Exception { .setKmsConfig(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .setEncryptionType(EncryptionType.forNumber(0)) .setHasReplication(true) + .setBackupConfig(BackupConfig.newBuilder().build()) .addAllRestrictedActions(new ArrayList()) .build(); Operation resultOperation = @@ -1013,6 +1019,7 @@ public void createVolumeTest2() throws Exception { .setKmsConfig(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .setEncryptionType(EncryptionType.forNumber(0)) .setHasReplication(true) + .setBackupConfig(BackupConfig.newBuilder().build()) .addAllRestrictedActions(new ArrayList()) .build(); Operation resultOperation = @@ -1096,6 +1103,7 @@ public void updateVolumeTest() throws Exception { .setKmsConfig(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .setEncryptionType(EncryptionType.forNumber(0)) .setHasReplication(true) + .setBackupConfig(BackupConfig.newBuilder().build()) .addAllRestrictedActions(new ArrayList()) .build(); Operation resultOperation = @@ -1138,6 +1146,7 @@ public void updateVolumeTest() throws Exception { .setKmsConfig(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .setEncryptionType(EncryptionType.forNumber(0)) .setHasReplication(true) + .setBackupConfig(BackupConfig.newBuilder().build()) .addAllRestrictedActions(new ArrayList()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -1201,6 +1210,7 @@ public void updateVolumeExceptionTest() throws Exception { .setKmsConfig(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .setEncryptionType(EncryptionType.forNumber(0)) .setHasReplication(true) + .setBackupConfig(BackupConfig.newBuilder().build()) .addAllRestrictedActions(new ArrayList()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -1334,6 +1344,7 @@ public void revertVolumeTest() throws Exception { .setKmsConfig(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .setEncryptionType(EncryptionType.forNumber(0)) .setHasReplication(true) + .setBackupConfig(BackupConfig.newBuilder().build()) .addAllRestrictedActions(new ArrayList()) .build(); Operation resultOperation = @@ -3811,6 +3822,1479 @@ public void reverseReplicationDirectionExceptionTest() throws Exception { } } + @Test + public void createBackupVaultTest() throws Exception { + BackupVault expectedResponse = + BackupVault.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupVaultTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BackupVault backupVault = BackupVault.newBuilder().build(); + String backupVaultId = "backupVaultId-1897432373"; + + BackupVault actualResponse = + client.createBackupVaultAsync(parent, backupVault, backupVaultId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createBackupVaultExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BackupVault backupVault = BackupVault.newBuilder().build(); + String backupVaultId = "backupVaultId-1897432373"; + client.createBackupVaultAsync(parent, backupVault, backupVaultId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createBackupVaultTest2() throws Exception { + BackupVault expectedResponse = + BackupVault.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupVaultTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + BackupVault backupVault = BackupVault.newBuilder().build(); + String backupVaultId = "backupVaultId-1897432373"; + + BackupVault actualResponse = + client.createBackupVaultAsync(parent, backupVault, backupVaultId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createBackupVaultExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + BackupVault backupVault = BackupVault.newBuilder().build(); + String backupVaultId = "backupVaultId-1897432373"; + client.createBackupVaultAsync(parent, backupVault, backupVaultId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getBackupVaultTest() throws Exception { + BackupVault expectedResponse = + BackupVault.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); + + BackupVault actualResponse = client.getBackupVault(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getBackupVaultExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); + client.getBackupVault(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupVaultTest2() throws Exception { + BackupVault expectedResponse = + BackupVault.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-237/locations/location-237/backupVaults/backupVault-237"; + + BackupVault actualResponse = client.getBackupVault(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getBackupVaultExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-237/locations/location-237/backupVaults/backupVault-237"; + client.getBackupVault(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupVaultsTest() throws Exception { + BackupVault responsesElement = BackupVault.newBuilder().build(); + ListBackupVaultsResponse expectedResponse = + ListBackupVaultsResponse.newBuilder() + .setNextPageToken("") + .addAllBackupVaults(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListBackupVaultsPagedResponse pagedListResponse = client.listBackupVaults(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupVaultsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listBackupVaultsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listBackupVaults(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupVaultsTest2() throws Exception { + BackupVault responsesElement = BackupVault.newBuilder().build(); + ListBackupVaultsResponse expectedResponse = + ListBackupVaultsResponse.newBuilder() + .setNextPageToken("") + .addAllBackupVaults(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListBackupVaultsPagedResponse pagedListResponse = client.listBackupVaults(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupVaultsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listBackupVaultsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listBackupVaults(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateBackupVaultTest() throws Exception { + BackupVault expectedResponse = + BackupVault.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateBackupVaultTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + BackupVault backupVault = + BackupVault.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + BackupVault actualResponse = client.updateBackupVaultAsync(backupVault, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateBackupVaultExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupVault backupVault = + BackupVault.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateBackupVaultAsync(backupVault, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteBackupVaultTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupVaultTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); + + client.deleteBackupVaultAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteBackupVaultExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); + client.deleteBackupVaultAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteBackupVaultTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupVaultTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-237/locations/location-237/backupVaults/backupVault-237"; + + client.deleteBackupVaultAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteBackupVaultExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-237/locations/location-237/backupVaults/backupVault-237"; + client.deleteBackupVaultAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName( + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) + .setDescription("description-1724546052") + .setVolumeUsageBytes(962433704) + .setSourceVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setSourceSnapshot( + SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setChainStorageBytes(1614651561) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + + Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createBackupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + client.createBackupAsync(parent, backup, backupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createBackupTest2() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName( + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) + .setDescription("description-1724546052") + .setVolumeUsageBytes(962433704) + .setSourceVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setSourceSnapshot( + SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setChainStorageBytes(1614651561) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5588/locations/location-5588/backupVaults/backupVault-5588"; + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + + Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createBackupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5588/locations/location-5588/backupVaults/backupVault-5588"; + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + client.createBackupAsync(parent, backup, backupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName( + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) + .setDescription("description-1724546052") + .setVolumeUsageBytes(962433704) + .setSourceVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setSourceSnapshot( + SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setChainStorageBytes(1614651561) + .build(); + mockService.addResponse(expectedResponse); + + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]"); + + Backup actualResponse = client.getBackup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getBackupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]"); + client.getBackup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupTest2() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName( + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) + .setDescription("description-1724546052") + .setVolumeUsageBytes(962433704) + .setSourceVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setSourceSnapshot( + SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setChainStorageBytes(1614651561) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-6240/locations/location-6240/backupVaults/backupVault-6240/backups/backup-6240"; + + Backup actualResponse = client.getBackup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getBackupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6240/locations/location-6240/backupVaults/backupVault-6240/backups/backup-6240"; + client.getBackup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupsTest() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + ListBackupsResponse expectedResponse = + ListBackupsResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); + + ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listBackupsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); + client.listBackups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupsTest2() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + ListBackupsResponse expectedResponse = + ListBackupsResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5588/locations/location-5588/backupVaults/backupVault-5588"; + + ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listBackupsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5588/locations/location-5588/backupVaults/backupVault-5588"; + client.listBackups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteBackupTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]"); + + client.deleteBackupAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteBackupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]"); + client.deleteBackupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteBackupTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-6240/locations/location-6240/backupVaults/backupVault-6240/backups/backup-6240"; + + client.deleteBackupAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteBackupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6240/locations/location-6240/backupVaults/backupVault-6240/backups/backup-6240"; + client.deleteBackupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName( + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) + .setDescription("description-1724546052") + .setVolumeUsageBytes(962433704) + .setSourceVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setSourceSnapshot( + SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setChainStorageBytes(1614651561) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Backup backup = + Backup.newBuilder() + .setName( + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) + .setDescription("description-1724546052") + .setVolumeUsageBytes(962433704) + .setSourceVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setSourceSnapshot( + SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setChainStorageBytes(1614651561) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Backup actualResponse = client.updateBackupAsync(backup, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateBackupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Backup backup = + Backup.newBuilder() + .setName( + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) + .setDescription("description-1724546052") + .setVolumeUsageBytes(962433704) + .setSourceVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setSourceSnapshot( + SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setChainStorageBytes(1614651561) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateBackupAsync(backup, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createBackupPolicyTest() throws Exception { + BackupPolicy expectedResponse = + BackupPolicy.newBuilder() + .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) + .setDailyBackupLimit(532629348) + .setWeeklyBackupLimit(-2075144708) + .setMonthlyBackupLimit(-1253809680) + .setDescription("description-1724546052") + .setEnabled(true) + .setAssignedVolumeCount(396892795) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BackupPolicy backupPolicy = BackupPolicy.newBuilder().build(); + String backupPolicyId = "backupPolicyId-1278533169"; + + BackupPolicy actualResponse = + client.createBackupPolicyAsync(parent, backupPolicy, backupPolicyId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createBackupPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BackupPolicy backupPolicy = BackupPolicy.newBuilder().build(); + String backupPolicyId = "backupPolicyId-1278533169"; + client.createBackupPolicyAsync(parent, backupPolicy, backupPolicyId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createBackupPolicyTest2() throws Exception { + BackupPolicy expectedResponse = + BackupPolicy.newBuilder() + .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) + .setDailyBackupLimit(532629348) + .setWeeklyBackupLimit(-2075144708) + .setMonthlyBackupLimit(-1253809680) + .setDescription("description-1724546052") + .setEnabled(true) + .setAssignedVolumeCount(396892795) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + BackupPolicy backupPolicy = BackupPolicy.newBuilder().build(); + String backupPolicyId = "backupPolicyId-1278533169"; + + BackupPolicy actualResponse = + client.createBackupPolicyAsync(parent, backupPolicy, backupPolicyId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createBackupPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + BackupPolicy backupPolicy = BackupPolicy.newBuilder().build(); + String backupPolicyId = "backupPolicyId-1278533169"; + client.createBackupPolicyAsync(parent, backupPolicy, backupPolicyId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getBackupPolicyTest() throws Exception { + BackupPolicy expectedResponse = + BackupPolicy.newBuilder() + .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) + .setDailyBackupLimit(532629348) + .setWeeklyBackupLimit(-2075144708) + .setMonthlyBackupLimit(-1253809680) + .setDescription("description-1724546052") + .setEnabled(true) + .setAssignedVolumeCount(396892795) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + BackupPolicyName name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]"); + + BackupPolicy actualResponse = client.getBackupPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getBackupPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupPolicyName name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]"); + client.getBackupPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupPolicyTest2() throws Exception { + BackupPolicy expectedResponse = + BackupPolicy.newBuilder() + .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) + .setDailyBackupLimit(532629348) + .setWeeklyBackupLimit(-2075144708) + .setMonthlyBackupLimit(-1253809680) + .setDescription("description-1724546052") + .setEnabled(true) + .setAssignedVolumeCount(396892795) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-1374/locations/location-1374/backupPolicies/backupPolicie-1374"; + + BackupPolicy actualResponse = client.getBackupPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getBackupPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1374/locations/location-1374/backupPolicies/backupPolicie-1374"; + client.getBackupPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupPoliciesTest() throws Exception { + BackupPolicy responsesElement = BackupPolicy.newBuilder().build(); + ListBackupPoliciesResponse expectedResponse = + ListBackupPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllBackupPolicies(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListBackupPoliciesPagedResponse pagedListResponse = client.listBackupPolicies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listBackupPoliciesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listBackupPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupPoliciesTest2() throws Exception { + BackupPolicy responsesElement = BackupPolicy.newBuilder().build(); + ListBackupPoliciesResponse expectedResponse = + ListBackupPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllBackupPolicies(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListBackupPoliciesPagedResponse pagedListResponse = client.listBackupPolicies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listBackupPoliciesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listBackupPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateBackupPolicyTest() throws Exception { + BackupPolicy expectedResponse = + BackupPolicy.newBuilder() + .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) + .setDailyBackupLimit(532629348) + .setWeeklyBackupLimit(-2075144708) + .setMonthlyBackupLimit(-1253809680) + .setDescription("description-1724546052") + .setEnabled(true) + .setAssignedVolumeCount(396892795) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateBackupPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + BackupPolicy backupPolicy = + BackupPolicy.newBuilder() + .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) + .setDailyBackupLimit(532629348) + .setWeeklyBackupLimit(-2075144708) + .setMonthlyBackupLimit(-1253809680) + .setDescription("description-1724546052") + .setEnabled(true) + .setAssignedVolumeCount(396892795) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + BackupPolicy actualResponse = client.updateBackupPolicyAsync(backupPolicy, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateBackupPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupPolicy backupPolicy = + BackupPolicy.newBuilder() + .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) + .setDailyBackupLimit(532629348) + .setWeeklyBackupLimit(-2075144708) + .setMonthlyBackupLimit(-1253809680) + .setDescription("description-1724546052") + .setEnabled(true) + .setAssignedVolumeCount(396892795) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateBackupPolicyAsync(backupPolicy, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteBackupPolicyTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + BackupPolicyName name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]"); + + client.deleteBackupPolicyAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteBackupPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupPolicyName name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]"); + client.deleteBackupPolicyAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteBackupPolicyTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-1374/locations/location-1374/backupPolicies/backupPolicie-1374"; + + client.deleteBackupPolicyAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteBackupPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1374/locations/location-1374/backupPolicies/backupPolicie-1374"; + client.deleteBackupPolicyAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-netapp/google-cloud-netapp/src/test/java/com/google/cloud/netapp/v1/NetAppClientTest.java b/java-netapp/google-cloud-netapp/src/test/java/com/google/cloud/netapp/v1/NetAppClientTest.java index 9a7628cbb269..0c9b5cfd75c4 100644 --- a/java-netapp/google-cloud-netapp/src/test/java/com/google/cloud/netapp/v1/NetAppClientTest.java +++ b/java-netapp/google-cloud-netapp/src/test/java/com/google/cloud/netapp/v1/NetAppClientTest.java @@ -17,6 +17,9 @@ package com.google.cloud.netapp.v1; import static com.google.cloud.netapp.v1.NetAppClient.ListActiveDirectoriesPagedResponse; +import static com.google.cloud.netapp.v1.NetAppClient.ListBackupPoliciesPagedResponse; +import static com.google.cloud.netapp.v1.NetAppClient.ListBackupVaultsPagedResponse; +import static com.google.cloud.netapp.v1.NetAppClient.ListBackupsPagedResponse; import static com.google.cloud.netapp.v1.NetAppClient.ListKmsConfigsPagedResponse; import static com.google.cloud.netapp.v1.NetAppClient.ListLocationsPagedResponse; import static com.google.cloud.netapp.v1.NetAppClient.ListReplicationsPagedResponse; @@ -705,6 +708,7 @@ public void getVolumeTest() throws Exception { .setKmsConfig(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .setEncryptionType(EncryptionType.forNumber(0)) .setHasReplication(true) + .setBackupConfig(BackupConfig.newBuilder().build()) .addAllRestrictedActions(new ArrayList()) .build(); mockNetApp.addResponse(expectedResponse); @@ -773,6 +777,7 @@ public void getVolumeTest2() throws Exception { .setKmsConfig(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .setEncryptionType(EncryptionType.forNumber(0)) .setHasReplication(true) + .setBackupConfig(BackupConfig.newBuilder().build()) .addAllRestrictedActions(new ArrayList()) .build(); mockNetApp.addResponse(expectedResponse); @@ -841,6 +846,7 @@ public void createVolumeTest() throws Exception { .setKmsConfig(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .setEncryptionType(EncryptionType.forNumber(0)) .setHasReplication(true) + .setBackupConfig(BackupConfig.newBuilder().build()) .addAllRestrictedActions(new ArrayList()) .build(); Operation resultOperation = @@ -923,6 +929,7 @@ public void createVolumeTest2() throws Exception { .setKmsConfig(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .setEncryptionType(EncryptionType.forNumber(0)) .setHasReplication(true) + .setBackupConfig(BackupConfig.newBuilder().build()) .addAllRestrictedActions(new ArrayList()) .build(); Operation resultOperation = @@ -1005,6 +1012,7 @@ public void updateVolumeTest() throws Exception { .setKmsConfig(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .setEncryptionType(EncryptionType.forNumber(0)) .setHasReplication(true) + .setBackupConfig(BackupConfig.newBuilder().build()) .addAllRestrictedActions(new ArrayList()) .build(); Operation resultOperation = @@ -1168,6 +1176,7 @@ public void revertVolumeTest() throws Exception { .setKmsConfig(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .setEncryptionType(EncryptionType.forNumber(0)) .setHasReplication(true) + .setBackupConfig(BackupConfig.newBuilder().build()) .addAllRestrictedActions(new ArrayList()) .build(); Operation resultOperation = @@ -3373,6 +3382,1313 @@ public void reverseReplicationDirectionExceptionTest() throws Exception { } } + @Test + public void createBackupVaultTest() throws Exception { + BackupVault expectedResponse = + BackupVault.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupVaultTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetApp.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BackupVault backupVault = BackupVault.newBuilder().build(); + String backupVaultId = "backupVaultId-1897432373"; + + BackupVault actualResponse = + client.createBackupVaultAsync(parent, backupVault, backupVaultId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBackupVaultRequest actualRequest = ((CreateBackupVaultRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(backupVault, actualRequest.getBackupVault()); + Assert.assertEquals(backupVaultId, actualRequest.getBackupVaultId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBackupVaultExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BackupVault backupVault = BackupVault.newBuilder().build(); + String backupVaultId = "backupVaultId-1897432373"; + client.createBackupVaultAsync(parent, backupVault, backupVaultId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createBackupVaultTest2() throws Exception { + BackupVault expectedResponse = + BackupVault.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupVaultTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetApp.addResponse(resultOperation); + + String parent = "parent-995424086"; + BackupVault backupVault = BackupVault.newBuilder().build(); + String backupVaultId = "backupVaultId-1897432373"; + + BackupVault actualResponse = + client.createBackupVaultAsync(parent, backupVault, backupVaultId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBackupVaultRequest actualRequest = ((CreateBackupVaultRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(backupVault, actualRequest.getBackupVault()); + Assert.assertEquals(backupVaultId, actualRequest.getBackupVaultId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBackupVaultExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + String parent = "parent-995424086"; + BackupVault backupVault = BackupVault.newBuilder().build(); + String backupVaultId = "backupVaultId-1897432373"; + client.createBackupVaultAsync(parent, backupVault, backupVaultId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getBackupVaultTest() throws Exception { + BackupVault expectedResponse = + BackupVault.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + mockNetApp.addResponse(expectedResponse); + + BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); + + BackupVault actualResponse = client.getBackupVault(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBackupVaultRequest actualRequest = ((GetBackupVaultRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBackupVaultExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); + client.getBackupVault(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupVaultTest2() throws Exception { + BackupVault expectedResponse = + BackupVault.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + mockNetApp.addResponse(expectedResponse); + + String name = "name3373707"; + + BackupVault actualResponse = client.getBackupVault(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBackupVaultRequest actualRequest = ((GetBackupVaultRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBackupVaultExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + String name = "name3373707"; + client.getBackupVault(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupVaultsTest() throws Exception { + BackupVault responsesElement = BackupVault.newBuilder().build(); + ListBackupVaultsResponse expectedResponse = + ListBackupVaultsResponse.newBuilder() + .setNextPageToken("") + .addAllBackupVaults(Arrays.asList(responsesElement)) + .build(); + mockNetApp.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListBackupVaultsPagedResponse pagedListResponse = client.listBackupVaults(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupVaultsList().get(0), resources.get(0)); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBackupVaultsRequest actualRequest = ((ListBackupVaultsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBackupVaultsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listBackupVaults(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupVaultsTest2() throws Exception { + BackupVault responsesElement = BackupVault.newBuilder().build(); + ListBackupVaultsResponse expectedResponse = + ListBackupVaultsResponse.newBuilder() + .setNextPageToken("") + .addAllBackupVaults(Arrays.asList(responsesElement)) + .build(); + mockNetApp.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListBackupVaultsPagedResponse pagedListResponse = client.listBackupVaults(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupVaultsList().get(0), resources.get(0)); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBackupVaultsRequest actualRequest = ((ListBackupVaultsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBackupVaultsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + String parent = "parent-995424086"; + client.listBackupVaults(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateBackupVaultTest() throws Exception { + BackupVault expectedResponse = + BackupVault.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateBackupVaultTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetApp.addResponse(resultOperation); + + BackupVault backupVault = BackupVault.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + BackupVault actualResponse = client.updateBackupVaultAsync(backupVault, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateBackupVaultRequest actualRequest = ((UpdateBackupVaultRequest) actualRequests.get(0)); + + Assert.assertEquals(backupVault, actualRequest.getBackupVault()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateBackupVaultExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + BackupVault backupVault = BackupVault.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateBackupVaultAsync(backupVault, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteBackupVaultTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupVaultTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetApp.addResponse(resultOperation); + + BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); + + client.deleteBackupVaultAsync(name).get(); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBackupVaultRequest actualRequest = ((DeleteBackupVaultRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBackupVaultExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); + client.deleteBackupVaultAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteBackupVaultTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupVaultTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetApp.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteBackupVaultAsync(name).get(); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBackupVaultRequest actualRequest = ((DeleteBackupVaultRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBackupVaultExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + String name = "name3373707"; + client.deleteBackupVaultAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName( + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) + .setDescription("description-1724546052") + .setVolumeUsageBytes(962433704) + .setSourceVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setSourceSnapshot( + SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setChainStorageBytes(1614651561) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetApp.addResponse(resultOperation); + + BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + + Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBackupRequest actualRequest = ((CreateBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(backup, actualRequest.getBackup()); + Assert.assertEquals(backupId, actualRequest.getBackupId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBackupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + client.createBackupAsync(parent, backup, backupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createBackupTest2() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName( + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) + .setDescription("description-1724546052") + .setVolumeUsageBytes(962433704) + .setSourceVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setSourceSnapshot( + SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setChainStorageBytes(1614651561) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetApp.addResponse(resultOperation); + + String parent = "parent-995424086"; + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + + Backup actualResponse = client.createBackupAsync(parent, backup, backupId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBackupRequest actualRequest = ((CreateBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(backup, actualRequest.getBackup()); + Assert.assertEquals(backupId, actualRequest.getBackupId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBackupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + String parent = "parent-995424086"; + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + client.createBackupAsync(parent, backup, backupId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName( + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) + .setDescription("description-1724546052") + .setVolumeUsageBytes(962433704) + .setSourceVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setSourceSnapshot( + SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setChainStorageBytes(1614651561) + .build(); + mockNetApp.addResponse(expectedResponse); + + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]"); + + Backup actualResponse = client.getBackup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBackupRequest actualRequest = ((GetBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBackupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]"); + client.getBackup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupTest2() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName( + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) + .setDescription("description-1724546052") + .setVolumeUsageBytes(962433704) + .setSourceVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setSourceSnapshot( + SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setChainStorageBytes(1614651561) + .build(); + mockNetApp.addResponse(expectedResponse); + + String name = "name3373707"; + + Backup actualResponse = client.getBackup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBackupRequest actualRequest = ((GetBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBackupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + String name = "name3373707"; + client.getBackup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupsTest() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + ListBackupsResponse expectedResponse = + ListBackupsResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockNetApp.addResponse(expectedResponse); + + BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); + + ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBackupsRequest actualRequest = ((ListBackupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBackupsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); + client.listBackups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupsTest2() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + ListBackupsResponse expectedResponse = + ListBackupsResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockNetApp.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListBackupsPagedResponse pagedListResponse = client.listBackups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBackupsRequest actualRequest = ((ListBackupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBackupsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + String parent = "parent-995424086"; + client.listBackups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteBackupTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetApp.addResponse(resultOperation); + + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]"); + + client.deleteBackupAsync(name).get(); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBackupRequest actualRequest = ((DeleteBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBackupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]"); + client.deleteBackupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteBackupTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetApp.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteBackupAsync(name).get(); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBackupRequest actualRequest = ((DeleteBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBackupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + String name = "name3373707"; + client.deleteBackupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName( + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) + .setDescription("description-1724546052") + .setVolumeUsageBytes(962433704) + .setSourceVolume(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) + .setSourceSnapshot( + SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setChainStorageBytes(1614651561) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetApp.addResponse(resultOperation); + + Backup backup = Backup.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Backup actualResponse = client.updateBackupAsync(backup, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateBackupRequest actualRequest = ((UpdateBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(backup, actualRequest.getBackup()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateBackupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + Backup backup = Backup.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateBackupAsync(backup, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createBackupPolicyTest() throws Exception { + BackupPolicy expectedResponse = + BackupPolicy.newBuilder() + .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) + .setDailyBackupLimit(532629348) + .setWeeklyBackupLimit(-2075144708) + .setMonthlyBackupLimit(-1253809680) + .setDescription("description-1724546052") + .setEnabled(true) + .setAssignedVolumeCount(396892795) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetApp.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BackupPolicy backupPolicy = BackupPolicy.newBuilder().build(); + String backupPolicyId = "backupPolicyId-1278533169"; + + BackupPolicy actualResponse = + client.createBackupPolicyAsync(parent, backupPolicy, backupPolicyId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBackupPolicyRequest actualRequest = ((CreateBackupPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(backupPolicy, actualRequest.getBackupPolicy()); + Assert.assertEquals(backupPolicyId, actualRequest.getBackupPolicyId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBackupPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BackupPolicy backupPolicy = BackupPolicy.newBuilder().build(); + String backupPolicyId = "backupPolicyId-1278533169"; + client.createBackupPolicyAsync(parent, backupPolicy, backupPolicyId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createBackupPolicyTest2() throws Exception { + BackupPolicy expectedResponse = + BackupPolicy.newBuilder() + .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) + .setDailyBackupLimit(532629348) + .setWeeklyBackupLimit(-2075144708) + .setMonthlyBackupLimit(-1253809680) + .setDescription("description-1724546052") + .setEnabled(true) + .setAssignedVolumeCount(396892795) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetApp.addResponse(resultOperation); + + String parent = "parent-995424086"; + BackupPolicy backupPolicy = BackupPolicy.newBuilder().build(); + String backupPolicyId = "backupPolicyId-1278533169"; + + BackupPolicy actualResponse = + client.createBackupPolicyAsync(parent, backupPolicy, backupPolicyId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBackupPolicyRequest actualRequest = ((CreateBackupPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(backupPolicy, actualRequest.getBackupPolicy()); + Assert.assertEquals(backupPolicyId, actualRequest.getBackupPolicyId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBackupPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + String parent = "parent-995424086"; + BackupPolicy backupPolicy = BackupPolicy.newBuilder().build(); + String backupPolicyId = "backupPolicyId-1278533169"; + client.createBackupPolicyAsync(parent, backupPolicy, backupPolicyId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getBackupPolicyTest() throws Exception { + BackupPolicy expectedResponse = + BackupPolicy.newBuilder() + .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) + .setDailyBackupLimit(532629348) + .setWeeklyBackupLimit(-2075144708) + .setMonthlyBackupLimit(-1253809680) + .setDescription("description-1724546052") + .setEnabled(true) + .setAssignedVolumeCount(396892795) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockNetApp.addResponse(expectedResponse); + + BackupPolicyName name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]"); + + BackupPolicy actualResponse = client.getBackupPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBackupPolicyRequest actualRequest = ((GetBackupPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBackupPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + BackupPolicyName name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]"); + client.getBackupPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupPolicyTest2() throws Exception { + BackupPolicy expectedResponse = + BackupPolicy.newBuilder() + .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) + .setDailyBackupLimit(532629348) + .setWeeklyBackupLimit(-2075144708) + .setMonthlyBackupLimit(-1253809680) + .setDescription("description-1724546052") + .setEnabled(true) + .setAssignedVolumeCount(396892795) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockNetApp.addResponse(expectedResponse); + + String name = "name3373707"; + + BackupPolicy actualResponse = client.getBackupPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBackupPolicyRequest actualRequest = ((GetBackupPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBackupPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + String name = "name3373707"; + client.getBackupPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupPoliciesTest() throws Exception { + BackupPolicy responsesElement = BackupPolicy.newBuilder().build(); + ListBackupPoliciesResponse expectedResponse = + ListBackupPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllBackupPolicies(Arrays.asList(responsesElement)) + .build(); + mockNetApp.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListBackupPoliciesPagedResponse pagedListResponse = client.listBackupPolicies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBackupPoliciesRequest actualRequest = ((ListBackupPoliciesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBackupPoliciesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listBackupPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupPoliciesTest2() throws Exception { + BackupPolicy responsesElement = BackupPolicy.newBuilder().build(); + ListBackupPoliciesResponse expectedResponse = + ListBackupPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllBackupPolicies(Arrays.asList(responsesElement)) + .build(); + mockNetApp.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListBackupPoliciesPagedResponse pagedListResponse = client.listBackupPolicies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBackupPoliciesRequest actualRequest = ((ListBackupPoliciesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBackupPoliciesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + String parent = "parent-995424086"; + client.listBackupPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateBackupPolicyTest() throws Exception { + BackupPolicy expectedResponse = + BackupPolicy.newBuilder() + .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) + .setDailyBackupLimit(532629348) + .setWeeklyBackupLimit(-2075144708) + .setMonthlyBackupLimit(-1253809680) + .setDescription("description-1724546052") + .setEnabled(true) + .setAssignedVolumeCount(396892795) + .setCreateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateBackupPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetApp.addResponse(resultOperation); + + BackupPolicy backupPolicy = BackupPolicy.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + BackupPolicy actualResponse = client.updateBackupPolicyAsync(backupPolicy, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateBackupPolicyRequest actualRequest = ((UpdateBackupPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(backupPolicy, actualRequest.getBackupPolicy()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateBackupPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + BackupPolicy backupPolicy = BackupPolicy.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateBackupPolicyAsync(backupPolicy, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteBackupPolicyTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetApp.addResponse(resultOperation); + + BackupPolicyName name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]"); + + client.deleteBackupPolicyAsync(name).get(); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBackupPolicyRequest actualRequest = ((DeleteBackupPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBackupPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + BackupPolicyName name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]"); + client.deleteBackupPolicyAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteBackupPolicyTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetApp.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteBackupPolicyAsync(name).get(); + + List actualRequests = mockNetApp.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBackupPolicyRequest actualRequest = ((DeleteBackupPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBackupPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetApp.addException(exception); + + try { + String name = "name3373707"; + client.deleteBackupPolicyAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-netapp/grpc-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/NetAppGrpc.java b/java-netapp/grpc-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/NetAppGrpc.java index 5ecf9404502e..4fa73f921ef3 100644 --- a/java-netapp/grpc-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/NetAppGrpc.java +++ b/java-netapp/grpc-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/NetAppGrpc.java @@ -1588,6 +1588,646 @@ private NetAppGrpc() {} return getReverseReplicationDirectionMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.CreateBackupVaultRequest, com.google.longrunning.Operation> + getCreateBackupVaultMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateBackupVault", + requestType = com.google.cloud.netapp.v1.CreateBackupVaultRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.CreateBackupVaultRequest, com.google.longrunning.Operation> + getCreateBackupVaultMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.CreateBackupVaultRequest, com.google.longrunning.Operation> + getCreateBackupVaultMethod; + if ((getCreateBackupVaultMethod = NetAppGrpc.getCreateBackupVaultMethod) == null) { + synchronized (NetAppGrpc.class) { + if ((getCreateBackupVaultMethod = NetAppGrpc.getCreateBackupVaultMethod) == null) { + NetAppGrpc.getCreateBackupVaultMethod = + getCreateBackupVaultMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateBackupVault")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.netapp.v1.CreateBackupVaultRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new NetAppMethodDescriptorSupplier("CreateBackupVault")) + .build(); + } + } + } + return getCreateBackupVaultMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.GetBackupVaultRequest, com.google.cloud.netapp.v1.BackupVault> + getGetBackupVaultMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBackupVault", + requestType = com.google.cloud.netapp.v1.GetBackupVaultRequest.class, + responseType = com.google.cloud.netapp.v1.BackupVault.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.GetBackupVaultRequest, com.google.cloud.netapp.v1.BackupVault> + getGetBackupVaultMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.GetBackupVaultRequest, + com.google.cloud.netapp.v1.BackupVault> + getGetBackupVaultMethod; + if ((getGetBackupVaultMethod = NetAppGrpc.getGetBackupVaultMethod) == null) { + synchronized (NetAppGrpc.class) { + if ((getGetBackupVaultMethod = NetAppGrpc.getGetBackupVaultMethod) == null) { + NetAppGrpc.getGetBackupVaultMethod = + getGetBackupVaultMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBackupVault")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.netapp.v1.GetBackupVaultRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.netapp.v1.BackupVault.getDefaultInstance())) + .setSchemaDescriptor(new NetAppMethodDescriptorSupplier("GetBackupVault")) + .build(); + } + } + } + return getGetBackupVaultMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.ListBackupVaultsRequest, + com.google.cloud.netapp.v1.ListBackupVaultsResponse> + getListBackupVaultsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListBackupVaults", + requestType = com.google.cloud.netapp.v1.ListBackupVaultsRequest.class, + responseType = com.google.cloud.netapp.v1.ListBackupVaultsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.ListBackupVaultsRequest, + com.google.cloud.netapp.v1.ListBackupVaultsResponse> + getListBackupVaultsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.ListBackupVaultsRequest, + com.google.cloud.netapp.v1.ListBackupVaultsResponse> + getListBackupVaultsMethod; + if ((getListBackupVaultsMethod = NetAppGrpc.getListBackupVaultsMethod) == null) { + synchronized (NetAppGrpc.class) { + if ((getListBackupVaultsMethod = NetAppGrpc.getListBackupVaultsMethod) == null) { + NetAppGrpc.getListBackupVaultsMethod = + getListBackupVaultsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListBackupVaults")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.netapp.v1.ListBackupVaultsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.netapp.v1.ListBackupVaultsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new NetAppMethodDescriptorSupplier("ListBackupVaults")) + .build(); + } + } + } + return getListBackupVaultsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.UpdateBackupVaultRequest, com.google.longrunning.Operation> + getUpdateBackupVaultMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateBackupVault", + requestType = com.google.cloud.netapp.v1.UpdateBackupVaultRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.UpdateBackupVaultRequest, com.google.longrunning.Operation> + getUpdateBackupVaultMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.UpdateBackupVaultRequest, com.google.longrunning.Operation> + getUpdateBackupVaultMethod; + if ((getUpdateBackupVaultMethod = NetAppGrpc.getUpdateBackupVaultMethod) == null) { + synchronized (NetAppGrpc.class) { + if ((getUpdateBackupVaultMethod = NetAppGrpc.getUpdateBackupVaultMethod) == null) { + NetAppGrpc.getUpdateBackupVaultMethod = + getUpdateBackupVaultMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateBackupVault")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.netapp.v1.UpdateBackupVaultRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new NetAppMethodDescriptorSupplier("UpdateBackupVault")) + .build(); + } + } + } + return getUpdateBackupVaultMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.DeleteBackupVaultRequest, com.google.longrunning.Operation> + getDeleteBackupVaultMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteBackupVault", + requestType = com.google.cloud.netapp.v1.DeleteBackupVaultRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.DeleteBackupVaultRequest, com.google.longrunning.Operation> + getDeleteBackupVaultMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.DeleteBackupVaultRequest, com.google.longrunning.Operation> + getDeleteBackupVaultMethod; + if ((getDeleteBackupVaultMethod = NetAppGrpc.getDeleteBackupVaultMethod) == null) { + synchronized (NetAppGrpc.class) { + if ((getDeleteBackupVaultMethod = NetAppGrpc.getDeleteBackupVaultMethod) == null) { + NetAppGrpc.getDeleteBackupVaultMethod = + getDeleteBackupVaultMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteBackupVault")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.netapp.v1.DeleteBackupVaultRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new NetAppMethodDescriptorSupplier("DeleteBackupVault")) + .build(); + } + } + } + return getDeleteBackupVaultMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.CreateBackupRequest, com.google.longrunning.Operation> + getCreateBackupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateBackup", + requestType = com.google.cloud.netapp.v1.CreateBackupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.CreateBackupRequest, com.google.longrunning.Operation> + getCreateBackupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.CreateBackupRequest, com.google.longrunning.Operation> + getCreateBackupMethod; + if ((getCreateBackupMethod = NetAppGrpc.getCreateBackupMethod) == null) { + synchronized (NetAppGrpc.class) { + if ((getCreateBackupMethod = NetAppGrpc.getCreateBackupMethod) == null) { + NetAppGrpc.getCreateBackupMethod = + getCreateBackupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateBackup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.netapp.v1.CreateBackupRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new NetAppMethodDescriptorSupplier("CreateBackup")) + .build(); + } + } + } + return getCreateBackupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.GetBackupRequest, com.google.cloud.netapp.v1.Backup> + getGetBackupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBackup", + requestType = com.google.cloud.netapp.v1.GetBackupRequest.class, + responseType = com.google.cloud.netapp.v1.Backup.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.GetBackupRequest, com.google.cloud.netapp.v1.Backup> + getGetBackupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.GetBackupRequest, com.google.cloud.netapp.v1.Backup> + getGetBackupMethod; + if ((getGetBackupMethod = NetAppGrpc.getGetBackupMethod) == null) { + synchronized (NetAppGrpc.class) { + if ((getGetBackupMethod = NetAppGrpc.getGetBackupMethod) == null) { + NetAppGrpc.getGetBackupMethod = + getGetBackupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBackup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.netapp.v1.GetBackupRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.netapp.v1.Backup.getDefaultInstance())) + .setSchemaDescriptor(new NetAppMethodDescriptorSupplier("GetBackup")) + .build(); + } + } + } + return getGetBackupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.ListBackupsRequest, + com.google.cloud.netapp.v1.ListBackupsResponse> + getListBackupsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListBackups", + requestType = com.google.cloud.netapp.v1.ListBackupsRequest.class, + responseType = com.google.cloud.netapp.v1.ListBackupsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.ListBackupsRequest, + com.google.cloud.netapp.v1.ListBackupsResponse> + getListBackupsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.ListBackupsRequest, + com.google.cloud.netapp.v1.ListBackupsResponse> + getListBackupsMethod; + if ((getListBackupsMethod = NetAppGrpc.getListBackupsMethod) == null) { + synchronized (NetAppGrpc.class) { + if ((getListBackupsMethod = NetAppGrpc.getListBackupsMethod) == null) { + NetAppGrpc.getListBackupsMethod = + getListBackupsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListBackups")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.netapp.v1.ListBackupsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.netapp.v1.ListBackupsResponse.getDefaultInstance())) + .setSchemaDescriptor(new NetAppMethodDescriptorSupplier("ListBackups")) + .build(); + } + } + } + return getListBackupsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.DeleteBackupRequest, com.google.longrunning.Operation> + getDeleteBackupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteBackup", + requestType = com.google.cloud.netapp.v1.DeleteBackupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.DeleteBackupRequest, com.google.longrunning.Operation> + getDeleteBackupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.DeleteBackupRequest, com.google.longrunning.Operation> + getDeleteBackupMethod; + if ((getDeleteBackupMethod = NetAppGrpc.getDeleteBackupMethod) == null) { + synchronized (NetAppGrpc.class) { + if ((getDeleteBackupMethod = NetAppGrpc.getDeleteBackupMethod) == null) { + NetAppGrpc.getDeleteBackupMethod = + getDeleteBackupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteBackup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.netapp.v1.DeleteBackupRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new NetAppMethodDescriptorSupplier("DeleteBackup")) + .build(); + } + } + } + return getDeleteBackupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.UpdateBackupRequest, com.google.longrunning.Operation> + getUpdateBackupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateBackup", + requestType = com.google.cloud.netapp.v1.UpdateBackupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.UpdateBackupRequest, com.google.longrunning.Operation> + getUpdateBackupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.UpdateBackupRequest, com.google.longrunning.Operation> + getUpdateBackupMethod; + if ((getUpdateBackupMethod = NetAppGrpc.getUpdateBackupMethod) == null) { + synchronized (NetAppGrpc.class) { + if ((getUpdateBackupMethod = NetAppGrpc.getUpdateBackupMethod) == null) { + NetAppGrpc.getUpdateBackupMethod = + getUpdateBackupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateBackup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.netapp.v1.UpdateBackupRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new NetAppMethodDescriptorSupplier("UpdateBackup")) + .build(); + } + } + } + return getUpdateBackupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.CreateBackupPolicyRequest, com.google.longrunning.Operation> + getCreateBackupPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateBackupPolicy", + requestType = com.google.cloud.netapp.v1.CreateBackupPolicyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.CreateBackupPolicyRequest, com.google.longrunning.Operation> + getCreateBackupPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.CreateBackupPolicyRequest, com.google.longrunning.Operation> + getCreateBackupPolicyMethod; + if ((getCreateBackupPolicyMethod = NetAppGrpc.getCreateBackupPolicyMethod) == null) { + synchronized (NetAppGrpc.class) { + if ((getCreateBackupPolicyMethod = NetAppGrpc.getCreateBackupPolicyMethod) == null) { + NetAppGrpc.getCreateBackupPolicyMethod = + getCreateBackupPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateBackupPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.netapp.v1.CreateBackupPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new NetAppMethodDescriptorSupplier("CreateBackupPolicy")) + .build(); + } + } + } + return getCreateBackupPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.GetBackupPolicyRequest, + com.google.cloud.netapp.v1.BackupPolicy> + getGetBackupPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBackupPolicy", + requestType = com.google.cloud.netapp.v1.GetBackupPolicyRequest.class, + responseType = com.google.cloud.netapp.v1.BackupPolicy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.GetBackupPolicyRequest, + com.google.cloud.netapp.v1.BackupPolicy> + getGetBackupPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.GetBackupPolicyRequest, + com.google.cloud.netapp.v1.BackupPolicy> + getGetBackupPolicyMethod; + if ((getGetBackupPolicyMethod = NetAppGrpc.getGetBackupPolicyMethod) == null) { + synchronized (NetAppGrpc.class) { + if ((getGetBackupPolicyMethod = NetAppGrpc.getGetBackupPolicyMethod) == null) { + NetAppGrpc.getGetBackupPolicyMethod = + getGetBackupPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBackupPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.netapp.v1.GetBackupPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.netapp.v1.BackupPolicy.getDefaultInstance())) + .setSchemaDescriptor(new NetAppMethodDescriptorSupplier("GetBackupPolicy")) + .build(); + } + } + } + return getGetBackupPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.ListBackupPoliciesRequest, + com.google.cloud.netapp.v1.ListBackupPoliciesResponse> + getListBackupPoliciesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListBackupPolicies", + requestType = com.google.cloud.netapp.v1.ListBackupPoliciesRequest.class, + responseType = com.google.cloud.netapp.v1.ListBackupPoliciesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.ListBackupPoliciesRequest, + com.google.cloud.netapp.v1.ListBackupPoliciesResponse> + getListBackupPoliciesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.ListBackupPoliciesRequest, + com.google.cloud.netapp.v1.ListBackupPoliciesResponse> + getListBackupPoliciesMethod; + if ((getListBackupPoliciesMethod = NetAppGrpc.getListBackupPoliciesMethod) == null) { + synchronized (NetAppGrpc.class) { + if ((getListBackupPoliciesMethod = NetAppGrpc.getListBackupPoliciesMethod) == null) { + NetAppGrpc.getListBackupPoliciesMethod = + getListBackupPoliciesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListBackupPolicies")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.netapp.v1.ListBackupPoliciesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.netapp.v1.ListBackupPoliciesResponse + .getDefaultInstance())) + .setSchemaDescriptor(new NetAppMethodDescriptorSupplier("ListBackupPolicies")) + .build(); + } + } + } + return getListBackupPoliciesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.UpdateBackupPolicyRequest, com.google.longrunning.Operation> + getUpdateBackupPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateBackupPolicy", + requestType = com.google.cloud.netapp.v1.UpdateBackupPolicyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.UpdateBackupPolicyRequest, com.google.longrunning.Operation> + getUpdateBackupPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.UpdateBackupPolicyRequest, com.google.longrunning.Operation> + getUpdateBackupPolicyMethod; + if ((getUpdateBackupPolicyMethod = NetAppGrpc.getUpdateBackupPolicyMethod) == null) { + synchronized (NetAppGrpc.class) { + if ((getUpdateBackupPolicyMethod = NetAppGrpc.getUpdateBackupPolicyMethod) == null) { + NetAppGrpc.getUpdateBackupPolicyMethod = + getUpdateBackupPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateBackupPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.netapp.v1.UpdateBackupPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new NetAppMethodDescriptorSupplier("UpdateBackupPolicy")) + .build(); + } + } + } + return getUpdateBackupPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.DeleteBackupPolicyRequest, com.google.longrunning.Operation> + getDeleteBackupPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteBackupPolicy", + requestType = com.google.cloud.netapp.v1.DeleteBackupPolicyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.DeleteBackupPolicyRequest, com.google.longrunning.Operation> + getDeleteBackupPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.netapp.v1.DeleteBackupPolicyRequest, com.google.longrunning.Operation> + getDeleteBackupPolicyMethod; + if ((getDeleteBackupPolicyMethod = NetAppGrpc.getDeleteBackupPolicyMethod) == null) { + synchronized (NetAppGrpc.class) { + if ((getDeleteBackupPolicyMethod = NetAppGrpc.getDeleteBackupPolicyMethod) == null) { + NetAppGrpc.getDeleteBackupPolicyMethod = + getDeleteBackupPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteBackupPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.netapp.v1.DeleteBackupPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new NetAppMethodDescriptorSupplier("DeleteBackupPolicy")) + .build(); + } + } + } + return getDeleteBackupPolicyMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static NetAppStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -2120,36 +2760,251 @@ default void stopReplication( com.google.cloud.netapp.v1.StopReplicationRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getStopReplicationMethod(), responseObserver); + getStopReplicationMethod(), responseObserver); + } + + /** + * + * + *
+     * Resume Cross Region Replication.
+     * 
+ */ + default void resumeReplication( + com.google.cloud.netapp.v1.ResumeReplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getResumeReplicationMethod(), responseObserver); + } + + /** + * + * + *
+     * Reverses direction of replication. Source becomes destination and
+     * destination becomes source.
+     * 
+ */ + default void reverseReplicationDirection( + com.google.cloud.netapp.v1.ReverseReplicationDirectionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getReverseReplicationDirectionMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates new backup vault
+     * 
+ */ + default void createBackupVault( + com.google.cloud.netapp.v1.CreateBackupVaultRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateBackupVaultMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns the description of the specified backup vault
+     * 
+ */ + default void getBackupVault( + com.google.cloud.netapp.v1.GetBackupVaultRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetBackupVaultMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns list of all available backup vaults.
+     * 
+ */ + default void listBackupVaults( + com.google.cloud.netapp.v1.ListBackupVaultsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListBackupVaultsMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the settings of a specific backup vault.
+     * 
+ */ + default void updateBackupVault( + com.google.cloud.netapp.v1.UpdateBackupVaultRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateBackupVaultMethod(), responseObserver); + } + + /** + * + * + *
+     * Warning! This operation will permanently delete the backup vault.
+     * 
+ */ + default void deleteBackupVault( + com.google.cloud.netapp.v1.DeleteBackupVaultRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteBackupVaultMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a backup from the volume specified in the request
+     * The backup can be created from the given snapshot if specified in the
+     * request. If no snapshot specified, there'll be a new snapshot taken to
+     * initiate the backup creation.
+     * 
+ */ + default void createBackup( + com.google.cloud.netapp.v1.CreateBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateBackupMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns the description of the specified backup
+     * 
+ */ + default void getBackup( + com.google.cloud.netapp.v1.GetBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBackupMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns descriptions of all backups for a backupVault.
+     * 
+ */ + default void listBackups( + com.google.cloud.netapp.v1.ListBackupsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListBackupsMethod(), responseObserver); + } + + /** + * + * + *
+     * Warning! This operation will permanently delete the backup.
+     * 
+ */ + default void deleteBackup( + com.google.cloud.netapp.v1.DeleteBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteBackupMethod(), responseObserver); + } + + /** + * + * + *
+     * Update backup with full spec.
+     * 
+ */ + default void updateBackup( + com.google.cloud.netapp.v1.UpdateBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateBackupMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates new backup policy
+     * 
+ */ + default void createBackupPolicy( + com.google.cloud.netapp.v1.CreateBackupPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateBackupPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns the description of the specified backup policy by backup_policy_id.
+     * 
+ */ + default void getBackupPolicy( + com.google.cloud.netapp.v1.GetBackupPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetBackupPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns list of all available backup policies.
+     * 
+ */ + default void listBackupPolicies( + com.google.cloud.netapp.v1.ListBackupPoliciesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListBackupPoliciesMethod(), responseObserver); } /** * * *
-     * Resume Cross Region Replication.
+     * Updates settings of a specific backup policy.
      * 
*/ - default void resumeReplication( - com.google.cloud.netapp.v1.ResumeReplicationRequest request, + default void updateBackupPolicy( + com.google.cloud.netapp.v1.UpdateBackupPolicyRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getResumeReplicationMethod(), responseObserver); + getUpdateBackupPolicyMethod(), responseObserver); } /** * * *
-     * Reverses direction of replication. Source becomes destination and
-     * destination becomes source.
+     * Warning! This operation will permanently delete the backup policy.
      * 
*/ - default void reverseReplicationDirection( - com.google.cloud.netapp.v1.ReverseReplicationDirectionRequest request, + default void deleteBackupPolicy( + com.google.cloud.netapp.v1.DeleteBackupPolicyRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getReverseReplicationDirectionMethod(), responseObserver); + getDeleteBackupPolicyMethod(), responseObserver); } } @@ -2517,11 +3372,256 @@ public void updateActiveDirectory( * Delete the active directory specified in the request. * */ - public void deleteActiveDirectory( - com.google.cloud.netapp.v1.DeleteActiveDirectoryRequest request, + public void deleteActiveDirectory( + com.google.cloud.netapp.v1.DeleteActiveDirectoryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteActiveDirectoryMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns descriptions of all KMS configs owned by the caller.
+     * 
+ */ + public void listKmsConfigs( + com.google.cloud.netapp.v1.ListKmsConfigsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListKmsConfigsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new KMS config.
+     * 
+ */ + public void createKmsConfig( + com.google.cloud.netapp.v1.CreateKmsConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateKmsConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns the description of the specified KMS config by kms_config_id.
+     * 
+ */ + public void getKmsConfig( + com.google.cloud.netapp.v1.GetKmsConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetKmsConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the Kms config properties with the full spec
+     * 
+ */ + public void updateKmsConfig( + com.google.cloud.netapp.v1.UpdateKmsConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateKmsConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Encrypt the existing volumes without CMEK encryption with the desired the
+     * KMS config for the whole region.
+     * 
+ */ + public void encryptVolumes( + com.google.cloud.netapp.v1.EncryptVolumesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getEncryptVolumesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Verifies KMS config reachability.
+     * 
+ */ + public void verifyKmsConfig( + com.google.cloud.netapp.v1.VerifyKmsConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getVerifyKmsConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Warning! This operation will permanently delete the Kms config.
+     * 
+ */ + public void deleteKmsConfig( + com.google.cloud.netapp.v1.DeleteKmsConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteKmsConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns descriptions of all replications for a volume.
+     * 
+ */ + public void listReplications( + com.google.cloud.netapp.v1.ListReplicationsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListReplicationsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Describe a replication for a volume.
+     * 
+ */ + public void getReplication( + com.google.cloud.netapp.v1.GetReplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetReplicationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Create a new replication for a volume.
+     * 
+ */ + public void createReplication( + com.google.cloud.netapp.v1.CreateReplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateReplicationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a replication.
+     * 
+ */ + public void deleteReplication( + com.google.cloud.netapp.v1.DeleteReplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteReplicationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the settings of a specific replication.
+     * 
+ */ + public void updateReplication( + com.google.cloud.netapp.v1.UpdateReplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateReplicationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Stop Cross Region Replication.
+     * 
+ */ + public void stopReplication( + com.google.cloud.netapp.v1.StopReplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getStopReplicationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Resume Cross Region Replication.
+     * 
+ */ + public void resumeReplication( + com.google.cloud.netapp.v1.ResumeReplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getResumeReplicationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Reverses direction of replication. Source becomes destination and
+     * destination becomes source.
+     * 
+ */ + public void reverseReplicationDirection( + com.google.cloud.netapp.v1.ReverseReplicationDirectionRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteActiveDirectoryMethod(), getCallOptions()), + getChannel().newCall(getReverseReplicationDirectionMethod(), getCallOptions()), request, responseObserver); } @@ -2530,15 +3630,14 @@ public void deleteActiveDirectory( * * *
-     * Returns descriptions of all KMS configs owned by the caller.
+     * Creates new backup vault
      * 
*/ - public void listKmsConfigs( - com.google.cloud.netapp.v1.ListKmsConfigsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { + public void createBackupVault( + com.google.cloud.netapp.v1.CreateBackupVaultRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListKmsConfigsMethod(), getCallOptions()), + getChannel().newCall(getCreateBackupVaultMethod(), getCallOptions()), request, responseObserver); } @@ -2547,14 +3646,14 @@ public void listKmsConfigs( * * *
-     * Creates a new KMS config.
+     * Returns the description of the specified backup vault
      * 
*/ - public void createKmsConfig( - com.google.cloud.netapp.v1.CreateKmsConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void getBackupVault( + com.google.cloud.netapp.v1.GetBackupVaultRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateKmsConfigMethod(), getCallOptions()), + getChannel().newCall(getGetBackupVaultMethod(), getCallOptions()), request, responseObserver); } @@ -2563,14 +3662,15 @@ public void createKmsConfig( * * *
-     * Returns the description of the specified KMS config by kms_config_id.
+     * Returns list of all available backup vaults.
      * 
*/ - public void getKmsConfig( - com.google.cloud.netapp.v1.GetKmsConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void listBackupVaults( + com.google.cloud.netapp.v1.ListBackupVaultsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetKmsConfigMethod(), getCallOptions()), + getChannel().newCall(getListBackupVaultsMethod(), getCallOptions()), request, responseObserver); } @@ -2579,14 +3679,14 @@ public void getKmsConfig( * * *
-     * Updates the Kms config properties with the full spec
+     * Updates the settings of a specific backup vault.
      * 
*/ - public void updateKmsConfig( - com.google.cloud.netapp.v1.UpdateKmsConfigRequest request, + public void updateBackupVault( + com.google.cloud.netapp.v1.UpdateBackupVaultRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateKmsConfigMethod(), getCallOptions()), + getChannel().newCall(getUpdateBackupVaultMethod(), getCallOptions()), request, responseObserver); } @@ -2595,15 +3695,14 @@ public void updateKmsConfig( * * *
-     * Encrypt the existing volumes without CMEK encryption with the desired the
-     * KMS config for the whole region.
+     * Warning! This operation will permanently delete the backup vault.
      * 
*/ - public void encryptVolumes( - com.google.cloud.netapp.v1.EncryptVolumesRequest request, + public void deleteBackupVault( + com.google.cloud.netapp.v1.DeleteBackupVaultRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getEncryptVolumesMethod(), getCallOptions()), + getChannel().newCall(getDeleteBackupVaultMethod(), getCallOptions()), request, responseObserver); } @@ -2612,15 +3711,17 @@ public void encryptVolumes( * * *
-     * Verifies KMS config reachability.
+     * Creates a backup from the volume specified in the request
+     * The backup can be created from the given snapshot if specified in the
+     * request. If no snapshot specified, there'll be a new snapshot taken to
+     * initiate the backup creation.
      * 
*/ - public void verifyKmsConfig( - com.google.cloud.netapp.v1.VerifyKmsConfigRequest request, - io.grpc.stub.StreamObserver - responseObserver) { + public void createBackup( + com.google.cloud.netapp.v1.CreateBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getVerifyKmsConfigMethod(), getCallOptions()), + getChannel().newCall(getCreateBackupMethod(), getCallOptions()), request, responseObserver); } @@ -2629,31 +3730,29 @@ public void verifyKmsConfig( * * *
-     * Warning! This operation will permanently delete the Kms config.
+     * Returns the description of the specified backup
      * 
*/ - public void deleteKmsConfig( - com.google.cloud.netapp.v1.DeleteKmsConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void getBackup( + com.google.cloud.netapp.v1.GetBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteKmsConfigMethod(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getGetBackupMethod(), getCallOptions()), request, responseObserver); } /** * * *
-     * Returns descriptions of all replications for a volume.
+     * Returns descriptions of all backups for a backupVault.
      * 
*/ - public void listReplications( - com.google.cloud.netapp.v1.ListReplicationsRequest request, - io.grpc.stub.StreamObserver + public void listBackups( + com.google.cloud.netapp.v1.ListBackupsRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListReplicationsMethod(), getCallOptions()), + getChannel().newCall(getListBackupsMethod(), getCallOptions()), request, responseObserver); } @@ -2662,14 +3761,14 @@ public void listReplications( * * *
-     * Describe a replication for a volume.
+     * Warning! This operation will permanently delete the backup.
      * 
*/ - public void getReplication( - com.google.cloud.netapp.v1.GetReplicationRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void deleteBackup( + com.google.cloud.netapp.v1.DeleteBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetReplicationMethod(), getCallOptions()), + getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), request, responseObserver); } @@ -2678,14 +3777,14 @@ public void getReplication( * * *
-     * Create a new replication for a volume.
+     * Update backup with full spec.
      * 
*/ - public void createReplication( - com.google.cloud.netapp.v1.CreateReplicationRequest request, + public void updateBackup( + com.google.cloud.netapp.v1.UpdateBackupRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateReplicationMethod(), getCallOptions()), + getChannel().newCall(getUpdateBackupMethod(), getCallOptions()), request, responseObserver); } @@ -2694,14 +3793,14 @@ public void createReplication( * * *
-     * Deletes a replication.
+     * Creates new backup policy
      * 
*/ - public void deleteReplication( - com.google.cloud.netapp.v1.DeleteReplicationRequest request, + public void createBackupPolicy( + com.google.cloud.netapp.v1.CreateBackupPolicyRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteReplicationMethod(), getCallOptions()), + getChannel().newCall(getCreateBackupPolicyMethod(), getCallOptions()), request, responseObserver); } @@ -2710,14 +3809,14 @@ public void deleteReplication( * * *
-     * Updates the settings of a specific replication.
+     * Returns the description of the specified backup policy by backup_policy_id.
      * 
*/ - public void updateReplication( - com.google.cloud.netapp.v1.UpdateReplicationRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void getBackupPolicy( + com.google.cloud.netapp.v1.GetBackupPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateReplicationMethod(), getCallOptions()), + getChannel().newCall(getGetBackupPolicyMethod(), getCallOptions()), request, responseObserver); } @@ -2726,14 +3825,15 @@ public void updateReplication( * * *
-     * Stop Cross Region Replication.
+     * Returns list of all available backup policies.
      * 
*/ - public void stopReplication( - com.google.cloud.netapp.v1.StopReplicationRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void listBackupPolicies( + com.google.cloud.netapp.v1.ListBackupPoliciesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getStopReplicationMethod(), getCallOptions()), + getChannel().newCall(getListBackupPoliciesMethod(), getCallOptions()), request, responseObserver); } @@ -2742,14 +3842,14 @@ public void stopReplication( * * *
-     * Resume Cross Region Replication.
+     * Updates settings of a specific backup policy.
      * 
*/ - public void resumeReplication( - com.google.cloud.netapp.v1.ResumeReplicationRequest request, + public void updateBackupPolicy( + com.google.cloud.netapp.v1.UpdateBackupPolicyRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getResumeReplicationMethod(), getCallOptions()), + getChannel().newCall(getUpdateBackupPolicyMethod(), getCallOptions()), request, responseObserver); } @@ -2758,15 +3858,14 @@ public void resumeReplication( * * *
-     * Reverses direction of replication. Source becomes destination and
-     * destination becomes source.
+     * Warning! This operation will permanently delete the backup policy.
      * 
*/ - public void reverseReplicationDirection( - com.google.cloud.netapp.v1.ReverseReplicationDirectionRequest request, + public void deleteBackupPolicy( + com.google.cloud.netapp.v1.DeleteBackupPolicyRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getReverseReplicationDirectionMethod(), getCallOptions()), + getChannel().newCall(getDeleteBackupPolicyMethod(), getCallOptions()), request, responseObserver); } @@ -3162,105 +4261,303 @@ public com.google.longrunning.Operation deleteKmsConfig( * * *
-     * Returns descriptions of all replications for a volume.
+     * Returns descriptions of all replications for a volume.
+     * 
+ */ + public com.google.cloud.netapp.v1.ListReplicationsResponse listReplications( + com.google.cloud.netapp.v1.ListReplicationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListReplicationsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Describe a replication for a volume.
+     * 
+ */ + public com.google.cloud.netapp.v1.Replication getReplication( + com.google.cloud.netapp.v1.GetReplicationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetReplicationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create a new replication for a volume.
+     * 
+ */ + public com.google.longrunning.Operation createReplication( + com.google.cloud.netapp.v1.CreateReplicationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateReplicationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a replication.
+     * 
+ */ + public com.google.longrunning.Operation deleteReplication( + com.google.cloud.netapp.v1.DeleteReplicationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteReplicationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the settings of a specific replication.
+     * 
+ */ + public com.google.longrunning.Operation updateReplication( + com.google.cloud.netapp.v1.UpdateReplicationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateReplicationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Stop Cross Region Replication.
+     * 
+ */ + public com.google.longrunning.Operation stopReplication( + com.google.cloud.netapp.v1.StopReplicationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getStopReplicationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Resume Cross Region Replication.
+     * 
+ */ + public com.google.longrunning.Operation resumeReplication( + com.google.cloud.netapp.v1.ResumeReplicationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getResumeReplicationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Reverses direction of replication. Source becomes destination and
+     * destination becomes source.
+     * 
+ */ + public com.google.longrunning.Operation reverseReplicationDirection( + com.google.cloud.netapp.v1.ReverseReplicationDirectionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getReverseReplicationDirectionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates new backup vault
+     * 
+ */ + public com.google.longrunning.Operation createBackupVault( + com.google.cloud.netapp.v1.CreateBackupVaultRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateBackupVaultMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns the description of the specified backup vault
+     * 
+ */ + public com.google.cloud.netapp.v1.BackupVault getBackupVault( + com.google.cloud.netapp.v1.GetBackupVaultRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBackupVaultMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns list of all available backup vaults.
+     * 
+ */ + public com.google.cloud.netapp.v1.ListBackupVaultsResponse listBackupVaults( + com.google.cloud.netapp.v1.ListBackupVaultsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListBackupVaultsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the settings of a specific backup vault.
+     * 
+ */ + public com.google.longrunning.Operation updateBackupVault( + com.google.cloud.netapp.v1.UpdateBackupVaultRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateBackupVaultMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Warning! This operation will permanently delete the backup vault.
+     * 
+ */ + public com.google.longrunning.Operation deleteBackupVault( + com.google.cloud.netapp.v1.DeleteBackupVaultRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteBackupVaultMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a backup from the volume specified in the request
+     * The backup can be created from the given snapshot if specified in the
+     * request. If no snapshot specified, there'll be a new snapshot taken to
+     * initiate the backup creation.
+     * 
+ */ + public com.google.longrunning.Operation createBackup( + com.google.cloud.netapp.v1.CreateBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateBackupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns the description of the specified backup
+     * 
+ */ + public com.google.cloud.netapp.v1.Backup getBackup( + com.google.cloud.netapp.v1.GetBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBackupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns descriptions of all backups for a backupVault.
      * 
*/ - public com.google.cloud.netapp.v1.ListReplicationsResponse listReplications( - com.google.cloud.netapp.v1.ListReplicationsRequest request) { + public com.google.cloud.netapp.v1.ListBackupsResponse listBackups( + com.google.cloud.netapp.v1.ListBackupsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListReplicationsMethod(), getCallOptions(), request); + getChannel(), getListBackupsMethod(), getCallOptions(), request); } /** * * *
-     * Describe a replication for a volume.
+     * Warning! This operation will permanently delete the backup.
      * 
*/ - public com.google.cloud.netapp.v1.Replication getReplication( - com.google.cloud.netapp.v1.GetReplicationRequest request) { + public com.google.longrunning.Operation deleteBackup( + com.google.cloud.netapp.v1.DeleteBackupRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetReplicationMethod(), getCallOptions(), request); + getChannel(), getDeleteBackupMethod(), getCallOptions(), request); } /** * * *
-     * Create a new replication for a volume.
+     * Update backup with full spec.
      * 
*/ - public com.google.longrunning.Operation createReplication( - com.google.cloud.netapp.v1.CreateReplicationRequest request) { + public com.google.longrunning.Operation updateBackup( + com.google.cloud.netapp.v1.UpdateBackupRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateReplicationMethod(), getCallOptions(), request); + getChannel(), getUpdateBackupMethod(), getCallOptions(), request); } /** * * *
-     * Deletes a replication.
+     * Creates new backup policy
      * 
*/ - public com.google.longrunning.Operation deleteReplication( - com.google.cloud.netapp.v1.DeleteReplicationRequest request) { + public com.google.longrunning.Operation createBackupPolicy( + com.google.cloud.netapp.v1.CreateBackupPolicyRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteReplicationMethod(), getCallOptions(), request); + getChannel(), getCreateBackupPolicyMethod(), getCallOptions(), request); } /** * * *
-     * Updates the settings of a specific replication.
+     * Returns the description of the specified backup policy by backup_policy_id.
      * 
*/ - public com.google.longrunning.Operation updateReplication( - com.google.cloud.netapp.v1.UpdateReplicationRequest request) { + public com.google.cloud.netapp.v1.BackupPolicy getBackupPolicy( + com.google.cloud.netapp.v1.GetBackupPolicyRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateReplicationMethod(), getCallOptions(), request); + getChannel(), getGetBackupPolicyMethod(), getCallOptions(), request); } /** * * *
-     * Stop Cross Region Replication.
+     * Returns list of all available backup policies.
      * 
*/ - public com.google.longrunning.Operation stopReplication( - com.google.cloud.netapp.v1.StopReplicationRequest request) { + public com.google.cloud.netapp.v1.ListBackupPoliciesResponse listBackupPolicies( + com.google.cloud.netapp.v1.ListBackupPoliciesRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getStopReplicationMethod(), getCallOptions(), request); + getChannel(), getListBackupPoliciesMethod(), getCallOptions(), request); } /** * * *
-     * Resume Cross Region Replication.
+     * Updates settings of a specific backup policy.
      * 
*/ - public com.google.longrunning.Operation resumeReplication( - com.google.cloud.netapp.v1.ResumeReplicationRequest request) { + public com.google.longrunning.Operation updateBackupPolicy( + com.google.cloud.netapp.v1.UpdateBackupPolicyRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getResumeReplicationMethod(), getCallOptions(), request); + getChannel(), getUpdateBackupPolicyMethod(), getCallOptions(), request); } /** * * *
-     * Reverses direction of replication. Source becomes destination and
-     * destination becomes source.
+     * Warning! This operation will permanently delete the backup policy.
      * 
*/ - public com.google.longrunning.Operation reverseReplicationDirection( - com.google.cloud.netapp.v1.ReverseReplicationDirectionRequest request) { + public com.google.longrunning.Operation deleteBackupPolicy( + com.google.cloud.netapp.v1.DeleteBackupPolicyRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getReverseReplicationDirectionMethod(), getCallOptions(), request); + getChannel(), getDeleteBackupPolicyMethod(), getCallOptions(), request); } } @@ -3765,6 +5062,209 @@ protected NetAppFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions ca return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getReverseReplicationDirectionMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Creates new backup vault
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createBackupVault(com.google.cloud.netapp.v1.CreateBackupVaultRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateBackupVaultMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns the description of the specified backup vault
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.netapp.v1.BackupVault> + getBackupVault(com.google.cloud.netapp.v1.GetBackupVaultRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetBackupVaultMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns list of all available backup vaults.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.netapp.v1.ListBackupVaultsResponse> + listBackupVaults(com.google.cloud.netapp.v1.ListBackupVaultsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListBackupVaultsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the settings of a specific backup vault.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateBackupVault(com.google.cloud.netapp.v1.UpdateBackupVaultRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateBackupVaultMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Warning! This operation will permanently delete the backup vault.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteBackupVault(com.google.cloud.netapp.v1.DeleteBackupVaultRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteBackupVaultMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a backup from the volume specified in the request
+     * The backup can be created from the given snapshot if specified in the
+     * request. If no snapshot specified, there'll be a new snapshot taken to
+     * initiate the backup creation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createBackup(com.google.cloud.netapp.v1.CreateBackupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateBackupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns the description of the specified backup
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getBackup(com.google.cloud.netapp.v1.GetBackupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetBackupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns descriptions of all backups for a backupVault.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.netapp.v1.ListBackupsResponse> + listBackups(com.google.cloud.netapp.v1.ListBackupsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListBackupsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Warning! This operation will permanently delete the backup.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteBackup(com.google.cloud.netapp.v1.DeleteBackupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update backup with full spec.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateBackup(com.google.cloud.netapp.v1.UpdateBackupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateBackupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates new backup policy
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createBackupPolicy(com.google.cloud.netapp.v1.CreateBackupPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateBackupPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns the description of the specified backup policy by backup_policy_id.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.netapp.v1.BackupPolicy> + getBackupPolicy(com.google.cloud.netapp.v1.GetBackupPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetBackupPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns list of all available backup policies.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.netapp.v1.ListBackupPoliciesResponse> + listBackupPolicies(com.google.cloud.netapp.v1.ListBackupPoliciesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListBackupPoliciesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates settings of a specific backup policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateBackupPolicy(com.google.cloud.netapp.v1.UpdateBackupPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateBackupPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Warning! This operation will permanently delete the backup policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteBackupPolicy(com.google.cloud.netapp.v1.DeleteBackupPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteBackupPolicyMethod(), getCallOptions()), request); + } } private static final int METHODID_LIST_STORAGE_POOLS = 0; @@ -3803,6 +5303,21 @@ protected NetAppFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions ca private static final int METHODID_STOP_REPLICATION = 33; private static final int METHODID_RESUME_REPLICATION = 34; private static final int METHODID_REVERSE_REPLICATION_DIRECTION = 35; + private static final int METHODID_CREATE_BACKUP_VAULT = 36; + private static final int METHODID_GET_BACKUP_VAULT = 37; + private static final int METHODID_LIST_BACKUP_VAULTS = 38; + private static final int METHODID_UPDATE_BACKUP_VAULT = 39; + private static final int METHODID_DELETE_BACKUP_VAULT = 40; + private static final int METHODID_CREATE_BACKUP = 41; + private static final int METHODID_GET_BACKUP = 42; + private static final int METHODID_LIST_BACKUPS = 43; + private static final int METHODID_DELETE_BACKUP = 44; + private static final int METHODID_UPDATE_BACKUP = 45; + private static final int METHODID_CREATE_BACKUP_POLICY = 46; + private static final int METHODID_GET_BACKUP_POLICY = 47; + private static final int METHODID_LIST_BACKUP_POLICIES = 48; + private static final int METHODID_UPDATE_BACKUP_POLICY = 49; + private static final int METHODID_DELETE_BACKUP_POLICY = 50; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -4012,6 +5527,86 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.netapp.v1.ReverseReplicationDirectionRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_CREATE_BACKUP_VAULT: + serviceImpl.createBackupVault( + (com.google.cloud.netapp.v1.CreateBackupVaultRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_BACKUP_VAULT: + serviceImpl.getBackupVault( + (com.google.cloud.netapp.v1.GetBackupVaultRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_BACKUP_VAULTS: + serviceImpl.listBackupVaults( + (com.google.cloud.netapp.v1.ListBackupVaultsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_BACKUP_VAULT: + serviceImpl.updateBackupVault( + (com.google.cloud.netapp.v1.UpdateBackupVaultRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_BACKUP_VAULT: + serviceImpl.deleteBackupVault( + (com.google.cloud.netapp.v1.DeleteBackupVaultRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_BACKUP: + serviceImpl.createBackup( + (com.google.cloud.netapp.v1.CreateBackupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_BACKUP: + serviceImpl.getBackup( + (com.google.cloud.netapp.v1.GetBackupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_BACKUPS: + serviceImpl.listBackups( + (com.google.cloud.netapp.v1.ListBackupsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_BACKUP: + serviceImpl.deleteBackup( + (com.google.cloud.netapp.v1.DeleteBackupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_BACKUP: + serviceImpl.updateBackup( + (com.google.cloud.netapp.v1.UpdateBackupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_BACKUP_POLICY: + serviceImpl.createBackupPolicy( + (com.google.cloud.netapp.v1.CreateBackupPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_BACKUP_POLICY: + serviceImpl.getBackupPolicy( + (com.google.cloud.netapp.v1.GetBackupPolicyRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_BACKUP_POLICIES: + serviceImpl.listBackupPolicies( + (com.google.cloud.netapp.v1.ListBackupPoliciesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_BACKUP_POLICY: + serviceImpl.updateBackupPolicy( + (com.google.cloud.netapp.v1.UpdateBackupPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_BACKUP_POLICY: + serviceImpl.deleteBackupPolicy( + (com.google.cloud.netapp.v1.DeleteBackupPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -4255,6 +5850,99 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.netapp.v1.ReverseReplicationDirectionRequest, com.google.longrunning.Operation>( service, METHODID_REVERSE_REPLICATION_DIRECTION))) + .addMethod( + getCreateBackupVaultMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.netapp.v1.CreateBackupVaultRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_BACKUP_VAULT))) + .addMethod( + getGetBackupVaultMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.netapp.v1.GetBackupVaultRequest, + com.google.cloud.netapp.v1.BackupVault>(service, METHODID_GET_BACKUP_VAULT))) + .addMethod( + getListBackupVaultsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.netapp.v1.ListBackupVaultsRequest, + com.google.cloud.netapp.v1.ListBackupVaultsResponse>( + service, METHODID_LIST_BACKUP_VAULTS))) + .addMethod( + getUpdateBackupVaultMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.netapp.v1.UpdateBackupVaultRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_BACKUP_VAULT))) + .addMethod( + getDeleteBackupVaultMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.netapp.v1.DeleteBackupVaultRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_BACKUP_VAULT))) + .addMethod( + getCreateBackupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.netapp.v1.CreateBackupRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_BACKUP))) + .addMethod( + getGetBackupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.netapp.v1.GetBackupRequest, com.google.cloud.netapp.v1.Backup>( + service, METHODID_GET_BACKUP))) + .addMethod( + getListBackupsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.netapp.v1.ListBackupsRequest, + com.google.cloud.netapp.v1.ListBackupsResponse>( + service, METHODID_LIST_BACKUPS))) + .addMethod( + getDeleteBackupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.netapp.v1.DeleteBackupRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_BACKUP))) + .addMethod( + getUpdateBackupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.netapp.v1.UpdateBackupRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_BACKUP))) + .addMethod( + getCreateBackupPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.netapp.v1.CreateBackupPolicyRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_BACKUP_POLICY))) + .addMethod( + getGetBackupPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.netapp.v1.GetBackupPolicyRequest, + com.google.cloud.netapp.v1.BackupPolicy>(service, METHODID_GET_BACKUP_POLICY))) + .addMethod( + getListBackupPoliciesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.netapp.v1.ListBackupPoliciesRequest, + com.google.cloud.netapp.v1.ListBackupPoliciesResponse>( + service, METHODID_LIST_BACKUP_POLICIES))) + .addMethod( + getUpdateBackupPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.netapp.v1.UpdateBackupPolicyRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_BACKUP_POLICY))) + .addMethod( + getDeleteBackupPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.netapp.v1.DeleteBackupPolicyRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_BACKUP_POLICY))) .build(); } @@ -4340,6 +6028,21 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getStopReplicationMethod()) .addMethod(getResumeReplicationMethod()) .addMethod(getReverseReplicationDirectionMethod()) + .addMethod(getCreateBackupVaultMethod()) + .addMethod(getGetBackupVaultMethod()) + .addMethod(getListBackupVaultsMethod()) + .addMethod(getUpdateBackupVaultMethod()) + .addMethod(getDeleteBackupVaultMethod()) + .addMethod(getCreateBackupMethod()) + .addMethod(getGetBackupMethod()) + .addMethod(getListBackupsMethod()) + .addMethod(getDeleteBackupMethod()) + .addMethod(getUpdateBackupMethod()) + .addMethod(getCreateBackupPolicyMethod()) + .addMethod(getGetBackupPolicyMethod()) + .addMethod(getListBackupPoliciesMethod()) + .addMethod(getUpdateBackupPolicyMethod()) + .addMethod(getDeleteBackupPolicyMethod()) .build(); } } diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/AccessType.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/AccessType.java index d0a41f0b6dc7..88803ce46c2c 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/AccessType.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/AccessType.java @@ -18,7 +18,15 @@ package com.google.cloud.netapp.v1; -/** Protobuf enum {@code google.cloud.netapp.v1.AccessType} */ +/** + * + * + *
+ * AccessType is an enum of all the supported access types for a volume.
+ * 
+ * + * Protobuf enum {@code google.cloud.netapp.v1.AccessType} + */ public enum AccessType implements com.google.protobuf.ProtocolMessageEnum { /** * diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ActiveDirectory.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ActiveDirectory.java index 5453c6824443..dc9dabe888a1 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ActiveDirectory.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ActiveDirectory.java @@ -340,12 +340,12 @@ private State(int value) { * * *
-   * Output only. The resource name of the active directory.
+   * Identifier. The resource name of the active directory.
    * Format:
    * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`.
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -365,12 +365,12 @@ public java.lang.String getName() { * * *
-   * Output only. The resource name of the active directory.
+   * Identifier. The resource name of the active directory.
    * Format:
    * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`.
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -2231,12 +2231,12 @@ public Builder mergeFrom( * * *
-     * Output only. The resource name of the active directory.
+     * Identifier. The resource name of the active directory.
      * Format:
      * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -2255,12 +2255,12 @@ public java.lang.String getName() { * * *
-     * Output only. The resource name of the active directory.
+     * Identifier. The resource name of the active directory.
      * Format:
      * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -2279,12 +2279,12 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Output only. The resource name of the active directory.
+     * Identifier. The resource name of the active directory.
      * Format:
      * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @param value The name to set. * @return This builder for chaining. @@ -2302,12 +2302,12 @@ public Builder setName(java.lang.String value) { * * *
-     * Output only. The resource name of the active directory.
+     * Identifier. The resource name of the active directory.
      * Format:
      * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return This builder for chaining. */ @@ -2321,12 +2321,12 @@ public Builder clearName() { * * *
-     * Output only. The resource name of the active directory.
+     * Identifier. The resource name of the active directory.
      * Format:
      * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ActiveDirectoryOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ActiveDirectoryOrBuilder.java index a2ac36217640..917315bf846e 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ActiveDirectoryOrBuilder.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ActiveDirectoryOrBuilder.java @@ -27,12 +27,12 @@ public interface ActiveDirectoryOrBuilder * * *
-   * Output only. The resource name of the active directory.
+   * Identifier. The resource name of the active directory.
    * Format:
    * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`.
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -41,12 +41,12 @@ public interface ActiveDirectoryOrBuilder * * *
-   * Output only. The resource name of the active directory.
+   * Identifier. The resource name of the active directory.
    * Format:
    * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`.
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ActiveDirectoryProto.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ActiveDirectoryProto.java index 6cd31b4c0b0f..63189aea3940 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ActiveDirectoryProto.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ActiveDirectoryProto.java @@ -94,8 +94,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "y\030\002 \001(\0132\'.google.cloud.netapp.v1.ActiveD" + "irectoryB\004\342A\001\002\"\\\n\034DeleteActiveDirectoryR" + "equest\022<\n\004name\030\001 \001(\tB.\342A\001\002\372A\'\n%netapp.go" - + "ogleapis.com/ActiveDirectory\"\226\007\n\017ActiveD" - + "irectory\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\0225\n\013create_t" + + "ogleapis.com/ActiveDirectory\"\274\007\n\017ActiveD" + + "irectory\022\022\n\004name\030\001 \001(\tB\004\342A\001\010\0225\n\013create_t" + "ime\030\002 \001(\0132\032.google.protobuf.TimestampB\004\342" + "A\001\003\022B\n\005state\030\003 \001(\0162-.google.cloud.netapp" + ".v1.ActiveDirectory.StateB\004\342A\001\003\022\024\n\006domai" @@ -114,15 +114,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "lsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"" + "j\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREAT" + "ING\020\001\022\t\n\005READY\020\002\022\014\n\010UPDATING\020\003\022\n\n\006IN_USE" - + "\020\004\022\014\n\010DELETING\020\005\022\t\n\005ERROR\020\006:x\352Au\n%netapp" - + ".googleapis.com/ActiveDirectory\022Lproject" - + "s/{project}/locations/{location}/activeD" - + "irectories/{active_directory}B\266\001\n\032com.go" - + "ogle.cloud.netapp.v1B\024ActiveDirectoryPro" - + "toP\001Z2cloud.google.com/go/netapp/apiv1/n" - + "etapppb;netapppb\252\002\026Google.Cloud.NetApp.V" - + "1\312\002\026Google\\Cloud\\NetApp\\V1\352\002\031Google::Clo" - + "ud::NetApp::V1b\006proto3" + + "\020\004\022\014\n\010DELETING\020\005\022\t\n\005ERROR\020\006:\235\001\352A\231\001\n%neta" + + "pp.googleapis.com/ActiveDirectory\022Lproje" + + "cts/{project}/locations/{location}/activ" + + "eDirectories/{active_directory}*\021activeD" + + "irectories2\017activeDirectoryB\266\001\n\032com.goog" + + "le.cloud.netapp.v1B\024ActiveDirectoryProto" + + "P\001Z2cloud.google.com/go/netapp/apiv1/net" + + "apppb;netapppb\252\002\026Google.Cloud.NetApp.V1\312" + + "\002\026Google\\Cloud\\NetApp\\V1\352\002\031Google::Cloud" + + "::NetApp::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/Backup.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/Backup.java new file mode 100644 index 000000000000..43c27e98d49a --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/Backup.java @@ -0,0 +1,2818 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * A NetApp Backup.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.Backup} + */ +public final class Backup extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.Backup) + BackupOrBuilder { + private static final long serialVersionUID = 0L; + // Use Backup.newBuilder() to construct. + private Backup(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Backup() { + name_ = ""; + state_ = 0; + description_ = ""; + backupType_ = 0; + sourceVolume_ = ""; + sourceSnapshot_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Backup(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_Backup_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 9: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_Backup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.Backup.class, + com.google.cloud.netapp.v1.Backup.Builder.class); + } + + /** + * + * + *
+   * The Backup States
+   * 
+ * + * Protobuf enum {@code google.cloud.netapp.v1.Backup.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Backup is being created. While in this state, the snapshot for the backup
+     * point-in-time may not have been created yet, and so the point-in-time may
+     * not have been fixed.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * Backup is being uploaded. While in this state, none of the writes to the
+     * volume will be included in the backup.
+     * 
+ * + * UPLOADING = 2; + */ + UPLOADING(2), + /** + * + * + *
+     * Backup is available for use.
+     * 
+ * + * READY = 3; + */ + READY(3), + /** + * + * + *
+     * Backup is being deleted.
+     * 
+ * + * DELETING = 4; + */ + DELETING(4), + /** + * + * + *
+     * Backup is not valid and cannot be used for creating new volumes or
+     * restoring existing volumes.
+     * 
+ * + * ERROR = 5; + */ + ERROR(5), + /** + * + * + *
+     * Backup is being updated.
+     * 
+ * + * UPDATING = 6; + */ + UPDATING(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * State not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Backup is being created. While in this state, the snapshot for the backup
+     * point-in-time may not have been created yet, and so the point-in-time may
+     * not have been fixed.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + * + * + *
+     * Backup is being uploaded. While in this state, none of the writes to the
+     * volume will be included in the backup.
+     * 
+ * + * UPLOADING = 2; + */ + public static final int UPLOADING_VALUE = 2; + /** + * + * + *
+     * Backup is available for use.
+     * 
+ * + * READY = 3; + */ + public static final int READY_VALUE = 3; + /** + * + * + *
+     * Backup is being deleted.
+     * 
+ * + * DELETING = 4; + */ + public static final int DELETING_VALUE = 4; + /** + * + * + *
+     * Backup is not valid and cannot be used for creating new volumes or
+     * restoring existing volumes.
+     * 
+ * + * ERROR = 5; + */ + public static final int ERROR_VALUE = 5; + /** + * + * + *
+     * Backup is being updated.
+     * 
+ * + * UPDATING = 6; + */ + public static final int UPDATING_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return UPLOADING; + case 3: + return READY; + case 4: + return DELETING; + case 5: + return ERROR; + case 6: + return UPDATING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.netapp.v1.Backup.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.netapp.v1.Backup.State) + } + + /** + * + * + *
+   * Backup types.
+   * 
+ * + * Protobuf enum {@code google.cloud.netapp.v1.Backup.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified backup type.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Manual backup type.
+     * 
+ * + * MANUAL = 1; + */ + MANUAL(1), + /** + * + * + *
+     * Scheduled backup type.
+     * 
+ * + * SCHEDULED = 2; + */ + SCHEDULED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified backup type.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Manual backup type.
+     * 
+ * + * MANUAL = 1; + */ + public static final int MANUAL_VALUE = 1; + /** + * + * + *
+     * Scheduled backup type.
+     * 
+ * + * SCHEDULED = 2; + */ + public static final int SCHEDULED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return MANUAL; + case 2: + return SCHEDULED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.netapp.v1.Backup.getDescriptor().getEnumTypes().get(1); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.netapp.v1.Backup.Type) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Identifier. The resource name of the backup.
+   * Format:
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Identifier. The resource name of the backup.
+   * Format:
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 2; + private int state_ = 0; + /** + * + * + *
+   * Output only. The backup state.
+   * 
+ * + * + * .google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The backup state.
+   * 
+ * + * + * .google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.netapp.v1.Backup.State getState() { + com.google.cloud.netapp.v1.Backup.State result = + com.google.cloud.netapp.v1.Backup.State.forNumber(state_); + return result == null ? com.google.cloud.netapp.v1.Backup.State.UNRECOGNIZED : result; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * A description of the backup with 2048 characters or less.
+   * Requests with longer descriptions will be rejected.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * A description of the backup with 2048 characters or less.
+   * Requests with longer descriptions will be rejected.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VOLUME_USAGE_BYTES_FIELD_NUMBER = 4; + private long volumeUsageBytes_ = 0L; + /** + * + * + *
+   * Output only. Size of the file system when the backup was created. When
+   * creating a new volume from the backup, the volume capacity will have to be
+   * at least as big.
+   * 
+ * + * int64 volume_usage_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The volumeUsageBytes. + */ + @java.lang.Override + public long getVolumeUsageBytes() { + return volumeUsageBytes_; + } + + public static final int BACKUP_TYPE_FIELD_NUMBER = 5; + private int backupType_ = 0; + /** + * + * + *
+   * Output only. Type of backup, manually created or created by a backup
+   * policy.
+   * 
+ * + * + * .google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for backupType. + */ + @java.lang.Override + public int getBackupTypeValue() { + return backupType_; + } + /** + * + * + *
+   * Output only. Type of backup, manually created or created by a backup
+   * policy.
+   * 
+ * + * + * .google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupType. + */ + @java.lang.Override + public com.google.cloud.netapp.v1.Backup.Type getBackupType() { + com.google.cloud.netapp.v1.Backup.Type result = + com.google.cloud.netapp.v1.Backup.Type.forNumber(backupType_); + return result == null ? com.google.cloud.netapp.v1.Backup.Type.UNRECOGNIZED : result; + } + + public static final int SOURCE_VOLUME_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceVolume_ = ""; + /** + * + * + *
+   * Volume full name of this backup belongs to.
+   * Format:
+   * `projects/{projects_id}/locations/{location}/volumes/{volume_id}`
+   * 
+ * + * string source_volume = 6 [(.google.api.resource_reference) = { ... } + * + * @return The sourceVolume. + */ + @java.lang.Override + public java.lang.String getSourceVolume() { + java.lang.Object ref = sourceVolume_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceVolume_ = s; + return s; + } + } + /** + * + * + *
+   * Volume full name of this backup belongs to.
+   * Format:
+   * `projects/{projects_id}/locations/{location}/volumes/{volume_id}`
+   * 
+ * + * string source_volume = 6 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for sourceVolume. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceVolumeBytes() { + java.lang.Object ref = sourceVolume_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceVolume_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_SNAPSHOT_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceSnapshot_ = ""; + /** + * + * + *
+   * If specified, backup will be created from the given snapshot.
+   * If not specified, there will be a new snapshot taken to initiate the backup
+   * creation. Format:
+   * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`
+   * 
+ * + * optional string source_snapshot = 7 [(.google.api.resource_reference) = { ... } + * + * @return Whether the sourceSnapshot field is set. + */ + @java.lang.Override + public boolean hasSourceSnapshot() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * If specified, backup will be created from the given snapshot.
+   * If not specified, there will be a new snapshot taken to initiate the backup
+   * creation. Format:
+   * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`
+   * 
+ * + * optional string source_snapshot = 7 [(.google.api.resource_reference) = { ... } + * + * @return The sourceSnapshot. + */ + @java.lang.Override + public java.lang.String getSourceSnapshot() { + java.lang.Object ref = sourceSnapshot_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceSnapshot_ = s; + return s; + } + } + /** + * + * + *
+   * If specified, backup will be created from the given snapshot.
+   * If not specified, there will be a new snapshot taken to initiate the backup
+   * creation. Format:
+   * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`
+   * 
+ * + * optional string source_snapshot = 7 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for sourceSnapshot. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceSnapshotBytes() { + java.lang.Object ref = sourceSnapshot_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceSnapshot_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time when the backup was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time when the backup was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time when the backup was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int LABELS_FIELD_NUMBER = 9; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_Backup_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CHAIN_STORAGE_BYTES_FIELD_NUMBER = 10; + private long chainStorageBytes_ = 0L; + /** + * + * + *
+   * Output only. Total size of all backups in a chain in bytes = baseline
+   * backup size + sum(incremental backup size)
+   * 
+ * + * int64 chain_storage_bytes = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The chainStorageBytes. + */ + @java.lang.Override + public long getChainStorageBytes() { + return chainStorageBytes_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (state_ != com.google.cloud.netapp.v1.Backup.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (volumeUsageBytes_ != 0L) { + output.writeInt64(4, volumeUsageBytes_); + } + if (backupType_ != com.google.cloud.netapp.v1.Backup.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, backupType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceVolume_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sourceVolume_); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, sourceSnapshot_); + } + if (createTime_ != null) { + output.writeMessage(8, getCreateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 9); + if (chainStorageBytes_ != 0L) { + output.writeInt64(10, chainStorageBytes_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (state_ != com.google.cloud.netapp.v1.Backup.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (volumeUsageBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, volumeUsageBytes_); + } + if (backupType_ != com.google.cloud.netapp.v1.Backup.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, backupType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceVolume_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, sourceVolume_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, sourceSnapshot_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCreateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, labels__); + } + if (chainStorageBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(10, chainStorageBytes_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.Backup)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.Backup other = (com.google.cloud.netapp.v1.Backup) obj; + + if (!getName().equals(other.getName())) return false; + if (state_ != other.state_) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (getVolumeUsageBytes() != other.getVolumeUsageBytes()) return false; + if (backupType_ != other.backupType_) return false; + if (!getSourceVolume().equals(other.getSourceVolume())) return false; + if (hasSourceSnapshot() != other.hasSourceSnapshot()) return false; + if (hasSourceSnapshot()) { + if (!getSourceSnapshot().equals(other.getSourceSnapshot())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (getChainStorageBytes() != other.getChainStorageBytes()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + VOLUME_USAGE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getVolumeUsageBytes()); + hash = (37 * hash) + BACKUP_TYPE_FIELD_NUMBER; + hash = (53 * hash) + backupType_; + hash = (37 * hash) + SOURCE_VOLUME_FIELD_NUMBER; + hash = (53 * hash) + getSourceVolume().hashCode(); + if (hasSourceSnapshot()) { + hash = (37 * hash) + SOURCE_SNAPSHOT_FIELD_NUMBER; + hash = (53 * hash) + getSourceSnapshot().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + CHAIN_STORAGE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getChainStorageBytes()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.Backup parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.Backup parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.Backup parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.Backup parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.Backup parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.Backup parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.Backup parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.Backup parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.Backup parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.Backup parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.Backup parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.Backup parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.netapp.v1.Backup prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A NetApp Backup.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.Backup} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.Backup) + com.google.cloud.netapp.v1.BackupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_Backup_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 9: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 9: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_Backup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.Backup.class, + com.google.cloud.netapp.v1.Backup.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.Backup.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + state_ = 0; + description_ = ""; + volumeUsageBytes_ = 0L; + backupType_ = 0; + sourceVolume_ = ""; + sourceSnapshot_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + chainStorageBytes_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_Backup_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.Backup getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.Backup.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.Backup build() { + com.google.cloud.netapp.v1.Backup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.Backup buildPartial() { + com.google.cloud.netapp.v1.Backup result = new com.google.cloud.netapp.v1.Backup(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.netapp.v1.Backup result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.volumeUsageBytes_ = volumeUsageBytes_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.backupType_ = backupType_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.sourceVolume_ = sourceVolume_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.sourceSnapshot_ = sourceSnapshot_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.chainStorageBytes_ = chainStorageBytes_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.Backup) { + return mergeFrom((com.google.cloud.netapp.v1.Backup) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.Backup other) { + if (other == com.google.cloud.netapp.v1.Backup.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getVolumeUsageBytes() != 0L) { + setVolumeUsageBytes(other.getVolumeUsageBytes()); + } + if (other.backupType_ != 0) { + setBackupTypeValue(other.getBackupTypeValue()); + } + if (!other.getSourceVolume().isEmpty()) { + sourceVolume_ = other.sourceVolume_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasSourceSnapshot()) { + sourceSnapshot_ = other.sourceSnapshot_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000100; + if (other.getChainStorageBytes() != 0L) { + setChainStorageBytes(other.getChainStorageBytes()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + volumeUsageBytes_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + backupType_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + sourceVolume_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + sourceSnapshot_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 80: + { + chainStorageBytes_ = input.readInt64(); + bitField0_ |= 0x00000200; + break; + } // case 80 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Identifier. The resource name of the backup.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Identifier. The resource name of the backup.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Identifier. The resource name of the backup.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Identifier. The resource name of the backup.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Identifier. The resource name of the backup.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The backup state.
+     * 
+ * + * + * .google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The backup state.
+     * 
+ * + * + * .google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The backup state.
+     * 
+ * + * + * .google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.netapp.v1.Backup.State getState() { + com.google.cloud.netapp.v1.Backup.State result = + com.google.cloud.netapp.v1.Backup.State.forNumber(state_); + return result == null ? com.google.cloud.netapp.v1.Backup.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The backup state.
+     * 
+ * + * + * .google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.netapp.v1.Backup.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The backup state.
+     * 
+ * + * + * .google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000002); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A description of the backup with 2048 characters or less.
+     * Requests with longer descriptions will be rejected.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A description of the backup with 2048 characters or less.
+     * Requests with longer descriptions will be rejected.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A description of the backup with 2048 characters or less.
+     * Requests with longer descriptions will be rejected.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A description of the backup with 2048 characters or less.
+     * Requests with longer descriptions will be rejected.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A description of the backup with 2048 characters or less.
+     * Requests with longer descriptions will be rejected.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private long volumeUsageBytes_; + /** + * + * + *
+     * Output only. Size of the file system when the backup was created. When
+     * creating a new volume from the backup, the volume capacity will have to be
+     * at least as big.
+     * 
+ * + * int64 volume_usage_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The volumeUsageBytes. + */ + @java.lang.Override + public long getVolumeUsageBytes() { + return volumeUsageBytes_; + } + /** + * + * + *
+     * Output only. Size of the file system when the backup was created. When
+     * creating a new volume from the backup, the volume capacity will have to be
+     * at least as big.
+     * 
+ * + * int64 volume_usage_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The volumeUsageBytes to set. + * @return This builder for chaining. + */ + public Builder setVolumeUsageBytes(long value) { + + volumeUsageBytes_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Size of the file system when the backup was created. When
+     * creating a new volume from the backup, the volume capacity will have to be
+     * at least as big.
+     * 
+ * + * int64 volume_usage_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVolumeUsageBytes() { + bitField0_ = (bitField0_ & ~0x00000008); + volumeUsageBytes_ = 0L; + onChanged(); + return this; + } + + private int backupType_ = 0; + /** + * + * + *
+     * Output only. Type of backup, manually created or created by a backup
+     * policy.
+     * 
+ * + * + * .google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for backupType. + */ + @java.lang.Override + public int getBackupTypeValue() { + return backupType_; + } + /** + * + * + *
+     * Output only. Type of backup, manually created or created by a backup
+     * policy.
+     * 
+ * + * + * .google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for backupType to set. + * @return This builder for chaining. + */ + public Builder setBackupTypeValue(int value) { + backupType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Type of backup, manually created or created by a backup
+     * policy.
+     * 
+ * + * + * .google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupType. + */ + @java.lang.Override + public com.google.cloud.netapp.v1.Backup.Type getBackupType() { + com.google.cloud.netapp.v1.Backup.Type result = + com.google.cloud.netapp.v1.Backup.Type.forNumber(backupType_); + return result == null ? com.google.cloud.netapp.v1.Backup.Type.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. Type of backup, manually created or created by a backup
+     * policy.
+     * 
+ * + * + * .google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The backupType to set. + * @return This builder for chaining. + */ + public Builder setBackupType(com.google.cloud.netapp.v1.Backup.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + backupType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Type of backup, manually created or created by a backup
+     * policy.
+     * 
+ * + * + * .google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearBackupType() { + bitField0_ = (bitField0_ & ~0x00000010); + backupType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object sourceVolume_ = ""; + /** + * + * + *
+     * Volume full name of this backup belongs to.
+     * Format:
+     * `projects/{projects_id}/locations/{location}/volumes/{volume_id}`
+     * 
+ * + * string source_volume = 6 [(.google.api.resource_reference) = { ... } + * + * @return The sourceVolume. + */ + public java.lang.String getSourceVolume() { + java.lang.Object ref = sourceVolume_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceVolume_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Volume full name of this backup belongs to.
+     * Format:
+     * `projects/{projects_id}/locations/{location}/volumes/{volume_id}`
+     * 
+ * + * string source_volume = 6 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for sourceVolume. + */ + public com.google.protobuf.ByteString getSourceVolumeBytes() { + java.lang.Object ref = sourceVolume_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceVolume_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Volume full name of this backup belongs to.
+     * Format:
+     * `projects/{projects_id}/locations/{location}/volumes/{volume_id}`
+     * 
+ * + * string source_volume = 6 [(.google.api.resource_reference) = { ... } + * + * @param value The sourceVolume to set. + * @return This builder for chaining. + */ + public Builder setSourceVolume(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceVolume_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Volume full name of this backup belongs to.
+     * Format:
+     * `projects/{projects_id}/locations/{location}/volumes/{volume_id}`
+     * 
+ * + * string source_volume = 6 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearSourceVolume() { + sourceVolume_ = getDefaultInstance().getSourceVolume(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Volume full name of this backup belongs to.
+     * Format:
+     * `projects/{projects_id}/locations/{location}/volumes/{volume_id}`
+     * 
+ * + * string source_volume = 6 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for sourceVolume to set. + * @return This builder for chaining. + */ + public Builder setSourceVolumeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceVolume_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object sourceSnapshot_ = ""; + /** + * + * + *
+     * If specified, backup will be created from the given snapshot.
+     * If not specified, there will be a new snapshot taken to initiate the backup
+     * creation. Format:
+     * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`
+     * 
+ * + * optional string source_snapshot = 7 [(.google.api.resource_reference) = { ... } + * + * @return Whether the sourceSnapshot field is set. + */ + public boolean hasSourceSnapshot() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * If specified, backup will be created from the given snapshot.
+     * If not specified, there will be a new snapshot taken to initiate the backup
+     * creation. Format:
+     * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`
+     * 
+ * + * optional string source_snapshot = 7 [(.google.api.resource_reference) = { ... } + * + * @return The sourceSnapshot. + */ + public java.lang.String getSourceSnapshot() { + java.lang.Object ref = sourceSnapshot_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceSnapshot_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * If specified, backup will be created from the given snapshot.
+     * If not specified, there will be a new snapshot taken to initiate the backup
+     * creation. Format:
+     * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`
+     * 
+ * + * optional string source_snapshot = 7 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for sourceSnapshot. + */ + public com.google.protobuf.ByteString getSourceSnapshotBytes() { + java.lang.Object ref = sourceSnapshot_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceSnapshot_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * If specified, backup will be created from the given snapshot.
+     * If not specified, there will be a new snapshot taken to initiate the backup
+     * creation. Format:
+     * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`
+     * 
+ * + * optional string source_snapshot = 7 [(.google.api.resource_reference) = { ... } + * + * @param value The sourceSnapshot to set. + * @return This builder for chaining. + */ + public Builder setSourceSnapshot(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceSnapshot_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * If specified, backup will be created from the given snapshot.
+     * If not specified, there will be a new snapshot taken to initiate the backup
+     * creation. Format:
+     * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`
+     * 
+ * + * optional string source_snapshot = 7 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearSourceSnapshot() { + sourceSnapshot_ = getDefaultInstance().getSourceSnapshot(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * If specified, backup will be created from the given snapshot.
+     * If not specified, there will be a new snapshot taken to initiate the backup
+     * creation. Format:
+     * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`
+     * 
+ * + * optional string source_snapshot = 7 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for sourceSnapshot to set. + * @return This builder for chaining. + */ + public Builder setSourceSnapshotBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceSnapshot_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time when the backup was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Output only. The time when the backup was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time when the backup was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the backup was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the backup was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the backup was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the backup was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time when the backup was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time when the backup was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000100; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Resource labels to represent user provided metadata.
+     * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Resource labels to represent user provided metadata.
+     * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Resource labels to represent user provided metadata.
+     * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Resource labels to represent user provided metadata.
+     * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000100); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Resource labels to represent user provided metadata.
+     * 
+ * + * map<string, string> labels = 9; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000100; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Resource labels to represent user provided metadata.
+     * 
+ * + * map<string, string> labels = 9; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000100; + return this; + } + /** + * + * + *
+     * Resource labels to represent user provided metadata.
+     * 
+ * + * map<string, string> labels = 9; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000100; + return this; + } + + private long chainStorageBytes_; + /** + * + * + *
+     * Output only. Total size of all backups in a chain in bytes = baseline
+     * backup size + sum(incremental backup size)
+     * 
+ * + * int64 chain_storage_bytes = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The chainStorageBytes. + */ + @java.lang.Override + public long getChainStorageBytes() { + return chainStorageBytes_; + } + /** + * + * + *
+     * Output only. Total size of all backups in a chain in bytes = baseline
+     * backup size + sum(incremental backup size)
+     * 
+ * + * int64 chain_storage_bytes = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The chainStorageBytes to set. + * @return This builder for chaining. + */ + public Builder setChainStorageBytes(long value) { + + chainStorageBytes_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Total size of all backups in a chain in bytes = baseline
+     * backup size + sum(incremental backup size)
+     * 
+ * + * int64 chain_storage_bytes = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearChainStorageBytes() { + bitField0_ = (bitField0_ & ~0x00000200); + chainStorageBytes_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.Backup) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.Backup) + private static final com.google.cloud.netapp.v1.Backup DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.Backup(); + } + + public static com.google.cloud.netapp.v1.Backup getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Backup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.Backup getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupConfig.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupConfig.java new file mode 100644 index 000000000000..392eb7c8275c --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupConfig.java @@ -0,0 +1,1110 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/volume.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * BackupConfig contains backup related config on a volume.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.BackupConfig} + */ +public final class BackupConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.BackupConfig) + BackupConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use BackupConfig.newBuilder() to construct. + private BackupConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BackupConfig() { + backupPolicies_ = com.google.protobuf.LazyStringArrayList.emptyList(); + backupVault_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BackupConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.VolumeProto + .internal_static_google_cloud_netapp_v1_BackupConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.VolumeProto + .internal_static_google_cloud_netapp_v1_BackupConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.BackupConfig.class, + com.google.cloud.netapp.v1.BackupConfig.Builder.class); + } + + private int bitField0_; + public static final int BACKUP_POLICIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList backupPolicies_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. When specified, schedule backups will be created based on the
+   * policy configuration.
+   * 
+ * + * + * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the backupPolicies. + */ + public com.google.protobuf.ProtocolStringList getBackupPoliciesList() { + return backupPolicies_; + } + /** + * + * + *
+   * Optional. When specified, schedule backups will be created based on the
+   * policy configuration.
+   * 
+ * + * + * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of backupPolicies. + */ + public int getBackupPoliciesCount() { + return backupPolicies_.size(); + } + /** + * + * + *
+   * Optional. When specified, schedule backups will be created based on the
+   * policy configuration.
+   * 
+ * + * + * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The backupPolicies at the given index. + */ + public java.lang.String getBackupPolicies(int index) { + return backupPolicies_.get(index); + } + /** + * + * + *
+   * Optional. When specified, schedule backups will be created based on the
+   * policy configuration.
+   * 
+ * + * + * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the backupPolicies at the given index. + */ + public com.google.protobuf.ByteString getBackupPoliciesBytes(int index) { + return backupPolicies_.getByteString(index); + } + + public static final int BACKUP_VAULT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupVault_ = ""; + /** + * + * + *
+   * Optional. Name of backup vault.
+   * Format:
+   * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}
+   * 
+ * + * + * string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The backupVault. + */ + @java.lang.Override + public java.lang.String getBackupVault() { + java.lang.Object ref = backupVault_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupVault_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Name of backup vault.
+   * Format:
+   * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}
+   * 
+ * + * + * string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for backupVault. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupVaultBytes() { + java.lang.Object ref = backupVault_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupVault_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCHEDULED_BACKUP_ENABLED_FIELD_NUMBER = 3; + private boolean scheduledBackupEnabled_ = false; + /** + * + * + *
+   * Optional. When set to true, scheduled backup is enabled on the volume.
+   * This field should be nil when there's no backup policy attached.
+   * 
+ * + * optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the scheduledBackupEnabled field is set. + */ + @java.lang.Override + public boolean hasScheduledBackupEnabled() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. When set to true, scheduled backup is enabled on the volume.
+   * This field should be nil when there's no backup policy attached.
+   * 
+ * + * optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The scheduledBackupEnabled. + */ + @java.lang.Override + public boolean getScheduledBackupEnabled() { + return scheduledBackupEnabled_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < backupPolicies_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, backupPolicies_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupVault_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backupVault_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeBool(3, scheduledBackupEnabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < backupPolicies_.size(); i++) { + dataSize += computeStringSizeNoTag(backupPolicies_.getRaw(i)); + } + size += dataSize; + size += 1 * getBackupPoliciesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupVault_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backupVault_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, scheduledBackupEnabled_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.BackupConfig)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.BackupConfig other = (com.google.cloud.netapp.v1.BackupConfig) obj; + + if (!getBackupPoliciesList().equals(other.getBackupPoliciesList())) return false; + if (!getBackupVault().equals(other.getBackupVault())) return false; + if (hasScheduledBackupEnabled() != other.hasScheduledBackupEnabled()) return false; + if (hasScheduledBackupEnabled()) { + if (getScheduledBackupEnabled() != other.getScheduledBackupEnabled()) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBackupPoliciesCount() > 0) { + hash = (37 * hash) + BACKUP_POLICIES_FIELD_NUMBER; + hash = (53 * hash) + getBackupPoliciesList().hashCode(); + } + hash = (37 * hash) + BACKUP_VAULT_FIELD_NUMBER; + hash = (53 * hash) + getBackupVault().hashCode(); + if (hasScheduledBackupEnabled()) { + hash = (37 * hash) + SCHEDULED_BACKUP_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getScheduledBackupEnabled()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.BackupConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.BackupConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.BackupConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.BackupConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.BackupConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.BackupConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.BackupConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.BackupConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.BackupConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.BackupConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.BackupConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.BackupConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.netapp.v1.BackupConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * BackupConfig contains backup related config on a volume.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.BackupConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.BackupConfig) + com.google.cloud.netapp.v1.BackupConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.VolumeProto + .internal_static_google_cloud_netapp_v1_BackupConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.VolumeProto + .internal_static_google_cloud_netapp_v1_BackupConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.BackupConfig.class, + com.google.cloud.netapp.v1.BackupConfig.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.BackupConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + backupPolicies_ = com.google.protobuf.LazyStringArrayList.emptyList(); + backupVault_ = ""; + scheduledBackupEnabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.VolumeProto + .internal_static_google_cloud_netapp_v1_BackupConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.BackupConfig getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.BackupConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.BackupConfig build() { + com.google.cloud.netapp.v1.BackupConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.BackupConfig buildPartial() { + com.google.cloud.netapp.v1.BackupConfig result = + new com.google.cloud.netapp.v1.BackupConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.netapp.v1.BackupConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + backupPolicies_.makeImmutable(); + result.backupPolicies_ = backupPolicies_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backupVault_ = backupVault_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.scheduledBackupEnabled_ = scheduledBackupEnabled_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.BackupConfig) { + return mergeFrom((com.google.cloud.netapp.v1.BackupConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.BackupConfig other) { + if (other == com.google.cloud.netapp.v1.BackupConfig.getDefaultInstance()) return this; + if (!other.backupPolicies_.isEmpty()) { + if (backupPolicies_.isEmpty()) { + backupPolicies_ = other.backupPolicies_; + bitField0_ |= 0x00000001; + } else { + ensureBackupPoliciesIsMutable(); + backupPolicies_.addAll(other.backupPolicies_); + } + onChanged(); + } + if (!other.getBackupVault().isEmpty()) { + backupVault_ = other.backupVault_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasScheduledBackupEnabled()) { + setScheduledBackupEnabled(other.getScheduledBackupEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureBackupPoliciesIsMutable(); + backupPolicies_.add(s); + break; + } // case 10 + case 18: + { + backupVault_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + scheduledBackupEnabled_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList backupPolicies_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureBackupPoliciesIsMutable() { + if (!backupPolicies_.isModifiable()) { + backupPolicies_ = new com.google.protobuf.LazyStringArrayList(backupPolicies_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * Optional. When specified, schedule backups will be created based on the
+     * policy configuration.
+     * 
+ * + * + * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the backupPolicies. + */ + public com.google.protobuf.ProtocolStringList getBackupPoliciesList() { + backupPolicies_.makeImmutable(); + return backupPolicies_; + } + /** + * + * + *
+     * Optional. When specified, schedule backups will be created based on the
+     * policy configuration.
+     * 
+ * + * + * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of backupPolicies. + */ + public int getBackupPoliciesCount() { + return backupPolicies_.size(); + } + /** + * + * + *
+     * Optional. When specified, schedule backups will be created based on the
+     * policy configuration.
+     * 
+ * + * + * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The backupPolicies at the given index. + */ + public java.lang.String getBackupPolicies(int index) { + return backupPolicies_.get(index); + } + /** + * + * + *
+     * Optional. When specified, schedule backups will be created based on the
+     * policy configuration.
+     * 
+ * + * + * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the backupPolicies at the given index. + */ + public com.google.protobuf.ByteString getBackupPoliciesBytes(int index) { + return backupPolicies_.getByteString(index); + } + /** + * + * + *
+     * Optional. When specified, schedule backups will be created based on the
+     * policy configuration.
+     * 
+ * + * + * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The backupPolicies to set. + * @return This builder for chaining. + */ + public Builder setBackupPolicies(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPoliciesIsMutable(); + backupPolicies_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. When specified, schedule backups will be created based on the
+     * policy configuration.
+     * 
+ * + * + * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The backupPolicies to add. + * @return This builder for chaining. + */ + public Builder addBackupPolicies(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPoliciesIsMutable(); + backupPolicies_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. When specified, schedule backups will be created based on the
+     * policy configuration.
+     * 
+ * + * + * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param values The backupPolicies to add. + * @return This builder for chaining. + */ + public Builder addAllBackupPolicies(java.lang.Iterable values) { + ensureBackupPoliciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backupPolicies_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. When specified, schedule backups will be created based on the
+     * policy configuration.
+     * 
+ * + * + * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearBackupPolicies() { + backupPolicies_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. When specified, schedule backups will be created based on the
+     * policy configuration.
+     * 
+ * + * + * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the backupPolicies to add. + * @return This builder for chaining. + */ + public Builder addBackupPoliciesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureBackupPoliciesIsMutable(); + backupPolicies_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object backupVault_ = ""; + /** + * + * + *
+     * Optional. Name of backup vault.
+     * Format:
+     * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}
+     * 
+ * + * + * string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The backupVault. + */ + public java.lang.String getBackupVault() { + java.lang.Object ref = backupVault_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupVault_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Name of backup vault.
+     * Format:
+     * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}
+     * 
+ * + * + * string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for backupVault. + */ + public com.google.protobuf.ByteString getBackupVaultBytes() { + java.lang.Object ref = backupVault_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupVault_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Name of backup vault.
+     * Format:
+     * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}
+     * 
+ * + * + * string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The backupVault to set. + * @return This builder for chaining. + */ + public Builder setBackupVault(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupVault_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Name of backup vault.
+     * Format:
+     * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}
+     * 
+ * + * + * string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearBackupVault() { + backupVault_ = getDefaultInstance().getBackupVault(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Name of backup vault.
+     * Format:
+     * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}
+     * 
+ * + * + * string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for backupVault to set. + * @return This builder for chaining. + */ + public Builder setBackupVaultBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupVault_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean scheduledBackupEnabled_; + /** + * + * + *
+     * Optional. When set to true, scheduled backup is enabled on the volume.
+     * This field should be nil when there's no backup policy attached.
+     * 
+ * + * optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the scheduledBackupEnabled field is set. + */ + @java.lang.Override + public boolean hasScheduledBackupEnabled() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. When set to true, scheduled backup is enabled on the volume.
+     * This field should be nil when there's no backup policy attached.
+     * 
+ * + * optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The scheduledBackupEnabled. + */ + @java.lang.Override + public boolean getScheduledBackupEnabled() { + return scheduledBackupEnabled_; + } + /** + * + * + *
+     * Optional. When set to true, scheduled backup is enabled on the volume.
+     * This field should be nil when there's no backup policy attached.
+     * 
+ * + * optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The scheduledBackupEnabled to set. + * @return This builder for chaining. + */ + public Builder setScheduledBackupEnabled(boolean value) { + + scheduledBackupEnabled_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. When set to true, scheduled backup is enabled on the volume.
+     * This field should be nil when there's no backup policy attached.
+     * 
+ * + * optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearScheduledBackupEnabled() { + bitField0_ = (bitField0_ & ~0x00000004); + scheduledBackupEnabled_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.BackupConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.BackupConfig) + private static final com.google.cloud.netapp.v1.BackupConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.BackupConfig(); + } + + public static com.google.cloud.netapp.v1.BackupConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.BackupConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupConfigOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupConfigOrBuilder.java new file mode 100644 index 000000000000..6cf0a6e9c4c3 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupConfigOrBuilder.java @@ -0,0 +1,150 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/volume.proto + +package com.google.cloud.netapp.v1; + +public interface BackupConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.BackupConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. When specified, schedule backups will be created based on the
+   * policy configuration.
+   * 
+ * + * + * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the backupPolicies. + */ + java.util.List getBackupPoliciesList(); + /** + * + * + *
+   * Optional. When specified, schedule backups will be created based on the
+   * policy configuration.
+   * 
+ * + * + * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of backupPolicies. + */ + int getBackupPoliciesCount(); + /** + * + * + *
+   * Optional. When specified, schedule backups will be created based on the
+   * policy configuration.
+   * 
+ * + * + * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The backupPolicies at the given index. + */ + java.lang.String getBackupPolicies(int index); + /** + * + * + *
+   * Optional. When specified, schedule backups will be created based on the
+   * policy configuration.
+   * 
+ * + * + * repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the backupPolicies at the given index. + */ + com.google.protobuf.ByteString getBackupPoliciesBytes(int index); + + /** + * + * + *
+   * Optional. Name of backup vault.
+   * Format:
+   * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}
+   * 
+ * + * + * string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The backupVault. + */ + java.lang.String getBackupVault(); + /** + * + * + *
+   * Optional. Name of backup vault.
+   * Format:
+   * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}
+   * 
+ * + * + * string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for backupVault. + */ + com.google.protobuf.ByteString getBackupVaultBytes(); + + /** + * + * + *
+   * Optional. When set to true, scheduled backup is enabled on the volume.
+   * This field should be nil when there's no backup policy attached.
+   * 
+ * + * optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the scheduledBackupEnabled field is set. + */ + boolean hasScheduledBackupEnabled(); + /** + * + * + *
+   * Optional. When set to true, scheduled backup is enabled on the volume.
+   * This field should be nil when there's no backup policy attached.
+   * 
+ * + * optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The scheduledBackupEnabled. + */ + boolean getScheduledBackupEnabled(); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupName.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupName.java new file mode 100644 index 000000000000..fac6de8ba9c4 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupName.java @@ -0,0 +1,260 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class BackupName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_BACKUP_VAULT_BACKUP = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/backupVaults/{backup_vault}/backups/{backup}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String backupVault; + private final String backup; + + @Deprecated + protected BackupName() { + project = null; + location = null; + backupVault = null; + backup = null; + } + + private BackupName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + backupVault = Preconditions.checkNotNull(builder.getBackupVault()); + backup = Preconditions.checkNotNull(builder.getBackup()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBackupVault() { + return backupVault; + } + + public String getBackup() { + return backup; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static BackupName of(String project, String location, String backupVault, String backup) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBackupVault(backupVault) + .setBackup(backup) + .build(); + } + + public static String format(String project, String location, String backupVault, String backup) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBackupVault(backupVault) + .setBackup(backup) + .build() + .toString(); + } + + public static BackupName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_BACKUP_VAULT_BACKUP.validatedMatch( + formattedString, "BackupName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("backup_vault"), + matchMap.get("backup")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (BackupName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_BACKUP_VAULT_BACKUP.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (backupVault != null) { + fieldMapBuilder.put("backup_vault", backupVault); + } + if (backup != null) { + fieldMapBuilder.put("backup", backup); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_BACKUP_VAULT_BACKUP.instantiate( + "project", project, "location", location, "backup_vault", backupVault, "backup", backup); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + BackupName that = ((BackupName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.backupVault, that.backupVault) + && Objects.equals(this.backup, that.backup); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(backupVault); + h *= 1000003; + h ^= Objects.hashCode(backup); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/backupVaults/{backup_vault}/backups/{backup}. + */ + public static class Builder { + private String project; + private String location; + private String backupVault; + private String backup; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBackupVault() { + return backupVault; + } + + public String getBackup() { + return backup; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setBackupVault(String backupVault) { + this.backupVault = backupVault; + return this; + } + + public Builder setBackup(String backup) { + this.backup = backup; + return this; + } + + private Builder(BackupName backupName) { + this.project = backupName.project; + this.location = backupName.location; + this.backupVault = backupName.backupVault; + this.backup = backupName.backup; + } + + public BackupName build() { + return new BackupName(this); + } + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupOrBuilder.java new file mode 100644 index 000000000000..ed67bb2cbb9f --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupOrBuilder.java @@ -0,0 +1,341 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup.proto + +package com.google.cloud.netapp.v1; + +public interface BackupOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.Backup) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the backup.
+   * Format:
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Identifier. The resource name of the backup.
+   * Format:
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The backup state.
+   * 
+ * + * + * .google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The backup state.
+   * 
+ * + * + * .google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.netapp.v1.Backup.State getState(); + + /** + * + * + *
+   * A description of the backup with 2048 characters or less.
+   * Requests with longer descriptions will be rejected.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A description of the backup with 2048 characters or less.
+   * Requests with longer descriptions will be rejected.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Size of the file system when the backup was created. When
+   * creating a new volume from the backup, the volume capacity will have to be
+   * at least as big.
+   * 
+ * + * int64 volume_usage_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The volumeUsageBytes. + */ + long getVolumeUsageBytes(); + + /** + * + * + *
+   * Output only. Type of backup, manually created or created by a backup
+   * policy.
+   * 
+ * + * + * .google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for backupType. + */ + int getBackupTypeValue(); + /** + * + * + *
+   * Output only. Type of backup, manually created or created by a backup
+   * policy.
+   * 
+ * + * + * .google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupType. + */ + com.google.cloud.netapp.v1.Backup.Type getBackupType(); + + /** + * + * + *
+   * Volume full name of this backup belongs to.
+   * Format:
+   * `projects/{projects_id}/locations/{location}/volumes/{volume_id}`
+   * 
+ * + * string source_volume = 6 [(.google.api.resource_reference) = { ... } + * + * @return The sourceVolume. + */ + java.lang.String getSourceVolume(); + /** + * + * + *
+   * Volume full name of this backup belongs to.
+   * Format:
+   * `projects/{projects_id}/locations/{location}/volumes/{volume_id}`
+   * 
+ * + * string source_volume = 6 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for sourceVolume. + */ + com.google.protobuf.ByteString getSourceVolumeBytes(); + + /** + * + * + *
+   * If specified, backup will be created from the given snapshot.
+   * If not specified, there will be a new snapshot taken to initiate the backup
+   * creation. Format:
+   * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`
+   * 
+ * + * optional string source_snapshot = 7 [(.google.api.resource_reference) = { ... } + * + * @return Whether the sourceSnapshot field is set. + */ + boolean hasSourceSnapshot(); + /** + * + * + *
+   * If specified, backup will be created from the given snapshot.
+   * If not specified, there will be a new snapshot taken to initiate the backup
+   * creation. Format:
+   * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`
+   * 
+ * + * optional string source_snapshot = 7 [(.google.api.resource_reference) = { ... } + * + * @return The sourceSnapshot. + */ + java.lang.String getSourceSnapshot(); + /** + * + * + *
+   * If specified, backup will be created from the given snapshot.
+   * If not specified, there will be a new snapshot taken to initiate the backup
+   * creation. Format:
+   * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`
+   * 
+ * + * optional string source_snapshot = 7 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for sourceSnapshot. + */ + com.google.protobuf.ByteString getSourceSnapshotBytes(); + + /** + * + * + *
+   * Output only. The time when the backup was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time when the backup was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time when the backup was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 9; + */ + int getLabelsCount(); + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 9; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 9; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 9; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 9; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Total size of all backups in a chain in bytes = baseline
+   * backup size + sum(incremental backup size)
+   * 
+ * + * int64 chain_storage_bytes = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The chainStorageBytes. + */ + long getChainStorageBytes(); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupPolicy.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupPolicy.java new file mode 100644 index 000000000000..220d0f362b89 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupPolicy.java @@ -0,0 +1,2527 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_policy.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * Backup Policy.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.BackupPolicy} + */ +public final class BackupPolicy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.BackupPolicy) + BackupPolicyOrBuilder { + private static final long serialVersionUID = 0L; + // Use BackupPolicy.newBuilder() to construct. + private BackupPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BackupPolicy() { + name_ = ""; + description_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BackupPolicy(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_BackupPolicy_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 9: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_BackupPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.BackupPolicy.class, + com.google.cloud.netapp.v1.BackupPolicy.Builder.class); + } + + /** Protobuf enum {@code google.cloud.netapp.v1.BackupPolicy.State} */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * BackupPolicy is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * BackupPolicy is available for use.
+     * 
+ * + * READY = 2; + */ + READY(2), + /** + * + * + *
+     * BackupPolicy is being deleted.
+     * 
+ * + * DELETING = 3; + */ + DELETING(3), + /** + * + * + *
+     * BackupPolicy is not valid and cannot be used.
+     * 
+ * + * ERROR = 4; + */ + ERROR(4), + /** + * + * + *
+     * BackupPolicy is being updated.
+     * 
+ * + * UPDATING = 5; + */ + UPDATING(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * State not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * BackupPolicy is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + * + * + *
+     * BackupPolicy is available for use.
+     * 
+ * + * READY = 2; + */ + public static final int READY_VALUE = 2; + /** + * + * + *
+     * BackupPolicy is being deleted.
+     * 
+ * + * DELETING = 3; + */ + public static final int DELETING_VALUE = 3; + /** + * + * + *
+     * BackupPolicy is not valid and cannot be used.
+     * 
+ * + * ERROR = 4; + */ + public static final int ERROR_VALUE = 4; + /** + * + * + *
+     * BackupPolicy is being updated.
+     * 
+ * + * UPDATING = 5; + */ + public static final int UPDATING_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return READY; + case 3: + return DELETING; + case 4: + return ERROR; + case 5: + return UPDATING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupPolicy.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.netapp.v1.BackupPolicy.State) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Identifier. The resource name of the backup policy.
+   * Format:
+   * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Identifier. The resource name of the backup policy.
+   * Format:
+   * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DAILY_BACKUP_LIMIT_FIELD_NUMBER = 2; + private int dailyBackupLimit_ = 0; + /** + * + * + *
+   * Number of daily backups to keep. Note that the minimum daily backup limit
+   * is 2.
+   * 
+ * + * optional int32 daily_backup_limit = 2; + * + * @return Whether the dailyBackupLimit field is set. + */ + @java.lang.Override + public boolean hasDailyBackupLimit() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Number of daily backups to keep. Note that the minimum daily backup limit
+   * is 2.
+   * 
+ * + * optional int32 daily_backup_limit = 2; + * + * @return The dailyBackupLimit. + */ + @java.lang.Override + public int getDailyBackupLimit() { + return dailyBackupLimit_; + } + + public static final int WEEKLY_BACKUP_LIMIT_FIELD_NUMBER = 3; + private int weeklyBackupLimit_ = 0; + /** + * + * + *
+   * Number of weekly backups to keep. Note that the sum of daily, weekly and
+   * monthly backups should be greater than 1.
+   * 
+ * + * optional int32 weekly_backup_limit = 3; + * + * @return Whether the weeklyBackupLimit field is set. + */ + @java.lang.Override + public boolean hasWeeklyBackupLimit() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Number of weekly backups to keep. Note that the sum of daily, weekly and
+   * monthly backups should be greater than 1.
+   * 
+ * + * optional int32 weekly_backup_limit = 3; + * + * @return The weeklyBackupLimit. + */ + @java.lang.Override + public int getWeeklyBackupLimit() { + return weeklyBackupLimit_; + } + + public static final int MONTHLY_BACKUP_LIMIT_FIELD_NUMBER = 4; + private int monthlyBackupLimit_ = 0; + /** + * + * + *
+   * Number of monthly backups to keep. Note that the sum of daily, weekly and
+   * monthly backups should be greater than 1.
+   * 
+ * + * optional int32 monthly_backup_limit = 4; + * + * @return Whether the monthlyBackupLimit field is set. + */ + @java.lang.Override + public boolean hasMonthlyBackupLimit() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Number of monthly backups to keep. Note that the sum of daily, weekly and
+   * monthly backups should be greater than 1.
+   * 
+ * + * optional int32 monthly_backup_limit = 4; + * + * @return The monthlyBackupLimit. + */ + @java.lang.Override + public int getMonthlyBackupLimit() { + return monthlyBackupLimit_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Description of the backup policy.
+   * 
+ * + * optional string description = 5; + * + * @return Whether the description field is set. + */ + @java.lang.Override + public boolean hasDescription() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Description of the backup policy.
+   * 
+ * + * optional string description = 5; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Description of the backup policy.
+   * 
+ * + * optional string description = 5; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENABLED_FIELD_NUMBER = 6; + private boolean enabled_ = false; + /** + * + * + *
+   * If enabled, make backups automatically according to the schedules.
+   * This will be applied to all volumes that have this policy attached and
+   * enforced on volume level. If not specified, default is true.
+   * 
+ * + * optional bool enabled = 6; + * + * @return Whether the enabled field is set. + */ + @java.lang.Override + public boolean hasEnabled() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * If enabled, make backups automatically according to the schedules.
+   * This will be applied to all volumes that have this policy attached and
+   * enforced on volume level. If not specified, default is true.
+   * 
+ * + * optional bool enabled = 6; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + public static final int ASSIGNED_VOLUME_COUNT_FIELD_NUMBER = 7; + private int assignedVolumeCount_ = 0; + /** + * + * + *
+   * Output only. The total number of volumes assigned by this backup policy.
+   * 
+ * + * optional int32 assigned_volume_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the assignedVolumeCount field is set. + */ + @java.lang.Override + public boolean hasAssignedVolumeCount() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * Output only. The total number of volumes assigned by this backup policy.
+   * 
+ * + * optional int32 assigned_volume_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The assignedVolumeCount. + */ + @java.lang.Override + public int getAssignedVolumeCount() { + return assignedVolumeCount_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time when the backup policy was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time when the backup policy was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time when the backup policy was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int LABELS_FIELD_NUMBER = 9; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_BackupPolicy_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int STATE_FIELD_NUMBER = 10; + private int state_ = 0; + /** + * + * + *
+   * Output only. The backup policy state.
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The backup policy state.
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.netapp.v1.BackupPolicy.State getState() { + com.google.cloud.netapp.v1.BackupPolicy.State result = + com.google.cloud.netapp.v1.BackupPolicy.State.forNumber(state_); + return result == null ? com.google.cloud.netapp.v1.BackupPolicy.State.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt32(2, dailyBackupLimit_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt32(3, weeklyBackupLimit_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeInt32(4, monthlyBackupLimit_); + } + if (((bitField0_ & 0x00000008) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeBool(6, enabled_); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeInt32(7, assignedVolumeCount_); + } + if (createTime_ != null) { + output.writeMessage(8, getCreateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 9); + if (state_ != com.google.cloud.netapp.v1.BackupPolicy.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(10, state_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, dailyBackupLimit_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, weeklyBackupLimit_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, monthlyBackupLimit_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, enabled_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, assignedVolumeCount_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCreateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, labels__); + } + if (state_ != com.google.cloud.netapp.v1.BackupPolicy.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, state_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.BackupPolicy)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.BackupPolicy other = (com.google.cloud.netapp.v1.BackupPolicy) obj; + + if (!getName().equals(other.getName())) return false; + if (hasDailyBackupLimit() != other.hasDailyBackupLimit()) return false; + if (hasDailyBackupLimit()) { + if (getDailyBackupLimit() != other.getDailyBackupLimit()) return false; + } + if (hasWeeklyBackupLimit() != other.hasWeeklyBackupLimit()) return false; + if (hasWeeklyBackupLimit()) { + if (getWeeklyBackupLimit() != other.getWeeklyBackupLimit()) return false; + } + if (hasMonthlyBackupLimit() != other.hasMonthlyBackupLimit()) return false; + if (hasMonthlyBackupLimit()) { + if (getMonthlyBackupLimit() != other.getMonthlyBackupLimit()) return false; + } + if (hasDescription() != other.hasDescription()) return false; + if (hasDescription()) { + if (!getDescription().equals(other.getDescription())) return false; + } + if (hasEnabled() != other.hasEnabled()) return false; + if (hasEnabled()) { + if (getEnabled() != other.getEnabled()) return false; + } + if (hasAssignedVolumeCount() != other.hasAssignedVolumeCount()) return false; + if (hasAssignedVolumeCount()) { + if (getAssignedVolumeCount() != other.getAssignedVolumeCount()) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (state_ != other.state_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasDailyBackupLimit()) { + hash = (37 * hash) + DAILY_BACKUP_LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getDailyBackupLimit(); + } + if (hasWeeklyBackupLimit()) { + hash = (37 * hash) + WEEKLY_BACKUP_LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getWeeklyBackupLimit(); + } + if (hasMonthlyBackupLimit()) { + hash = (37 * hash) + MONTHLY_BACKUP_LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getMonthlyBackupLimit(); + } + if (hasDescription()) { + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + } + if (hasEnabled()) { + hash = (37 * hash) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnabled()); + } + if (hasAssignedVolumeCount()) { + hash = (37 * hash) + ASSIGNED_VOLUME_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getAssignedVolumeCount(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.BackupPolicy parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.BackupPolicy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.BackupPolicy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.BackupPolicy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.BackupPolicy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.BackupPolicy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.BackupPolicy parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.BackupPolicy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.BackupPolicy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.BackupPolicy parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.BackupPolicy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.BackupPolicy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.netapp.v1.BackupPolicy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Backup Policy.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.BackupPolicy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.BackupPolicy) + com.google.cloud.netapp.v1.BackupPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_BackupPolicy_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 9: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 9: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_BackupPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.BackupPolicy.class, + com.google.cloud.netapp.v1.BackupPolicy.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.BackupPolicy.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + dailyBackupLimit_ = 0; + weeklyBackupLimit_ = 0; + monthlyBackupLimit_ = 0; + description_ = ""; + enabled_ = false; + assignedVolumeCount_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + state_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_BackupPolicy_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.BackupPolicy getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.BackupPolicy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.BackupPolicy build() { + com.google.cloud.netapp.v1.BackupPolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.BackupPolicy buildPartial() { + com.google.cloud.netapp.v1.BackupPolicy result = + new com.google.cloud.netapp.v1.BackupPolicy(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.netapp.v1.BackupPolicy result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dailyBackupLimit_ = dailyBackupLimit_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.weeklyBackupLimit_ = weeklyBackupLimit_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.monthlyBackupLimit_ = monthlyBackupLimit_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.enabled_ = enabled_; + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.assignedVolumeCount_ = assignedVolumeCount_; + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.state_ = state_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.BackupPolicy) { + return mergeFrom((com.google.cloud.netapp.v1.BackupPolicy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.BackupPolicy other) { + if (other == com.google.cloud.netapp.v1.BackupPolicy.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasDailyBackupLimit()) { + setDailyBackupLimit(other.getDailyBackupLimit()); + } + if (other.hasWeeklyBackupLimit()) { + setWeeklyBackupLimit(other.getWeeklyBackupLimit()); + } + if (other.hasMonthlyBackupLimit()) { + setMonthlyBackupLimit(other.getMonthlyBackupLimit()); + } + if (other.hasDescription()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasEnabled()) { + setEnabled(other.getEnabled()); + } + if (other.hasAssignedVolumeCount()) { + setAssignedVolumeCount(other.getAssignedVolumeCount()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000100; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + dailyBackupLimit_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + weeklyBackupLimit_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + monthlyBackupLimit_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + enabled_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: + { + assignedVolumeCount_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 80: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 80 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Identifier. The resource name of the backup policy.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Identifier. The resource name of the backup policy.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Identifier. The resource name of the backup policy.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Identifier. The resource name of the backup policy.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Identifier. The resource name of the backup policy.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int dailyBackupLimit_; + /** + * + * + *
+     * Number of daily backups to keep. Note that the minimum daily backup limit
+     * is 2.
+     * 
+ * + * optional int32 daily_backup_limit = 2; + * + * @return Whether the dailyBackupLimit field is set. + */ + @java.lang.Override + public boolean hasDailyBackupLimit() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Number of daily backups to keep. Note that the minimum daily backup limit
+     * is 2.
+     * 
+ * + * optional int32 daily_backup_limit = 2; + * + * @return The dailyBackupLimit. + */ + @java.lang.Override + public int getDailyBackupLimit() { + return dailyBackupLimit_; + } + /** + * + * + *
+     * Number of daily backups to keep. Note that the minimum daily backup limit
+     * is 2.
+     * 
+ * + * optional int32 daily_backup_limit = 2; + * + * @param value The dailyBackupLimit to set. + * @return This builder for chaining. + */ + public Builder setDailyBackupLimit(int value) { + + dailyBackupLimit_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of daily backups to keep. Note that the minimum daily backup limit
+     * is 2.
+     * 
+ * + * optional int32 daily_backup_limit = 2; + * + * @return This builder for chaining. + */ + public Builder clearDailyBackupLimit() { + bitField0_ = (bitField0_ & ~0x00000002); + dailyBackupLimit_ = 0; + onChanged(); + return this; + } + + private int weeklyBackupLimit_; + /** + * + * + *
+     * Number of weekly backups to keep. Note that the sum of daily, weekly and
+     * monthly backups should be greater than 1.
+     * 
+ * + * optional int32 weekly_backup_limit = 3; + * + * @return Whether the weeklyBackupLimit field is set. + */ + @java.lang.Override + public boolean hasWeeklyBackupLimit() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Number of weekly backups to keep. Note that the sum of daily, weekly and
+     * monthly backups should be greater than 1.
+     * 
+ * + * optional int32 weekly_backup_limit = 3; + * + * @return The weeklyBackupLimit. + */ + @java.lang.Override + public int getWeeklyBackupLimit() { + return weeklyBackupLimit_; + } + /** + * + * + *
+     * Number of weekly backups to keep. Note that the sum of daily, weekly and
+     * monthly backups should be greater than 1.
+     * 
+ * + * optional int32 weekly_backup_limit = 3; + * + * @param value The weeklyBackupLimit to set. + * @return This builder for chaining. + */ + public Builder setWeeklyBackupLimit(int value) { + + weeklyBackupLimit_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of weekly backups to keep. Note that the sum of daily, weekly and
+     * monthly backups should be greater than 1.
+     * 
+ * + * optional int32 weekly_backup_limit = 3; + * + * @return This builder for chaining. + */ + public Builder clearWeeklyBackupLimit() { + bitField0_ = (bitField0_ & ~0x00000004); + weeklyBackupLimit_ = 0; + onChanged(); + return this; + } + + private int monthlyBackupLimit_; + /** + * + * + *
+     * Number of monthly backups to keep. Note that the sum of daily, weekly and
+     * monthly backups should be greater than 1.
+     * 
+ * + * optional int32 monthly_backup_limit = 4; + * + * @return Whether the monthlyBackupLimit field is set. + */ + @java.lang.Override + public boolean hasMonthlyBackupLimit() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Number of monthly backups to keep. Note that the sum of daily, weekly and
+     * monthly backups should be greater than 1.
+     * 
+ * + * optional int32 monthly_backup_limit = 4; + * + * @return The monthlyBackupLimit. + */ + @java.lang.Override + public int getMonthlyBackupLimit() { + return monthlyBackupLimit_; + } + /** + * + * + *
+     * Number of monthly backups to keep. Note that the sum of daily, weekly and
+     * monthly backups should be greater than 1.
+     * 
+ * + * optional int32 monthly_backup_limit = 4; + * + * @param value The monthlyBackupLimit to set. + * @return This builder for chaining. + */ + public Builder setMonthlyBackupLimit(int value) { + + monthlyBackupLimit_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of monthly backups to keep. Note that the sum of daily, weekly and
+     * monthly backups should be greater than 1.
+     * 
+ * + * optional int32 monthly_backup_limit = 4; + * + * @return This builder for chaining. + */ + public Builder clearMonthlyBackupLimit() { + bitField0_ = (bitField0_ & ~0x00000008); + monthlyBackupLimit_ = 0; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Description of the backup policy.
+     * 
+ * + * optional string description = 5; + * + * @return Whether the description field is set. + */ + public boolean hasDescription() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Description of the backup policy.
+     * 
+ * + * optional string description = 5; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Description of the backup policy.
+     * 
+ * + * optional string description = 5; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Description of the backup policy.
+     * 
+ * + * optional string description = 5; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Description of the backup policy.
+     * 
+ * + * optional string description = 5; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Description of the backup policy.
+     * 
+ * + * optional string description = 5; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean enabled_; + /** + * + * + *
+     * If enabled, make backups automatically according to the schedules.
+     * This will be applied to all volumes that have this policy attached and
+     * enforced on volume level. If not specified, default is true.
+     * 
+ * + * optional bool enabled = 6; + * + * @return Whether the enabled field is set. + */ + @java.lang.Override + public boolean hasEnabled() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * If enabled, make backups automatically according to the schedules.
+     * This will be applied to all volumes that have this policy attached and
+     * enforced on volume level. If not specified, default is true.
+     * 
+ * + * optional bool enabled = 6; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + /** + * + * + *
+     * If enabled, make backups automatically according to the schedules.
+     * This will be applied to all volumes that have this policy attached and
+     * enforced on volume level. If not specified, default is true.
+     * 
+ * + * optional bool enabled = 6; + * + * @param value The enabled to set. + * @return This builder for chaining. + */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * If enabled, make backups automatically according to the schedules.
+     * This will be applied to all volumes that have this policy attached and
+     * enforced on volume level. If not specified, default is true.
+     * 
+ * + * optional bool enabled = 6; + * + * @return This builder for chaining. + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000020); + enabled_ = false; + onChanged(); + return this; + } + + private int assignedVolumeCount_; + /** + * + * + *
+     * Output only. The total number of volumes assigned by this backup policy.
+     * 
+ * + * optional int32 assigned_volume_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the assignedVolumeCount field is set. + */ + @java.lang.Override + public boolean hasAssignedVolumeCount() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Output only. The total number of volumes assigned by this backup policy.
+     * 
+ * + * optional int32 assigned_volume_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The assignedVolumeCount. + */ + @java.lang.Override + public int getAssignedVolumeCount() { + return assignedVolumeCount_; + } + /** + * + * + *
+     * Output only. The total number of volumes assigned by this backup policy.
+     * 
+ * + * optional int32 assigned_volume_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The assignedVolumeCount to set. + * @return This builder for chaining. + */ + public Builder setAssignedVolumeCount(int value) { + + assignedVolumeCount_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The total number of volumes assigned by this backup policy.
+     * 
+ * + * optional int32 assigned_volume_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearAssignedVolumeCount() { + bitField0_ = (bitField0_ & ~0x00000040); + assignedVolumeCount_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time when the backup policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Output only. The time when the backup policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time when the backup policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the backup policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the backup policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the backup policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the backup policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time when the backup policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time when the backup policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000100; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Resource labels to represent user provided metadata.
+     * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Resource labels to represent user provided metadata.
+     * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Resource labels to represent user provided metadata.
+     * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Resource labels to represent user provided metadata.
+     * 
+ * + * map<string, string> labels = 9; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000100); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Resource labels to represent user provided metadata.
+     * 
+ * + * map<string, string> labels = 9; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000100; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Resource labels to represent user provided metadata.
+     * 
+ * + * map<string, string> labels = 9; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000100; + return this; + } + /** + * + * + *
+     * Resource labels to represent user provided metadata.
+     * 
+ * + * map<string, string> labels = 9; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000100; + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The backup policy state.
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The backup policy state.
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The backup policy state.
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.netapp.v1.BackupPolicy.State getState() { + com.google.cloud.netapp.v1.BackupPolicy.State result = + com.google.cloud.netapp.v1.BackupPolicy.State.forNumber(state_); + return result == null ? com.google.cloud.netapp.v1.BackupPolicy.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The backup policy state.
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.netapp.v1.BackupPolicy.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The backup policy state.
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000200); + state_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.BackupPolicy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.BackupPolicy) + private static final com.google.cloud.netapp.v1.BackupPolicy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.BackupPolicy(); + } + + public static com.google.cloud.netapp.v1.BackupPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupPolicy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.BackupPolicy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupPolicyName.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupPolicyName.java new file mode 100644 index 000000000000..25036b66f56d --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupPolicyName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class BackupPolicyName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_BACKUP_POLICY = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/backupPolicies/{backup_policy}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String backupPolicy; + + @Deprecated + protected BackupPolicyName() { + project = null; + location = null; + backupPolicy = null; + } + + private BackupPolicyName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + backupPolicy = Preconditions.checkNotNull(builder.getBackupPolicy()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBackupPolicy() { + return backupPolicy; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static BackupPolicyName of(String project, String location, String backupPolicy) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBackupPolicy(backupPolicy) + .build(); + } + + public static String format(String project, String location, String backupPolicy) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBackupPolicy(backupPolicy) + .build() + .toString(); + } + + public static BackupPolicyName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_BACKUP_POLICY.validatedMatch( + formattedString, "BackupPolicyName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("backup_policy")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (BackupPolicyName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_BACKUP_POLICY.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (backupPolicy != null) { + fieldMapBuilder.put("backup_policy", backupPolicy); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_BACKUP_POLICY.instantiate( + "project", project, "location", location, "backup_policy", backupPolicy); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + BackupPolicyName that = ((BackupPolicyName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.backupPolicy, that.backupPolicy); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(backupPolicy); + return h; + } + + /** Builder for projects/{project}/locations/{location}/backupPolicies/{backup_policy}. */ + public static class Builder { + private String project; + private String location; + private String backupPolicy; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBackupPolicy() { + return backupPolicy; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setBackupPolicy(String backupPolicy) { + this.backupPolicy = backupPolicy; + return this; + } + + private Builder(BackupPolicyName backupPolicyName) { + this.project = backupPolicyName.project; + this.location = backupPolicyName.location; + this.backupPolicy = backupPolicyName.backupPolicy; + } + + public BackupPolicyName build() { + return new BackupPolicyName(this); + } + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupPolicyOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupPolicyOrBuilder.java new file mode 100644 index 000000000000..50a37bd3062c --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupPolicyOrBuilder.java @@ -0,0 +1,353 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_policy.proto + +package com.google.cloud.netapp.v1; + +public interface BackupPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.BackupPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the backup policy.
+   * Format:
+   * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Identifier. The resource name of the backup policy.
+   * Format:
+   * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Number of daily backups to keep. Note that the minimum daily backup limit
+   * is 2.
+   * 
+ * + * optional int32 daily_backup_limit = 2; + * + * @return Whether the dailyBackupLimit field is set. + */ + boolean hasDailyBackupLimit(); + /** + * + * + *
+   * Number of daily backups to keep. Note that the minimum daily backup limit
+   * is 2.
+   * 
+ * + * optional int32 daily_backup_limit = 2; + * + * @return The dailyBackupLimit. + */ + int getDailyBackupLimit(); + + /** + * + * + *
+   * Number of weekly backups to keep. Note that the sum of daily, weekly and
+   * monthly backups should be greater than 1.
+   * 
+ * + * optional int32 weekly_backup_limit = 3; + * + * @return Whether the weeklyBackupLimit field is set. + */ + boolean hasWeeklyBackupLimit(); + /** + * + * + *
+   * Number of weekly backups to keep. Note that the sum of daily, weekly and
+   * monthly backups should be greater than 1.
+   * 
+ * + * optional int32 weekly_backup_limit = 3; + * + * @return The weeklyBackupLimit. + */ + int getWeeklyBackupLimit(); + + /** + * + * + *
+   * Number of monthly backups to keep. Note that the sum of daily, weekly and
+   * monthly backups should be greater than 1.
+   * 
+ * + * optional int32 monthly_backup_limit = 4; + * + * @return Whether the monthlyBackupLimit field is set. + */ + boolean hasMonthlyBackupLimit(); + /** + * + * + *
+   * Number of monthly backups to keep. Note that the sum of daily, weekly and
+   * monthly backups should be greater than 1.
+   * 
+ * + * optional int32 monthly_backup_limit = 4; + * + * @return The monthlyBackupLimit. + */ + int getMonthlyBackupLimit(); + + /** + * + * + *
+   * Description of the backup policy.
+   * 
+ * + * optional string description = 5; + * + * @return Whether the description field is set. + */ + boolean hasDescription(); + /** + * + * + *
+   * Description of the backup policy.
+   * 
+ * + * optional string description = 5; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Description of the backup policy.
+   * 
+ * + * optional string description = 5; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * If enabled, make backups automatically according to the schedules.
+   * This will be applied to all volumes that have this policy attached and
+   * enforced on volume level. If not specified, default is true.
+   * 
+ * + * optional bool enabled = 6; + * + * @return Whether the enabled field is set. + */ + boolean hasEnabled(); + /** + * + * + *
+   * If enabled, make backups automatically according to the schedules.
+   * This will be applied to all volumes that have this policy attached and
+   * enforced on volume level. If not specified, default is true.
+   * 
+ * + * optional bool enabled = 6; + * + * @return The enabled. + */ + boolean getEnabled(); + + /** + * + * + *
+   * Output only. The total number of volumes assigned by this backup policy.
+   * 
+ * + * optional int32 assigned_volume_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the assignedVolumeCount field is set. + */ + boolean hasAssignedVolumeCount(); + /** + * + * + *
+   * Output only. The total number of volumes assigned by this backup policy.
+   * 
+ * + * optional int32 assigned_volume_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The assignedVolumeCount. + */ + int getAssignedVolumeCount(); + + /** + * + * + *
+   * Output only. The time when the backup policy was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time when the backup policy was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time when the backup policy was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 9; + */ + int getLabelsCount(); + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 9; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 9; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 9; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 9; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. The backup policy state.
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The backup policy state.
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.netapp.v1.BackupPolicy.State getState(); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupPolicyProto.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupPolicyProto.java new file mode 100644 index 000000000000..987160fc2550 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupPolicyProto.java @@ -0,0 +1,225 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_policy.proto + +package com.google.cloud.netapp.v1; + +public final class BackupPolicyProto { + private BackupPolicyProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_BackupPolicy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_BackupPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_BackupPolicy_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_BackupPolicy_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_CreateBackupPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_CreateBackupPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_GetBackupPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_GetBackupPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_ListBackupPoliciesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_ListBackupPoliciesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_ListBackupPoliciesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_ListBackupPoliciesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_UpdateBackupPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_UpdateBackupPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_DeleteBackupPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_DeleteBackupPolicyRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n*google/cloud/netapp/v1/backup_policy.p" + + "roto\022\026google.cloud.netapp.v1\032\037google/api" + + "/field_behavior.proto\032\031google/api/resour" + + "ce.proto\032 google/protobuf/field_mask.pro" + + "to\032\037google/protobuf/timestamp.proto\"\272\006\n\014" + + "BackupPolicy\022\022\n\004name\030\001 \001(\tB\004\342A\001\010\022\037\n\022dail" + + "y_backup_limit\030\002 \001(\005H\000\210\001\001\022 \n\023weekly_back" + + "up_limit\030\003 \001(\005H\001\210\001\001\022!\n\024monthly_backup_li" + + "mit\030\004 \001(\005H\002\210\001\001\022\030\n\013description\030\005 \001(\tH\003\210\001\001" + + "\022\024\n\007enabled\030\006 \001(\010H\004\210\001\001\022(\n\025assigned_volum" + + "e_count\030\007 \001(\005B\004\342A\001\003H\005\210\001\001\0225\n\013create_time\030" + + "\010 \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\022" + + "@\n\006labels\030\t \003(\01320.google.cloud.netapp.v1" + + ".BackupPolicy.LabelsEntry\022?\n\005state\030\n \001(\016" + + "2*.google.cloud.netapp.v1.BackupPolicy.S" + + "tateB\004\342A\001\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r" + + "\n\005value\030\002 \001(\t:\0028\001\"^\n\005State\022\025\n\021STATE_UNSP" + + "ECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002\022\014\n\010DE" + + "LETING\020\003\022\t\n\005ERROR\020\004\022\014\n\010UPDATING\020\005:\216\001\352A\212\001" + + "\n\"netapp.googleapis.com/BackupPolicy\022Fpr" + + "ojects/{project}/locations/{location}/ba" + + "ckupPolicies/{backup_policy}*\016backupPoli" + + "cies2\014backupPolicyB\025\n\023_daily_backup_limi" + + "tB\026\n\024_weekly_backup_limitB\027\n\025_monthly_ba" + + "ckup_limitB\016\n\014_descriptionB\n\n\010_enabledB\030" + + "\n\026_assigned_volume_count\"\273\001\n\031CreateBacku" + + "pPolicyRequest\022;\n\006parent\030\001 \001(\tB+\342A\001\002\372A$\022" + + "\"netapp.googleapis.com/BackupPolicy\022A\n\rb" + + "ackup_policy\030\002 \001(\0132$.google.cloud.netapp" + + ".v1.BackupPolicyB\004\342A\001\002\022\036\n\020backup_policy_" + + "id\030\003 \001(\tB\004\342A\001\002\"S\n\026GetBackupPolicyRequest" + + "\0229\n\004name\030\001 \001(\tB+\342A\001\002\372A$\n\"netapp.googleap" + + "is.com/BackupPolicy\"\241\001\n\031ListBackupPolici" + + "esRequest\022;\n\006parent\030\001 \001(\tB+\342A\001\002\372A$\022\"neta" + + "pp.googleapis.com/BackupPolicy\022\021\n\tpage_s" + + "ize\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030" + + "\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"\211\001\n\032ListBackupPo" + + "liciesResponse\022=\n\017backup_policies\030\001 \003(\0132" + + "$.google.cloud.netapp.v1.BackupPolicy\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 " + + "\003(\t\"\225\001\n\031UpdateBackupPolicyRequest\0225\n\013upd" + + "ate_mask\030\001 \001(\0132\032.google.protobuf.FieldMa" + + "skB\004\342A\001\002\022A\n\rbackup_policy\030\002 \001(\0132$.google" + + ".cloud.netapp.v1.BackupPolicyB\004\342A\001\002\"V\n\031D" + + "eleteBackupPolicyRequest\0229\n\004name\030\001 \001(\tB+" + + "\342A\001\002\372A$\n\"netapp.googleapis.com/BackupPol" + + "icyB\263\001\n\032com.google.cloud.netapp.v1B\021Back" + + "upPolicyProtoP\001Z2cloud.google.com/go/net" + + "app/apiv1/netapppb;netapppb\252\002\026Google.Clo" + + "ud.NetApp.V1\312\002\026Google\\Cloud\\NetApp\\V1\352\002\031" + + "Google::Cloud::NetApp::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_netapp_v1_BackupPolicy_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_netapp_v1_BackupPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_BackupPolicy_descriptor, + new java.lang.String[] { + "Name", + "DailyBackupLimit", + "WeeklyBackupLimit", + "MonthlyBackupLimit", + "Description", + "Enabled", + "AssignedVolumeCount", + "CreateTime", + "Labels", + "State", + "DailyBackupLimit", + "WeeklyBackupLimit", + "MonthlyBackupLimit", + "Description", + "Enabled", + "AssignedVolumeCount", + }); + internal_static_google_cloud_netapp_v1_BackupPolicy_LabelsEntry_descriptor = + internal_static_google_cloud_netapp_v1_BackupPolicy_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_netapp_v1_BackupPolicy_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_BackupPolicy_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_netapp_v1_CreateBackupPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_netapp_v1_CreateBackupPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_CreateBackupPolicyRequest_descriptor, + new java.lang.String[] { + "Parent", "BackupPolicy", "BackupPolicyId", + }); + internal_static_google_cloud_netapp_v1_GetBackupPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_netapp_v1_GetBackupPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_GetBackupPolicyRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_netapp_v1_ListBackupPoliciesRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_netapp_v1_ListBackupPoliciesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_ListBackupPoliciesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_netapp_v1_ListBackupPoliciesResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_netapp_v1_ListBackupPoliciesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_ListBackupPoliciesResponse_descriptor, + new java.lang.String[] { + "BackupPolicies", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_netapp_v1_UpdateBackupPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_netapp_v1_UpdateBackupPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_UpdateBackupPolicyRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "BackupPolicy", + }); + internal_static_google_cloud_netapp_v1_DeleteBackupPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_netapp_v1_DeleteBackupPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_DeleteBackupPolicyRequest_descriptor, + new java.lang.String[] { + "Name", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupProto.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupProto.java new file mode 100644 index 000000000000..c253173962cd --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupProto.java @@ -0,0 +1,218 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup.proto + +package com.google.cloud.netapp.v1; + +public final class BackupProto { + private BackupProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_Backup_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_Backup_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_Backup_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_Backup_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_ListBackupsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_ListBackupsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_ListBackupsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_ListBackupsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_GetBackupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_GetBackupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_CreateBackupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_CreateBackupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_DeleteBackupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_DeleteBackupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_UpdateBackupRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_UpdateBackupRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n#google/cloud/netapp/v1/backup.proto\022\026g" + + "oogle.cloud.netapp.v1\032\037google/api/field_" + + "behavior.proto\032\031google/api/resource.prot" + + "o\032 google/protobuf/field_mask.proto\032\037goo" + + "gle/protobuf/timestamp.proto\"\330\006\n\006Backup\022" + + "\022\n\004name\030\001 \001(\tB\004\342A\001\010\0229\n\005state\030\002 \001(\0162$.goo" + + "gle.cloud.netapp.v1.Backup.StateB\004\342A\001\003\022\023" + + "\n\013description\030\003 \001(\t\022 \n\022volume_usage_byte" + + "s\030\004 \001(\003B\004\342A\001\003\022>\n\013backup_type\030\005 \001(\0162#.goo" + + "gle.cloud.netapp.v1.Backup.TypeB\004\342A\001\003\0228\n" + + "\rsource_volume\030\006 \001(\tB!\372A\036\n\034netapp.google" + + "apis.com/Volume\022A\n\017source_snapshot\030\007 \001(\t" + + "B#\372A \n\036netapp.googleapis.com/SnapshotH\000\210" + + "\001\001\0225\n\013create_time\030\010 \001(\0132\032.google.protobu" + + "f.TimestampB\004\342A\001\003\022:\n\006labels\030\t \003(\0132*.goog" + + "le.cloud.netapp.v1.Backup.LabelsEntry\022!\n" + + "\023chain_storage_bytes\030\n \001(\003B\004\342A\001\003\032-\n\013Labe" + + "lsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"" + + "m\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREAT" + + "ING\020\001\022\r\n\tUPLOADING\020\002\022\t\n\005READY\020\003\022\014\n\010DELET" + + "ING\020\004\022\t\n\005ERROR\020\005\022\014\n\010UPDATING\020\006\"7\n\004Type\022\024" + + "\n\020TYPE_UNSPECIFIED\020\000\022\n\n\006MANUAL\020\001\022\r\n\tSCHE" + + "DULED\020\002:\211\001\352A\205\001\n\034netapp.googleapis.com/Ba" + + "ckup\022Tprojects/{project}/locations/{loca" + + "tion}/backupVaults/{backup_vault}/backup" + + "s/{backup}*\007backups2\006backupB\022\n\020_source_s" + + "napshot\"\224\001\n\022ListBackupsRequest\0225\n\006parent" + + "\030\001 \001(\tB%\342A\001\002\372A\036\022\034netapp.googleapis.com/B" + + "ackup\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003" + + " \001(\t\022\020\n\010order_by\030\004 \001(\t\022\016\n\006filter\030\005 \001(\t\"t" + + "\n\023ListBackupsResponse\022/\n\007backups\030\001 \003(\0132\036" + + ".google.cloud.netapp.v1.Backup\022\027\n\017next_p" + + "age_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"G\n\020" + + "GetBackupRequest\0223\n\004name\030\001 \001(\tB%\342A\001\002\372A\036\n" + + "\034netapp.googleapis.com/Backup\"\233\001\n\023Create" + + "BackupRequest\0225\n\006parent\030\001 \001(\tB%\342A\001\002\372A\036\022\034" + + "netapp.googleapis.com/Backup\022\027\n\tbackup_i" + + "d\030\002 \001(\tB\004\342A\001\002\0224\n\006backup\030\003 \001(\0132\036.google.c" + + "loud.netapp.v1.BackupB\004\342A\001\002\"J\n\023DeleteBac" + + "kupRequest\0223\n\004name\030\001 \001(\tB%\342A\001\002\372A\036\n\034netap" + + "p.googleapis.com/Backup\"\202\001\n\023UpdateBackup" + + "Request\0225\n\013update_mask\030\001 \001(\0132\032.google.pr" + + "otobuf.FieldMaskB\004\342A\001\002\0224\n\006backup\030\002 \001(\0132\036" + + ".google.cloud.netapp.v1.BackupB\004\342A\001\002B\255\001\n" + + "\032com.google.cloud.netapp.v1B\013BackupProto" + + "P\001Z2cloud.google.com/go/netapp/apiv1/net" + + "apppb;netapppb\252\002\026Google.Cloud.NetApp.V1\312" + + "\002\026Google\\Cloud\\NetApp\\V1\352\002\031Google::Cloud" + + "::NetApp::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_netapp_v1_Backup_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_netapp_v1_Backup_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_Backup_descriptor, + new java.lang.String[] { + "Name", + "State", + "Description", + "VolumeUsageBytes", + "BackupType", + "SourceVolume", + "SourceSnapshot", + "CreateTime", + "Labels", + "ChainStorageBytes", + "SourceSnapshot", + }); + internal_static_google_cloud_netapp_v1_Backup_LabelsEntry_descriptor = + internal_static_google_cloud_netapp_v1_Backup_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_netapp_v1_Backup_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_Backup_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_netapp_v1_ListBackupsRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_netapp_v1_ListBackupsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_ListBackupsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "OrderBy", "Filter", + }); + internal_static_google_cloud_netapp_v1_ListBackupsResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_netapp_v1_ListBackupsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_ListBackupsResponse_descriptor, + new java.lang.String[] { + "Backups", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_netapp_v1_GetBackupRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_netapp_v1_GetBackupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_GetBackupRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_netapp_v1_CreateBackupRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_netapp_v1_CreateBackupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_CreateBackupRequest_descriptor, + new java.lang.String[] { + "Parent", "BackupId", "Backup", + }); + internal_static_google_cloud_netapp_v1_DeleteBackupRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_netapp_v1_DeleteBackupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_DeleteBackupRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_netapp_v1_UpdateBackupRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_netapp_v1_UpdateBackupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_UpdateBackupRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Backup", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupVault.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupVault.java new file mode 100644 index 000000000000..5c98dee90fd1 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupVault.java @@ -0,0 +1,1816 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_vault.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * A NetApp BackupVault.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.BackupVault} + */ +public final class BackupVault extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.BackupVault) + BackupVaultOrBuilder { + private static final long serialVersionUID = 0L; + // Use BackupVault.newBuilder() to construct. + private BackupVault(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BackupVault() { + name_ = ""; + state_ = 0; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BackupVault(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_BackupVault_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 5: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_BackupVault_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.BackupVault.class, + com.google.cloud.netapp.v1.BackupVault.Builder.class); + } + + /** + * + * + *
+   * The Backup Vault States
+   * 
+ * + * Protobuf enum {@code google.cloud.netapp.v1.BackupVault.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * BackupVault is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * BackupVault is available for use.
+     * 
+ * + * READY = 2; + */ + READY(2), + /** + * + * + *
+     * BackupVault is being deleted.
+     * 
+ * + * DELETING = 3; + */ + DELETING(3), + /** + * + * + *
+     * BackupVault is not valid and cannot be used.
+     * 
+ * + * ERROR = 4; + */ + ERROR(4), + /** + * + * + *
+     * BackupVault is being updated.
+     * 
+ * + * UPDATING = 5; + */ + UPDATING(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * State not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * BackupVault is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + * + * + *
+     * BackupVault is available for use.
+     * 
+ * + * READY = 2; + */ + public static final int READY_VALUE = 2; + /** + * + * + *
+     * BackupVault is being deleted.
+     * 
+ * + * DELETING = 3; + */ + public static final int DELETING_VALUE = 3; + /** + * + * + *
+     * BackupVault is not valid and cannot be used.
+     * 
+ * + * ERROR = 4; + */ + public static final int ERROR_VALUE = 4; + /** + * + * + *
+     * BackupVault is being updated.
+     * 
+ * + * UPDATING = 5; + */ + public static final int UPDATING_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return READY; + case 3: + return DELETING; + case 4: + return ERROR; + case 5: + return UPDATING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupVault.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.netapp.v1.BackupVault.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Identifier. The resource name of the backup vault.
+   * Format:
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Identifier. The resource name of the backup vault.
+   * Format:
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 2; + private int state_ = 0; + /** + * + * + *
+   * Output only. The backup vault state.
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupVault.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The backup vault state.
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupVault.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.netapp.v1.BackupVault.State getState() { + com.google.cloud.netapp.v1.BackupVault.State result = + com.google.cloud.netapp.v1.BackupVault.State.forNumber(state_); + return result == null ? com.google.cloud.netapp.v1.BackupVault.State.UNRECOGNIZED : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Create time of the backup vault.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Create time of the backup vault.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Create time of the backup vault.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Description of the backup vault.
+   * 
+ * + * string description = 4; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Description of the backup vault.
+   * 
+ * + * string description = 4; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 5; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_BackupVault_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (state_ != com.google.cloud.netapp.v1.BackupVault.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, state_); + } + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 5); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (state_ != com.google.cloud.netapp.v1.BackupVault.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, labels__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.BackupVault)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.BackupVault other = (com.google.cloud.netapp.v1.BackupVault) obj; + + if (!getName().equals(other.getName())) return false; + if (state_ != other.state_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!getDescription().equals(other.getDescription())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.BackupVault parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.BackupVault parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.BackupVault parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.BackupVault parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.BackupVault parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.BackupVault parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.BackupVault parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.BackupVault parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.BackupVault parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.BackupVault parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.BackupVault parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.BackupVault parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.netapp.v1.BackupVault prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A NetApp BackupVault.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.BackupVault} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.BackupVault) + com.google.cloud.netapp.v1.BackupVaultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_BackupVault_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 5: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 5: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_BackupVault_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.BackupVault.class, + com.google.cloud.netapp.v1.BackupVault.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.BackupVault.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + state_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + description_ = ""; + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_BackupVault_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.BackupVault getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.BackupVault.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.BackupVault build() { + com.google.cloud.netapp.v1.BackupVault result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.BackupVault buildPartial() { + com.google.cloud.netapp.v1.BackupVault result = + new com.google.cloud.netapp.v1.BackupVault(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.netapp.v1.BackupVault result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.BackupVault) { + return mergeFrom((com.google.cloud.netapp.v1.BackupVault) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.BackupVault other) { + if (other == com.google.cloud.netapp.v1.BackupVault.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000008; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000010; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Identifier. The resource name of the backup vault.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Identifier. The resource name of the backup vault.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Identifier. The resource name of the backup vault.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Identifier. The resource name of the backup vault.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Identifier. The resource name of the backup vault.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The backup vault state.
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The backup vault state.
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The backup vault state.
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.netapp.v1.BackupVault.State getState() { + com.google.cloud.netapp.v1.BackupVault.State result = + com.google.cloud.netapp.v1.BackupVault.State.forNumber(state_); + return result == null ? com.google.cloud.netapp.v1.BackupVault.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The backup vault state.
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.netapp.v1.BackupVault.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The backup vault state.
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000002); + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Create time of the backup vault.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. Create time of the backup vault.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Create time of the backup vault.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Create time of the backup vault.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Create time of the backup vault.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Create time of the backup vault.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Create time of the backup vault.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Create time of the backup vault.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Create time of the backup vault.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Description of the backup vault.
+     * 
+ * + * string description = 4; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Description of the backup vault.
+     * 
+ * + * string description = 4; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Description of the backup vault.
+     * 
+ * + * string description = 4; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Description of the backup vault.
+     * 
+ * + * string description = 4; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Description of the backup vault.
+     * 
+ * + * string description = 4; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Resource labels to represent user provided metadata.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Resource labels to represent user provided metadata.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Resource labels to represent user provided metadata.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Resource labels to represent user provided metadata.
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Resource labels to represent user provided metadata.
+     * 
+ * + * map<string, string> labels = 5; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000010; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Resource labels to represent user provided metadata.
+     * 
+ * + * map<string, string> labels = 5; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + /** + * + * + *
+     * Resource labels to represent user provided metadata.
+     * 
+ * + * map<string, string> labels = 5; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.BackupVault) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.BackupVault) + private static final com.google.cloud.netapp.v1.BackupVault DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.BackupVault(); + } + + public static com.google.cloud.netapp.v1.BackupVault getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupVault parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.BackupVault getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupVaultName.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupVaultName.java new file mode 100644 index 000000000000..fedb1a151ed0 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupVaultName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class BackupVaultName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_BACKUP_VAULT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/backupVaults/{backup_vault}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String backupVault; + + @Deprecated + protected BackupVaultName() { + project = null; + location = null; + backupVault = null; + } + + private BackupVaultName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + backupVault = Preconditions.checkNotNull(builder.getBackupVault()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBackupVault() { + return backupVault; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static BackupVaultName of(String project, String location, String backupVault) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBackupVault(backupVault) + .build(); + } + + public static String format(String project, String location, String backupVault) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBackupVault(backupVault) + .build() + .toString(); + } + + public static BackupVaultName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_BACKUP_VAULT.validatedMatch( + formattedString, "BackupVaultName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("backup_vault")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (BackupVaultName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_BACKUP_VAULT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (backupVault != null) { + fieldMapBuilder.put("backup_vault", backupVault); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_BACKUP_VAULT.instantiate( + "project", project, "location", location, "backup_vault", backupVault); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + BackupVaultName that = ((BackupVaultName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.backupVault, that.backupVault); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(backupVault); + return h; + } + + /** Builder for projects/{project}/locations/{location}/backupVaults/{backup_vault}. */ + public static class Builder { + private String project; + private String location; + private String backupVault; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBackupVault() { + return backupVault; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setBackupVault(String backupVault) { + this.backupVault = backupVault; + return this; + } + + private Builder(BackupVaultName backupVaultName) { + this.project = backupVaultName.project; + this.location = backupVaultName.location; + this.backupVault = backupVaultName.backupVault; + } + + public BackupVaultName build() { + return new BackupVaultName(this); + } + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupVaultOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupVaultOrBuilder.java new file mode 100644 index 000000000000..5e4a91601688 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupVaultOrBuilder.java @@ -0,0 +1,204 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_vault.proto + +package com.google.cloud.netapp.v1; + +public interface BackupVaultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.BackupVault) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the backup vault.
+   * Format:
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Identifier. The resource name of the backup vault.
+   * Format:
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The backup vault state.
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupVault.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The backup vault state.
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupVault.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.netapp.v1.BackupVault.State getState(); + + /** + * + * + *
+   * Output only. Create time of the backup vault.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Create time of the backup vault.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Create time of the backup vault.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Description of the backup vault.
+   * 
+ * + * string description = 4; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Description of the backup vault.
+   * 
+ * + * string description = 4; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 5; + */ + int getLabelsCount(); + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 5; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 5; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 5; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Resource labels to represent user provided metadata.
+   * 
+ * + * map<string, string> labels = 5; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupVaultProto.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupVaultProto.java new file mode 100644 index 000000000000..b5634abadf23 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/BackupVaultProto.java @@ -0,0 +1,202 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_vault.proto + +package com.google.cloud.netapp.v1; + +public final class BackupVaultProto { + private BackupVaultProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_BackupVault_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_BackupVault_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_BackupVault_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_BackupVault_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_GetBackupVaultRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_GetBackupVaultRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_ListBackupVaultsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_ListBackupVaultsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_ListBackupVaultsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_ListBackupVaultsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_CreateBackupVaultRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_CreateBackupVaultRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_DeleteBackupVaultRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_DeleteBackupVaultRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_UpdateBackupVaultRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_UpdateBackupVaultRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n)google/cloud/netapp/v1/backup_vault.pr" + + "oto\022\026google.cloud.netapp.v1\032\037google/api/" + + "field_behavior.proto\032\031google/api/resourc" + + "e.proto\032 google/protobuf/field_mask.prot" + + "o\032\037google/protobuf/timestamp.proto\"\207\004\n\013B" + + "ackupVault\022\022\n\004name\030\001 \001(\tB\004\342A\001\010\022>\n\005state\030" + + "\002 \001(\0162).google.cloud.netapp.v1.BackupVau" + + "lt.StateB\004\342A\001\003\0225\n\013create_time\030\003 \001(\0132\032.go" + + "ogle.protobuf.TimestampB\004\342A\001\003\022\023\n\013descrip" + + "tion\030\004 \001(\t\022?\n\006labels\030\005 \003(\0132/.google.clou" + + "d.netapp.v1.BackupVault.LabelsEntry\032-\n\013L" + + "abelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" + + "8\001\"^\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CR" + + "EATING\020\001\022\t\n\005READY\020\002\022\014\n\010DELETING\020\003\022\t\n\005ERR" + + "OR\020\004\022\014\n\010UPDATING\020\005:\207\001\352A\203\001\n!netapp.google" + + "apis.com/BackupVault\022Cprojects/{project}" + + "/locations/{location}/backupVaults/{back" + + "up_vault}*\014backupVaults2\013backupVault\"Q\n\025" + + "GetBackupVaultRequest\0228\n\004name\030\001 \001(\tB*\342A\001" + + "\002\372A#\n!netapp.googleapis.com/BackupVault\"" + + "\236\001\n\027ListBackupVaultsRequest\022:\n\006parent\030\001 " + + "\001(\tB*\342A\001\002\372A#\022!netapp.googleapis.com/Back" + + "upVault\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token" + + "\030\003 \001(\t\022\020\n\010order_by\030\004 \001(\t\022\016\n\006filter\030\005 \001(\t" + + "\"\204\001\n\030ListBackupVaultsResponse\022:\n\rbackup_" + + "vaults\030\001 \003(\0132#.google.cloud.netapp.v1.Ba" + + "ckupVault\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013un" + + "reachable\030\003 \003(\t\"\266\001\n\030CreateBackupVaultReq" + + "uest\022:\n\006parent\030\001 \001(\tB*\342A\001\002\372A#\022!netapp.go" + + "ogleapis.com/BackupVault\022\035\n\017backup_vault" + + "_id\030\002 \001(\tB\004\342A\001\002\022?\n\014backup_vault\030\003 \001(\0132#." + + "google.cloud.netapp.v1.BackupVaultB\004\342A\001\002" + + "\"T\n\030DeleteBackupVaultRequest\0228\n\004name\030\001 \001" + + "(\tB*\342A\001\002\372A#\n!netapp.googleapis.com/Backu" + + "pVault\"\222\001\n\030UpdateBackupVaultRequest\0225\n\013u" + + "pdate_mask\030\001 \001(\0132\032.google.protobuf.Field" + + "MaskB\004\342A\001\002\022?\n\014backup_vault\030\002 \001(\0132#.googl" + + "e.cloud.netapp.v1.BackupVaultB\004\342A\001\002B\262\001\n\032" + + "com.google.cloud.netapp.v1B\020BackupVaultP" + + "rotoP\001Z2cloud.google.com/go/netapp/apiv1" + + "/netapppb;netapppb\252\002\026Google.Cloud.NetApp" + + ".V1\312\002\026Google\\Cloud\\NetApp\\V1\352\002\031Google::C" + + "loud::NetApp::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_netapp_v1_BackupVault_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_netapp_v1_BackupVault_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_BackupVault_descriptor, + new java.lang.String[] { + "Name", "State", "CreateTime", "Description", "Labels", + }); + internal_static_google_cloud_netapp_v1_BackupVault_LabelsEntry_descriptor = + internal_static_google_cloud_netapp_v1_BackupVault_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_netapp_v1_BackupVault_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_BackupVault_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_netapp_v1_GetBackupVaultRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_netapp_v1_GetBackupVaultRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_GetBackupVaultRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_netapp_v1_ListBackupVaultsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_netapp_v1_ListBackupVaultsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_ListBackupVaultsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "OrderBy", "Filter", + }); + internal_static_google_cloud_netapp_v1_ListBackupVaultsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_netapp_v1_ListBackupVaultsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_ListBackupVaultsResponse_descriptor, + new java.lang.String[] { + "BackupVaults", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_netapp_v1_CreateBackupVaultRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_netapp_v1_CreateBackupVaultRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_CreateBackupVaultRequest_descriptor, + new java.lang.String[] { + "Parent", "BackupVaultId", "BackupVault", + }); + internal_static_google_cloud_netapp_v1_DeleteBackupVaultRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_netapp_v1_DeleteBackupVaultRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_DeleteBackupVaultRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_netapp_v1_UpdateBackupVaultRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_netapp_v1_UpdateBackupVaultRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_UpdateBackupVaultRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "BackupVault", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CloudNetappServiceProto.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CloudNetappServiceProto.java index 24fe5dfa1930..1bee0f96b10b 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CloudNetappServiceProto.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CloudNetappServiceProto.java @@ -45,220 +45,303 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "gle/api/annotations.proto\032\027google/api/cl" + "ient.proto\032\037google/api/field_behavior.pr" + "oto\032\031google/api/resource.proto\032-google/c" - + "loud/netapp/v1/active_directory.proto\032 g" - + "oogle/cloud/netapp/v1/kms.proto\032(google/" - + "cloud/netapp/v1/replication.proto\032%googl" - + "e/cloud/netapp/v1/snapshot.proto\032)google" - + "/cloud/netapp/v1/storage_pool.proto\032#goo" - + "gle/cloud/netapp/v1/volume.proto\032#google" - + "/longrunning/operations.proto\032\033google/pr" - + "otobuf/empty.proto\032\037google/protobuf/time" - + "stamp.proto\"\207\002\n\021OperationMetadata\0225\n\013cre" - + "ate_time\030\001 \001(\0132\032.google.protobuf.Timesta" - + "mpB\004\342A\001\003\0222\n\010end_time\030\002 \001(\0132\032.google.prot" - + "obuf.TimestampB\004\342A\001\003\022\024\n\006target\030\003 \001(\tB\004\342A" - + "\001\003\022\022\n\004verb\030\004 \001(\tB\004\342A\001\003\022\034\n\016status_message" - + "\030\005 \001(\tB\004\342A\001\003\022$\n\026requested_cancellation\030\006" - + " \001(\010B\004\342A\001\003\022\031\n\013api_version\030\007 \001(\tB\004\342A\001\0032\363;" - + "\n\006NetApp\022\270\001\n\020ListStoragePools\022/.google.c" - + "loud.netapp.v1.ListStoragePoolsRequest\0320" - + ".google.cloud.netapp.v1.ListStoragePools" - + "Response\"A\332A\006parent\202\323\344\223\0022\0220/v1/{parent=p" - + "rojects/*/locations/*}/storagePools\022\366\001\n\021" - + "CreateStoragePool\0220.google.cloud.netapp." - + "v1.CreateStoragePoolRequest\032\035.google.lon" - + "grunning.Operation\"\217\001\312A \n\013StoragePool\022\021O" - + "perationMetadata\332A#parent,storage_pool,s" - + "torage_pool_id\202\323\344\223\002@\"0/v1/{parent=projec" - + "ts/*/locations/*}/storagePools:\014storage_" - + "pool\022\245\001\n\016GetStoragePool\022-.google.cloud.n" - + "etapp.v1.GetStoragePoolRequest\032#.google." - + "cloud.netapp.v1.StoragePool\"?\332A\004name\202\323\344\223" - + "\0022\0220/v1/{name=projects/*/locations/*/sto" - + "ragePools/*}\022\370\001\n\021UpdateStoragePool\0220.goo" - + "gle.cloud.netapp.v1.UpdateStoragePoolReq" - + "uest\032\035.google.longrunning.Operation\"\221\001\312A" - + " \n\013StoragePool\022\021OperationMetadata\332A\030stor" - + "age_pool,update_mask\202\323\344\223\002M2=/v1/{storage" - + "_pool.name=projects/*/locations/*/storag" - + "ePools/*}:\014storage_pool\022\322\001\n\021DeleteStorag" - + "ePool\0220.google.cloud.netapp.v1.DeleteSto" - + "ragePoolRequest\032\035.google.longrunning.Ope" - + "ration\"l\312A*\n\025google.protobuf.Empty\022\021Oper" - + "ationMetadata\332A\004name\202\323\344\223\0022*0/v1/{name=pr" - + "ojects/*/locations/*/storagePools/*}\022\244\001\n" - + "\013ListVolumes\022*.google.cloud.netapp.v1.Li" - + "stVolumesRequest\032+.google.cloud.netapp.v" - + "1.ListVolumesResponse\"<\332A\006parent\202\323\344\223\002-\022+" - + "/v1/{parent=projects/*/locations/*}/volu" - + "mes\022\221\001\n\tGetVolume\022(.google.cloud.netapp." - + "v1.GetVolumeRequest\032\036.google.cloud.netap" - + "p.v1.Volume\":\332A\004name\202\323\344\223\002-\022+/v1/{name=pr" - + "ojects/*/locations/*/volumes/*}\022\317\001\n\014Crea" - + "teVolume\022+.google.cloud.netapp.v1.Create" - + "VolumeRequest\032\035.google.longrunning.Opera" - + "tion\"s\312A\033\n\006Volume\022\021OperationMetadata\332A\027p" - + "arent,volume,volume_id\202\323\344\223\0025\"+/v1/{paren" - + "t=projects/*/locations/*}/volumes:\006volum" - + "e\022\321\001\n\014UpdateVolume\022+.google.cloud.netapp" - + ".v1.UpdateVolumeRequest\032\035.google.longrun" - + "ning.Operation\"u\312A\033\n\006Volume\022\021OperationMe" - + "tadata\332A\022volume,update_mask\202\323\344\223\002<22/v1/{" - + "volume.name=projects/*/locations/*/volum" - + "es/*}:\006volume\022\303\001\n\014DeleteVolume\022+.google." - + "cloud.netapp.v1.DeleteVolumeRequest\032\035.go" - + "ogle.longrunning.Operation\"g\312A*\n\025google." + + "loud/netapp/v1/active_directory.proto\032#g" + + "oogle/cloud/netapp/v1/backup.proto\032*goog" + + "le/cloud/netapp/v1/backup_policy.proto\032)" + + "google/cloud/netapp/v1/backup_vault.prot" + + "o\032 google/cloud/netapp/v1/kms.proto\032(goo" + + "gle/cloud/netapp/v1/replication.proto\032%g" + + "oogle/cloud/netapp/v1/snapshot.proto\032)go" + + "ogle/cloud/netapp/v1/storage_pool.proto\032" + + "#google/cloud/netapp/v1/volume.proto\032#go" + + "ogle/longrunning/operations.proto\032\033googl" + + "e/protobuf/empty.proto\032\037google/protobuf/" + + "timestamp.proto\"\207\002\n\021OperationMetadata\0225\n" + + "\013create_time\030\001 \001(\0132\032.google.protobuf.Tim" + + "estampB\004\342A\001\003\0222\n\010end_time\030\002 \001(\0132\032.google." + + "protobuf.TimestampB\004\342A\001\003\022\024\n\006target\030\003 \001(\t" + + "B\004\342A\001\003\022\022\n\004verb\030\004 \001(\tB\004\342A\001\003\022\034\n\016status_mes" + + "sage\030\005 \001(\tB\004\342A\001\003\022$\n\026requested_cancellati" + + "on\030\006 \001(\010B\004\342A\001\003\022\031\n\013api_version\030\007 \001(\tB\004\342A\001" + + "\0032\340T\n\006NetApp\022\270\001\n\020ListStoragePools\022/.goog" + + "le.cloud.netapp.v1.ListStoragePoolsReque" + + "st\0320.google.cloud.netapp.v1.ListStorageP" + + "oolsResponse\"A\332A\006parent\202\323\344\223\0022\0220/v1/{pare" + + "nt=projects/*/locations/*}/storagePools\022" + + "\366\001\n\021CreateStoragePool\0220.google.cloud.net" + + "app.v1.CreateStoragePoolRequest\032\035.google" + + ".longrunning.Operation\"\217\001\312A \n\013StoragePoo" + + "l\022\021OperationMetadata\332A#parent,storage_po" + + "ol,storage_pool_id\202\323\344\223\002@\"0/v1/{parent=pr" + + "ojects/*/locations/*}/storagePools:\014stor" + + "age_pool\022\245\001\n\016GetStoragePool\022-.google.clo" + + "ud.netapp.v1.GetStoragePoolRequest\032#.goo" + + "gle.cloud.netapp.v1.StoragePool\"?\332A\004name" + + "\202\323\344\223\0022\0220/v1/{name=projects/*/locations/*" + + "/storagePools/*}\022\370\001\n\021UpdateStoragePool\0220" + + ".google.cloud.netapp.v1.UpdateStoragePoo" + + "lRequest\032\035.google.longrunning.Operation\"" + + "\221\001\312A \n\013StoragePool\022\021OperationMetadata\332A\030" + + "storage_pool,update_mask\202\323\344\223\002M2=/v1/{sto" + + "rage_pool.name=projects/*/locations/*/st" + + "oragePools/*}:\014storage_pool\022\322\001\n\021DeleteSt" + + "oragePool\0220.google.cloud.netapp.v1.Delet" + + "eStoragePoolRequest\032\035.google.longrunning" + + ".Operation\"l\312A*\n\025google.protobuf.Empty\022\021" + + "OperationMetadata\332A\004name\202\323\344\223\0022*0/v1/{nam" + + "e=projects/*/locations/*/storagePools/*}" + + "\022\244\001\n\013ListVolumes\022*.google.cloud.netapp.v" + + "1.ListVolumesRequest\032+.google.cloud.neta" + + "pp.v1.ListVolumesResponse\"<\332A\006parent\202\323\344\223" + + "\002-\022+/v1/{parent=projects/*/locations/*}/" + + "volumes\022\221\001\n\tGetVolume\022(.google.cloud.net" + + "app.v1.GetVolumeRequest\032\036.google.cloud.n" + + "etapp.v1.Volume\":\332A\004name\202\323\344\223\002-\022+/v1/{nam" + + "e=projects/*/locations/*/volumes/*}\022\317\001\n\014" + + "CreateVolume\022+.google.cloud.netapp.v1.Cr" + + "eateVolumeRequest\032\035.google.longrunning.O" + + "peration\"s\312A\033\n\006Volume\022\021OperationMetadata" + + "\332A\027parent,volume,volume_id\202\323\344\223\0025\"+/v1/{p" + + "arent=projects/*/locations/*}/volumes:\006v" + + "olume\022\321\001\n\014UpdateVolume\022+.google.cloud.ne" + + "tapp.v1.UpdateVolumeRequest\032\035.google.lon" + + "grunning.Operation\"u\312A\033\n\006Volume\022\021Operati" + + "onMetadata\332A\022volume,update_mask\202\323\344\223\002<22/" + + "v1/{volume.name=projects/*/locations/*/v" + + "olumes/*}:\006volume\022\303\001\n\014DeleteVolume\022+.goo" + + "gle.cloud.netapp.v1.DeleteVolumeRequest\032" + + "\035.google.longrunning.Operation\"g\312A*\n\025goo" + + "gle.protobuf.Empty\022\021OperationMetadata\332A\004" + + "name\202\323\344\223\002-*+/v1/{name=projects/*/locatio" + + "ns/*/volumes/*}\022\267\001\n\014RevertVolume\022+.googl" + + "e.cloud.netapp.v1.RevertVolumeRequest\032\035." + + "google.longrunning.Operation\"[\312A\033\n\006Volum" + + "e\022\021OperationMetadata\202\323\344\223\0027\"2/v1/{name=pr" + + "ojects/*/locations/*/volumes/*}:revert:\001" + + "*\022\266\001\n\rListSnapshots\022,.google.cloud.netap" + + "p.v1.ListSnapshotsRequest\032-.google.cloud" + + ".netapp.v1.ListSnapshotsResponse\"H\332A\006par" + + "ent\202\323\344\223\0029\0227/v1/{parent=projects/*/locati" + + "ons/*/volumes/*}/snapshots\022\243\001\n\013GetSnapsh" + + "ot\022*.google.cloud.netapp.v1.GetSnapshotR" + + "equest\032 .google.cloud.netapp.v1.Snapshot" + + "\"F\332A\004name\202\323\344\223\0029\0227/v1/{name=projects/*/lo" + + "cations/*/volumes/*/snapshots/*}\022\350\001\n\016Cre" + + "ateSnapshot\022-.google.cloud.netapp.v1.Cre" + + "ateSnapshotRequest\032\035.google.longrunning." + + "Operation\"\207\001\312A\035\n\010Snapshot\022\021OperationMeta" + + "data\332A\033parent,snapshot,snapshot_id\202\323\344\223\002C" + + "\"7/v1/{parent=projects/*/locations/*/vol" + + "umes/*}/snapshots:\010snapshot\022\323\001\n\016DeleteSn" + + "apshot\022-.google.cloud.netapp.v1.DeleteSn" + + "apshotRequest\032\035.google.longrunning.Opera" + + "tion\"s\312A*\n\025google.protobuf.Empty\022\021Operat" + + "ionMetadata\332A\004name\202\323\344\223\0029*7/v1/{name=proj" + + "ects/*/locations/*/volumes/*/snapshots/*" + + "}\022\352\001\n\016UpdateSnapshot\022-.google.cloud.neta" + + "pp.v1.UpdateSnapshotRequest\032\035.google.lon" + + "grunning.Operation\"\211\001\312A\035\n\010Snapshot\022\021Oper" + + "ationMetadata\332A\024snapshot,update_mask\202\323\344\223" + + "\002L2@/v1/{snapshot.name=projects/*/locati" + + "ons/*/volumes/*/snapshots/*}:\010snapshot\022\314" + + "\001\n\025ListActiveDirectories\0224.google.cloud." + + "netapp.v1.ListActiveDirectoriesRequest\0325" + + ".google.cloud.netapp.v1.ListActiveDirect" + + "oriesResponse\"F\332A\006parent\202\323\344\223\0027\0225/v1/{par" + + "ent=projects/*/locations/*}/activeDirect" + + "ories\022\266\001\n\022GetActiveDirectory\0221.google.cl" + + "oud.netapp.v1.GetActiveDirectoryRequest\032" + + "\'.google.cloud.netapp.v1.ActiveDirectory" + + "\"D\332A\004name\202\323\344\223\0027\0225/v1/{name=projects/*/lo" + + "cations/*/activeDirectories/*}\022\223\002\n\025Creat" + + "eActiveDirectory\0224.google.cloud.netapp.v" + + "1.CreateActiveDirectoryRequest\032\035.google." + + "longrunning.Operation\"\244\001\312A$\n\017ActiveDirec" + + "tory\022\021OperationMetadata\332A+parent,active_" + + "directory,active_directory_id\202\323\344\223\002I\"5/v1" + + "/{parent=projects/*/locations/*}/activeD" + + "irectories:\020active_directory\022\225\002\n\025UpdateA" + + "ctiveDirectory\0224.google.cloud.netapp.v1." + + "UpdateActiveDirectoryRequest\032\035.google.lo" + + "ngrunning.Operation\"\246\001\312A$\n\017ActiveDirecto" + + "ry\022\021OperationMetadata\332A\034active_directory" + + ",update_mask\202\323\344\223\002Z2F/v1/{active_director" + + "y.name=projects/*/locations/*/activeDire" + + "ctories/*}:\020active_directory\022\337\001\n\025DeleteA" + + "ctiveDirectory\0224.google.cloud.netapp.v1." + + "DeleteActiveDirectoryRequest\032\035.google.lo" + + "ngrunning.Operation\"q\312A*\n\025google.protobu" + + "f.Empty\022\021OperationMetadata\332A\004name\202\323\344\223\0027*" + + "5/v1/{name=projects/*/locations/*/active" + + "Directories/*}\022\260\001\n\016ListKmsConfigs\022-.goog" + + "le.cloud.netapp.v1.ListKmsConfigsRequest" + + "\032..google.cloud.netapp.v1.ListKmsConfigs" + + "Response\"?\332A\006parent\202\323\344\223\0020\022./v1/{parent=p" + + "rojects/*/locations/*}/kmsConfigs\022\350\001\n\017Cr" + + "eateKmsConfig\022..google.cloud.netapp.v1.C" + + "reateKmsConfigRequest\032\035.google.longrunni" + + "ng.Operation\"\205\001\312A\036\n\tKmsConfig\022\021Operation" + + "Metadata\332A\037parent,kms_config,kms_config_" + + "id\202\323\344\223\002<\"./v1/{parent=projects/*/locatio" + + "ns/*}/kmsConfigs:\nkms_config\022\235\001\n\014GetKmsC" + + "onfig\022+.google.cloud.netapp.v1.GetKmsCon" + + "figRequest\032!.google.cloud.netapp.v1.KmsC" + + "onfig\"=\332A\004name\202\323\344\223\0020\022./v1/{name=projects" + + "/*/locations/*/kmsConfigs/*}\022\352\001\n\017UpdateK" + + "msConfig\022..google.cloud.netapp.v1.Update" + + "KmsConfigRequest\032\035.google.longrunning.Op" + + "eration\"\207\001\312A\036\n\tKmsConfig\022\021OperationMetad" + + "ata\332A\026kms_config,update_mask\202\323\344\223\002G29/v1/" + + "{kms_config.name=projects/*/locations/*/" + + "kmsConfigs/*}:\nkms_config\022\302\001\n\016EncryptVol" + + "umes\022-.google.cloud.netapp.v1.EncryptVol" + + "umesRequest\032\035.google.longrunning.Operati" + + "on\"b\312A\036\n\tKmsConfig\022\021OperationMetadata\202\323\344" + + "\223\002;\"6/v1/{name=projects/*/locations/*/km" + + "sConfigs/*}:encrypt:\001*\022\264\001\n\017VerifyKmsConf" + + "ig\022..google.cloud.netapp.v1.VerifyKmsCon" + + "figRequest\032/.google.cloud.netapp.v1.Veri" + + "fyKmsConfigResponse\"@\202\323\344\223\002:\"5/v1/{name=p" + + "rojects/*/locations/*/kmsConfigs/*}:veri" + + "fy:\001*\022\314\001\n\017DeleteKmsConfig\022..google.cloud" + + ".netapp.v1.DeleteKmsConfigRequest\032\035.goog" + + "le.longrunning.Operation\"j\312A*\n\025google.pr" + + "otobuf.Empty\022\021OperationMetadata\332A\004name\202\323" + + "\344\223\0020*./v1/{name=projects/*/locations/*/k" + + "msConfigs/*}\022\302\001\n\020ListReplications\022/.goog" + + "le.cloud.netapp.v1.ListReplicationsReque" + + "st\0320.google.cloud.netapp.v1.ListReplicat" + + "ionsResponse\"K\332A\006parent\202\323\344\223\002<\022:/v1/{pare" + + "nt=projects/*/locations/*/volumes/*}/rep" + + "lications\022\257\001\n\016GetReplication\022-.google.cl" + + "oud.netapp.v1.GetReplicationRequest\032#.go" + + "ogle.cloud.netapp.v1.Replication\"I\332A\004nam" + + "e\202\323\344\223\002<\022:/v1/{name=projects/*/locations/" + + "*/volumes/*/replications/*}\022\375\001\n\021CreateRe" + + "plication\0220.google.cloud.netapp.v1.Creat" + + "eReplicationRequest\032\035.google.longrunning" + + ".Operation\"\226\001\312A \n\013Replication\022\021Operation" + + "Metadata\332A!parent,replication,replicatio" + + "n_id\202\323\344\223\002I\":/v1/{parent=projects/*/locat" + + "ions/*/volumes/*}/replications:\013replicat" + + "ion\022\334\001\n\021DeleteReplication\0220.google.cloud" + + ".netapp.v1.DeleteReplicationRequest\032\035.go" + + "ogle.longrunning.Operation\"v\312A*\n\025google." + "protobuf.Empty\022\021OperationMetadata\332A\004name" - + "\202\323\344\223\002-*+/v1/{name=projects/*/locations/*" - + "/volumes/*}\022\267\001\n\014RevertVolume\022+.google.cl" - + "oud.netapp.v1.RevertVolumeRequest\032\035.goog" - + "le.longrunning.Operation\"[\312A\033\n\006Volume\022\021O" - + "perationMetadata\202\323\344\223\0027\"2/v1/{name=projec" - + "ts/*/locations/*/volumes/*}:revert:\001*\022\266\001" - + "\n\rListSnapshots\022,.google.cloud.netapp.v1" - + ".ListSnapshotsRequest\032-.google.cloud.net" - + "app.v1.ListSnapshotsResponse\"H\332A\006parent\202" - + "\323\344\223\0029\0227/v1/{parent=projects/*/locations/" - + "*/volumes/*}/snapshots\022\243\001\n\013GetSnapshot\022*" - + ".google.cloud.netapp.v1.GetSnapshotReque" - + "st\032 .google.cloud.netapp.v1.Snapshot\"F\332A" - + "\004name\202\323\344\223\0029\0227/v1/{name=projects/*/locati" - + "ons/*/volumes/*/snapshots/*}\022\350\001\n\016CreateS" - + "napshot\022-.google.cloud.netapp.v1.CreateS" - + "napshotRequest\032\035.google.longrunning.Oper" - + "ation\"\207\001\312A\035\n\010Snapshot\022\021OperationMetadata" - + "\332A\033parent,snapshot,snapshot_id\202\323\344\223\002C\"7/v" - + "1/{parent=projects/*/locations/*/volumes" - + "/*}/snapshots:\010snapshot\022\323\001\n\016DeleteSnapsh" - + "ot\022-.google.cloud.netapp.v1.DeleteSnapsh" - + "otRequest\032\035.google.longrunning.Operation" - + "\"s\312A*\n\025google.protobuf.Empty\022\021OperationM" - + "etadata\332A\004name\202\323\344\223\0029*7/v1/{name=projects" - + "/*/locations/*/volumes/*/snapshots/*}\022\352\001" - + "\n\016UpdateSnapshot\022-.google.cloud.netapp.v" - + "1.UpdateSnapshotRequest\032\035.google.longrun" - + "ning.Operation\"\211\001\312A\035\n\010Snapshot\022\021Operatio" - + "nMetadata\332A\024snapshot,update_mask\202\323\344\223\002L2@" - + "/v1/{snapshot.name=projects/*/locations/" - + "*/volumes/*/snapshots/*}:\010snapshot\022\314\001\n\025L" - + "istActiveDirectories\0224.google.cloud.neta" - + "pp.v1.ListActiveDirectoriesRequest\0325.goo" - + "gle.cloud.netapp.v1.ListActiveDirectorie" - + "sResponse\"F\332A\006parent\202\323\344\223\0027\0225/v1/{parent=" - + "projects/*/locations/*}/activeDirectorie" - + "s\022\266\001\n\022GetActiveDirectory\0221.google.cloud." - + "netapp.v1.GetActiveDirectoryRequest\032\'.go" - + "ogle.cloud.netapp.v1.ActiveDirectory\"D\332A" - + "\004name\202\323\344\223\0027\0225/v1/{name=projects/*/locati" - + "ons/*/activeDirectories/*}\022\223\002\n\025CreateAct" - + "iveDirectory\0224.google.cloud.netapp.v1.Cr" - + "eateActiveDirectoryRequest\032\035.google.long" - + "running.Operation\"\244\001\312A$\n\017ActiveDirectory" - + "\022\021OperationMetadata\332A+parent,active_dire" - + "ctory,active_directory_id\202\323\344\223\002I\"5/v1/{pa" - + "rent=projects/*/locations/*}/activeDirec" - + "tories:\020active_directory\022\225\002\n\025UpdateActiv" - + "eDirectory\0224.google.cloud.netapp.v1.Upda" - + "teActiveDirectoryRequest\032\035.google.longru" - + "nning.Operation\"\246\001\312A$\n\017ActiveDirectory\022\021" - + "OperationMetadata\332A\034active_directory,upd" - + "ate_mask\202\323\344\223\002Z2F/v1/{active_directory.na" - + "me=projects/*/locations/*/activeDirector" - + "ies/*}:\020active_directory\022\337\001\n\025DeleteActiv" - + "eDirectory\0224.google.cloud.netapp.v1.Dele" - + "teActiveDirectoryRequest\032\035.google.longru" - + "nning.Operation\"q\312A*\n\025google.protobuf.Em" - + "pty\022\021OperationMetadata\332A\004name\202\323\344\223\0027*5/v1" - + "/{name=projects/*/locations/*/activeDire" - + "ctories/*}\022\260\001\n\016ListKmsConfigs\022-.google.c" - + "loud.netapp.v1.ListKmsConfigsRequest\032..g" - + "oogle.cloud.netapp.v1.ListKmsConfigsResp" - + "onse\"?\332A\006parent\202\323\344\223\0020\022./v1/{parent=proje" - + "cts/*/locations/*}/kmsConfigs\022\350\001\n\017Create" - + "KmsConfig\022..google.cloud.netapp.v1.Creat" - + "eKmsConfigRequest\032\035.google.longrunning.O" - + "peration\"\205\001\312A\036\n\tKmsConfig\022\021OperationMeta" - + "data\332A\037parent,kms_config,kms_config_id\202\323" - + "\344\223\002<\"./v1/{parent=projects/*/locations/*" - + "}/kmsConfigs:\nkms_config\022\235\001\n\014GetKmsConfi" - + "g\022+.google.cloud.netapp.v1.GetKmsConfigR" - + "equest\032!.google.cloud.netapp.v1.KmsConfi" - + "g\"=\332A\004name\202\323\344\223\0020\022./v1/{name=projects/*/l" - + "ocations/*/kmsConfigs/*}\022\352\001\n\017UpdateKmsCo" - + "nfig\022..google.cloud.netapp.v1.UpdateKmsC" - + "onfigRequest\032\035.google.longrunning.Operat" - + "ion\"\207\001\312A\036\n\tKmsConfig\022\021OperationMetadata\332" - + "A\026kms_config,update_mask\202\323\344\223\002G29/v1/{kms" - + "_config.name=projects/*/locations/*/kmsC" - + "onfigs/*}:\nkms_config\022\302\001\n\016EncryptVolumes" - + "\022-.google.cloud.netapp.v1.EncryptVolumes" - + "Request\032\035.google.longrunning.Operation\"b" - + "\312A\036\n\tKmsConfig\022\021OperationMetadata\202\323\344\223\002;\"" - + "6/v1/{name=projects/*/locations/*/kmsCon" - + "figs/*}:encrypt:\001*\022\264\001\n\017VerifyKmsConfig\022." - + ".google.cloud.netapp.v1.VerifyKmsConfigR" - + "equest\032/.google.cloud.netapp.v1.VerifyKm" - + "sConfigResponse\"@\202\323\344\223\002:\"5/v1/{name=proje" - + "cts/*/locations/*/kmsConfigs/*}:verify:\001" - + "*\022\314\001\n\017DeleteKmsConfig\022..google.cloud.net" - + "app.v1.DeleteKmsConfigRequest\032\035.google.l" - + "ongrunning.Operation\"j\312A*\n\025google.protob" - + "uf.Empty\022\021OperationMetadata\332A\004name\202\323\344\223\0020" - + "*./v1/{name=projects/*/locations/*/kmsCo" - + "nfigs/*}\022\302\001\n\020ListReplications\022/.google.c" - + "loud.netapp.v1.ListReplicationsRequest\0320" - + ".google.cloud.netapp.v1.ListReplications" - + "Response\"K\332A\006parent\202\323\344\223\002<\022:/v1/{parent=p" - + "rojects/*/locations/*/volumes/*}/replica" - + "tions\022\257\001\n\016GetReplication\022-.google.cloud." - + "netapp.v1.GetReplicationRequest\032#.google" - + ".cloud.netapp.v1.Replication\"I\332A\004name\202\323\344" - + "\223\002<\022:/v1/{name=projects/*/locations/*/vo" - + "lumes/*/replications/*}\022\375\001\n\021CreateReplic" - + "ation\0220.google.cloud.netapp.v1.CreateRep" - + "licationRequest\032\035.google.longrunning.Ope" - + "ration\"\226\001\312A \n\013Replication\022\021OperationMeta" - + "data\332A!parent,replication,replication_id" - + "\202\323\344\223\002I\":/v1/{parent=projects/*/locations" - + "/*/volumes/*}/replications:\013replication\022" - + "\334\001\n\021DeleteReplication\0220.google.cloud.net" - + "app.v1.DeleteReplicationRequest\032\035.google" - + ".longrunning.Operation\"v\312A*\n\025google.prot" - + "obuf.Empty\022\021OperationMetadata\332A\004name\202\323\344\223" - + "\002<*:/v1/{name=projects/*/locations/*/vol" - + "umes/*/replications/*}\022\377\001\n\021UpdateReplica" - + "tion\0220.google.cloud.netapp.v1.UpdateRepl" - + "icationRequest\032\035.google.longrunning.Oper" - + "ation\"\230\001\312A \n\013Replication\022\021OperationMetad" - + "ata\332A\027replication,update_mask\202\323\344\223\002U2F/v1" - + "/{replication.name=projects/*/locations/" - + "*/volumes/*/replications/*}:\013replication" - + "\022\317\001\n\017StopReplication\022..google.cloud.neta" - + "pp.v1.StopReplicationRequest\032\035.google.lo" - + "ngrunning.Operation\"m\312A \n\013Replication\022\021O" - + "perationMetadata\202\323\344\223\002D\"?/v1/{name=projec" - + "ts/*/locations/*/volumes/*/replications/" - + "*}:stop:\001*\022\325\001\n\021ResumeReplication\0220.googl" - + "e.cloud.netapp.v1.ResumeReplicationReque" - + "st\032\035.google.longrunning.Operation\"o\312A \n\013" - + "Replication\022\021OperationMetadata\202\323\344\223\002F\"A/v" + + "\202\323\344\223\002<*:/v1/{name=projects/*/locations/*" + + "/volumes/*/replications/*}\022\377\001\n\021UpdateRep" + + "lication\0220.google.cloud.netapp.v1.Update" + + "ReplicationRequest\032\035.google.longrunning." + + "Operation\"\230\001\312A \n\013Replication\022\021OperationM" + + "etadata\332A\027replication,update_mask\202\323\344\223\002U2" + + "F/v1/{replication.name=projects/*/locati" + + "ons/*/volumes/*/replications/*}:\013replica" + + "tion\022\317\001\n\017StopReplication\022..google.cloud." + + "netapp.v1.StopReplicationRequest\032\035.googl" + + "e.longrunning.Operation\"m\312A \n\013Replicatio" + + "n\022\021OperationMetadata\202\323\344\223\002D\"?/v1/{name=pr" + + "ojects/*/locations/*/volumes/*/replicati" + + "ons/*}:stop:\001*\022\325\001\n\021ResumeReplication\0220.g" + + "oogle.cloud.netapp.v1.ResumeReplicationR" + + "equest\032\035.google.longrunning.Operation\"o\312" + + "A \n\013Replication\022\021OperationMetadata\202\323\344\223\002F" + + "\"A/v1/{name=projects/*/locations/*/volum" + + "es/*/replications/*}:resume:\001*\022\363\001\n\033Rever" + + "seReplicationDirection\022:.google.cloud.ne" + + "tapp.v1.ReverseReplicationDirectionReque" + + "st\032\035.google.longrunning.Operation\"y\312A \n\013" + + "Replication\022\021OperationMetadata\202\323\344\223\002P\"K/v" + "1/{name=projects/*/locations/*/volumes/*" - + "/replications/*}:resume:\001*\022\363\001\n\033ReverseRe" - + "plicationDirection\022:.google.cloud.netapp" - + ".v1.ReverseReplicationDirectionRequest\032\035" - + ".google.longrunning.Operation\"y\312A \n\013Repl" - + "ication\022\021OperationMetadata\202\323\344\223\002P\"K/v1/{n" - + "ame=projects/*/locations/*/volumes/*/rep" - + "lications/*}:reverseDirection:\001*\032I\312A\025net" - + "app.googleapis.com\322A.https://www.googlea" - + "pis.com/auth/cloud-platformB\212\002\n\032com.goog" - + "le.cloud.netapp.v1B\027CloudNetappServicePr" - + "otoP\001Z2cloud.google.com/go/netapp/apiv1/" - + "netapppb;netapppb\252\002\026Google.Cloud.NetApp." - + "V1\312\002\026Google\\Cloud\\NetApp\\V1\352\002\031Google::Cl" - + "oud::NetApp::V1\352AN\n\036compute.googleapis.c" - + "om/Network\022,projects/{project}/global/ne" - + "tworks/{network}b\006proto3" + + "/replications/*}:reverseDirection:\001*\022\366\001\n" + + "\021CreateBackupVault\0220.google.cloud.netapp" + + ".v1.CreateBackupVaultRequest\032\035.google.lo" + + "ngrunning.Operation\"\217\001\312A \n\013BackupVault\022\021" + + "OperationMetadata\332A#parent,backup_vault," + + "backup_vault_id\202\323\344\223\002@\"0/v1/{parent=proje" + + "cts/*/locations/*}/backupVaults:\014backup_" + + "vault\022\245\001\n\016GetBackupVault\022-.google.cloud." + + "netapp.v1.GetBackupVaultRequest\032#.google" + + ".cloud.netapp.v1.BackupVault\"?\332A\004name\202\323\344" + + "\223\0022\0220/v1/{name=projects/*/locations/*/ba" + + "ckupVaults/*}\022\270\001\n\020ListBackupVaults\022/.goo" + + "gle.cloud.netapp.v1.ListBackupVaultsRequ" + + "est\0320.google.cloud.netapp.v1.ListBackupV" + + "aultsResponse\"A\332A\006parent\202\323\344\223\0022\0220/v1/{par" + + "ent=projects/*/locations/*}/backupVaults" + + "\022\370\001\n\021UpdateBackupVault\0220.google.cloud.ne" + + "tapp.v1.UpdateBackupVaultRequest\032\035.googl" + + "e.longrunning.Operation\"\221\001\312A \n\013BackupVau" + + "lt\022\021OperationMetadata\332A\030backup_vault,upd" + + "ate_mask\202\323\344\223\002M2=/v1/{backup_vault.name=p" + + "rojects/*/locations/*/backupVaults/*}:\014b" + + "ackup_vault\022\322\001\n\021DeleteBackupVault\0220.goog" + + "le.cloud.netapp.v1.DeleteBackupVaultRequ" + + "est\032\035.google.longrunning.Operation\"l\312A*\n" + + "\025google.protobuf.Empty\022\021OperationMetadat" + + "a\332A\004name\202\323\344\223\0022*0/v1/{name=projects/*/loc" + + "ations/*/backupVaults/*}\022\337\001\n\014CreateBacku" + + "p\022+.google.cloud.netapp.v1.CreateBackupR" + + "equest\032\035.google.longrunning.Operation\"\202\001" + + "\312A\033\n\006Backup\022\021OperationMetadata\332A\027parent," + + "backup,backup_id\202\323\344\223\002D\":/v1/{parent=proj" + + "ects/*/locations/*/backupVaults/*}/backu" + + "ps:\006backup\022\240\001\n\tGetBackup\022(.google.cloud." + + "netapp.v1.GetBackupRequest\032\036.google.clou" + + "d.netapp.v1.Backup\"I\332A\004name\202\323\344\223\002<\022:/v1/{" + + "name=projects/*/locations/*/backupVaults" + + "/*/backups/*}\022\263\001\n\013ListBackups\022*.google.c" + + "loud.netapp.v1.ListBackupsRequest\032+.goog" + + "le.cloud.netapp.v1.ListBackupsResponse\"K" + + "\332A\006parent\202\323\344\223\002<\022:/v1/{parent=projects/*/" + + "locations/*/backupVaults/*}/backups\022\322\001\n\014" + + "DeleteBackup\022+.google.cloud.netapp.v1.De" + + "leteBackupRequest\032\035.google.longrunning.O" + + "peration\"v\312A*\n\025google.protobuf.Empty\022\021Op" + + "erationMetadata\332A\004name\202\323\344\223\002<*:/v1/{name=" + + "projects/*/locations/*/backupVaults/*/ba" + + "ckups/*}\022\341\001\n\014UpdateBackup\022+.google.cloud" + + ".netapp.v1.UpdateBackupRequest\032\035.google." + + "longrunning.Operation\"\204\001\312A\033\n\006Backup\022\021Ope" + + "rationMetadata\332A\022backup,update_mask\202\323\344\223\002" + + "K2A/v1/{backup.name=projects/*/locations" + + "/*/backupVaults/*/backups/*}:\006backup\022\376\001\n" + + "\022CreateBackupPolicy\0221.google.cloud.netap" + + "p.v1.CreateBackupPolicyRequest\032\035.google." + + "longrunning.Operation\"\225\001\312A!\n\014BackupPolic" + + "y\022\021OperationMetadata\332A%parent,backup_pol" + + "icy,backup_policy_id\202\323\344\223\002C\"2/v1/{parent=" + + "projects/*/locations/*}/backupPolicies:\r" + + "backup_policy\022\252\001\n\017GetBackupPolicy\022..goog" + + "le.cloud.netapp.v1.GetBackupPolicyReques" + + "t\032$.google.cloud.netapp.v1.BackupPolicy\"" + + "A\332A\004name\202\323\344\223\0024\0222/v1/{name=projects/*/loc" + + "ations/*/backupPolicies/*}\022\300\001\n\022ListBacku" + + "pPolicies\0221.google.cloud.netapp.v1.ListB" + + "ackupPoliciesRequest\0322.google.cloud.neta" + + "pp.v1.ListBackupPoliciesResponse\"C\332A\006par" + + "ent\202\323\344\223\0024\0222/v1/{parent=projects/*/locati" + + "ons/*}/backupPolicies\022\200\002\n\022UpdateBackupPo" + + "licy\0221.google.cloud.netapp.v1.UpdateBack" + + "upPolicyRequest\032\035.google.longrunning.Ope" + + "ration\"\227\001\312A!\n\014BackupPolicy\022\021OperationMet" + + "adata\332A\031backup_policy,update_mask\202\323\344\223\002Q2" + + "@/v1/{backup_policy.name=projects/*/loca" + + "tions/*/backupPolicies/*}:\rbackup_policy" + + "\022\326\001\n\022DeleteBackupPolicy\0221.google.cloud.n" + + "etapp.v1.DeleteBackupPolicyRequest\032\035.goo" + + "gle.longrunning.Operation\"n\312A*\n\025google.p" + + "rotobuf.Empty\022\021OperationMetadata\332A\004name\202" + + "\323\344\223\0024*2/v1/{name=projects/*/locations/*/" + + "backupPolicies/*}\032I\312A\025netapp.googleapis." + + "com\322A.https://www.googleapis.com/auth/cl" + + "oud-platformB\212\002\n\032com.google.cloud.netapp" + + ".v1B\027CloudNetappServiceProtoP\001Z2cloud.go" + + "ogle.com/go/netapp/apiv1/netapppb;netapp" + + "pb\252\002\026Google.Cloud.NetApp.V1\312\002\026Google\\Clo" + + "ud\\NetApp\\V1\352\002\031Google::Cloud::NetApp::V1" + + "\352AN\n\036compute.googleapis.com/Network\022,pro" + + "jects/{project}/global/networks/{network" + + "}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -269,6 +352,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.netapp.v1.ActiveDirectoryProto.getDescriptor(), + com.google.cloud.netapp.v1.BackupProto.getDescriptor(), + com.google.cloud.netapp.v1.BackupPolicyProto.getDescriptor(), + com.google.cloud.netapp.v1.BackupVaultProto.getDescriptor(), com.google.cloud.netapp.v1.KmsProto.getDescriptor(), com.google.cloud.netapp.v1.ReplicationProto.getDescriptor(), com.google.cloud.netapp.v1.SnapshotProto.getDescriptor(), @@ -308,6 +394,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.netapp.v1.ActiveDirectoryProto.getDescriptor(); + com.google.cloud.netapp.v1.BackupProto.getDescriptor(); + com.google.cloud.netapp.v1.BackupPolicyProto.getDescriptor(); + com.google.cloud.netapp.v1.BackupVaultProto.getDescriptor(); com.google.cloud.netapp.v1.KmsProto.getDescriptor(); com.google.cloud.netapp.v1.ReplicationProto.getDescriptor(); com.google.cloud.netapp.v1.SnapshotProto.getDescriptor(); diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CreateBackupPolicyRequest.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CreateBackupPolicyRequest.java new file mode 100644 index 000000000000..906710c42331 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CreateBackupPolicyRequest.java @@ -0,0 +1,1138 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_policy.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * CreateBackupPolicyRequest creates a backupPolicy.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.CreateBackupPolicyRequest} + */ +public final class CreateBackupPolicyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.CreateBackupPolicyRequest) + CreateBackupPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateBackupPolicyRequest.newBuilder() to construct. + private CreateBackupPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateBackupPolicyRequest() { + parent_ = ""; + backupPolicyId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateBackupPolicyRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_CreateBackupPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_CreateBackupPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.CreateBackupPolicyRequest.class, + com.google.cloud.netapp.v1.CreateBackupPolicyRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The location to create the backup policies of, in the format
+   * `projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The location to create the backup policies of, in the format
+   * `projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_POLICY_FIELD_NUMBER = 2; + private com.google.cloud.netapp.v1.BackupPolicy backupPolicy_; + /** + * + * + *
+   * Required. A backupPolicy resource
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupPolicy field is set. + */ + @java.lang.Override + public boolean hasBackupPolicy() { + return backupPolicy_ != null; + } + /** + * + * + *
+   * Required. A backupPolicy resource
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupPolicy. + */ + @java.lang.Override + public com.google.cloud.netapp.v1.BackupPolicy getBackupPolicy() { + return backupPolicy_ == null + ? com.google.cloud.netapp.v1.BackupPolicy.getDefaultInstance() + : backupPolicy_; + } + /** + * + * + *
+   * Required. A backupPolicy resource
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.netapp.v1.BackupPolicyOrBuilder getBackupPolicyOrBuilder() { + return backupPolicy_ == null + ? com.google.cloud.netapp.v1.BackupPolicy.getDefaultInstance() + : backupPolicy_; + } + + public static final int BACKUP_POLICY_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupPolicyId_ = ""; + /** + * + * + *
+   * Required. The ID to use for the backup policy.
+   * The ID must be unique within the specified location.
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+   * 
+ * + * string backup_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupPolicyId. + */ + @java.lang.Override + public java.lang.String getBackupPolicyId() { + java.lang.Object ref = backupPolicyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupPolicyId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ID to use for the backup policy.
+   * The ID must be unique within the specified location.
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+   * 
+ * + * string backup_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for backupPolicyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupPolicyIdBytes() { + java.lang.Object ref = backupPolicyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPolicyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (backupPolicy_ != null) { + output.writeMessage(2, getBackupPolicy()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupPolicyId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, backupPolicyId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (backupPolicy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getBackupPolicy()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupPolicyId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, backupPolicyId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.CreateBackupPolicyRequest)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.CreateBackupPolicyRequest other = + (com.google.cloud.netapp.v1.CreateBackupPolicyRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasBackupPolicy() != other.hasBackupPolicy()) return false; + if (hasBackupPolicy()) { + if (!getBackupPolicy().equals(other.getBackupPolicy())) return false; + } + if (!getBackupPolicyId().equals(other.getBackupPolicyId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasBackupPolicy()) { + hash = (37 * hash) + BACKUP_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getBackupPolicy().hashCode(); + } + hash = (37 * hash) + BACKUP_POLICY_ID_FIELD_NUMBER; + hash = (53 * hash) + getBackupPolicyId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.CreateBackupPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.CreateBackupPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.CreateBackupPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.CreateBackupPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.CreateBackupPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.CreateBackupPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.CreateBackupPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.CreateBackupPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.CreateBackupPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.CreateBackupPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.CreateBackupPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.CreateBackupPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.netapp.v1.CreateBackupPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * CreateBackupPolicyRequest creates a backupPolicy.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.CreateBackupPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.CreateBackupPolicyRequest) + com.google.cloud.netapp.v1.CreateBackupPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_CreateBackupPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_CreateBackupPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.CreateBackupPolicyRequest.class, + com.google.cloud.netapp.v1.CreateBackupPolicyRequest.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.CreateBackupPolicyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + backupPolicy_ = null; + if (backupPolicyBuilder_ != null) { + backupPolicyBuilder_.dispose(); + backupPolicyBuilder_ = null; + } + backupPolicyId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_CreateBackupPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.CreateBackupPolicyRequest getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.CreateBackupPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.CreateBackupPolicyRequest build() { + com.google.cloud.netapp.v1.CreateBackupPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.CreateBackupPolicyRequest buildPartial() { + com.google.cloud.netapp.v1.CreateBackupPolicyRequest result = + new com.google.cloud.netapp.v1.CreateBackupPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.netapp.v1.CreateBackupPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backupPolicy_ = + backupPolicyBuilder_ == null ? backupPolicy_ : backupPolicyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.backupPolicyId_ = backupPolicyId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.CreateBackupPolicyRequest) { + return mergeFrom((com.google.cloud.netapp.v1.CreateBackupPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.CreateBackupPolicyRequest other) { + if (other == com.google.cloud.netapp.v1.CreateBackupPolicyRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasBackupPolicy()) { + mergeBackupPolicy(other.getBackupPolicy()); + } + if (!other.getBackupPolicyId().isEmpty()) { + backupPolicyId_ = other.backupPolicyId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getBackupPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + backupPolicyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The location to create the backup policies of, in the format
+     * `projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The location to create the backup policies of, in the format
+     * `projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The location to create the backup policies of, in the format
+     * `projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The location to create the backup policies of, in the format
+     * `projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The location to create the backup policies of, in the format
+     * `projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.netapp.v1.BackupPolicy backupPolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.netapp.v1.BackupPolicy, + com.google.cloud.netapp.v1.BackupPolicy.Builder, + com.google.cloud.netapp.v1.BackupPolicyOrBuilder> + backupPolicyBuilder_; + /** + * + * + *
+     * Required. A backupPolicy resource
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupPolicy field is set. + */ + public boolean hasBackupPolicy() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. A backupPolicy resource
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupPolicy. + */ + public com.google.cloud.netapp.v1.BackupPolicy getBackupPolicy() { + if (backupPolicyBuilder_ == null) { + return backupPolicy_ == null + ? com.google.cloud.netapp.v1.BackupPolicy.getDefaultInstance() + : backupPolicy_; + } else { + return backupPolicyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A backupPolicy resource
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupPolicy(com.google.cloud.netapp.v1.BackupPolicy value) { + if (backupPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupPolicy_ = value; + } else { + backupPolicyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A backupPolicy resource
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupPolicy( + com.google.cloud.netapp.v1.BackupPolicy.Builder builderForValue) { + if (backupPolicyBuilder_ == null) { + backupPolicy_ = builderForValue.build(); + } else { + backupPolicyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A backupPolicy resource
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBackupPolicy(com.google.cloud.netapp.v1.BackupPolicy value) { + if (backupPolicyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && backupPolicy_ != null + && backupPolicy_ != com.google.cloud.netapp.v1.BackupPolicy.getDefaultInstance()) { + getBackupPolicyBuilder().mergeFrom(value); + } else { + backupPolicy_ = value; + } + } else { + backupPolicyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A backupPolicy resource
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBackupPolicy() { + bitField0_ = (bitField0_ & ~0x00000002); + backupPolicy_ = null; + if (backupPolicyBuilder_ != null) { + backupPolicyBuilder_.dispose(); + backupPolicyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A backupPolicy resource
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.netapp.v1.BackupPolicy.Builder getBackupPolicyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getBackupPolicyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A backupPolicy resource
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.netapp.v1.BackupPolicyOrBuilder getBackupPolicyOrBuilder() { + if (backupPolicyBuilder_ != null) { + return backupPolicyBuilder_.getMessageOrBuilder(); + } else { + return backupPolicy_ == null + ? com.google.cloud.netapp.v1.BackupPolicy.getDefaultInstance() + : backupPolicy_; + } + } + /** + * + * + *
+     * Required. A backupPolicy resource
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.netapp.v1.BackupPolicy, + com.google.cloud.netapp.v1.BackupPolicy.Builder, + com.google.cloud.netapp.v1.BackupPolicyOrBuilder> + getBackupPolicyFieldBuilder() { + if (backupPolicyBuilder_ == null) { + backupPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.netapp.v1.BackupPolicy, + com.google.cloud.netapp.v1.BackupPolicy.Builder, + com.google.cloud.netapp.v1.BackupPolicyOrBuilder>( + getBackupPolicy(), getParentForChildren(), isClean()); + backupPolicy_ = null; + } + return backupPolicyBuilder_; + } + + private java.lang.Object backupPolicyId_ = ""; + /** + * + * + *
+     * Required. The ID to use for the backup policy.
+     * The ID must be unique within the specified location.
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * 
+ * + * string backup_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupPolicyId. + */ + public java.lang.String getBackupPolicyId() { + java.lang.Object ref = backupPolicyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupPolicyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ID to use for the backup policy.
+     * The ID must be unique within the specified location.
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * 
+ * + * string backup_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for backupPolicyId. + */ + public com.google.protobuf.ByteString getBackupPolicyIdBytes() { + java.lang.Object ref = backupPolicyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPolicyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ID to use for the backup policy.
+     * The ID must be unique within the specified location.
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * 
+ * + * string backup_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The backupPolicyId to set. + * @return This builder for chaining. + */ + public Builder setBackupPolicyId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupPolicyId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID to use for the backup policy.
+     * The ID must be unique within the specified location.
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * 
+ * + * string backup_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBackupPolicyId() { + backupPolicyId_ = getDefaultInstance().getBackupPolicyId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID to use for the backup policy.
+     * The ID must be unique within the specified location.
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * 
+ * + * string backup_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for backupPolicyId to set. + * @return This builder for chaining. + */ + public Builder setBackupPolicyIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupPolicyId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.CreateBackupPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.CreateBackupPolicyRequest) + private static final com.google.cloud.netapp.v1.CreateBackupPolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.CreateBackupPolicyRequest(); + } + + public static com.google.cloud.netapp.v1.CreateBackupPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateBackupPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.CreateBackupPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CreateBackupPolicyRequestOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CreateBackupPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..2a755eceb5ab --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CreateBackupPolicyRequestOrBuilder.java @@ -0,0 +1,128 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_policy.proto + +package com.google.cloud.netapp.v1; + +public interface CreateBackupPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.CreateBackupPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The location to create the backup policies of, in the format
+   * `projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The location to create the backup policies of, in the format
+   * `projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. A backupPolicy resource
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupPolicy field is set. + */ + boolean hasBackupPolicy(); + /** + * + * + *
+   * Required. A backupPolicy resource
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupPolicy. + */ + com.google.cloud.netapp.v1.BackupPolicy getBackupPolicy(); + /** + * + * + *
+   * Required. A backupPolicy resource
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.netapp.v1.BackupPolicyOrBuilder getBackupPolicyOrBuilder(); + + /** + * + * + *
+   * Required. The ID to use for the backup policy.
+   * The ID must be unique within the specified location.
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+   * 
+ * + * string backup_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupPolicyId. + */ + java.lang.String getBackupPolicyId(); + /** + * + * + *
+   * Required. The ID to use for the backup policy.
+   * The ID must be unique within the specified location.
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+   * 
+ * + * string backup_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for backupPolicyId. + */ + com.google.protobuf.ByteString getBackupPolicyIdBytes(); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CreateBackupRequest.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CreateBackupRequest.java new file mode 100644 index 000000000000..5c81dc3e4f00 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CreateBackupRequest.java @@ -0,0 +1,1129 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * CreateBackupRequest creates a backup.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.CreateBackupRequest} + */ +public final class CreateBackupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.CreateBackupRequest) + CreateBackupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateBackupRequest.newBuilder() to construct. + private CreateBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateBackupRequest() { + parent_ = ""; + backupId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateBackupRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_CreateBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_CreateBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.CreateBackupRequest.class, + com.google.cloud.netapp.v1.CreateBackupRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The NetApp backupVault to create the backups of, in the format
+   * `projects/*/locations/*/backupVaults/{backup_vault_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The NetApp backupVault to create the backups of, in the format
+   * `projects/*/locations/*/backupVaults/{backup_vault_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupId_ = ""; + /** + * + * + *
+   * Required. The ID to use for the backup.
+   * The ID must be unique within the specified backupVault.
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+   * Values that do not match this pattern will trigger an INVALID_ARGUMENT
+   * error.
+   * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupId. + */ + @java.lang.Override + public java.lang.String getBackupId() { + java.lang.Object ref = backupId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ID to use for the backup.
+   * The ID must be unique within the specified backupVault.
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+   * Values that do not match this pattern will trigger an INVALID_ARGUMENT
+   * error.
+   * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for backupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupIdBytes() { + java.lang.Object ref = backupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_FIELD_NUMBER = 3; + private com.google.cloud.netapp.v1.Backup backup_; + /** + * + * + *
+   * Required. A backup resource
+   * 
+ * + * .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backup field is set. + */ + @java.lang.Override + public boolean hasBackup() { + return backup_ != null; + } + /** + * + * + *
+   * Required. A backup resource
+   * 
+ * + * .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backup. + */ + @java.lang.Override + public com.google.cloud.netapp.v1.Backup getBackup() { + return backup_ == null ? com.google.cloud.netapp.v1.Backup.getDefaultInstance() : backup_; + } + /** + * + * + *
+   * Required. A backup resource
+   * 
+ * + * .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.netapp.v1.BackupOrBuilder getBackupOrBuilder() { + return backup_ == null ? com.google.cloud.netapp.v1.Backup.getDefaultInstance() : backup_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backupId_); + } + if (backup_ != null) { + output.writeMessage(3, getBackup()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backupId_); + } + if (backup_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBackup()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.CreateBackupRequest)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.CreateBackupRequest other = + (com.google.cloud.netapp.v1.CreateBackupRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getBackupId().equals(other.getBackupId())) return false; + if (hasBackup() != other.hasBackup()) return false; + if (hasBackup()) { + if (!getBackup().equals(other.getBackup())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + BACKUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getBackupId().hashCode(); + if (hasBackup()) { + hash = (37 * hash) + BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getBackup().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.CreateBackupRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.CreateBackupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.CreateBackupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.CreateBackupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.CreateBackupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.CreateBackupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.CreateBackupRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.CreateBackupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.CreateBackupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.CreateBackupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.CreateBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.CreateBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.netapp.v1.CreateBackupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * CreateBackupRequest creates a backup.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.CreateBackupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.CreateBackupRequest) + com.google.cloud.netapp.v1.CreateBackupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_CreateBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_CreateBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.CreateBackupRequest.class, + com.google.cloud.netapp.v1.CreateBackupRequest.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.CreateBackupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + backupId_ = ""; + backup_ = null; + if (backupBuilder_ != null) { + backupBuilder_.dispose(); + backupBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_CreateBackupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.CreateBackupRequest getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.CreateBackupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.CreateBackupRequest build() { + com.google.cloud.netapp.v1.CreateBackupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.CreateBackupRequest buildPartial() { + com.google.cloud.netapp.v1.CreateBackupRequest result = + new com.google.cloud.netapp.v1.CreateBackupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.netapp.v1.CreateBackupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backupId_ = backupId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.backup_ = backupBuilder_ == null ? backup_ : backupBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.CreateBackupRequest) { + return mergeFrom((com.google.cloud.netapp.v1.CreateBackupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.CreateBackupRequest other) { + if (other == com.google.cloud.netapp.v1.CreateBackupRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBackupId().isEmpty()) { + backupId_ = other.backupId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasBackup()) { + mergeBackup(other.getBackup()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + backupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getBackupFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The NetApp backupVault to create the backups of, in the format
+     * `projects/*/locations/*/backupVaults/{backup_vault_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The NetApp backupVault to create the backups of, in the format
+     * `projects/*/locations/*/backupVaults/{backup_vault_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The NetApp backupVault to create the backups of, in the format
+     * `projects/*/locations/*/backupVaults/{backup_vault_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The NetApp backupVault to create the backups of, in the format
+     * `projects/*/locations/*/backupVaults/{backup_vault_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The NetApp backupVault to create the backups of, in the format
+     * `projects/*/locations/*/backupVaults/{backup_vault_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object backupId_ = ""; + /** + * + * + *
+     * Required. The ID to use for the backup.
+     * The ID must be unique within the specified backupVault.
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * Values that do not match this pattern will trigger an INVALID_ARGUMENT
+     * error.
+     * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupId. + */ + public java.lang.String getBackupId() { + java.lang.Object ref = backupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ID to use for the backup.
+     * The ID must be unique within the specified backupVault.
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * Values that do not match this pattern will trigger an INVALID_ARGUMENT
+     * error.
+     * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for backupId. + */ + public com.google.protobuf.ByteString getBackupIdBytes() { + java.lang.Object ref = backupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ID to use for the backup.
+     * The ID must be unique within the specified backupVault.
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * Values that do not match this pattern will trigger an INVALID_ARGUMENT
+     * error.
+     * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The backupId to set. + * @return This builder for chaining. + */ + public Builder setBackupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID to use for the backup.
+     * The ID must be unique within the specified backupVault.
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * Values that do not match this pattern will trigger an INVALID_ARGUMENT
+     * error.
+     * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBackupId() { + backupId_ = getDefaultInstance().getBackupId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID to use for the backup.
+     * The ID must be unique within the specified backupVault.
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * Values that do not match this pattern will trigger an INVALID_ARGUMENT
+     * error.
+     * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for backupId to set. + * @return This builder for chaining. + */ + public Builder setBackupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.netapp.v1.Backup backup_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.netapp.v1.Backup, + com.google.cloud.netapp.v1.Backup.Builder, + com.google.cloud.netapp.v1.BackupOrBuilder> + backupBuilder_; + /** + * + * + *
+     * Required. A backup resource
+     * 
+ * + * .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backup field is set. + */ + public boolean hasBackup() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. A backup resource
+     * 
+ * + * .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backup. + */ + public com.google.cloud.netapp.v1.Backup getBackup() { + if (backupBuilder_ == null) { + return backup_ == null ? com.google.cloud.netapp.v1.Backup.getDefaultInstance() : backup_; + } else { + return backupBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A backup resource
+     * 
+ * + * .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackup(com.google.cloud.netapp.v1.Backup value) { + if (backupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backup_ = value; + } else { + backupBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A backup resource
+     * 
+ * + * .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackup(com.google.cloud.netapp.v1.Backup.Builder builderForValue) { + if (backupBuilder_ == null) { + backup_ = builderForValue.build(); + } else { + backupBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A backup resource
+     * 
+ * + * .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBackup(com.google.cloud.netapp.v1.Backup value) { + if (backupBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && backup_ != null + && backup_ != com.google.cloud.netapp.v1.Backup.getDefaultInstance()) { + getBackupBuilder().mergeFrom(value); + } else { + backup_ = value; + } + } else { + backupBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A backup resource
+     * 
+ * + * .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBackup() { + bitField0_ = (bitField0_ & ~0x00000004); + backup_ = null; + if (backupBuilder_ != null) { + backupBuilder_.dispose(); + backupBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A backup resource
+     * 
+ * + * .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.netapp.v1.Backup.Builder getBackupBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getBackupFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A backup resource
+     * 
+ * + * .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.netapp.v1.BackupOrBuilder getBackupOrBuilder() { + if (backupBuilder_ != null) { + return backupBuilder_.getMessageOrBuilder(); + } else { + return backup_ == null ? com.google.cloud.netapp.v1.Backup.getDefaultInstance() : backup_; + } + } + /** + * + * + *
+     * Required. A backup resource
+     * 
+ * + * .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.netapp.v1.Backup, + com.google.cloud.netapp.v1.Backup.Builder, + com.google.cloud.netapp.v1.BackupOrBuilder> + getBackupFieldBuilder() { + if (backupBuilder_ == null) { + backupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.netapp.v1.Backup, + com.google.cloud.netapp.v1.Backup.Builder, + com.google.cloud.netapp.v1.BackupOrBuilder>( + getBackup(), getParentForChildren(), isClean()); + backup_ = null; + } + return backupBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.CreateBackupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.CreateBackupRequest) + private static final com.google.cloud.netapp.v1.CreateBackupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.CreateBackupRequest(); + } + + public static com.google.cloud.netapp.v1.CreateBackupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateBackupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.CreateBackupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CreateBackupRequestOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CreateBackupRequestOrBuilder.java new file mode 100644 index 000000000000..071179e691e6 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CreateBackupRequestOrBuilder.java @@ -0,0 +1,129 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup.proto + +package com.google.cloud.netapp.v1; + +public interface CreateBackupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.CreateBackupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The NetApp backupVault to create the backups of, in the format
+   * `projects/*/locations/*/backupVaults/{backup_vault_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The NetApp backupVault to create the backups of, in the format
+   * `projects/*/locations/*/backupVaults/{backup_vault_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID to use for the backup.
+   * The ID must be unique within the specified backupVault.
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+   * Values that do not match this pattern will trigger an INVALID_ARGUMENT
+   * error.
+   * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupId. + */ + java.lang.String getBackupId(); + /** + * + * + *
+   * Required. The ID to use for the backup.
+   * The ID must be unique within the specified backupVault.
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+   * Values that do not match this pattern will trigger an INVALID_ARGUMENT
+   * error.
+   * 
+ * + * string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for backupId. + */ + com.google.protobuf.ByteString getBackupIdBytes(); + + /** + * + * + *
+   * Required. A backup resource
+   * 
+ * + * .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backup field is set. + */ + boolean hasBackup(); + /** + * + * + *
+   * Required. A backup resource
+   * 
+ * + * .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backup. + */ + com.google.cloud.netapp.v1.Backup getBackup(); + /** + * + * + *
+   * Required. A backup resource
+   * 
+ * + * .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.netapp.v1.BackupOrBuilder getBackupOrBuilder(); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CreateBackupVaultRequest.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CreateBackupVaultRequest.java new file mode 100644 index 000000000000..89914e6b13b8 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CreateBackupVaultRequest.java @@ -0,0 +1,1158 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_vault.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * CreateBackupVaultRequest creates a backup vault.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.CreateBackupVaultRequest} + */ +public final class CreateBackupVaultRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.CreateBackupVaultRequest) + CreateBackupVaultRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateBackupVaultRequest.newBuilder() to construct. + private CreateBackupVaultRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateBackupVaultRequest() { + parent_ = ""; + backupVaultId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateBackupVaultRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_CreateBackupVaultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_CreateBackupVaultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.CreateBackupVaultRequest.class, + com.google.cloud.netapp.v1.CreateBackupVaultRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The location to create the backup vaults, in the format
+   * `projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The location to create the backup vaults, in the format
+   * `projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_VAULT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupVaultId_ = ""; + /** + * + * + *
+   * Required. The ID to use for the backupVault.
+   * The ID must be unique within the specified location.
+   * The max supported length is 63 characters.
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+   * Values that do not match this pattern will trigger an INVALID_ARGUMENT
+   * error.
+   * 
+ * + * string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupVaultId. + */ + @java.lang.Override + public java.lang.String getBackupVaultId() { + java.lang.Object ref = backupVaultId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupVaultId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ID to use for the backupVault.
+   * The ID must be unique within the specified location.
+   * The max supported length is 63 characters.
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+   * Values that do not match this pattern will trigger an INVALID_ARGUMENT
+   * error.
+   * 
+ * + * string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for backupVaultId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupVaultIdBytes() { + java.lang.Object ref = backupVaultId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupVaultId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_VAULT_FIELD_NUMBER = 3; + private com.google.cloud.netapp.v1.BackupVault backupVault_; + /** + * + * + *
+   * Required. A backupVault resource
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupVault field is set. + */ + @java.lang.Override + public boolean hasBackupVault() { + return backupVault_ != null; + } + /** + * + * + *
+   * Required. A backupVault resource
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupVault. + */ + @java.lang.Override + public com.google.cloud.netapp.v1.BackupVault getBackupVault() { + return backupVault_ == null + ? com.google.cloud.netapp.v1.BackupVault.getDefaultInstance() + : backupVault_; + } + /** + * + * + *
+   * Required. A backupVault resource
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.netapp.v1.BackupVaultOrBuilder getBackupVaultOrBuilder() { + return backupVault_ == null + ? com.google.cloud.netapp.v1.BackupVault.getDefaultInstance() + : backupVault_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupVaultId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backupVaultId_); + } + if (backupVault_ != null) { + output.writeMessage(3, getBackupVault()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupVaultId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backupVaultId_); + } + if (backupVault_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBackupVault()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.CreateBackupVaultRequest)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.CreateBackupVaultRequest other = + (com.google.cloud.netapp.v1.CreateBackupVaultRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getBackupVaultId().equals(other.getBackupVaultId())) return false; + if (hasBackupVault() != other.hasBackupVault()) return false; + if (hasBackupVault()) { + if (!getBackupVault().equals(other.getBackupVault())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + BACKUP_VAULT_ID_FIELD_NUMBER; + hash = (53 * hash) + getBackupVaultId().hashCode(); + if (hasBackupVault()) { + hash = (37 * hash) + BACKUP_VAULT_FIELD_NUMBER; + hash = (53 * hash) + getBackupVault().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.CreateBackupVaultRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.CreateBackupVaultRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.CreateBackupVaultRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.CreateBackupVaultRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.CreateBackupVaultRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.CreateBackupVaultRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.CreateBackupVaultRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.CreateBackupVaultRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.CreateBackupVaultRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.CreateBackupVaultRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.CreateBackupVaultRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.CreateBackupVaultRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.netapp.v1.CreateBackupVaultRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * CreateBackupVaultRequest creates a backup vault.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.CreateBackupVaultRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.CreateBackupVaultRequest) + com.google.cloud.netapp.v1.CreateBackupVaultRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_CreateBackupVaultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_CreateBackupVaultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.CreateBackupVaultRequest.class, + com.google.cloud.netapp.v1.CreateBackupVaultRequest.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.CreateBackupVaultRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + backupVaultId_ = ""; + backupVault_ = null; + if (backupVaultBuilder_ != null) { + backupVaultBuilder_.dispose(); + backupVaultBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_CreateBackupVaultRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.CreateBackupVaultRequest getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.CreateBackupVaultRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.CreateBackupVaultRequest build() { + com.google.cloud.netapp.v1.CreateBackupVaultRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.CreateBackupVaultRequest buildPartial() { + com.google.cloud.netapp.v1.CreateBackupVaultRequest result = + new com.google.cloud.netapp.v1.CreateBackupVaultRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.netapp.v1.CreateBackupVaultRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backupVaultId_ = backupVaultId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.backupVault_ = + backupVaultBuilder_ == null ? backupVault_ : backupVaultBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.CreateBackupVaultRequest) { + return mergeFrom((com.google.cloud.netapp.v1.CreateBackupVaultRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.CreateBackupVaultRequest other) { + if (other == com.google.cloud.netapp.v1.CreateBackupVaultRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBackupVaultId().isEmpty()) { + backupVaultId_ = other.backupVaultId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasBackupVault()) { + mergeBackupVault(other.getBackupVault()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + backupVaultId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getBackupVaultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The location to create the backup vaults, in the format
+     * `projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The location to create the backup vaults, in the format
+     * `projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The location to create the backup vaults, in the format
+     * `projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The location to create the backup vaults, in the format
+     * `projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The location to create the backup vaults, in the format
+     * `projects/{project_id}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object backupVaultId_ = ""; + /** + * + * + *
+     * Required. The ID to use for the backupVault.
+     * The ID must be unique within the specified location.
+     * The max supported length is 63 characters.
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * Values that do not match this pattern will trigger an INVALID_ARGUMENT
+     * error.
+     * 
+ * + * string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupVaultId. + */ + public java.lang.String getBackupVaultId() { + java.lang.Object ref = backupVaultId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupVaultId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ID to use for the backupVault.
+     * The ID must be unique within the specified location.
+     * The max supported length is 63 characters.
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * Values that do not match this pattern will trigger an INVALID_ARGUMENT
+     * error.
+     * 
+ * + * string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for backupVaultId. + */ + public com.google.protobuf.ByteString getBackupVaultIdBytes() { + java.lang.Object ref = backupVaultId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupVaultId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ID to use for the backupVault.
+     * The ID must be unique within the specified location.
+     * The max supported length is 63 characters.
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * Values that do not match this pattern will trigger an INVALID_ARGUMENT
+     * error.
+     * 
+ * + * string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The backupVaultId to set. + * @return This builder for chaining. + */ + public Builder setBackupVaultId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupVaultId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID to use for the backupVault.
+     * The ID must be unique within the specified location.
+     * The max supported length is 63 characters.
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * Values that do not match this pattern will trigger an INVALID_ARGUMENT
+     * error.
+     * 
+ * + * string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBackupVaultId() { + backupVaultId_ = getDefaultInstance().getBackupVaultId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID to use for the backupVault.
+     * The ID must be unique within the specified location.
+     * The max supported length is 63 characters.
+     * This value must start with a lowercase letter followed by up to 62
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * Values that do not match this pattern will trigger an INVALID_ARGUMENT
+     * error.
+     * 
+ * + * string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for backupVaultId to set. + * @return This builder for chaining. + */ + public Builder setBackupVaultIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupVaultId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.netapp.v1.BackupVault backupVault_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.netapp.v1.BackupVault, + com.google.cloud.netapp.v1.BackupVault.Builder, + com.google.cloud.netapp.v1.BackupVaultOrBuilder> + backupVaultBuilder_; + /** + * + * + *
+     * Required. A backupVault resource
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupVault field is set. + */ + public boolean hasBackupVault() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. A backupVault resource
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupVault. + */ + public com.google.cloud.netapp.v1.BackupVault getBackupVault() { + if (backupVaultBuilder_ == null) { + return backupVault_ == null + ? com.google.cloud.netapp.v1.BackupVault.getDefaultInstance() + : backupVault_; + } else { + return backupVaultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. A backupVault resource
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupVault(com.google.cloud.netapp.v1.BackupVault value) { + if (backupVaultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupVault_ = value; + } else { + backupVaultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A backupVault resource
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupVault(com.google.cloud.netapp.v1.BackupVault.Builder builderForValue) { + if (backupVaultBuilder_ == null) { + backupVault_ = builderForValue.build(); + } else { + backupVaultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A backupVault resource
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBackupVault(com.google.cloud.netapp.v1.BackupVault value) { + if (backupVaultBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && backupVault_ != null + && backupVault_ != com.google.cloud.netapp.v1.BackupVault.getDefaultInstance()) { + getBackupVaultBuilder().mergeFrom(value); + } else { + backupVault_ = value; + } + } else { + backupVaultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A backupVault resource
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBackupVault() { + bitField0_ = (bitField0_ & ~0x00000004); + backupVault_ = null; + if (backupVaultBuilder_ != null) { + backupVaultBuilder_.dispose(); + backupVaultBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A backupVault resource
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.netapp.v1.BackupVault.Builder getBackupVaultBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getBackupVaultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A backupVault resource
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.netapp.v1.BackupVaultOrBuilder getBackupVaultOrBuilder() { + if (backupVaultBuilder_ != null) { + return backupVaultBuilder_.getMessageOrBuilder(); + } else { + return backupVault_ == null + ? com.google.cloud.netapp.v1.BackupVault.getDefaultInstance() + : backupVault_; + } + } + /** + * + * + *
+     * Required. A backupVault resource
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.netapp.v1.BackupVault, + com.google.cloud.netapp.v1.BackupVault.Builder, + com.google.cloud.netapp.v1.BackupVaultOrBuilder> + getBackupVaultFieldBuilder() { + if (backupVaultBuilder_ == null) { + backupVaultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.netapp.v1.BackupVault, + com.google.cloud.netapp.v1.BackupVault.Builder, + com.google.cloud.netapp.v1.BackupVaultOrBuilder>( + getBackupVault(), getParentForChildren(), isClean()); + backupVault_ = null; + } + return backupVaultBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.CreateBackupVaultRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.CreateBackupVaultRequest) + private static final com.google.cloud.netapp.v1.CreateBackupVaultRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.CreateBackupVaultRequest(); + } + + public static com.google.cloud.netapp.v1.CreateBackupVaultRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateBackupVaultRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.CreateBackupVaultRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CreateBackupVaultRequestOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CreateBackupVaultRequestOrBuilder.java new file mode 100644 index 000000000000..0f4dcc1e1680 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/CreateBackupVaultRequestOrBuilder.java @@ -0,0 +1,134 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_vault.proto + +package com.google.cloud.netapp.v1; + +public interface CreateBackupVaultRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.CreateBackupVaultRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The location to create the backup vaults, in the format
+   * `projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The location to create the backup vaults, in the format
+   * `projects/{project_id}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID to use for the backupVault.
+   * The ID must be unique within the specified location.
+   * The max supported length is 63 characters.
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+   * Values that do not match this pattern will trigger an INVALID_ARGUMENT
+   * error.
+   * 
+ * + * string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupVaultId. + */ + java.lang.String getBackupVaultId(); + /** + * + * + *
+   * Required. The ID to use for the backupVault.
+   * The ID must be unique within the specified location.
+   * The max supported length is 63 characters.
+   * This value must start with a lowercase letter followed by up to 62
+   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+   * Values that do not match this pattern will trigger an INVALID_ARGUMENT
+   * error.
+   * 
+ * + * string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for backupVaultId. + */ + com.google.protobuf.ByteString getBackupVaultIdBytes(); + + /** + * + * + *
+   * Required. A backupVault resource
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupVault field is set. + */ + boolean hasBackupVault(); + /** + * + * + *
+   * Required. A backupVault resource
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupVault. + */ + com.google.cloud.netapp.v1.BackupVault getBackupVault(); + /** + * + * + *
+   * Required. A backupVault resource
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.netapp.v1.BackupVaultOrBuilder getBackupVaultOrBuilder(); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/DeleteBackupPolicyRequest.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/DeleteBackupPolicyRequest.java new file mode 100644 index 000000000000..c04ff8ddbc49 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/DeleteBackupPolicyRequest.java @@ -0,0 +1,645 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_policy.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * DeleteBackupPolicyRequest deletes a backup policy.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.DeleteBackupPolicyRequest} + */ +public final class DeleteBackupPolicyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.DeleteBackupPolicyRequest) + DeleteBackupPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteBackupPolicyRequest.newBuilder() to construct. + private DeleteBackupPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteBackupPolicyRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteBackupPolicyRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_DeleteBackupPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_DeleteBackupPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.DeleteBackupPolicyRequest.class, + com.google.cloud.netapp.v1.DeleteBackupPolicyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The backup policy resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The backup policy resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.DeleteBackupPolicyRequest)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.DeleteBackupPolicyRequest other = + (com.google.cloud.netapp.v1.DeleteBackupPolicyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.DeleteBackupPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.DeleteBackupPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.DeleteBackupPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.DeleteBackupPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.DeleteBackupPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.DeleteBackupPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.DeleteBackupPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.DeleteBackupPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.DeleteBackupPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.DeleteBackupPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.DeleteBackupPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.DeleteBackupPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.netapp.v1.DeleteBackupPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * DeleteBackupPolicyRequest deletes a backup policy.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.DeleteBackupPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.DeleteBackupPolicyRequest) + com.google.cloud.netapp.v1.DeleteBackupPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_DeleteBackupPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_DeleteBackupPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.DeleteBackupPolicyRequest.class, + com.google.cloud.netapp.v1.DeleteBackupPolicyRequest.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.DeleteBackupPolicyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_DeleteBackupPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.DeleteBackupPolicyRequest getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.DeleteBackupPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.DeleteBackupPolicyRequest build() { + com.google.cloud.netapp.v1.DeleteBackupPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.DeleteBackupPolicyRequest buildPartial() { + com.google.cloud.netapp.v1.DeleteBackupPolicyRequest result = + new com.google.cloud.netapp.v1.DeleteBackupPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.netapp.v1.DeleteBackupPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.DeleteBackupPolicyRequest) { + return mergeFrom((com.google.cloud.netapp.v1.DeleteBackupPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.DeleteBackupPolicyRequest other) { + if (other == com.google.cloud.netapp.v1.DeleteBackupPolicyRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The backup policy resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The backup policy resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The backup policy resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backup policy resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backup policy resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.DeleteBackupPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.DeleteBackupPolicyRequest) + private static final com.google.cloud.netapp.v1.DeleteBackupPolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.DeleteBackupPolicyRequest(); + } + + public static com.google.cloud.netapp.v1.DeleteBackupPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteBackupPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.DeleteBackupPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/DeleteBackupPolicyRequestOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/DeleteBackupPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..432a2c56a70a --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/DeleteBackupPolicyRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_policy.proto + +package com.google.cloud.netapp.v1; + +public interface DeleteBackupPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.DeleteBackupPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The backup policy resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The backup policy resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/DeleteBackupRequest.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/DeleteBackupRequest.java new file mode 100644 index 000000000000..348463886339 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/DeleteBackupRequest.java @@ -0,0 +1,644 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * DeleteBackupRequest deletes a backup.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.DeleteBackupRequest} + */ +public final class DeleteBackupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.DeleteBackupRequest) + DeleteBackupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteBackupRequest.newBuilder() to construct. + private DeleteBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteBackupRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteBackupRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_DeleteBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_DeleteBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.DeleteBackupRequest.class, + com.google.cloud.netapp.v1.DeleteBackupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The backup resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The backup resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.DeleteBackupRequest)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.DeleteBackupRequest other = + (com.google.cloud.netapp.v1.DeleteBackupRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.DeleteBackupRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.DeleteBackupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.DeleteBackupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.DeleteBackupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.DeleteBackupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.DeleteBackupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.DeleteBackupRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.DeleteBackupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.DeleteBackupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.DeleteBackupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.DeleteBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.DeleteBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.netapp.v1.DeleteBackupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * DeleteBackupRequest deletes a backup.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.DeleteBackupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.DeleteBackupRequest) + com.google.cloud.netapp.v1.DeleteBackupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_DeleteBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_DeleteBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.DeleteBackupRequest.class, + com.google.cloud.netapp.v1.DeleteBackupRequest.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.DeleteBackupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_DeleteBackupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.DeleteBackupRequest getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.DeleteBackupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.DeleteBackupRequest build() { + com.google.cloud.netapp.v1.DeleteBackupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.DeleteBackupRequest buildPartial() { + com.google.cloud.netapp.v1.DeleteBackupRequest result = + new com.google.cloud.netapp.v1.DeleteBackupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.netapp.v1.DeleteBackupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.DeleteBackupRequest) { + return mergeFrom((com.google.cloud.netapp.v1.DeleteBackupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.DeleteBackupRequest other) { + if (other == com.google.cloud.netapp.v1.DeleteBackupRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The backup resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The backup resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The backup resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backup resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backup resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.DeleteBackupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.DeleteBackupRequest) + private static final com.google.cloud.netapp.v1.DeleteBackupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.DeleteBackupRequest(); + } + + public static com.google.cloud.netapp.v1.DeleteBackupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteBackupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.DeleteBackupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/DeleteBackupRequestOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/DeleteBackupRequestOrBuilder.java new file mode 100644 index 000000000000..f8cc46a73364 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/DeleteBackupRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup.proto + +package com.google.cloud.netapp.v1; + +public interface DeleteBackupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.DeleteBackupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The backup resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The backup resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/DeleteBackupVaultRequest.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/DeleteBackupVaultRequest.java new file mode 100644 index 000000000000..0ed7888acaaa --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/DeleteBackupVaultRequest.java @@ -0,0 +1,645 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_vault.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * DeleteBackupVaultRequest deletes a backupVault.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.DeleteBackupVaultRequest} + */ +public final class DeleteBackupVaultRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.DeleteBackupVaultRequest) + DeleteBackupVaultRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteBackupVaultRequest.newBuilder() to construct. + private DeleteBackupVaultRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteBackupVaultRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteBackupVaultRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_DeleteBackupVaultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_DeleteBackupVaultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.DeleteBackupVaultRequest.class, + com.google.cloud.netapp.v1.DeleteBackupVaultRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The backupVault resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The backupVault resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.DeleteBackupVaultRequest)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.DeleteBackupVaultRequest other = + (com.google.cloud.netapp.v1.DeleteBackupVaultRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.DeleteBackupVaultRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.DeleteBackupVaultRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.DeleteBackupVaultRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.DeleteBackupVaultRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.DeleteBackupVaultRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.DeleteBackupVaultRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.DeleteBackupVaultRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.DeleteBackupVaultRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.DeleteBackupVaultRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.DeleteBackupVaultRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.DeleteBackupVaultRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.DeleteBackupVaultRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.netapp.v1.DeleteBackupVaultRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * DeleteBackupVaultRequest deletes a backupVault.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.DeleteBackupVaultRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.DeleteBackupVaultRequest) + com.google.cloud.netapp.v1.DeleteBackupVaultRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_DeleteBackupVaultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_DeleteBackupVaultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.DeleteBackupVaultRequest.class, + com.google.cloud.netapp.v1.DeleteBackupVaultRequest.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.DeleteBackupVaultRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_DeleteBackupVaultRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.DeleteBackupVaultRequest getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.DeleteBackupVaultRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.DeleteBackupVaultRequest build() { + com.google.cloud.netapp.v1.DeleteBackupVaultRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.DeleteBackupVaultRequest buildPartial() { + com.google.cloud.netapp.v1.DeleteBackupVaultRequest result = + new com.google.cloud.netapp.v1.DeleteBackupVaultRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.netapp.v1.DeleteBackupVaultRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.DeleteBackupVaultRequest) { + return mergeFrom((com.google.cloud.netapp.v1.DeleteBackupVaultRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.DeleteBackupVaultRequest other) { + if (other == com.google.cloud.netapp.v1.DeleteBackupVaultRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The backupVault resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The backupVault resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The backupVault resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backupVault resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backupVault resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.DeleteBackupVaultRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.DeleteBackupVaultRequest) + private static final com.google.cloud.netapp.v1.DeleteBackupVaultRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.DeleteBackupVaultRequest(); + } + + public static com.google.cloud.netapp.v1.DeleteBackupVaultRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteBackupVaultRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.DeleteBackupVaultRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/DeleteBackupVaultRequestOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/DeleteBackupVaultRequestOrBuilder.java new file mode 100644 index 000000000000..e4ab0f184b8b --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/DeleteBackupVaultRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_vault.proto + +package com.google.cloud.netapp.v1; + +public interface DeleteBackupVaultRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.DeleteBackupVaultRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The backupVault resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The backupVault resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/GetBackupPolicyRequest.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/GetBackupPolicyRequest.java new file mode 100644 index 000000000000..5944df02811f --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/GetBackupPolicyRequest.java @@ -0,0 +1,645 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_policy.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * GetBackupPolicyRequest gets the state of a backupPolicy.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.GetBackupPolicyRequest} + */ +public final class GetBackupPolicyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.GetBackupPolicyRequest) + GetBackupPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetBackupPolicyRequest.newBuilder() to construct. + private GetBackupPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetBackupPolicyRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetBackupPolicyRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_GetBackupPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_GetBackupPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.GetBackupPolicyRequest.class, + com.google.cloud.netapp.v1.GetBackupPolicyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The backupPolicy resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The backupPolicy resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.GetBackupPolicyRequest)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.GetBackupPolicyRequest other = + (com.google.cloud.netapp.v1.GetBackupPolicyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.GetBackupPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.GetBackupPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.GetBackupPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.GetBackupPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.GetBackupPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.GetBackupPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.GetBackupPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.GetBackupPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.GetBackupPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.GetBackupPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.GetBackupPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.GetBackupPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.netapp.v1.GetBackupPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * GetBackupPolicyRequest gets the state of a backupPolicy.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.GetBackupPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.GetBackupPolicyRequest) + com.google.cloud.netapp.v1.GetBackupPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_GetBackupPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_GetBackupPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.GetBackupPolicyRequest.class, + com.google.cloud.netapp.v1.GetBackupPolicyRequest.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.GetBackupPolicyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_GetBackupPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.GetBackupPolicyRequest getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.GetBackupPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.GetBackupPolicyRequest build() { + com.google.cloud.netapp.v1.GetBackupPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.GetBackupPolicyRequest buildPartial() { + com.google.cloud.netapp.v1.GetBackupPolicyRequest result = + new com.google.cloud.netapp.v1.GetBackupPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.netapp.v1.GetBackupPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.GetBackupPolicyRequest) { + return mergeFrom((com.google.cloud.netapp.v1.GetBackupPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.GetBackupPolicyRequest other) { + if (other == com.google.cloud.netapp.v1.GetBackupPolicyRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The backupPolicy resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The backupPolicy resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The backupPolicy resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backupPolicy resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backupPolicy resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.GetBackupPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.GetBackupPolicyRequest) + private static final com.google.cloud.netapp.v1.GetBackupPolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.GetBackupPolicyRequest(); + } + + public static com.google.cloud.netapp.v1.GetBackupPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBackupPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.GetBackupPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/GetBackupPolicyRequestOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/GetBackupPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..e7b770b56bc2 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/GetBackupPolicyRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_policy.proto + +package com.google.cloud.netapp.v1; + +public interface GetBackupPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.GetBackupPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The backupPolicy resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The backupPolicy resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/GetBackupRequest.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/GetBackupRequest.java new file mode 100644 index 000000000000..94398936fd97 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/GetBackupRequest.java @@ -0,0 +1,644 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * GetBackupRequest gets the state of a backup.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.GetBackupRequest} + */ +public final class GetBackupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.GetBackupRequest) + GetBackupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetBackupRequest.newBuilder() to construct. + private GetBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetBackupRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetBackupRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_GetBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_GetBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.GetBackupRequest.class, + com.google.cloud.netapp.v1.GetBackupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The backup resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The backup resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.GetBackupRequest)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.GetBackupRequest other = + (com.google.cloud.netapp.v1.GetBackupRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.GetBackupRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.GetBackupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.GetBackupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.GetBackupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.GetBackupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.GetBackupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.GetBackupRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.GetBackupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.GetBackupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.GetBackupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.GetBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.GetBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.netapp.v1.GetBackupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * GetBackupRequest gets the state of a backup.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.GetBackupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.GetBackupRequest) + com.google.cloud.netapp.v1.GetBackupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_GetBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_GetBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.GetBackupRequest.class, + com.google.cloud.netapp.v1.GetBackupRequest.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.GetBackupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_GetBackupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.GetBackupRequest getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.GetBackupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.GetBackupRequest build() { + com.google.cloud.netapp.v1.GetBackupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.GetBackupRequest buildPartial() { + com.google.cloud.netapp.v1.GetBackupRequest result = + new com.google.cloud.netapp.v1.GetBackupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.netapp.v1.GetBackupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.GetBackupRequest) { + return mergeFrom((com.google.cloud.netapp.v1.GetBackupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.GetBackupRequest other) { + if (other == com.google.cloud.netapp.v1.GetBackupRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The backup resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The backup resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The backup resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backup resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backup resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.GetBackupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.GetBackupRequest) + private static final com.google.cloud.netapp.v1.GetBackupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.GetBackupRequest(); + } + + public static com.google.cloud.netapp.v1.GetBackupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBackupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.GetBackupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/GetBackupRequestOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/GetBackupRequestOrBuilder.java new file mode 100644 index 000000000000..185c0f8f3a08 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/GetBackupRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup.proto + +package com.google.cloud.netapp.v1; + +public interface GetBackupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.GetBackupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The backup resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The backup resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/GetBackupVaultRequest.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/GetBackupVaultRequest.java new file mode 100644 index 000000000000..e994ba945b42 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/GetBackupVaultRequest.java @@ -0,0 +1,645 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_vault.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * GetBackupVaultRequest gets the state of a backupVault.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.GetBackupVaultRequest} + */ +public final class GetBackupVaultRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.GetBackupVaultRequest) + GetBackupVaultRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetBackupVaultRequest.newBuilder() to construct. + private GetBackupVaultRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetBackupVaultRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetBackupVaultRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_GetBackupVaultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_GetBackupVaultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.GetBackupVaultRequest.class, + com.google.cloud.netapp.v1.GetBackupVaultRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The backupVault resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The backupVault resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.GetBackupVaultRequest)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.GetBackupVaultRequest other = + (com.google.cloud.netapp.v1.GetBackupVaultRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.GetBackupVaultRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.GetBackupVaultRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.GetBackupVaultRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.GetBackupVaultRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.GetBackupVaultRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.GetBackupVaultRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.GetBackupVaultRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.GetBackupVaultRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.GetBackupVaultRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.GetBackupVaultRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.GetBackupVaultRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.GetBackupVaultRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.netapp.v1.GetBackupVaultRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * GetBackupVaultRequest gets the state of a backupVault.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.GetBackupVaultRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.GetBackupVaultRequest) + com.google.cloud.netapp.v1.GetBackupVaultRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_GetBackupVaultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_GetBackupVaultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.GetBackupVaultRequest.class, + com.google.cloud.netapp.v1.GetBackupVaultRequest.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.GetBackupVaultRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_GetBackupVaultRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.GetBackupVaultRequest getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.GetBackupVaultRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.GetBackupVaultRequest build() { + com.google.cloud.netapp.v1.GetBackupVaultRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.GetBackupVaultRequest buildPartial() { + com.google.cloud.netapp.v1.GetBackupVaultRequest result = + new com.google.cloud.netapp.v1.GetBackupVaultRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.netapp.v1.GetBackupVaultRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.GetBackupVaultRequest) { + return mergeFrom((com.google.cloud.netapp.v1.GetBackupVaultRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.GetBackupVaultRequest other) { + if (other == com.google.cloud.netapp.v1.GetBackupVaultRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The backupVault resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The backupVault resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The backupVault resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backupVault resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backupVault resource name, in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.GetBackupVaultRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.GetBackupVaultRequest) + private static final com.google.cloud.netapp.v1.GetBackupVaultRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.GetBackupVaultRequest(); + } + + public static com.google.cloud.netapp.v1.GetBackupVaultRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBackupVaultRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.GetBackupVaultRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/GetBackupVaultRequestOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/GetBackupVaultRequestOrBuilder.java new file mode 100644 index 000000000000..64265a8b1d79 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/GetBackupVaultRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_vault.proto + +package com.google.cloud.netapp.v1; + +public interface GetBackupVaultRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.GetBackupVaultRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The backupVault resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The backupVault resource name, in the format
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/KmsConfig.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/KmsConfig.java index d40ea9683280..50849f4e47e6 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/KmsConfig.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/KmsConfig.java @@ -446,10 +446,10 @@ private State(int value) { * * *
-   * Output only. Name of the KmsConfig.
+   * Identifier. Name of the KmsConfig.
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -469,10 +469,10 @@ public java.lang.String getName() { * * *
-   * Output only. Name of the KmsConfig.
+   * Identifier. Name of the KmsConfig.
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -1512,10 +1512,10 @@ public Builder mergeFrom( * * *
-     * Output only. Name of the KmsConfig.
+     * Identifier. Name of the KmsConfig.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -1534,10 +1534,10 @@ public java.lang.String getName() { * * *
-     * Output only. Name of the KmsConfig.
+     * Identifier. Name of the KmsConfig.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -1556,10 +1556,10 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Output only. Name of the KmsConfig.
+     * Identifier. Name of the KmsConfig.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @param value The name to set. * @return This builder for chaining. @@ -1577,10 +1577,10 @@ public Builder setName(java.lang.String value) { * * *
-     * Output only. Name of the KmsConfig.
+     * Identifier. Name of the KmsConfig.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return This builder for chaining. */ @@ -1594,10 +1594,10 @@ public Builder clearName() { * * *
-     * Output only. Name of the KmsConfig.
+     * Identifier. Name of the KmsConfig.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/KmsConfigOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/KmsConfigOrBuilder.java index ae8eaab1d86b..c4947951b763 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/KmsConfigOrBuilder.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/KmsConfigOrBuilder.java @@ -27,10 +27,10 @@ public interface KmsConfigOrBuilder * * *
-   * Output only. Name of the KmsConfig.
+   * Identifier. Name of the KmsConfig.
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -39,10 +39,10 @@ public interface KmsConfigOrBuilder * * *
-   * Output only. Name of the KmsConfig.
+   * Identifier. Name of the KmsConfig.
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/KmsProto.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/KmsProto.java index 2f207d6563eb..2fcec0be7344 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/KmsProto.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/KmsProto.java @@ -110,8 +110,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\037netapp.googleapis.com/KmsConfig\"h\n\027Veri" + "fyKmsConfigResponse\022\025\n\007healthy\030\001 \001(\010B\004\342A" + "\001\003\022\032\n\014health_error\030\002 \001(\tB\004\342A\001\003\022\032\n\014instru" - + "ctions\030\003 \001(\tB\004\342A\001\003\"\274\005\n\tKmsConfig\022\022\n\004name" - + "\030\001 \001(\tB\004\342A\001\003\022\035\n\017crypto_key_name\030\002 \001(\tB\004\342" + + "ctions\030\003 \001(\tB\004\342A\001\003\"\323\005\n\tKmsConfig\022\022\n\004name" + + "\030\001 \001(\tB\004\342A\001\010\022\035\n\017crypto_key_name\030\002 \001(\tB\004\342" + "A\001\002\022<\n\005state\030\003 \001(\0162\'.google.cloud.netapp" + ".v1.KmsConfig.StateB\004\342A\001\003\022\033\n\rstate_detai" + "ls\030\004 \001(\tB\004\342A\001\003\0225\n\013create_time\030\005 \001(\0132\032.go" @@ -125,14 +125,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\010DELETING\020\003\022\014\n\010UPDATING\020\004\022\n\n\006IN_USE\020\005\022\t\n" + "\005ERROR\020\006\022\025\n\021KEY_CHECK_PENDING\020\007\022\025\n\021KEY_N" + "OT_REACHABLE\020\010\022\r\n\tDISABLING\020\t\022\014\n\010DISABLE" - + "D\020\n\022\r\n\tMIGRATING\020\013:e\352Ab\n\037netapp.googleap" + + "D\020\n\022\r\n\tMIGRATING\020\013:|\352Ay\n\037netapp.googleap" + "is.com/KmsConfig\022?projects/{project}/loc" + "ations/{location}/kmsConfigs/{kms_config" - + "}B\252\001\n\032com.google.cloud.netapp.v1B\010KmsPro" - + "toP\001Z2cloud.google.com/go/netapp/apiv1/n" - + "etapppb;netapppb\252\002\026Google.Cloud.NetApp.V" - + "1\312\002\026Google\\Cloud\\NetApp\\V1\352\002\031Google::Clo" - + "ud::NetApp::V1b\006proto3" + + "}*\nkmsConfigs2\tkmsConfigB\252\001\n\032com.google." + + "cloud.netapp.v1B\010KmsProtoP\001Z2cloud.googl" + + "e.com/go/netapp/apiv1/netapppb;netapppb\252" + + "\002\026Google.Cloud.NetApp.V1\312\002\026Google\\Cloud\\" + + "NetApp\\V1\352\002\031Google::Cloud::NetApp::V1b\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupPoliciesRequest.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupPoliciesRequest.java new file mode 100644 index 000000000000..613f80ea40f8 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupPoliciesRequest.java @@ -0,0 +1,1281 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_policy.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * ListBackupPoliciesRequest for requesting multiple backup policies.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.ListBackupPoliciesRequest} + */ +public final class ListBackupPoliciesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.ListBackupPoliciesRequest) + ListBackupPoliciesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListBackupPoliciesRequest.newBuilder() to construct. + private ListBackupPoliciesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListBackupPoliciesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListBackupPoliciesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_ListBackupPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_ListBackupPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.ListBackupPoliciesRequest.class, + com.google.cloud.netapp.v1.ListBackupPoliciesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for ListBackupPoliciesRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for ListBackupPoliciesRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, the server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.ListBackupPoliciesRequest)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.ListBackupPoliciesRequest other = + (com.google.cloud.netapp.v1.ListBackupPoliciesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.netapp.v1.ListBackupPoliciesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * ListBackupPoliciesRequest for requesting multiple backup policies.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.ListBackupPoliciesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.ListBackupPoliciesRequest) + com.google.cloud.netapp.v1.ListBackupPoliciesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_ListBackupPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_ListBackupPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.ListBackupPoliciesRequest.class, + com.google.cloud.netapp.v1.ListBackupPoliciesRequest.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.ListBackupPoliciesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_ListBackupPoliciesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupPoliciesRequest getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.ListBackupPoliciesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupPoliciesRequest build() { + com.google.cloud.netapp.v1.ListBackupPoliciesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupPoliciesRequest buildPartial() { + com.google.cloud.netapp.v1.ListBackupPoliciesRequest result = + new com.google.cloud.netapp.v1.ListBackupPoliciesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.netapp.v1.ListBackupPoliciesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.ListBackupPoliciesRequest) { + return mergeFrom((com.google.cloud.netapp.v1.ListBackupPoliciesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.ListBackupPoliciesRequest other) { + if (other == com.google.cloud.netapp.v1.ListBackupPoliciesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for ListBackupPoliciesRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListBackupPoliciesRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListBackupPoliciesRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListBackupPoliciesRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListBackupPoliciesRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, the server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, the server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, the server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filtering results
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filtering results
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filtering results
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.ListBackupPoliciesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.ListBackupPoliciesRequest) + private static final com.google.cloud.netapp.v1.ListBackupPoliciesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.ListBackupPoliciesRequest(); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBackupPoliciesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupPoliciesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupPoliciesRequestOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupPoliciesRequestOrBuilder.java new file mode 100644 index 000000000000..b40dc0d5af07 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupPoliciesRequestOrBuilder.java @@ -0,0 +1,143 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_policy.proto + +package com.google.cloud.netapp.v1; + +public interface ListBackupPoliciesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.ListBackupPoliciesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListBackupPoliciesRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ListBackupPoliciesRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, the server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupPoliciesResponse.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupPoliciesResponse.java new file mode 100644 index 000000000000..63bf66c4271e --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupPoliciesResponse.java @@ -0,0 +1,1400 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_policy.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * ListBackupPoliciesResponse contains all the backup policies requested.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.ListBackupPoliciesResponse} + */ +public final class ListBackupPoliciesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.ListBackupPoliciesResponse) + ListBackupPoliciesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListBackupPoliciesResponse.newBuilder() to construct. + private ListBackupPoliciesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListBackupPoliciesResponse() { + backupPolicies_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListBackupPoliciesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_ListBackupPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_ListBackupPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.ListBackupPoliciesResponse.class, + com.google.cloud.netapp.v1.ListBackupPoliciesResponse.Builder.class); + } + + public static final int BACKUP_POLICIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List backupPolicies_; + /** + * + * + *
+   * The list of backup policies.
+   * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + @java.lang.Override + public java.util.List getBackupPoliciesList() { + return backupPolicies_; + } + /** + * + * + *
+   * The list of backup policies.
+   * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + @java.lang.Override + public java.util.List + getBackupPoliciesOrBuilderList() { + return backupPolicies_; + } + /** + * + * + *
+   * The list of backup policies.
+   * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + @java.lang.Override + public int getBackupPoliciesCount() { + return backupPolicies_.size(); + } + /** + * + * + *
+   * The list of backup policies.
+   * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + @java.lang.Override + public com.google.cloud.netapp.v1.BackupPolicy getBackupPolicies(int index) { + return backupPolicies_.get(index); + } + /** + * + * + *
+   * The list of backup policies.
+   * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + @java.lang.Override + public com.google.cloud.netapp.v1.BackupPolicyOrBuilder getBackupPoliciesOrBuilder(int index) { + return backupPolicies_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < backupPolicies_.size(); i++) { + output.writeMessage(1, backupPolicies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < backupPolicies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, backupPolicies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.ListBackupPoliciesResponse)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.ListBackupPoliciesResponse other = + (com.google.cloud.netapp.v1.ListBackupPoliciesResponse) obj; + + if (!getBackupPoliciesList().equals(other.getBackupPoliciesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBackupPoliciesCount() > 0) { + hash = (37 * hash) + BACKUP_POLICIES_FIELD_NUMBER; + hash = (53 * hash) + getBackupPoliciesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.netapp.v1.ListBackupPoliciesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * ListBackupPoliciesResponse contains all the backup policies requested.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.ListBackupPoliciesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.ListBackupPoliciesResponse) + com.google.cloud.netapp.v1.ListBackupPoliciesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_ListBackupPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_ListBackupPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.ListBackupPoliciesResponse.class, + com.google.cloud.netapp.v1.ListBackupPoliciesResponse.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.ListBackupPoliciesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (backupPoliciesBuilder_ == null) { + backupPolicies_ = java.util.Collections.emptyList(); + } else { + backupPolicies_ = null; + backupPoliciesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_ListBackupPoliciesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupPoliciesResponse getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.ListBackupPoliciesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupPoliciesResponse build() { + com.google.cloud.netapp.v1.ListBackupPoliciesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupPoliciesResponse buildPartial() { + com.google.cloud.netapp.v1.ListBackupPoliciesResponse result = + new com.google.cloud.netapp.v1.ListBackupPoliciesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.netapp.v1.ListBackupPoliciesResponse result) { + if (backupPoliciesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + backupPolicies_ = java.util.Collections.unmodifiableList(backupPolicies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.backupPolicies_ = backupPolicies_; + } else { + result.backupPolicies_ = backupPoliciesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.netapp.v1.ListBackupPoliciesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.ListBackupPoliciesResponse) { + return mergeFrom((com.google.cloud.netapp.v1.ListBackupPoliciesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.ListBackupPoliciesResponse other) { + if (other == com.google.cloud.netapp.v1.ListBackupPoliciesResponse.getDefaultInstance()) + return this; + if (backupPoliciesBuilder_ == null) { + if (!other.backupPolicies_.isEmpty()) { + if (backupPolicies_.isEmpty()) { + backupPolicies_ = other.backupPolicies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBackupPoliciesIsMutable(); + backupPolicies_.addAll(other.backupPolicies_); + } + onChanged(); + } + } else { + if (!other.backupPolicies_.isEmpty()) { + if (backupPoliciesBuilder_.isEmpty()) { + backupPoliciesBuilder_.dispose(); + backupPoliciesBuilder_ = null; + backupPolicies_ = other.backupPolicies_; + bitField0_ = (bitField0_ & ~0x00000001); + backupPoliciesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBackupPoliciesFieldBuilder() + : null; + } else { + backupPoliciesBuilder_.addAllMessages(other.backupPolicies_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.netapp.v1.BackupPolicy m = + input.readMessage( + com.google.cloud.netapp.v1.BackupPolicy.parser(), extensionRegistry); + if (backupPoliciesBuilder_ == null) { + ensureBackupPoliciesIsMutable(); + backupPolicies_.add(m); + } else { + backupPoliciesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List backupPolicies_ = + java.util.Collections.emptyList(); + + private void ensureBackupPoliciesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + backupPolicies_ = + new java.util.ArrayList(backupPolicies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.netapp.v1.BackupPolicy, + com.google.cloud.netapp.v1.BackupPolicy.Builder, + com.google.cloud.netapp.v1.BackupPolicyOrBuilder> + backupPoliciesBuilder_; + + /** + * + * + *
+     * The list of backup policies.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + public java.util.List getBackupPoliciesList() { + if (backupPoliciesBuilder_ == null) { + return java.util.Collections.unmodifiableList(backupPolicies_); + } else { + return backupPoliciesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of backup policies.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + public int getBackupPoliciesCount() { + if (backupPoliciesBuilder_ == null) { + return backupPolicies_.size(); + } else { + return backupPoliciesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of backup policies.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + public com.google.cloud.netapp.v1.BackupPolicy getBackupPolicies(int index) { + if (backupPoliciesBuilder_ == null) { + return backupPolicies_.get(index); + } else { + return backupPoliciesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of backup policies.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + public Builder setBackupPolicies(int index, com.google.cloud.netapp.v1.BackupPolicy value) { + if (backupPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPoliciesIsMutable(); + backupPolicies_.set(index, value); + onChanged(); + } else { + backupPoliciesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of backup policies.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + public Builder setBackupPolicies( + int index, com.google.cloud.netapp.v1.BackupPolicy.Builder builderForValue) { + if (backupPoliciesBuilder_ == null) { + ensureBackupPoliciesIsMutable(); + backupPolicies_.set(index, builderForValue.build()); + onChanged(); + } else { + backupPoliciesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of backup policies.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + public Builder addBackupPolicies(com.google.cloud.netapp.v1.BackupPolicy value) { + if (backupPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPoliciesIsMutable(); + backupPolicies_.add(value); + onChanged(); + } else { + backupPoliciesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of backup policies.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + public Builder addBackupPolicies(int index, com.google.cloud.netapp.v1.BackupPolicy value) { + if (backupPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPoliciesIsMutable(); + backupPolicies_.add(index, value); + onChanged(); + } else { + backupPoliciesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of backup policies.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + public Builder addBackupPolicies( + com.google.cloud.netapp.v1.BackupPolicy.Builder builderForValue) { + if (backupPoliciesBuilder_ == null) { + ensureBackupPoliciesIsMutable(); + backupPolicies_.add(builderForValue.build()); + onChanged(); + } else { + backupPoliciesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of backup policies.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + public Builder addBackupPolicies( + int index, com.google.cloud.netapp.v1.BackupPolicy.Builder builderForValue) { + if (backupPoliciesBuilder_ == null) { + ensureBackupPoliciesIsMutable(); + backupPolicies_.add(index, builderForValue.build()); + onChanged(); + } else { + backupPoliciesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of backup policies.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + public Builder addAllBackupPolicies( + java.lang.Iterable values) { + if (backupPoliciesBuilder_ == null) { + ensureBackupPoliciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backupPolicies_); + onChanged(); + } else { + backupPoliciesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of backup policies.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + public Builder clearBackupPolicies() { + if (backupPoliciesBuilder_ == null) { + backupPolicies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + backupPoliciesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of backup policies.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + public Builder removeBackupPolicies(int index) { + if (backupPoliciesBuilder_ == null) { + ensureBackupPoliciesIsMutable(); + backupPolicies_.remove(index); + onChanged(); + } else { + backupPoliciesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of backup policies.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + public com.google.cloud.netapp.v1.BackupPolicy.Builder getBackupPoliciesBuilder(int index) { + return getBackupPoliciesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of backup policies.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + public com.google.cloud.netapp.v1.BackupPolicyOrBuilder getBackupPoliciesOrBuilder(int index) { + if (backupPoliciesBuilder_ == null) { + return backupPolicies_.get(index); + } else { + return backupPoliciesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of backup policies.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + public java.util.List + getBackupPoliciesOrBuilderList() { + if (backupPoliciesBuilder_ != null) { + return backupPoliciesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backupPolicies_); + } + } + /** + * + * + *
+     * The list of backup policies.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + public com.google.cloud.netapp.v1.BackupPolicy.Builder addBackupPoliciesBuilder() { + return getBackupPoliciesFieldBuilder() + .addBuilder(com.google.cloud.netapp.v1.BackupPolicy.getDefaultInstance()); + } + /** + * + * + *
+     * The list of backup policies.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + public com.google.cloud.netapp.v1.BackupPolicy.Builder addBackupPoliciesBuilder(int index) { + return getBackupPoliciesFieldBuilder() + .addBuilder(index, com.google.cloud.netapp.v1.BackupPolicy.getDefaultInstance()); + } + /** + * + * + *
+     * The list of backup policies.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + public java.util.List + getBackupPoliciesBuilderList() { + return getBackupPoliciesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.netapp.v1.BackupPolicy, + com.google.cloud.netapp.v1.BackupPolicy.Builder, + com.google.cloud.netapp.v1.BackupPolicyOrBuilder> + getBackupPoliciesFieldBuilder() { + if (backupPoliciesBuilder_ == null) { + backupPoliciesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.netapp.v1.BackupPolicy, + com.google.cloud.netapp.v1.BackupPolicy.Builder, + com.google.cloud.netapp.v1.BackupPolicyOrBuilder>( + backupPolicies_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + backupPolicies_ = null; + } + return backupPoliciesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.ListBackupPoliciesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.ListBackupPoliciesResponse) + private static final com.google.cloud.netapp.v1.ListBackupPoliciesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.ListBackupPoliciesResponse(); + } + + public static com.google.cloud.netapp.v1.ListBackupPoliciesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBackupPoliciesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupPoliciesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupPoliciesResponseOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupPoliciesResponseOrBuilder.java new file mode 100644 index 000000000000..5944a24dfb71 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupPoliciesResponseOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_policy.proto + +package com.google.cloud.netapp.v1; + +public interface ListBackupPoliciesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.ListBackupPoliciesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of backup policies.
+   * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + java.util.List getBackupPoliciesList(); + /** + * + * + *
+   * The list of backup policies.
+   * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + com.google.cloud.netapp.v1.BackupPolicy getBackupPolicies(int index); + /** + * + * + *
+   * The list of backup policies.
+   * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + int getBackupPoliciesCount(); + /** + * + * + *
+   * The list of backup policies.
+   * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + java.util.List + getBackupPoliciesOrBuilderList(); + /** + * + * + *
+   * The list of backup policies.
+   * 
+ * + * repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + com.google.cloud.netapp.v1.BackupPolicyOrBuilder getBackupPoliciesOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupVaultsRequest.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupVaultsRequest.java new file mode 100644 index 000000000000..27a3f17cbe9a --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupVaultsRequest.java @@ -0,0 +1,1298 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_vault.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * ListBackupVaultsRequest lists backupVaults.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.ListBackupVaultsRequest} + */ +public final class ListBackupVaultsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.ListBackupVaultsRequest) + ListBackupVaultsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListBackupVaultsRequest.newBuilder() to construct. + private ListBackupVaultsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListBackupVaultsRequest() { + parent_ = ""; + pageToken_ = ""; + orderBy_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListBackupVaultsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_ListBackupVaultsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_ListBackupVaultsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.ListBackupVaultsRequest.class, + com.google.cloud.netapp.v1.ListBackupVaultsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The location for which to retrieve backupVault information,
+   * in the format
+   * `projects/{project_id}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The location for which to retrieve backupVault information,
+   * in the format
+   * `projects/{project_id}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
+   * 
+ * + * string order_by = 4; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
+   * 
+ * + * string order_by = 4; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 5; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 5; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, orderBy_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, filter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, orderBy_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, filter_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.ListBackupVaultsRequest)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.ListBackupVaultsRequest other = + (com.google.cloud.netapp.v1.ListBackupVaultsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.netapp.v1.ListBackupVaultsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * ListBackupVaultsRequest lists backupVaults.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.ListBackupVaultsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.ListBackupVaultsRequest) + com.google.cloud.netapp.v1.ListBackupVaultsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_ListBackupVaultsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_ListBackupVaultsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.ListBackupVaultsRequest.class, + com.google.cloud.netapp.v1.ListBackupVaultsRequest.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.ListBackupVaultsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + orderBy_ = ""; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_ListBackupVaultsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupVaultsRequest getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.ListBackupVaultsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupVaultsRequest build() { + com.google.cloud.netapp.v1.ListBackupVaultsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupVaultsRequest buildPartial() { + com.google.cloud.netapp.v1.ListBackupVaultsRequest result = + new com.google.cloud.netapp.v1.ListBackupVaultsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.netapp.v1.ListBackupVaultsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.filter_ = filter_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.ListBackupVaultsRequest) { + return mergeFrom((com.google.cloud.netapp.v1.ListBackupVaultsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.ListBackupVaultsRequest other) { + if (other == com.google.cloud.netapp.v1.ListBackupVaultsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The location for which to retrieve backupVault information,
+     * in the format
+     * `projects/{project_id}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The location for which to retrieve backupVault information,
+     * in the format
+     * `projects/{project_id}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The location for which to retrieve backupVault information,
+     * in the format
+     * `projects/{project_id}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The location for which to retrieve backupVault information,
+     * in the format
+     * `projects/{project_id}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The location for which to retrieve backupVault information,
+     * in the format
+     * `projects/{project_id}/locations/{location}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of items to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
+     * 
+ * + * string order_by = 4; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
+     * 
+ * + * string order_by = 4; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
+     * 
+ * + * string order_by = 4; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
+     * 
+ * + * string order_by = 4; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
+     * 
+ * + * string order_by = 4; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 5; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 5; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 5; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 5; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * List filter.
+     * 
+ * + * string filter = 5; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.ListBackupVaultsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.ListBackupVaultsRequest) + private static final com.google.cloud.netapp.v1.ListBackupVaultsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.ListBackupVaultsRequest(); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBackupVaultsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupVaultsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupVaultsRequestOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupVaultsRequestOrBuilder.java new file mode 100644 index 000000000000..423fe1ccfdf0 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupVaultsRequestOrBuilder.java @@ -0,0 +1,148 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_vault.proto + +package com.google.cloud.netapp.v1; + +public interface ListBackupVaultsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.ListBackupVaultsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The location for which to retrieve backupVault information,
+   * in the format
+   * `projects/{project_id}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The location for which to retrieve backupVault information,
+   * in the format
+   * `projects/{project_id}/locations/{location}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
+   * 
+ * + * string order_by = 4; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
+   * 
+ * + * string order_by = 4; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 5; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * List filter.
+   * 
+ * + * string filter = 5; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupVaultsResponse.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupVaultsResponse.java new file mode 100644 index 000000000000..72aef167badb --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupVaultsResponse.java @@ -0,0 +1,1402 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_vault.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * ListBackupVaultsResponse is the result of ListBackupVaultsRequest.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.ListBackupVaultsResponse} + */ +public final class ListBackupVaultsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.ListBackupVaultsResponse) + ListBackupVaultsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListBackupVaultsResponse.newBuilder() to construct. + private ListBackupVaultsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListBackupVaultsResponse() { + backupVaults_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListBackupVaultsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_ListBackupVaultsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_ListBackupVaultsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.ListBackupVaultsResponse.class, + com.google.cloud.netapp.v1.ListBackupVaultsResponse.Builder.class); + } + + public static final int BACKUP_VAULTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List backupVaults_; + /** + * + * + *
+   * A list of backupVaults in the project for the specified location.
+   * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + @java.lang.Override + public java.util.List getBackupVaultsList() { + return backupVaults_; + } + /** + * + * + *
+   * A list of backupVaults in the project for the specified location.
+   * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + @java.lang.Override + public java.util.List + getBackupVaultsOrBuilderList() { + return backupVaults_; + } + /** + * + * + *
+   * A list of backupVaults in the project for the specified location.
+   * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + @java.lang.Override + public int getBackupVaultsCount() { + return backupVaults_.size(); + } + /** + * + * + *
+   * A list of backupVaults in the project for the specified location.
+   * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + @java.lang.Override + public com.google.cloud.netapp.v1.BackupVault getBackupVaults(int index) { + return backupVaults_.get(index); + } + /** + * + * + *
+   * A list of backupVaults in the project for the specified location.
+   * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + @java.lang.Override + public com.google.cloud.netapp.v1.BackupVaultOrBuilder getBackupVaultsOrBuilder(int index) { + return backupVaults_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * The token you can use to retrieve the next page of results. Not returned
+   * if there are no more results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The token you can use to retrieve the next page of results. Not returned
+   * if there are no more results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < backupVaults_.size(); i++) { + output.writeMessage(1, backupVaults_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < backupVaults_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, backupVaults_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.ListBackupVaultsResponse)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.ListBackupVaultsResponse other = + (com.google.cloud.netapp.v1.ListBackupVaultsResponse) obj; + + if (!getBackupVaultsList().equals(other.getBackupVaultsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBackupVaultsCount() > 0) { + hash = (37 * hash) + BACKUP_VAULTS_FIELD_NUMBER; + hash = (53 * hash) + getBackupVaultsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.netapp.v1.ListBackupVaultsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * ListBackupVaultsResponse is the result of ListBackupVaultsRequest.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.ListBackupVaultsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.ListBackupVaultsResponse) + com.google.cloud.netapp.v1.ListBackupVaultsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_ListBackupVaultsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_ListBackupVaultsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.ListBackupVaultsResponse.class, + com.google.cloud.netapp.v1.ListBackupVaultsResponse.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.ListBackupVaultsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (backupVaultsBuilder_ == null) { + backupVaults_ = java.util.Collections.emptyList(); + } else { + backupVaults_ = null; + backupVaultsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_ListBackupVaultsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupVaultsResponse getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.ListBackupVaultsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupVaultsResponse build() { + com.google.cloud.netapp.v1.ListBackupVaultsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupVaultsResponse buildPartial() { + com.google.cloud.netapp.v1.ListBackupVaultsResponse result = + new com.google.cloud.netapp.v1.ListBackupVaultsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.netapp.v1.ListBackupVaultsResponse result) { + if (backupVaultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + backupVaults_ = java.util.Collections.unmodifiableList(backupVaults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.backupVaults_ = backupVaults_; + } else { + result.backupVaults_ = backupVaultsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.netapp.v1.ListBackupVaultsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.ListBackupVaultsResponse) { + return mergeFrom((com.google.cloud.netapp.v1.ListBackupVaultsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.ListBackupVaultsResponse other) { + if (other == com.google.cloud.netapp.v1.ListBackupVaultsResponse.getDefaultInstance()) + return this; + if (backupVaultsBuilder_ == null) { + if (!other.backupVaults_.isEmpty()) { + if (backupVaults_.isEmpty()) { + backupVaults_ = other.backupVaults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBackupVaultsIsMutable(); + backupVaults_.addAll(other.backupVaults_); + } + onChanged(); + } + } else { + if (!other.backupVaults_.isEmpty()) { + if (backupVaultsBuilder_.isEmpty()) { + backupVaultsBuilder_.dispose(); + backupVaultsBuilder_ = null; + backupVaults_ = other.backupVaults_; + bitField0_ = (bitField0_ & ~0x00000001); + backupVaultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBackupVaultsFieldBuilder() + : null; + } else { + backupVaultsBuilder_.addAllMessages(other.backupVaults_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.netapp.v1.BackupVault m = + input.readMessage( + com.google.cloud.netapp.v1.BackupVault.parser(), extensionRegistry); + if (backupVaultsBuilder_ == null) { + ensureBackupVaultsIsMutable(); + backupVaults_.add(m); + } else { + backupVaultsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List backupVaults_ = + java.util.Collections.emptyList(); + + private void ensureBackupVaultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + backupVaults_ = + new java.util.ArrayList(backupVaults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.netapp.v1.BackupVault, + com.google.cloud.netapp.v1.BackupVault.Builder, + com.google.cloud.netapp.v1.BackupVaultOrBuilder> + backupVaultsBuilder_; + + /** + * + * + *
+     * A list of backupVaults in the project for the specified location.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + public java.util.List getBackupVaultsList() { + if (backupVaultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(backupVaults_); + } else { + return backupVaultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of backupVaults in the project for the specified location.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + public int getBackupVaultsCount() { + if (backupVaultsBuilder_ == null) { + return backupVaults_.size(); + } else { + return backupVaultsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of backupVaults in the project for the specified location.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + public com.google.cloud.netapp.v1.BackupVault getBackupVaults(int index) { + if (backupVaultsBuilder_ == null) { + return backupVaults_.get(index); + } else { + return backupVaultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of backupVaults in the project for the specified location.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + public Builder setBackupVaults(int index, com.google.cloud.netapp.v1.BackupVault value) { + if (backupVaultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupVaultsIsMutable(); + backupVaults_.set(index, value); + onChanged(); + } else { + backupVaultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of backupVaults in the project for the specified location.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + public Builder setBackupVaults( + int index, com.google.cloud.netapp.v1.BackupVault.Builder builderForValue) { + if (backupVaultsBuilder_ == null) { + ensureBackupVaultsIsMutable(); + backupVaults_.set(index, builderForValue.build()); + onChanged(); + } else { + backupVaultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of backupVaults in the project for the specified location.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + public Builder addBackupVaults(com.google.cloud.netapp.v1.BackupVault value) { + if (backupVaultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupVaultsIsMutable(); + backupVaults_.add(value); + onChanged(); + } else { + backupVaultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of backupVaults in the project for the specified location.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + public Builder addBackupVaults(int index, com.google.cloud.netapp.v1.BackupVault value) { + if (backupVaultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupVaultsIsMutable(); + backupVaults_.add(index, value); + onChanged(); + } else { + backupVaultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of backupVaults in the project for the specified location.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + public Builder addBackupVaults(com.google.cloud.netapp.v1.BackupVault.Builder builderForValue) { + if (backupVaultsBuilder_ == null) { + ensureBackupVaultsIsMutable(); + backupVaults_.add(builderForValue.build()); + onChanged(); + } else { + backupVaultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of backupVaults in the project for the specified location.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + public Builder addBackupVaults( + int index, com.google.cloud.netapp.v1.BackupVault.Builder builderForValue) { + if (backupVaultsBuilder_ == null) { + ensureBackupVaultsIsMutable(); + backupVaults_.add(index, builderForValue.build()); + onChanged(); + } else { + backupVaultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of backupVaults in the project for the specified location.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + public Builder addAllBackupVaults( + java.lang.Iterable values) { + if (backupVaultsBuilder_ == null) { + ensureBackupVaultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backupVaults_); + onChanged(); + } else { + backupVaultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of backupVaults in the project for the specified location.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + public Builder clearBackupVaults() { + if (backupVaultsBuilder_ == null) { + backupVaults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + backupVaultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of backupVaults in the project for the specified location.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + public Builder removeBackupVaults(int index) { + if (backupVaultsBuilder_ == null) { + ensureBackupVaultsIsMutable(); + backupVaults_.remove(index); + onChanged(); + } else { + backupVaultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of backupVaults in the project for the specified location.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + public com.google.cloud.netapp.v1.BackupVault.Builder getBackupVaultsBuilder(int index) { + return getBackupVaultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of backupVaults in the project for the specified location.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + public com.google.cloud.netapp.v1.BackupVaultOrBuilder getBackupVaultsOrBuilder(int index) { + if (backupVaultsBuilder_ == null) { + return backupVaults_.get(index); + } else { + return backupVaultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of backupVaults in the project for the specified location.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + public java.util.List + getBackupVaultsOrBuilderList() { + if (backupVaultsBuilder_ != null) { + return backupVaultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backupVaults_); + } + } + /** + * + * + *
+     * A list of backupVaults in the project for the specified location.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + public com.google.cloud.netapp.v1.BackupVault.Builder addBackupVaultsBuilder() { + return getBackupVaultsFieldBuilder() + .addBuilder(com.google.cloud.netapp.v1.BackupVault.getDefaultInstance()); + } + /** + * + * + *
+     * A list of backupVaults in the project for the specified location.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + public com.google.cloud.netapp.v1.BackupVault.Builder addBackupVaultsBuilder(int index) { + return getBackupVaultsFieldBuilder() + .addBuilder(index, com.google.cloud.netapp.v1.BackupVault.getDefaultInstance()); + } + /** + * + * + *
+     * A list of backupVaults in the project for the specified location.
+     * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + public java.util.List + getBackupVaultsBuilderList() { + return getBackupVaultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.netapp.v1.BackupVault, + com.google.cloud.netapp.v1.BackupVault.Builder, + com.google.cloud.netapp.v1.BackupVaultOrBuilder> + getBackupVaultsFieldBuilder() { + if (backupVaultsBuilder_ == null) { + backupVaultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.netapp.v1.BackupVault, + com.google.cloud.netapp.v1.BackupVault.Builder, + com.google.cloud.netapp.v1.BackupVaultOrBuilder>( + backupVaults_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + backupVaults_ = null; + } + return backupVaultsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The token you can use to retrieve the next page of results. Not returned
+     * if there are no more results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The token you can use to retrieve the next page of results. Not returned
+     * if there are no more results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The token you can use to retrieve the next page of results. Not returned
+     * if there are no more results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The token you can use to retrieve the next page of results. Not returned
+     * if there are no more results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The token you can use to retrieve the next page of results. Not returned
+     * if there are no more results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.ListBackupVaultsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.ListBackupVaultsResponse) + private static final com.google.cloud.netapp.v1.ListBackupVaultsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.ListBackupVaultsResponse(); + } + + public static com.google.cloud.netapp.v1.ListBackupVaultsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBackupVaultsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupVaultsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupVaultsResponseOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupVaultsResponseOrBuilder.java new file mode 100644 index 000000000000..9830431e127a --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupVaultsResponseOrBuilder.java @@ -0,0 +1,155 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_vault.proto + +package com.google.cloud.netapp.v1; + +public interface ListBackupVaultsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.ListBackupVaultsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of backupVaults in the project for the specified location.
+   * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + java.util.List getBackupVaultsList(); + /** + * + * + *
+   * A list of backupVaults in the project for the specified location.
+   * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + com.google.cloud.netapp.v1.BackupVault getBackupVaults(int index); + /** + * + * + *
+   * A list of backupVaults in the project for the specified location.
+   * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + int getBackupVaultsCount(); + /** + * + * + *
+   * A list of backupVaults in the project for the specified location.
+   * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + java.util.List + getBackupVaultsOrBuilderList(); + /** + * + * + *
+   * A list of backupVaults in the project for the specified location.
+   * 
+ * + * repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + com.google.cloud.netapp.v1.BackupVaultOrBuilder getBackupVaultsOrBuilder(int index); + + /** + * + * + *
+   * The token you can use to retrieve the next page of results. Not returned
+   * if there are no more results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The token you can use to retrieve the next page of results. Not returned
+   * if there are no more results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupsRequest.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupsRequest.java new file mode 100644 index 000000000000..bde3843436ed --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupsRequest.java @@ -0,0 +1,1368 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * ListBackupsRequest lists backups.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.ListBackupsRequest} + */ +public final class ListBackupsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.ListBackupsRequest) + ListBackupsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListBackupsRequest.newBuilder() to construct. + private ListBackupsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListBackupsRequest() { + parent_ = ""; + pageToken_ = ""; + orderBy_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListBackupsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_ListBackupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_ListBackupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.ListBackupsRequest.class, + com.google.cloud.netapp.v1.ListBackupsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The backupVault for which to retrieve backup information,
+   * in the format
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+   * To retrieve backup information for all locations, use "-" for the
+   * `{location}` value.
+   * To retrieve backup information for all backupVaults, use "-" for the
+   * `{backup_vault_id}` value.
+   * To retrieve backup information for a volume, use "-" for the
+   * `{backup_vault_id}` value and specify volume full name with the filter.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The backupVault for which to retrieve backup information,
+   * in the format
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+   * To retrieve backup information for all locations, use "-" for the
+   * `{location}` value.
+   * To retrieve backup information for all backupVaults, use "-" for the
+   * `{backup_vault_id}` value.
+   * To retrieve backup information for a volume, use "-" for the
+   * `{backup_vault_id}` value and specify volume full name with the filter.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of items to return. The service may return fewer
+   * than this value. The maximum value
+   * is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
+   * 
+ * + * string order_by = 4; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
+   * 
+ * + * string order_by = 4; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * The standard list filter.
+   * If specified, backups will be returned based on the attribute name that
+   * matches the filter expression. If empty, then no backups are filtered out.
+   * See https://google.aip.dev/160
+   * 
+ * + * string filter = 5; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * The standard list filter.
+   * If specified, backups will be returned based on the attribute name that
+   * matches the filter expression. If empty, then no backups are filtered out.
+   * See https://google.aip.dev/160
+   * 
+ * + * string filter = 5; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, orderBy_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, filter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, orderBy_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, filter_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.ListBackupsRequest)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.ListBackupsRequest other = + (com.google.cloud.netapp.v1.ListBackupsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.ListBackupsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.ListBackupsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.ListBackupsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.ListBackupsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.ListBackupsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.ListBackupsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.ListBackupsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.netapp.v1.ListBackupsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * ListBackupsRequest lists backups.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.ListBackupsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.ListBackupsRequest) + com.google.cloud.netapp.v1.ListBackupsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_ListBackupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_ListBackupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.ListBackupsRequest.class, + com.google.cloud.netapp.v1.ListBackupsRequest.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.ListBackupsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + orderBy_ = ""; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_ListBackupsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupsRequest getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.ListBackupsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupsRequest build() { + com.google.cloud.netapp.v1.ListBackupsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupsRequest buildPartial() { + com.google.cloud.netapp.v1.ListBackupsRequest result = + new com.google.cloud.netapp.v1.ListBackupsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.netapp.v1.ListBackupsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.filter_ = filter_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.ListBackupsRequest) { + return mergeFrom((com.google.cloud.netapp.v1.ListBackupsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.ListBackupsRequest other) { + if (other == com.google.cloud.netapp.v1.ListBackupsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The backupVault for which to retrieve backup information,
+     * in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+     * To retrieve backup information for all locations, use "-" for the
+     * `{location}` value.
+     * To retrieve backup information for all backupVaults, use "-" for the
+     * `{backup_vault_id}` value.
+     * To retrieve backup information for a volume, use "-" for the
+     * `{backup_vault_id}` value and specify volume full name with the filter.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The backupVault for which to retrieve backup information,
+     * in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+     * To retrieve backup information for all locations, use "-" for the
+     * `{location}` value.
+     * To retrieve backup information for all backupVaults, use "-" for the
+     * `{backup_vault_id}` value.
+     * To retrieve backup information for a volume, use "-" for the
+     * `{backup_vault_id}` value and specify volume full name with the filter.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The backupVault for which to retrieve backup information,
+     * in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+     * To retrieve backup information for all locations, use "-" for the
+     * `{location}` value.
+     * To retrieve backup information for all backupVaults, use "-" for the
+     * `{backup_vault_id}` value.
+     * To retrieve backup information for a volume, use "-" for the
+     * `{backup_vault_id}` value and specify volume full name with the filter.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backupVault for which to retrieve backup information,
+     * in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+     * To retrieve backup information for all locations, use "-" for the
+     * `{location}` value.
+     * To retrieve backup information for all backupVaults, use "-" for the
+     * `{backup_vault_id}` value.
+     * To retrieve backup information for a volume, use "-" for the
+     * `{backup_vault_id}` value and specify volume full name with the filter.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backupVault for which to retrieve backup information,
+     * in the format
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+     * To retrieve backup information for all locations, use "-" for the
+     * `{location}` value.
+     * To retrieve backup information for all backupVaults, use "-" for the
+     * `{backup_vault_id}` value.
+     * To retrieve backup information for a volume, use "-" for the
+     * `{backup_vault_id}` value and specify volume full name with the filter.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of items to return. The service may return fewer
+     * than this value. The maximum value
+     * is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of items to return. The service may return fewer
+     * than this value. The maximum value
+     * is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of items to return. The service may return fewer
+     * than this value. The maximum value
+     * is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value to use if there are additional
+     * results to retrieve for this list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
+     * 
+ * + * string order_by = 4; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
+     * 
+ * + * string order_by = 4; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
+     * 
+ * + * string order_by = 4; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
+     * 
+ * + * string order_by = 4; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Sort results. Supported values are "name", "name desc" or "" (unsorted).
+     * 
+ * + * string order_by = 4; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * The standard list filter.
+     * If specified, backups will be returned based on the attribute name that
+     * matches the filter expression. If empty, then no backups are filtered out.
+     * See https://google.aip.dev/160
+     * 
+ * + * string filter = 5; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     * If specified, backups will be returned based on the attribute name that
+     * matches the filter expression. If empty, then no backups are filtered out.
+     * See https://google.aip.dev/160
+     * 
+ * + * string filter = 5; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The standard list filter.
+     * If specified, backups will be returned based on the attribute name that
+     * matches the filter expression. If empty, then no backups are filtered out.
+     * See https://google.aip.dev/160
+     * 
+ * + * string filter = 5; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * If specified, backups will be returned based on the attribute name that
+     * matches the filter expression. If empty, then no backups are filtered out.
+     * See https://google.aip.dev/160
+     * 
+ * + * string filter = 5; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * If specified, backups will be returned based on the attribute name that
+     * matches the filter expression. If empty, then no backups are filtered out.
+     * See https://google.aip.dev/160
+     * 
+ * + * string filter = 5; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.ListBackupsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.ListBackupsRequest) + private static final com.google.cloud.netapp.v1.ListBackupsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.ListBackupsRequest(); + } + + public static com.google.cloud.netapp.v1.ListBackupsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBackupsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupsRequestOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupsRequestOrBuilder.java new file mode 100644 index 000000000000..5eed15f75222 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupsRequestOrBuilder.java @@ -0,0 +1,168 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup.proto + +package com.google.cloud.netapp.v1; + +public interface ListBackupsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.ListBackupsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The backupVault for which to retrieve backup information,
+   * in the format
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+   * To retrieve backup information for all locations, use "-" for the
+   * `{location}` value.
+   * To retrieve backup information for all backupVaults, use "-" for the
+   * `{backup_vault_id}` value.
+   * To retrieve backup information for a volume, use "-" for the
+   * `{backup_vault_id}` value and specify volume full name with the filter.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The backupVault for which to retrieve backup information,
+   * in the format
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+   * To retrieve backup information for all locations, use "-" for the
+   * `{location}` value.
+   * To retrieve backup information for all backupVaults, use "-" for the
+   * `{backup_vault_id}` value.
+   * To retrieve backup information for a volume, use "-" for the
+   * `{backup_vault_id}` value and specify volume full name with the filter.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return. The service may return fewer
+   * than this value. The maximum value
+   * is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The next_page_token value to use if there are additional
+   * results to retrieve for this list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
+   * 
+ * + * string order_by = 4; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Sort results. Supported values are "name", "name desc" or "" (unsorted).
+   * 
+ * + * string order_by = 4; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * The standard list filter.
+   * If specified, backups will be returned based on the attribute name that
+   * matches the filter expression. If empty, then no backups are filtered out.
+   * See https://google.aip.dev/160
+   * 
+ * + * string filter = 5; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The standard list filter.
+   * If specified, backups will be returned based on the attribute name that
+   * matches the filter expression. If empty, then no backups are filtered out.
+   * See https://google.aip.dev/160
+   * 
+ * + * string filter = 5; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupsResponse.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupsResponse.java new file mode 100644 index 000000000000..a4499742709c --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupsResponse.java @@ -0,0 +1,1398 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * ListBackupsResponse is the result of ListBackupsRequest.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.ListBackupsResponse} + */ +public final class ListBackupsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.ListBackupsResponse) + ListBackupsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListBackupsResponse.newBuilder() to construct. + private ListBackupsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListBackupsResponse() { + backups_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListBackupsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_ListBackupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_ListBackupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.ListBackupsResponse.class, + com.google.cloud.netapp.v1.ListBackupsResponse.Builder.class); + } + + public static final int BACKUPS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List backups_; + /** + * + * + *
+   * A list of backups in the project.
+   * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + @java.lang.Override + public java.util.List getBackupsList() { + return backups_; + } + /** + * + * + *
+   * A list of backups in the project.
+   * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + @java.lang.Override + public java.util.List + getBackupsOrBuilderList() { + return backups_; + } + /** + * + * + *
+   * A list of backups in the project.
+   * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + @java.lang.Override + public int getBackupsCount() { + return backups_.size(); + } + /** + * + * + *
+   * A list of backups in the project.
+   * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + @java.lang.Override + public com.google.cloud.netapp.v1.Backup getBackups(int index) { + return backups_.get(index); + } + /** + * + * + *
+   * A list of backups in the project.
+   * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + @java.lang.Override + public com.google.cloud.netapp.v1.BackupOrBuilder getBackupsOrBuilder(int index) { + return backups_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * The token you can use to retrieve the next page of results. Not returned
+   * if there are no more results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The token you can use to retrieve the next page of results. Not returned
+   * if there are no more results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < backups_.size(); i++) { + output.writeMessage(1, backups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < backups_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, backups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.ListBackupsResponse)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.ListBackupsResponse other = + (com.google.cloud.netapp.v1.ListBackupsResponse) obj; + + if (!getBackupsList().equals(other.getBackupsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBackupsCount() > 0) { + hash = (37 * hash) + BACKUPS_FIELD_NUMBER; + hash = (53 * hash) + getBackupsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.ListBackupsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.ListBackupsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.ListBackupsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.ListBackupsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.ListBackupsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.ListBackupsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.ListBackupsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.ListBackupsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.netapp.v1.ListBackupsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * ListBackupsResponse is the result of ListBackupsRequest.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.ListBackupsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.ListBackupsResponse) + com.google.cloud.netapp.v1.ListBackupsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_ListBackupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_ListBackupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.ListBackupsResponse.class, + com.google.cloud.netapp.v1.ListBackupsResponse.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.ListBackupsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (backupsBuilder_ == null) { + backups_ = java.util.Collections.emptyList(); + } else { + backups_ = null; + backupsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_ListBackupsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupsResponse getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.ListBackupsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupsResponse build() { + com.google.cloud.netapp.v1.ListBackupsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupsResponse buildPartial() { + com.google.cloud.netapp.v1.ListBackupsResponse result = + new com.google.cloud.netapp.v1.ListBackupsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.netapp.v1.ListBackupsResponse result) { + if (backupsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + backups_ = java.util.Collections.unmodifiableList(backups_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.backups_ = backups_; + } else { + result.backups_ = backupsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.netapp.v1.ListBackupsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.ListBackupsResponse) { + return mergeFrom((com.google.cloud.netapp.v1.ListBackupsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.ListBackupsResponse other) { + if (other == com.google.cloud.netapp.v1.ListBackupsResponse.getDefaultInstance()) return this; + if (backupsBuilder_ == null) { + if (!other.backups_.isEmpty()) { + if (backups_.isEmpty()) { + backups_ = other.backups_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBackupsIsMutable(); + backups_.addAll(other.backups_); + } + onChanged(); + } + } else { + if (!other.backups_.isEmpty()) { + if (backupsBuilder_.isEmpty()) { + backupsBuilder_.dispose(); + backupsBuilder_ = null; + backups_ = other.backups_; + bitField0_ = (bitField0_ & ~0x00000001); + backupsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBackupsFieldBuilder() + : null; + } else { + backupsBuilder_.addAllMessages(other.backups_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.netapp.v1.Backup m = + input.readMessage( + com.google.cloud.netapp.v1.Backup.parser(), extensionRegistry); + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.add(m); + } else { + backupsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List backups_ = + java.util.Collections.emptyList(); + + private void ensureBackupsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + backups_ = new java.util.ArrayList(backups_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.netapp.v1.Backup, + com.google.cloud.netapp.v1.Backup.Builder, + com.google.cloud.netapp.v1.BackupOrBuilder> + backupsBuilder_; + + /** + * + * + *
+     * A list of backups in the project.
+     * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + public java.util.List getBackupsList() { + if (backupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(backups_); + } else { + return backupsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of backups in the project.
+     * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + public int getBackupsCount() { + if (backupsBuilder_ == null) { + return backups_.size(); + } else { + return backupsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of backups in the project.
+     * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + public com.google.cloud.netapp.v1.Backup getBackups(int index) { + if (backupsBuilder_ == null) { + return backups_.get(index); + } else { + return backupsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of backups in the project.
+     * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + public Builder setBackups(int index, com.google.cloud.netapp.v1.Backup value) { + if (backupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupsIsMutable(); + backups_.set(index, value); + onChanged(); + } else { + backupsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of backups in the project.
+     * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + public Builder setBackups( + int index, com.google.cloud.netapp.v1.Backup.Builder builderForValue) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.set(index, builderForValue.build()); + onChanged(); + } else { + backupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of backups in the project.
+     * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + public Builder addBackups(com.google.cloud.netapp.v1.Backup value) { + if (backupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupsIsMutable(); + backups_.add(value); + onChanged(); + } else { + backupsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of backups in the project.
+     * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + public Builder addBackups(int index, com.google.cloud.netapp.v1.Backup value) { + if (backupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupsIsMutable(); + backups_.add(index, value); + onChanged(); + } else { + backupsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of backups in the project.
+     * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + public Builder addBackups(com.google.cloud.netapp.v1.Backup.Builder builderForValue) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.add(builderForValue.build()); + onChanged(); + } else { + backupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of backups in the project.
+     * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + public Builder addBackups( + int index, com.google.cloud.netapp.v1.Backup.Builder builderForValue) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.add(index, builderForValue.build()); + onChanged(); + } else { + backupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of backups in the project.
+     * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + public Builder addAllBackups( + java.lang.Iterable values) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backups_); + onChanged(); + } else { + backupsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of backups in the project.
+     * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + public Builder clearBackups() { + if (backupsBuilder_ == null) { + backups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + backupsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of backups in the project.
+     * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + public Builder removeBackups(int index) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.remove(index); + onChanged(); + } else { + backupsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of backups in the project.
+     * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + public com.google.cloud.netapp.v1.Backup.Builder getBackupsBuilder(int index) { + return getBackupsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of backups in the project.
+     * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + public com.google.cloud.netapp.v1.BackupOrBuilder getBackupsOrBuilder(int index) { + if (backupsBuilder_ == null) { + return backups_.get(index); + } else { + return backupsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of backups in the project.
+     * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + public java.util.List + getBackupsOrBuilderList() { + if (backupsBuilder_ != null) { + return backupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backups_); + } + } + /** + * + * + *
+     * A list of backups in the project.
+     * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + public com.google.cloud.netapp.v1.Backup.Builder addBackupsBuilder() { + return getBackupsFieldBuilder() + .addBuilder(com.google.cloud.netapp.v1.Backup.getDefaultInstance()); + } + /** + * + * + *
+     * A list of backups in the project.
+     * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + public com.google.cloud.netapp.v1.Backup.Builder addBackupsBuilder(int index) { + return getBackupsFieldBuilder() + .addBuilder(index, com.google.cloud.netapp.v1.Backup.getDefaultInstance()); + } + /** + * + * + *
+     * A list of backups in the project.
+     * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + public java.util.List getBackupsBuilderList() { + return getBackupsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.netapp.v1.Backup, + com.google.cloud.netapp.v1.Backup.Builder, + com.google.cloud.netapp.v1.BackupOrBuilder> + getBackupsFieldBuilder() { + if (backupsBuilder_ == null) { + backupsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.netapp.v1.Backup, + com.google.cloud.netapp.v1.Backup.Builder, + com.google.cloud.netapp.v1.BackupOrBuilder>( + backups_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + backups_ = null; + } + return backupsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The token you can use to retrieve the next page of results. Not returned
+     * if there are no more results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The token you can use to retrieve the next page of results. Not returned
+     * if there are no more results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The token you can use to retrieve the next page of results. Not returned
+     * if there are no more results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The token you can use to retrieve the next page of results. Not returned
+     * if there are no more results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The token you can use to retrieve the next page of results. Not returned
+     * if there are no more results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.ListBackupsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.ListBackupsResponse) + private static final com.google.cloud.netapp.v1.ListBackupsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.ListBackupsResponse(); + } + + public static com.google.cloud.netapp.v1.ListBackupsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBackupsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.ListBackupsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupsResponseOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupsResponseOrBuilder.java new file mode 100644 index 000000000000..d26520c3b25a --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ListBackupsResponseOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup.proto + +package com.google.cloud.netapp.v1; + +public interface ListBackupsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.ListBackupsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of backups in the project.
+   * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + java.util.List getBackupsList(); + /** + * + * + *
+   * A list of backups in the project.
+   * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + com.google.cloud.netapp.v1.Backup getBackups(int index); + /** + * + * + *
+   * A list of backups in the project.
+   * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + int getBackupsCount(); + /** + * + * + *
+   * A list of backups in the project.
+   * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + java.util.List getBackupsOrBuilderList(); + /** + * + * + *
+   * A list of backups in the project.
+   * 
+ * + * repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + com.google.cloud.netapp.v1.BackupOrBuilder getBackupsOrBuilder(int index); + + /** + * + * + *
+   * The token you can use to retrieve the next page of results. Not returned
+   * if there are no more results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The token you can use to retrieve the next page of results. Not returned
+   * if there are no more results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/Protocols.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/Protocols.java index ef1ae230e97e..1350b00046de 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/Protocols.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/Protocols.java @@ -18,7 +18,15 @@ package com.google.cloud.netapp.v1; -/** Protobuf enum {@code google.cloud.netapp.v1.Protocols} */ +/** + * + * + *
+ * Protocols is an enum of all the supported network protocols for a volume.
+ * 
+ * + * Protobuf enum {@code google.cloud.netapp.v1.Protocols} + */ public enum Protocols implements com.google.protobuf.ProtocolMessageEnum { /** * diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/Replication.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/Replication.java index 543f05dc5985..565794598d18 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/Replication.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/Replication.java @@ -864,12 +864,12 @@ private MirrorState(int value) { * * *
-   * Output only. The resource name of the Replication.
+   * Identifier. The resource name of the Replication.
    * Format:
    * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -889,12 +889,12 @@ public java.lang.String getName() { * * *
-   * Output only. The resource name of the Replication.
+   * Identifier. The resource name of the Replication.
    * Format:
    * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -2347,12 +2347,12 @@ public Builder mergeFrom( * * *
-     * Output only. The resource name of the Replication.
+     * Identifier. The resource name of the Replication.
      * Format:
      * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -2371,12 +2371,12 @@ public java.lang.String getName() { * * *
-     * Output only. The resource name of the Replication.
+     * Identifier. The resource name of the Replication.
      * Format:
      * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -2395,12 +2395,12 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Output only. The resource name of the Replication.
+     * Identifier. The resource name of the Replication.
      * Format:
      * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @param value The name to set. * @return This builder for chaining. @@ -2418,12 +2418,12 @@ public Builder setName(java.lang.String value) { * * *
-     * Output only. The resource name of the Replication.
+     * Identifier. The resource name of the Replication.
      * Format:
      * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return This builder for chaining. */ @@ -2437,12 +2437,12 @@ public Builder clearName() { * * *
-     * Output only. The resource name of the Replication.
+     * Identifier. The resource name of the Replication.
      * Format:
      * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ReplicationOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ReplicationOrBuilder.java index a4967bac53c4..a32ba60e1c08 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ReplicationOrBuilder.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ReplicationOrBuilder.java @@ -27,12 +27,12 @@ public interface ReplicationOrBuilder * * *
-   * Output only. The resource name of the Replication.
+   * Identifier. The resource name of the Replication.
    * Format:
    * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -41,12 +41,12 @@ public interface ReplicationOrBuilder * * *
-   * Output only. The resource name of the Replication.
+   * Identifier. The resource name of the Replication.
    * Format:
    * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ReplicationProto.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ReplicationProto.java index 1d21203f9935..0c9a9d15bfa4 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ReplicationProto.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ReplicationProto.java @@ -108,8 +108,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "_durationB\026\n\024_last_transfer_bytesB\031\n\027_la" + "st_transfer_durationB\017\n\r_lag_durationB\016\n" + "\014_update_timeB\031\n\027_last_transfer_end_time" - + "B\026\n\024_last_transfer_error\"\225\013\n\013Replication" - + "\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022>\n\005state\030\002 \001(\0162).go" + + "B\026\n\024_last_transfer_error\"\262\013\n\013Replication" + + "\022\022\n\004name\030\001 \001(\tB\004\342A\001\010\022>\n\005state\030\002 \001(\0162).go" + "ogle.cloud.netapp.v1.Replication.StateB\004" + "\342A\001\003\022\033\n\rstate_details\030\003 \001(\tB\004\342A\001\003\022G\n\004rol" + "e\030\004 \001(\01623.google.cloud.netapp.v1.Replica" @@ -140,47 +140,48 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "RY_10_MINUTES\020\001\022\n\n\006HOURLY\020\002\022\t\n\005DAILY\020\003\"g" + "\n\013MirrorState\022\034\n\030MIRROR_STATE_UNSPECIFIE" + "D\020\000\022\r\n\tPREPARING\020\001\022\014\n\010MIRRORED\020\002\022\013\n\007STOP" - + "PED\020\003\022\020\n\014TRANSFERRING\020\004:{\352Ax\n!netapp.goo" - + "gleapis.com/Replication\022Sprojects/{proje" - + "ct}/locations/{location}/volumes/{volume" - + "}/replications/{replication}B\n\n\010_healthy" - + "B\016\n\014_description\"\236\001\n\027ListReplicationsReq" - + "uest\022:\n\006parent\030\001 \001(\tB*\342A\001\002\372A#\022!netapp.go" - + "ogleapis.com/Replication\022\021\n\tpage_size\030\002 " - + "\001(\005\022\022\n\npage_token\030\003 \001(\t\022\020\n\010order_by\030\004 \001(" - + "\t\022\016\n\006filter\030\005 \001(\t\"\203\001\n\030ListReplicationsRe" - + "sponse\0229\n\014replications\030\001 \003(\0132#.google.cl" - + "oud.netapp.v1.Replication\022\027\n\017next_page_t" - + "oken\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"Q\n\025GetRe" - + "plicationRequest\0228\n\004name\030\001 \001(\tB*\342A\001\002\372A#\n" - + "!netapp.googleapis.com/Replication\"\260\001\n\033D" - + "estinationVolumeParameters\022@\n\014storage_po" - + "ol\030\001 \001(\tB*\342A\001\002\372A#\n!netapp.googleapis.com" - + "/StoragePool\022\021\n\tvolume_id\030\002 \001(\t\022\022\n\nshare" - + "_name\030\003 \001(\t\022\030\n\013description\030\004 \001(\tH\000\210\001\001B\016\n" - + "\014_description\"\264\001\n\030CreateReplicationReque" - + "st\022:\n\006parent\030\001 \001(\tB*\342A\001\002\372A#\022!netapp.goog" - + "leapis.com/Replication\022>\n\013replication\030\002 " - + "\001(\0132#.google.cloud.netapp.v1.Replication" - + "B\004\342A\001\002\022\034\n\016replication_id\030\003 \001(\tB\004\342A\001\002\"T\n\030" - + "DeleteReplicationRequest\0228\n\004name\030\001 \001(\tB*" - + "\342A\001\002\372A#\n!netapp.googleapis.com/Replicati" - + "on\"\221\001\n\030UpdateReplicationRequest\0225\n\013updat" - + "e_mask\030\001 \001(\0132\032.google.protobuf.FieldMask" - + "B\004\342A\001\002\022>\n\013replication\030\002 \001(\0132#.google.clo" - + "ud.netapp.v1.ReplicationB\004\342A\001\002\"a\n\026StopRe" - + "plicationRequest\0228\n\004name\030\001 \001(\tB*\342A\001\002\372A#\n" - + "!netapp.googleapis.com/Replication\022\r\n\005fo" - + "rce\030\002 \001(\010\"T\n\030ResumeReplicationRequest\0228\n" - + "\004name\030\001 \001(\tB*\342A\001\002\372A#\n!netapp.googleapis." - + "com/Replication\"^\n\"ReverseReplicationDir" - + "ectionRequest\0228\n\004name\030\001 \001(\tB*\342A\001\002\372A#\n!ne" - + "tapp.googleapis.com/ReplicationB\262\001\n\032com." - + "google.cloud.netapp.v1B\020ReplicationProto" - + "P\001Z2cloud.google.com/go/netapp/apiv1/net" - + "apppb;netapppb\252\002\026Google.Cloud.NetApp.V1\312" - + "\002\026Google\\Cloud\\NetApp\\V1\352\002\031Google::Cloud" - + "::NetApp::V1b\006proto3" + + "PED\020\003\022\020\n\014TRANSFERRING\020\004:\227\001\352A\223\001\n!netapp.g" + + "oogleapis.com/Replication\022Sprojects/{pro" + + "ject}/locations/{location}/volumes/{volu" + + "me}/replications/{replication}*\014replicat" + + "ions2\013replicationB\n\n\010_healthyB\016\n\014_descri" + + "ption\"\236\001\n\027ListReplicationsRequest\022:\n\006par" + + "ent\030\001 \001(\tB*\342A\001\002\372A#\022!netapp.googleapis.co" + + "m/Replication\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage" + + "_token\030\003 \001(\t\022\020\n\010order_by\030\004 \001(\t\022\016\n\006filter" + + "\030\005 \001(\t\"\203\001\n\030ListReplicationsResponse\0229\n\014r" + + "eplications\030\001 \003(\0132#.google.cloud.netapp." + + "v1.Replication\022\027\n\017next_page_token\030\002 \001(\t\022" + + "\023\n\013unreachable\030\003 \003(\t\"Q\n\025GetReplicationRe" + + "quest\0228\n\004name\030\001 \001(\tB*\342A\001\002\372A#\n!netapp.goo" + + "gleapis.com/Replication\"\260\001\n\033DestinationV" + + "olumeParameters\022@\n\014storage_pool\030\001 \001(\tB*\342" + + "A\001\002\372A#\n!netapp.googleapis.com/StoragePoo" + + "l\022\021\n\tvolume_id\030\002 \001(\t\022\022\n\nshare_name\030\003 \001(\t" + + "\022\030\n\013description\030\004 \001(\tH\000\210\001\001B\016\n\014_descripti" + + "on\"\264\001\n\030CreateReplicationRequest\022:\n\006paren" + + "t\030\001 \001(\tB*\342A\001\002\372A#\022!netapp.googleapis.com/" + + "Replication\022>\n\013replication\030\002 \001(\0132#.googl" + + "e.cloud.netapp.v1.ReplicationB\004\342A\001\002\022\034\n\016r" + + "eplication_id\030\003 \001(\tB\004\342A\001\002\"T\n\030DeleteRepli" + + "cationRequest\0228\n\004name\030\001 \001(\tB*\342A\001\002\372A#\n!ne" + + "tapp.googleapis.com/Replication\"\221\001\n\030Upda" + + "teReplicationRequest\0225\n\013update_mask\030\001 \001(" + + "\0132\032.google.protobuf.FieldMaskB\004\342A\001\002\022>\n\013r" + + "eplication\030\002 \001(\0132#.google.cloud.netapp.v" + + "1.ReplicationB\004\342A\001\002\"a\n\026StopReplicationRe" + + "quest\0228\n\004name\030\001 \001(\tB*\342A\001\002\372A#\n!netapp.goo" + + "gleapis.com/Replication\022\r\n\005force\030\002 \001(\010\"T" + + "\n\030ResumeReplicationRequest\0228\n\004name\030\001 \001(\t" + + "B*\342A\001\002\372A#\n!netapp.googleapis.com/Replica" + + "tion\"^\n\"ReverseReplicationDirectionReque" + + "st\0228\n\004name\030\001 \001(\tB*\342A\001\002\372A#\n!netapp.google" + + "apis.com/ReplicationB\262\001\n\032com.google.clou" + + "d.netapp.v1B\020ReplicationProtoP\001Z2cloud.g" + + "oogle.com/go/netapp/apiv1/netapppb;netap" + + "ppb\252\002\026Google.Cloud.NetApp.V1\312\002\026Google\\Cl" + + "oud\\NetApp\\V1\352\002\031Google::Cloud::NetApp::V" + + "1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/RestoreParameters.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/RestoreParameters.java index 5003f4d26b1f..b7a2b3318303 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/RestoreParameters.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/RestoreParameters.java @@ -70,6 +70,7 @@ public enum SourceCase com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { SOURCE_SNAPSHOT(1), + SOURCE_BACKUP(2), SOURCE_NOT_SET(0); private final int value; @@ -90,6 +91,8 @@ public static SourceCase forNumber(int value) { switch (value) { case 1: return SOURCE_SNAPSHOT; + case 2: + return SOURCE_BACKUP; case 0: return SOURCE_NOT_SET; default: @@ -182,6 +185,82 @@ public com.google.protobuf.ByteString getSourceSnapshotBytes() { } } + public static final int SOURCE_BACKUP_FIELD_NUMBER = 2; + /** + * + * + *
+   * Full name of the backup resource.
+   * Format:
+   * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}
+   * 
+ * + * string source_backup = 2; + * + * @return Whether the sourceBackup field is set. + */ + public boolean hasSourceBackup() { + return sourceCase_ == 2; + } + /** + * + * + *
+   * Full name of the backup resource.
+   * Format:
+   * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}
+   * 
+ * + * string source_backup = 2; + * + * @return The sourceBackup. + */ + public java.lang.String getSourceBackup() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceCase_ == 2) { + source_ = s; + } + return s; + } + } + /** + * + * + *
+   * Full name of the backup resource.
+   * Format:
+   * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}
+   * 
+ * + * string source_backup = 2; + * + * @return The bytes for sourceBackup. + */ + public com.google.protobuf.ByteString getSourceBackupBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 2) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -199,6 +278,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceCase_ == 1) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, source_); } + if (sourceCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, source_); + } getUnknownFields().writeTo(output); } @@ -211,6 +293,9 @@ public int getSerializedSize() { if (sourceCase_ == 1) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, source_); } + if (sourceCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, source_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -232,6 +317,9 @@ public boolean equals(final java.lang.Object obj) { case 1: if (!getSourceSnapshot().equals(other.getSourceSnapshot())) return false; break; + case 2: + if (!getSourceBackup().equals(other.getSourceBackup())) return false; + break; case 0: default: } @@ -251,6 +339,10 @@ public int hashCode() { hash = (37 * hash) + SOURCE_SNAPSHOT_FIELD_NUMBER; hash = (53 * hash) + getSourceSnapshot().hashCode(); break; + case 2: + hash = (37 * hash) + SOURCE_BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getSourceBackup().hashCode(); + break; case 0: default: } @@ -492,6 +584,13 @@ public Builder mergeFrom(com.google.cloud.netapp.v1.RestoreParameters other) { onChanged(); break; } + case SOURCE_BACKUP: + { + sourceCase_ = 2; + source_ = other.source_; + onChanged(); + break; + } case SOURCE_NOT_SET: { break; @@ -530,6 +629,13 @@ public Builder mergeFrom( source_ = s; break; } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + sourceCase_ = 2; + source_ = s; + break; + } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -709,6 +815,152 @@ public Builder setSourceSnapshotBytes(com.google.protobuf.ByteString value) { return this; } + /** + * + * + *
+     * Full name of the backup resource.
+     * Format:
+     * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}
+     * 
+ * + * string source_backup = 2; + * + * @return Whether the sourceBackup field is set. + */ + @java.lang.Override + public boolean hasSourceBackup() { + return sourceCase_ == 2; + } + /** + * + * + *
+     * Full name of the backup resource.
+     * Format:
+     * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}
+     * 
+ * + * string source_backup = 2; + * + * @return The sourceBackup. + */ + @java.lang.Override + public java.lang.String getSourceBackup() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceCase_ == 2) { + source_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Full name of the backup resource.
+     * Format:
+     * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}
+     * 
+ * + * string source_backup = 2; + * + * @return The bytes for sourceBackup. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceBackupBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 2) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Full name of the backup resource.
+     * Format:
+     * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}
+     * 
+ * + * string source_backup = 2; + * + * @param value The sourceBackup to set. + * @return This builder for chaining. + */ + public Builder setSourceBackup(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceCase_ = 2; + source_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Full name of the backup resource.
+     * Format:
+     * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}
+     * 
+ * + * string source_backup = 2; + * + * @return This builder for chaining. + */ + public Builder clearSourceBackup() { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Full name of the backup resource.
+     * Format:
+     * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}
+     * 
+ * + * string source_backup = 2; + * + * @param value The bytes for sourceBackup to set. + * @return This builder for chaining. + */ + public Builder setSourceBackupBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceCase_ = 2; + source_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/RestoreParametersOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/RestoreParametersOrBuilder.java index ad21d97aaa70..44fc0bb4bc88 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/RestoreParametersOrBuilder.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/RestoreParametersOrBuilder.java @@ -66,5 +66,48 @@ public interface RestoreParametersOrBuilder */ com.google.protobuf.ByteString getSourceSnapshotBytes(); + /** + * + * + *
+   * Full name of the backup resource.
+   * Format:
+   * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}
+   * 
+ * + * string source_backup = 2; + * + * @return Whether the sourceBackup field is set. + */ + boolean hasSourceBackup(); + /** + * + * + *
+   * Full name of the backup resource.
+   * Format:
+   * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}
+   * 
+ * + * string source_backup = 2; + * + * @return The sourceBackup. + */ + java.lang.String getSourceBackup(); + /** + * + * + *
+   * Full name of the backup resource.
+   * Format:
+   * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}
+   * 
+ * + * string source_backup = 2; + * + * @return The bytes for sourceBackup. + */ + com.google.protobuf.ByteString getSourceBackupBytes(); + com.google.cloud.netapp.v1.RestoreParameters.SourceCase getSourceCase(); } diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ServiceLevel.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ServiceLevel.java index e118bc72b347..80641650dbd8 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ServiceLevel.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/ServiceLevel.java @@ -28,11 +28,35 @@ * Protobuf enum {@code google.cloud.netapp.v1.ServiceLevel} */ public enum ServiceLevel implements com.google.protobuf.ProtocolMessageEnum { - /** SERVICE_LEVEL_UNSPECIFIED = 0; */ + /** + * + * + *
+   * Unspecified service level.
+   * 
+ * + * SERVICE_LEVEL_UNSPECIFIED = 0; + */ SERVICE_LEVEL_UNSPECIFIED(0), - /** PREMIUM = 1; */ + /** + * + * + *
+   * Premium service level.
+   * 
+ * + * PREMIUM = 1; + */ PREMIUM(1), - /** EXTREME = 2; */ + /** + * + * + *
+   * Extreme service level.
+   * 
+ * + * EXTREME = 2; + */ EXTREME(2), /** * @@ -47,11 +71,35 @@ public enum ServiceLevel implements com.google.protobuf.ProtocolMessageEnum { UNRECOGNIZED(-1), ; - /** SERVICE_LEVEL_UNSPECIFIED = 0; */ + /** + * + * + *
+   * Unspecified service level.
+   * 
+ * + * SERVICE_LEVEL_UNSPECIFIED = 0; + */ public static final int SERVICE_LEVEL_UNSPECIFIED_VALUE = 0; - /** PREMIUM = 1; */ + /** + * + * + *
+   * Premium service level.
+   * 
+ * + * PREMIUM = 1; + */ public static final int PREMIUM_VALUE = 1; - /** EXTREME = 2; */ + /** + * + * + *
+   * Extreme service level.
+   * 
+ * + * EXTREME = 2; + */ public static final int EXTREME_VALUE = 2; /** * diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/Snapshot.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/Snapshot.java index 5df0aa93cdf7..16d9be7b6d59 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/Snapshot.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/Snapshot.java @@ -329,12 +329,12 @@ private State(int value) { * * *
-   * Output only. The resource name of the snapshot.
+   * Identifier. The resource name of the snapshot.
    * Format:
    * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`.
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -354,12 +354,12 @@ public java.lang.String getName() { * * *
-   * Output only. The resource name of the snapshot.
+   * Identifier. The resource name of the snapshot.
    * Format:
    * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`.
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -1214,12 +1214,12 @@ public Builder mergeFrom( * * *
-     * Output only. The resource name of the snapshot.
+     * Identifier. The resource name of the snapshot.
      * Format:
      * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -1238,12 +1238,12 @@ public java.lang.String getName() { * * *
-     * Output only. The resource name of the snapshot.
+     * Identifier. The resource name of the snapshot.
      * Format:
      * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -1262,12 +1262,12 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Output only. The resource name of the snapshot.
+     * Identifier. The resource name of the snapshot.
      * Format:
      * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @param value The name to set. * @return This builder for chaining. @@ -1285,12 +1285,12 @@ public Builder setName(java.lang.String value) { * * *
-     * Output only. The resource name of the snapshot.
+     * Identifier. The resource name of the snapshot.
      * Format:
      * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return This builder for chaining. */ @@ -1304,12 +1304,12 @@ public Builder clearName() { * * *
-     * Output only. The resource name of the snapshot.
+     * Identifier. The resource name of the snapshot.
      * Format:
      * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @param value The bytes for name to set. * @return This builder for chaining. diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/SnapshotOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/SnapshotOrBuilder.java index 880edf65b1a6..90973907091e 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/SnapshotOrBuilder.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/SnapshotOrBuilder.java @@ -27,12 +27,12 @@ public interface SnapshotOrBuilder * * *
-   * Output only. The resource name of the snapshot.
+   * Identifier. The resource name of the snapshot.
    * Format:
    * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`.
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -41,12 +41,12 @@ public interface SnapshotOrBuilder * * *
-   * Output only. The resource name of the snapshot.
+   * Identifier. The resource name of the snapshot.
    * Format:
    * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`.
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/SnapshotProto.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/SnapshotProto.java index 99f875a250a2..9d7364b136ba 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/SnapshotProto.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/SnapshotProto.java @@ -91,8 +91,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "pdateSnapshotRequest\0225\n\013update_mask\030\001 \001(" + "\0132\032.google.protobuf.FieldMaskB\004\342A\001\002\0228\n\010s" + "napshot\030\002 \001(\0132 .google.cloud.netapp.v1.S" - + "napshotB\004\342A\001\002\"\255\004\n\010Snapshot\022\022\n\004name\030\001 \001(\t" - + "B\004\342A\001\003\022;\n\005state\030\002 \001(\0162&.google.cloud.net" + + "napshotB\004\342A\001\002\"\304\004\n\010Snapshot\022\022\n\004name\030\001 \001(\t" + + "B\004\342A\001\010\022;\n\005state\030\002 \001(\0162&.google.cloud.net" + "app.v1.Snapshot.StateB\004\342A\001\003\022\033\n\rstate_det" + "ails\030\003 \001(\tB\004\342A\001\003\022\023\n\013description\030\004 \001(\t\022\030\n" + "\nused_bytes\030\005 \001(\001B\004\342A\001\003\0225\n\013create_time\030\006" @@ -102,14 +102,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"l\n\005State\022\025\n\021" + "STATE_UNSPECIFIED\020\000\022\t\n\005READY\020\001\022\014\n\010CREATI" + "NG\020\002\022\014\n\010DELETING\020\003\022\014\n\010UPDATING\020\004\022\014\n\010DISA" - + "BLED\020\005\022\t\n\005ERROR\020\006:r\352Ao\n\036netapp.googleapi" - + "s.com/Snapshot\022Mprojects/{project}/locat" - + "ions/{location}/volumes/{volume}/snapsho" - + "ts/{snapshot}B\257\001\n\032com.google.cloud.netap" - + "p.v1B\rSnapshotProtoP\001Z2cloud.google.com/" - + "go/netapp/apiv1/netapppb;netapppb\252\002\026Goog" - + "le.Cloud.NetApp.V1\312\002\026Google\\Cloud\\NetApp" - + "\\V1\352\002\031Google::Cloud::NetApp::V1b\006proto3" + + "BLED\020\005\022\t\n\005ERROR\020\006:\210\001\352A\204\001\n\036netapp.googlea" + + "pis.com/Snapshot\022Mprojects/{project}/loc" + + "ations/{location}/volumes/{volume}/snaps" + + "hots/{snapshot}*\tsnapshots2\010snapshotB\257\001\n" + + "\032com.google.cloud.netapp.v1B\rSnapshotPro" + + "toP\001Z2cloud.google.com/go/netapp/apiv1/n" + + "etapppb;netapppb\252\002\026Google.Cloud.NetApp.V" + + "1\312\002\026Google\\Cloud\\NetApp\\V1\352\002\031Google::Clo" + + "ud::NetApp::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/StoragePool.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/StoragePool.java index 185faf86de22..bd449fcd31ff 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/StoragePool.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/StoragePool.java @@ -360,10 +360,10 @@ private State(int value) { * * *
-   * Output only. Name of the storage pool
+   * Identifier. Name of the storage pool
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -383,10 +383,10 @@ public java.lang.String getName() { * * *
-   * Output only. Name of the storage pool
+   * Identifier. Name of the storage pool
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -1063,15 +1063,18 @@ public com.google.cloud.netapp.v1.EncryptionType getEncryptionType() { * * *
-   * Optional. Allows SO pool to access AD or DNS server from other regions.
+   * Deprecated. Used to allow SO pool to access AD or DNS server from other
+   * regions.
    * 
* - * optional bool global_access_allowed = 17 [(.google.api.field_behavior) = OPTIONAL]; - * + * optional bool global_access_allowed = 17 [deprecated = true]; * + * @deprecated google.cloud.netapp.v1.StoragePool.global_access_allowed is deprecated. See + * google/cloud/netapp/v1/storage_pool.proto;l=222 * @return Whether the globalAccessAllowed field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasGlobalAccessAllowed() { return ((bitField0_ & 0x00000001) != 0); } @@ -1079,15 +1082,18 @@ public boolean hasGlobalAccessAllowed() { * * *
-   * Optional. Allows SO pool to access AD or DNS server from other regions.
+   * Deprecated. Used to allow SO pool to access AD or DNS server from other
+   * regions.
    * 
* - * optional bool global_access_allowed = 17 [(.google.api.field_behavior) = OPTIONAL]; - * + * optional bool global_access_allowed = 17 [deprecated = true]; * + * @deprecated google.cloud.netapp.v1.StoragePool.global_access_allowed is deprecated. See + * google/cloud/netapp/v1/storage_pool.proto;l=222 * @return The globalAccessAllowed. */ @java.lang.Override + @java.lang.Deprecated public boolean getGlobalAccessAllowed() { return globalAccessAllowed_; } @@ -1858,10 +1864,10 @@ public Builder mergeFrom( * * *
-     * Output only. Name of the storage pool
+     * Identifier. Name of the storage pool
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -1880,10 +1886,10 @@ public java.lang.String getName() { * * *
-     * Output only. Name of the storage pool
+     * Identifier. Name of the storage pool
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -1902,10 +1908,10 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Output only. Name of the storage pool
+     * Identifier. Name of the storage pool
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @param value The name to set. * @return This builder for chaining. @@ -1923,10 +1929,10 @@ public Builder setName(java.lang.String value) { * * *
-     * Output only. Name of the storage pool
+     * Identifier. Name of the storage pool
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return This builder for chaining. */ @@ -1940,10 +1946,10 @@ public Builder clearName() { * * *
-     * Output only. Name of the storage pool
+     * Identifier. Name of the storage pool
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @param value The bytes for name to set. * @return This builder for chaining. @@ -3496,15 +3502,18 @@ public Builder clearEncryptionType() { * * *
-     * Optional. Allows SO pool to access AD or DNS server from other regions.
+     * Deprecated. Used to allow SO pool to access AD or DNS server from other
+     * regions.
      * 
* - * optional bool global_access_allowed = 17 [(.google.api.field_behavior) = OPTIONAL]; - * + * optional bool global_access_allowed = 17 [deprecated = true]; * + * @deprecated google.cloud.netapp.v1.StoragePool.global_access_allowed is deprecated. See + * google/cloud/netapp/v1/storage_pool.proto;l=222 * @return Whether the globalAccessAllowed field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasGlobalAccessAllowed() { return ((bitField0_ & 0x00010000) != 0); } @@ -3512,15 +3521,18 @@ public boolean hasGlobalAccessAllowed() { * * *
-     * Optional. Allows SO pool to access AD or DNS server from other regions.
+     * Deprecated. Used to allow SO pool to access AD or DNS server from other
+     * regions.
      * 
* - * optional bool global_access_allowed = 17 [(.google.api.field_behavior) = OPTIONAL]; - * + * optional bool global_access_allowed = 17 [deprecated = true]; * + * @deprecated google.cloud.netapp.v1.StoragePool.global_access_allowed is deprecated. See + * google/cloud/netapp/v1/storage_pool.proto;l=222 * @return The globalAccessAllowed. */ @java.lang.Override + @java.lang.Deprecated public boolean getGlobalAccessAllowed() { return globalAccessAllowed_; } @@ -3528,15 +3540,18 @@ public boolean getGlobalAccessAllowed() { * * *
-     * Optional. Allows SO pool to access AD or DNS server from other regions.
+     * Deprecated. Used to allow SO pool to access AD or DNS server from other
+     * regions.
      * 
* - * optional bool global_access_allowed = 17 [(.google.api.field_behavior) = OPTIONAL]; - * + * optional bool global_access_allowed = 17 [deprecated = true]; * + * @deprecated google.cloud.netapp.v1.StoragePool.global_access_allowed is deprecated. See + * google/cloud/netapp/v1/storage_pool.proto;l=222 * @param value The globalAccessAllowed to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setGlobalAccessAllowed(boolean value) { globalAccessAllowed_ = value; @@ -3548,14 +3563,17 @@ public Builder setGlobalAccessAllowed(boolean value) { * * *
-     * Optional. Allows SO pool to access AD or DNS server from other regions.
+     * Deprecated. Used to allow SO pool to access AD or DNS server from other
+     * regions.
      * 
* - * optional bool global_access_allowed = 17 [(.google.api.field_behavior) = OPTIONAL]; - * + * optional bool global_access_allowed = 17 [deprecated = true]; * + * @deprecated google.cloud.netapp.v1.StoragePool.global_access_allowed is deprecated. See + * google/cloud/netapp/v1/storage_pool.proto;l=222 * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearGlobalAccessAllowed() { bitField0_ = (bitField0_ & ~0x00010000); globalAccessAllowed_ = false; diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/StoragePoolOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/StoragePoolOrBuilder.java index b96d4ebff30d..b1f0f8029e25 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/StoragePoolOrBuilder.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/StoragePoolOrBuilder.java @@ -27,10 +27,10 @@ public interface StoragePoolOrBuilder * * *
-   * Output only. Name of the storage pool
+   * Identifier. Name of the storage pool
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -39,10 +39,10 @@ public interface StoragePoolOrBuilder * * *
-   * Output only. Name of the storage pool
+   * Identifier. Name of the storage pool
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -445,26 +445,32 @@ java.lang.String getLabelsOrDefault( * * *
-   * Optional. Allows SO pool to access AD or DNS server from other regions.
+   * Deprecated. Used to allow SO pool to access AD or DNS server from other
+   * regions.
    * 
* - * optional bool global_access_allowed = 17 [(.google.api.field_behavior) = OPTIONAL]; - * + * optional bool global_access_allowed = 17 [deprecated = true]; * + * @deprecated google.cloud.netapp.v1.StoragePool.global_access_allowed is deprecated. See + * google/cloud/netapp/v1/storage_pool.proto;l=222 * @return Whether the globalAccessAllowed field is set. */ + @java.lang.Deprecated boolean hasGlobalAccessAllowed(); /** * * *
-   * Optional. Allows SO pool to access AD or DNS server from other regions.
+   * Deprecated. Used to allow SO pool to access AD or DNS server from other
+   * regions.
    * 
* - * optional bool global_access_allowed = 17 [(.google.api.field_behavior) = OPTIONAL]; - * + * optional bool global_access_allowed = 17 [deprecated = true]; * + * @deprecated google.cloud.netapp.v1.StoragePool.global_access_allowed is deprecated. See + * google/cloud/netapp/v1/storage_pool.proto;l=222 * @return The globalAccessAllowed. */ + @java.lang.Deprecated boolean getGlobalAccessAllowed(); } diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/StoragePoolProto.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/StoragePoolProto.java index 461ef1b77f30..f3ef30ca45b8 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/StoragePoolProto.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/StoragePoolProto.java @@ -93,8 +93,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "?\n\014storage_pool\030\002 \001(\0132#.google.cloud.net" + "app.v1.StoragePoolB\004\342A\001\002\"T\n\030DeleteStorag" + "ePoolRequest\0228\n\004name\030\001 \001(\tB*\342A\001\002\372A#\n!net" - + "app.googleapis.com/StoragePool\"\260\010\n\013Stora" - + "gePool\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022A\n\rservice_le" + + "app.googleapis.com/StoragePool\"\313\010\n\013Stora" + + "gePool\022\022\n\004name\030\001 \001(\tB\004\342A\001\010\022A\n\rservice_le" + "vel\030\002 \001(\0162$.google.cloud.netapp.v1.Servi" + "ceLevelB\004\342A\001\002\022\032\n\014capacity_gib\030\003 \001(\003B\004\342A\001" + "\002\022!\n\023volume_capacity_gib\030\004 \001(\003B\004\342A\001\003\022\032\n\014" @@ -111,21 +111,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\030\r \001(\tB$\372A!\n\037netapp.googleapis.com/KmsCo" + "nfig\022\024\n\014ldap_enabled\030\016 \001(\010\022\021\n\tpsa_range\030" + "\017 \001(\t\022E\n\017encryption_type\030\020 \001(\0162&.google." - + "cloud.netapp.v1.EncryptionTypeB\004\342A\001\003\022(\n\025" - + "global_access_allowed\030\021 \001(\010B\004\342A\001\001H\000\210\001\001\032-" - + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" - + "\t:\0028\001\"{\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\t\n" - + "\005READY\020\001\022\014\n\010CREATING\020\002\022\014\n\010DELETING\020\003\022\014\n\010" - + "UPDATING\020\004\022\r\n\tRESTORING\020\005\022\014\n\010DISABLED\020\006\022" - + "\t\n\005ERROR\020\007:k\352Ah\n!netapp.googleapis.com/S" + + "cloud.netapp.v1.EncryptionTypeB\004\342A\001\003\022&\n\025" + + "global_access_allowed\030\021 \001(\010B\002\030\001H\000\210\001\001\032-\n\013" + + "LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" + + "\0028\001\"{\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\t\n\005R" + + "EADY\020\001\022\014\n\010CREATING\020\002\022\014\n\010DELETING\020\003\022\014\n\010UP" + + "DATING\020\004\022\r\n\tRESTORING\020\005\022\014\n\010DISABLED\020\006\022\t\n" + + "\005ERROR\020\007:\207\001\352A\203\001\n!netapp.googleapis.com/S" + "toragePool\022Cprojects/{project}/locations" - + "/{location}/storagePools/{storage_pool}B" - + "\030\n\026_global_access_allowedB\262\001\n\032com.google" - + ".cloud.netapp.v1B\020StoragePoolProtoP\001Z2cl" - + "oud.google.com/go/netapp/apiv1/netapppb;" - + "netapppb\252\002\026Google.Cloud.NetApp.V1\312\002\026Goog" - + "le\\Cloud\\NetApp\\V1\352\002\031Google::Cloud::NetA" - + "pp::V1b\006proto3" + + "/{location}/storagePools/{storage_pool}*" + + "\014storagePools2\013storagePoolB\030\n\026_global_ac" + + "cess_allowedB\262\001\n\032com.google.cloud.netapp" + + ".v1B\020StoragePoolProtoP\001Z2cloud.google.co" + + "m/go/netapp/apiv1/netapppb;netapppb\252\002\026Go" + + "ogle.Cloud.NetApp.V1\312\002\026Google\\Cloud\\NetA" + + "pp\\V1\352\002\031Google::Cloud::NetApp::V1b\006proto" + + "3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/UpdateBackupPolicyRequest.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/UpdateBackupPolicyRequest.java new file mode 100644 index 000000000000..5deea1814345 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/UpdateBackupPolicyRequest.java @@ -0,0 +1,1051 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_policy.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * UpdateBackupPolicyRequest for updating a backup policy.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.UpdateBackupPolicyRequest} + */ +public final class UpdateBackupPolicyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.UpdateBackupPolicyRequest) + UpdateBackupPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateBackupPolicyRequest.newBuilder() to construct. + private UpdateBackupPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateBackupPolicyRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateBackupPolicyRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_UpdateBackupPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_UpdateBackupPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.UpdateBackupPolicyRequest.class, + com.google.cloud.netapp.v1.UpdateBackupPolicyRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Backup Policy resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Backup Policy resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Backup Policy resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int BACKUP_POLICY_FIELD_NUMBER = 2; + private com.google.cloud.netapp.v1.BackupPolicy backupPolicy_; + /** + * + * + *
+   * Required. The backup policy being updated
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupPolicy field is set. + */ + @java.lang.Override + public boolean hasBackupPolicy() { + return backupPolicy_ != null; + } + /** + * + * + *
+   * Required. The backup policy being updated
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupPolicy. + */ + @java.lang.Override + public com.google.cloud.netapp.v1.BackupPolicy getBackupPolicy() { + return backupPolicy_ == null + ? com.google.cloud.netapp.v1.BackupPolicy.getDefaultInstance() + : backupPolicy_; + } + /** + * + * + *
+   * Required. The backup policy being updated
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.netapp.v1.BackupPolicyOrBuilder getBackupPolicyOrBuilder() { + return backupPolicy_ == null + ? com.google.cloud.netapp.v1.BackupPolicy.getDefaultInstance() + : backupPolicy_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (backupPolicy_ != null) { + output.writeMessage(2, getBackupPolicy()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (backupPolicy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getBackupPolicy()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.UpdateBackupPolicyRequest)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.UpdateBackupPolicyRequest other = + (com.google.cloud.netapp.v1.UpdateBackupPolicyRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasBackupPolicy() != other.hasBackupPolicy()) return false; + if (hasBackupPolicy()) { + if (!getBackupPolicy().equals(other.getBackupPolicy())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasBackupPolicy()) { + hash = (37 * hash) + BACKUP_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getBackupPolicy().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.UpdateBackupPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.UpdateBackupPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.UpdateBackupPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.UpdateBackupPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.UpdateBackupPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.UpdateBackupPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.UpdateBackupPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.UpdateBackupPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.UpdateBackupPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.UpdateBackupPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.UpdateBackupPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.UpdateBackupPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.netapp.v1.UpdateBackupPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * UpdateBackupPolicyRequest for updating a backup policy.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.UpdateBackupPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.UpdateBackupPolicyRequest) + com.google.cloud.netapp.v1.UpdateBackupPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_UpdateBackupPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_UpdateBackupPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.UpdateBackupPolicyRequest.class, + com.google.cloud.netapp.v1.UpdateBackupPolicyRequest.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.UpdateBackupPolicyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + backupPolicy_ = null; + if (backupPolicyBuilder_ != null) { + backupPolicyBuilder_.dispose(); + backupPolicyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.BackupPolicyProto + .internal_static_google_cloud_netapp_v1_UpdateBackupPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.UpdateBackupPolicyRequest getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.UpdateBackupPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.UpdateBackupPolicyRequest build() { + com.google.cloud.netapp.v1.UpdateBackupPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.UpdateBackupPolicyRequest buildPartial() { + com.google.cloud.netapp.v1.UpdateBackupPolicyRequest result = + new com.google.cloud.netapp.v1.UpdateBackupPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.netapp.v1.UpdateBackupPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backupPolicy_ = + backupPolicyBuilder_ == null ? backupPolicy_ : backupPolicyBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.UpdateBackupPolicyRequest) { + return mergeFrom((com.google.cloud.netapp.v1.UpdateBackupPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.UpdateBackupPolicyRequest other) { + if (other == com.google.cloud.netapp.v1.UpdateBackupPolicyRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasBackupPolicy()) { + mergeBackupPolicy(other.getBackupPolicy()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getBackupPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup Policy resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup Policy resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup Policy resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup Policy resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup Policy resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup Policy resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup Policy resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup Policy resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup Policy resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.netapp.v1.BackupPolicy backupPolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.netapp.v1.BackupPolicy, + com.google.cloud.netapp.v1.BackupPolicy.Builder, + com.google.cloud.netapp.v1.BackupPolicyOrBuilder> + backupPolicyBuilder_; + /** + * + * + *
+     * Required. The backup policy being updated
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupPolicy field is set. + */ + public boolean hasBackupPolicy() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The backup policy being updated
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupPolicy. + */ + public com.google.cloud.netapp.v1.BackupPolicy getBackupPolicy() { + if (backupPolicyBuilder_ == null) { + return backupPolicy_ == null + ? com.google.cloud.netapp.v1.BackupPolicy.getDefaultInstance() + : backupPolicy_; + } else { + return backupPolicyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The backup policy being updated
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupPolicy(com.google.cloud.netapp.v1.BackupPolicy value) { + if (backupPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupPolicy_ = value; + } else { + backupPolicyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backup policy being updated
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupPolicy( + com.google.cloud.netapp.v1.BackupPolicy.Builder builderForValue) { + if (backupPolicyBuilder_ == null) { + backupPolicy_ = builderForValue.build(); + } else { + backupPolicyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backup policy being updated
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBackupPolicy(com.google.cloud.netapp.v1.BackupPolicy value) { + if (backupPolicyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && backupPolicy_ != null + && backupPolicy_ != com.google.cloud.netapp.v1.BackupPolicy.getDefaultInstance()) { + getBackupPolicyBuilder().mergeFrom(value); + } else { + backupPolicy_ = value; + } + } else { + backupPolicyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backup policy being updated
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBackupPolicy() { + bitField0_ = (bitField0_ & ~0x00000002); + backupPolicy_ = null; + if (backupPolicyBuilder_ != null) { + backupPolicyBuilder_.dispose(); + backupPolicyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backup policy being updated
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.netapp.v1.BackupPolicy.Builder getBackupPolicyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getBackupPolicyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The backup policy being updated
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.netapp.v1.BackupPolicyOrBuilder getBackupPolicyOrBuilder() { + if (backupPolicyBuilder_ != null) { + return backupPolicyBuilder_.getMessageOrBuilder(); + } else { + return backupPolicy_ == null + ? com.google.cloud.netapp.v1.BackupPolicy.getDefaultInstance() + : backupPolicy_; + } + } + /** + * + * + *
+     * Required. The backup policy being updated
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.netapp.v1.BackupPolicy, + com.google.cloud.netapp.v1.BackupPolicy.Builder, + com.google.cloud.netapp.v1.BackupPolicyOrBuilder> + getBackupPolicyFieldBuilder() { + if (backupPolicyBuilder_ == null) { + backupPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.netapp.v1.BackupPolicy, + com.google.cloud.netapp.v1.BackupPolicy.Builder, + com.google.cloud.netapp.v1.BackupPolicyOrBuilder>( + getBackupPolicy(), getParentForChildren(), isClean()); + backupPolicy_ = null; + } + return backupPolicyBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.UpdateBackupPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.UpdateBackupPolicyRequest) + private static final com.google.cloud.netapp.v1.UpdateBackupPolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.UpdateBackupPolicyRequest(); + } + + public static com.google.cloud.netapp.v1.UpdateBackupPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateBackupPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.UpdateBackupPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/UpdateBackupPolicyRequestOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/UpdateBackupPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..7260b0e284af --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/UpdateBackupPolicyRequestOrBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_policy.proto + +package com.google.cloud.netapp.v1; + +public interface UpdateBackupPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.UpdateBackupPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Backup Policy resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Backup Policy resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Backup Policy resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The backup policy being updated
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupPolicy field is set. + */ + boolean hasBackupPolicy(); + /** + * + * + *
+   * Required. The backup policy being updated
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupPolicy. + */ + com.google.cloud.netapp.v1.BackupPolicy getBackupPolicy(); + /** + * + * + *
+   * Required. The backup policy being updated
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.netapp.v1.BackupPolicyOrBuilder getBackupPolicyOrBuilder(); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/UpdateBackupRequest.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/UpdateBackupRequest.java new file mode 100644 index 000000000000..87f1f63c1010 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/UpdateBackupRequest.java @@ -0,0 +1,1028 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * UpdateBackupRequest updates description and/or labels for a backup.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.UpdateBackupRequest} + */ +public final class UpdateBackupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.UpdateBackupRequest) + UpdateBackupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateBackupRequest.newBuilder() to construct. + private UpdateBackupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateBackupRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateBackupRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_UpdateBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_UpdateBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.UpdateBackupRequest.class, + com.google.cloud.netapp.v1.UpdateBackupRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Backup resource to be updated.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Backup resource to be updated.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Backup resource to be updated.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int BACKUP_FIELD_NUMBER = 2; + private com.google.cloud.netapp.v1.Backup backup_; + /** + * + * + *
+   * Required. The backup being updated
+   * 
+ * + * .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backup field is set. + */ + @java.lang.Override + public boolean hasBackup() { + return backup_ != null; + } + /** + * + * + *
+   * Required. The backup being updated
+   * 
+ * + * .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backup. + */ + @java.lang.Override + public com.google.cloud.netapp.v1.Backup getBackup() { + return backup_ == null ? com.google.cloud.netapp.v1.Backup.getDefaultInstance() : backup_; + } + /** + * + * + *
+   * Required. The backup being updated
+   * 
+ * + * .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.netapp.v1.BackupOrBuilder getBackupOrBuilder() { + return backup_ == null ? com.google.cloud.netapp.v1.Backup.getDefaultInstance() : backup_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (backup_ != null) { + output.writeMessage(2, getBackup()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (backup_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getBackup()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.UpdateBackupRequest)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.UpdateBackupRequest other = + (com.google.cloud.netapp.v1.UpdateBackupRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasBackup() != other.hasBackup()) return false; + if (hasBackup()) { + if (!getBackup().equals(other.getBackup())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasBackup()) { + hash = (37 * hash) + BACKUP_FIELD_NUMBER; + hash = (53 * hash) + getBackup().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.UpdateBackupRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.UpdateBackupRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.UpdateBackupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.UpdateBackupRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.UpdateBackupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.UpdateBackupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.UpdateBackupRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.UpdateBackupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.UpdateBackupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.UpdateBackupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.UpdateBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.UpdateBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.netapp.v1.UpdateBackupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * UpdateBackupRequest updates description and/or labels for a backup.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.UpdateBackupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.UpdateBackupRequest) + com.google.cloud.netapp.v1.UpdateBackupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_UpdateBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_UpdateBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.UpdateBackupRequest.class, + com.google.cloud.netapp.v1.UpdateBackupRequest.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.UpdateBackupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + backup_ = null; + if (backupBuilder_ != null) { + backupBuilder_.dispose(); + backupBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.BackupProto + .internal_static_google_cloud_netapp_v1_UpdateBackupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.UpdateBackupRequest getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.UpdateBackupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.UpdateBackupRequest build() { + com.google.cloud.netapp.v1.UpdateBackupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.UpdateBackupRequest buildPartial() { + com.google.cloud.netapp.v1.UpdateBackupRequest result = + new com.google.cloud.netapp.v1.UpdateBackupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.netapp.v1.UpdateBackupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backup_ = backupBuilder_ == null ? backup_ : backupBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.UpdateBackupRequest) { + return mergeFrom((com.google.cloud.netapp.v1.UpdateBackupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.UpdateBackupRequest other) { + if (other == com.google.cloud.netapp.v1.UpdateBackupRequest.getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasBackup()) { + mergeBackup(other.getBackup()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getBackupFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup resource to be updated.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup resource to be updated.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup resource to be updated.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup resource to be updated.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup resource to be updated.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup resource to be updated.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup resource to be updated.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup resource to be updated.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup resource to be updated.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.netapp.v1.Backup backup_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.netapp.v1.Backup, + com.google.cloud.netapp.v1.Backup.Builder, + com.google.cloud.netapp.v1.BackupOrBuilder> + backupBuilder_; + /** + * + * + *
+     * Required. The backup being updated
+     * 
+ * + * .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backup field is set. + */ + public boolean hasBackup() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The backup being updated
+     * 
+ * + * .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backup. + */ + public com.google.cloud.netapp.v1.Backup getBackup() { + if (backupBuilder_ == null) { + return backup_ == null ? com.google.cloud.netapp.v1.Backup.getDefaultInstance() : backup_; + } else { + return backupBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The backup being updated
+     * 
+ * + * .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackup(com.google.cloud.netapp.v1.Backup value) { + if (backupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backup_ = value; + } else { + backupBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backup being updated
+     * 
+ * + * .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackup(com.google.cloud.netapp.v1.Backup.Builder builderForValue) { + if (backupBuilder_ == null) { + backup_ = builderForValue.build(); + } else { + backupBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backup being updated
+     * 
+ * + * .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBackup(com.google.cloud.netapp.v1.Backup value) { + if (backupBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && backup_ != null + && backup_ != com.google.cloud.netapp.v1.Backup.getDefaultInstance()) { + getBackupBuilder().mergeFrom(value); + } else { + backup_ = value; + } + } else { + backupBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backup being updated
+     * 
+ * + * .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBackup() { + bitField0_ = (bitField0_ & ~0x00000002); + backup_ = null; + if (backupBuilder_ != null) { + backupBuilder_.dispose(); + backupBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backup being updated
+     * 
+ * + * .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.netapp.v1.Backup.Builder getBackupBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getBackupFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The backup being updated
+     * 
+ * + * .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.netapp.v1.BackupOrBuilder getBackupOrBuilder() { + if (backupBuilder_ != null) { + return backupBuilder_.getMessageOrBuilder(); + } else { + return backup_ == null ? com.google.cloud.netapp.v1.Backup.getDefaultInstance() : backup_; + } + } + /** + * + * + *
+     * Required. The backup being updated
+     * 
+ * + * .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.netapp.v1.Backup, + com.google.cloud.netapp.v1.Backup.Builder, + com.google.cloud.netapp.v1.BackupOrBuilder> + getBackupFieldBuilder() { + if (backupBuilder_ == null) { + backupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.netapp.v1.Backup, + com.google.cloud.netapp.v1.Backup.Builder, + com.google.cloud.netapp.v1.BackupOrBuilder>( + getBackup(), getParentForChildren(), isClean()); + backup_ = null; + } + return backupBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.UpdateBackupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.UpdateBackupRequest) + private static final com.google.cloud.netapp.v1.UpdateBackupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.UpdateBackupRequest(); + } + + public static com.google.cloud.netapp.v1.UpdateBackupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateBackupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.UpdateBackupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/UpdateBackupRequestOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/UpdateBackupRequestOrBuilder.java new file mode 100644 index 000000000000..816305fe386f --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/UpdateBackupRequestOrBuilder.java @@ -0,0 +1,113 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup.proto + +package com.google.cloud.netapp.v1; + +public interface UpdateBackupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.UpdateBackupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Backup resource to be updated.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Backup resource to be updated.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Backup resource to be updated.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The backup being updated
+   * 
+ * + * .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backup field is set. + */ + boolean hasBackup(); + /** + * + * + *
+   * Required. The backup being updated
+   * 
+ * + * .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backup. + */ + com.google.cloud.netapp.v1.Backup getBackup(); + /** + * + * + *
+   * Required. The backup being updated
+   * 
+ * + * .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.netapp.v1.BackupOrBuilder getBackupOrBuilder(); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/UpdateBackupVaultRequest.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/UpdateBackupVaultRequest.java new file mode 100644 index 000000000000..323a6efe5965 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/UpdateBackupVaultRequest.java @@ -0,0 +1,1050 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_vault.proto + +package com.google.cloud.netapp.v1; + +/** + * + * + *
+ * UpdateBackupVaultRequest updates description and/or labels for a backupVault.
+ * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.UpdateBackupVaultRequest} + */ +public final class UpdateBackupVaultRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.UpdateBackupVaultRequest) + UpdateBackupVaultRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateBackupVaultRequest.newBuilder() to construct. + private UpdateBackupVaultRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateBackupVaultRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateBackupVaultRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_UpdateBackupVaultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_UpdateBackupVaultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.UpdateBackupVaultRequest.class, + com.google.cloud.netapp.v1.UpdateBackupVaultRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Backup resource to be updated.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Backup resource to be updated.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Backup resource to be updated.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int BACKUP_VAULT_FIELD_NUMBER = 2; + private com.google.cloud.netapp.v1.BackupVault backupVault_; + /** + * + * + *
+   * Required. The backupVault being updated
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupVault field is set. + */ + @java.lang.Override + public boolean hasBackupVault() { + return backupVault_ != null; + } + /** + * + * + *
+   * Required. The backupVault being updated
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupVault. + */ + @java.lang.Override + public com.google.cloud.netapp.v1.BackupVault getBackupVault() { + return backupVault_ == null + ? com.google.cloud.netapp.v1.BackupVault.getDefaultInstance() + : backupVault_; + } + /** + * + * + *
+   * Required. The backupVault being updated
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.netapp.v1.BackupVaultOrBuilder getBackupVaultOrBuilder() { + return backupVault_ == null + ? com.google.cloud.netapp.v1.BackupVault.getDefaultInstance() + : backupVault_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (backupVault_ != null) { + output.writeMessage(2, getBackupVault()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (backupVault_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getBackupVault()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.netapp.v1.UpdateBackupVaultRequest)) { + return super.equals(obj); + } + com.google.cloud.netapp.v1.UpdateBackupVaultRequest other = + (com.google.cloud.netapp.v1.UpdateBackupVaultRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasBackupVault() != other.hasBackupVault()) return false; + if (hasBackupVault()) { + if (!getBackupVault().equals(other.getBackupVault())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasBackupVault()) { + hash = (37 * hash) + BACKUP_VAULT_FIELD_NUMBER; + hash = (53 * hash) + getBackupVault().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.netapp.v1.UpdateBackupVaultRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.UpdateBackupVaultRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.UpdateBackupVaultRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.UpdateBackupVaultRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.UpdateBackupVaultRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.netapp.v1.UpdateBackupVaultRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.UpdateBackupVaultRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.UpdateBackupVaultRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.UpdateBackupVaultRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.UpdateBackupVaultRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.netapp.v1.UpdateBackupVaultRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.netapp.v1.UpdateBackupVaultRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.netapp.v1.UpdateBackupVaultRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * UpdateBackupVaultRequest updates description and/or labels for a backupVault.
+   * 
+ * + * Protobuf type {@code google.cloud.netapp.v1.UpdateBackupVaultRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.UpdateBackupVaultRequest) + com.google.cloud.netapp.v1.UpdateBackupVaultRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_UpdateBackupVaultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_UpdateBackupVaultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.netapp.v1.UpdateBackupVaultRequest.class, + com.google.cloud.netapp.v1.UpdateBackupVaultRequest.Builder.class); + } + + // Construct using com.google.cloud.netapp.v1.UpdateBackupVaultRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + backupVault_ = null; + if (backupVaultBuilder_ != null) { + backupVaultBuilder_.dispose(); + backupVaultBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.netapp.v1.BackupVaultProto + .internal_static_google_cloud_netapp_v1_UpdateBackupVaultRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.UpdateBackupVaultRequest getDefaultInstanceForType() { + return com.google.cloud.netapp.v1.UpdateBackupVaultRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.netapp.v1.UpdateBackupVaultRequest build() { + com.google.cloud.netapp.v1.UpdateBackupVaultRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.UpdateBackupVaultRequest buildPartial() { + com.google.cloud.netapp.v1.UpdateBackupVaultRequest result = + new com.google.cloud.netapp.v1.UpdateBackupVaultRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.netapp.v1.UpdateBackupVaultRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backupVault_ = + backupVaultBuilder_ == null ? backupVault_ : backupVaultBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.netapp.v1.UpdateBackupVaultRequest) { + return mergeFrom((com.google.cloud.netapp.v1.UpdateBackupVaultRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.netapp.v1.UpdateBackupVaultRequest other) { + if (other == com.google.cloud.netapp.v1.UpdateBackupVaultRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasBackupVault()) { + mergeBackupVault(other.getBackupVault()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getBackupVaultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup resource to be updated.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup resource to be updated.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup resource to be updated.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup resource to be updated.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup resource to be updated.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup resource to be updated.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup resource to be updated.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup resource to be updated.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup resource to be updated.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.netapp.v1.BackupVault backupVault_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.netapp.v1.BackupVault, + com.google.cloud.netapp.v1.BackupVault.Builder, + com.google.cloud.netapp.v1.BackupVaultOrBuilder> + backupVaultBuilder_; + /** + * + * + *
+     * Required. The backupVault being updated
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupVault field is set. + */ + public boolean hasBackupVault() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The backupVault being updated
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupVault. + */ + public com.google.cloud.netapp.v1.BackupVault getBackupVault() { + if (backupVaultBuilder_ == null) { + return backupVault_ == null + ? com.google.cloud.netapp.v1.BackupVault.getDefaultInstance() + : backupVault_; + } else { + return backupVaultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The backupVault being updated
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupVault(com.google.cloud.netapp.v1.BackupVault value) { + if (backupVaultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupVault_ = value; + } else { + backupVaultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backupVault being updated
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupVault(com.google.cloud.netapp.v1.BackupVault.Builder builderForValue) { + if (backupVaultBuilder_ == null) { + backupVault_ = builderForValue.build(); + } else { + backupVaultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backupVault being updated
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBackupVault(com.google.cloud.netapp.v1.BackupVault value) { + if (backupVaultBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && backupVault_ != null + && backupVault_ != com.google.cloud.netapp.v1.BackupVault.getDefaultInstance()) { + getBackupVaultBuilder().mergeFrom(value); + } else { + backupVault_ = value; + } + } else { + backupVaultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backupVault being updated
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBackupVault() { + bitField0_ = (bitField0_ & ~0x00000002); + backupVault_ = null; + if (backupVaultBuilder_ != null) { + backupVaultBuilder_.dispose(); + backupVaultBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The backupVault being updated
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.netapp.v1.BackupVault.Builder getBackupVaultBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getBackupVaultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The backupVault being updated
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.netapp.v1.BackupVaultOrBuilder getBackupVaultOrBuilder() { + if (backupVaultBuilder_ != null) { + return backupVaultBuilder_.getMessageOrBuilder(); + } else { + return backupVault_ == null + ? com.google.cloud.netapp.v1.BackupVault.getDefaultInstance() + : backupVault_; + } + } + /** + * + * + *
+     * Required. The backupVault being updated
+     * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.netapp.v1.BackupVault, + com.google.cloud.netapp.v1.BackupVault.Builder, + com.google.cloud.netapp.v1.BackupVaultOrBuilder> + getBackupVaultFieldBuilder() { + if (backupVaultBuilder_ == null) { + backupVaultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.netapp.v1.BackupVault, + com.google.cloud.netapp.v1.BackupVault.Builder, + com.google.cloud.netapp.v1.BackupVaultOrBuilder>( + getBackupVault(), getParentForChildren(), isClean()); + backupVault_ = null; + } + return backupVaultBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.netapp.v1.UpdateBackupVaultRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.netapp.v1.UpdateBackupVaultRequest) + private static final com.google.cloud.netapp.v1.UpdateBackupVaultRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.netapp.v1.UpdateBackupVaultRequest(); + } + + public static com.google.cloud.netapp.v1.UpdateBackupVaultRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateBackupVaultRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.netapp.v1.UpdateBackupVaultRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/UpdateBackupVaultRequestOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/UpdateBackupVaultRequestOrBuilder.java new file mode 100644 index 000000000000..336f0cf9a26b --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/UpdateBackupVaultRequestOrBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/netapp/v1/backup_vault.proto + +package com.google.cloud.netapp.v1; + +public interface UpdateBackupVaultRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.netapp.v1.UpdateBackupVaultRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Backup resource to be updated.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Backup resource to be updated.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Backup resource to be updated.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The backupVault being updated
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupVault field is set. + */ + boolean hasBackupVault(); + /** + * + * + *
+   * Required. The backupVault being updated
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupVault. + */ + com.google.cloud.netapp.v1.BackupVault getBackupVault(); + /** + * + * + *
+   * Required. The backupVault being updated
+   * 
+ * + * + * .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.netapp.v1.BackupVaultOrBuilder getBackupVaultOrBuilder(); +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/Volume.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/Volume.java index 5d8160ec4bbe..59b3a0018304 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/Volume.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/Volume.java @@ -357,6 +357,7 @@ private State(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.netapp.v1.Volume.State) } + private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -365,10 +366,10 @@ private State(int value) { * * *
-   * Output only. Name of the volume
+   * Identifier. Name of the volume
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -388,10 +389,10 @@ public java.lang.String getName() { * * *
-   * Output only. Name of the volume
+   * Identifier. Name of the volume
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -1792,6 +1793,56 @@ public boolean getHasReplication() { return hasReplication_; } + public static final int BACKUP_CONFIG_FIELD_NUMBER = 30; + private com.google.cloud.netapp.v1.BackupConfig backupConfig_; + /** + * + * + *
+   * BackupConfig of the volume.
+   * 
+ * + * optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; + * + * @return Whether the backupConfig field is set. + */ + @java.lang.Override + public boolean hasBackupConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * BackupConfig of the volume.
+   * 
+ * + * optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; + * + * @return The backupConfig. + */ + @java.lang.Override + public com.google.cloud.netapp.v1.BackupConfig getBackupConfig() { + return backupConfig_ == null + ? com.google.cloud.netapp.v1.BackupConfig.getDefaultInstance() + : backupConfig_; + } + /** + * + * + *
+   * BackupConfig of the volume.
+   * 
+ * + * optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; + */ + @java.lang.Override + public com.google.cloud.netapp.v1.BackupConfigOrBuilder getBackupConfigOrBuilder() { + return backupConfig_ == null + ? com.google.cloud.netapp.v1.BackupConfig.getDefaultInstance() + : backupConfig_; + } + public static final int RESTRICTED_ACTIONS_FIELD_NUMBER = 31; @SuppressWarnings("serial") @@ -2014,6 +2065,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (hasReplication_ != false) { output.writeBool(29, hasReplication_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(30, getBackupConfig()); + } if (getRestrictedActionsList().size() > 0) { output.writeUInt32NoTag(250); output.writeUInt32NoTag(restrictedActionsMemoizedSerializedSize); @@ -2145,6 +2199,9 @@ public int getSerializedSize() { if (hasReplication_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(29, hasReplication_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(30, getBackupConfig()); + } { int dataSize = 0; for (int i = 0; i < restrictedActions_.size(); i++) { @@ -2215,6 +2272,10 @@ public boolean equals(final java.lang.Object obj) { if (!getKmsConfig().equals(other.getKmsConfig())) return false; if (encryptionType_ != other.encryptionType_) return false; if (getHasReplication() != other.getHasReplication()) return false; + if (hasBackupConfig() != other.hasBackupConfig()) return false; + if (hasBackupConfig()) { + if (!getBackupConfig().equals(other.getBackupConfig())) return false; + } if (!restrictedActions_.equals(other.restrictedActions_)) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -2304,6 +2365,10 @@ public int hashCode() { hash = (53 * hash) + encryptionType_; hash = (37 * hash) + HAS_REPLICATION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getHasReplication()); + if (hasBackupConfig()) { + hash = (37 * hash) + BACKUP_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBackupConfig().hashCode(); + } if (getRestrictedActionsCount() > 0) { hash = (37 * hash) + RESTRICTED_ACTIONS_FIELD_NUMBER; hash = (53 * hash) + restrictedActions_.hashCode(); @@ -2456,10 +2521,24 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.netapp.v1.Volume.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getExportPolicyFieldBuilder(); + getMountOptionsFieldBuilder(); + getSnapshotPolicyFieldBuilder(); + getRestoreParametersFieldBuilder(); + getBackupConfigFieldBuilder(); + } } @java.lang.Override @@ -2519,8 +2598,13 @@ public Builder clear() { kmsConfig_ = ""; encryptionType_ = 0; hasReplication_ = false; + backupConfig_ = null; + if (backupConfigBuilder_ != null) { + backupConfigBuilder_.dispose(); + backupConfigBuilder_ = null; + } restrictedActions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x20000000); + bitField0_ = (bitField0_ & ~0x40000000); return this; } @@ -2575,9 +2659,9 @@ private void buildPartialRepeatedFields(com.google.cloud.netapp.v1.Volume result } else { result.mountOptions_ = mountOptionsBuilder_.build(); } - if (((bitField0_ & 0x20000000) != 0)) { + if (((bitField0_ & 0x40000000) != 0)) { restrictedActions_ = java.util.Collections.unmodifiableList(restrictedActions_); - bitField0_ = (bitField0_ & ~0x20000000); + bitField0_ = (bitField0_ & ~0x40000000); } result.restrictedActions_ = restrictedActions_; } @@ -2668,6 +2752,13 @@ private void buildPartial0(com.google.cloud.netapp.v1.Volume result) { if (((from_bitField0_ & 0x10000000) != 0)) { result.hasReplication_ = hasReplication_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x20000000) != 0)) { + result.backupConfig_ = + backupConfigBuilder_ == null ? backupConfig_ : backupConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -2859,10 +2950,13 @@ public Builder mergeFrom(com.google.cloud.netapp.v1.Volume other) { if (other.getHasReplication() != false) { setHasReplication(other.getHasReplication()); } + if (other.hasBackupConfig()) { + mergeBackupConfig(other.getBackupConfig()); + } if (!other.restrictedActions_.isEmpty()) { if (restrictedActions_.isEmpty()) { restrictedActions_ = other.restrictedActions_; - bitField0_ = (bitField0_ & ~0x20000000); + bitField0_ = (bitField0_ & ~0x40000000); } else { ensureRestrictedActionsIsMutable(); restrictedActions_.addAll(other.restrictedActions_); @@ -3109,6 +3203,12 @@ public Builder mergeFrom( bitField0_ |= 0x10000000; break; } // case 232 + case 242: + { + input.readMessage(getBackupConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x20000000; + break; + } // case 242 case 248: { int tmpRaw = input.readEnum(); @@ -3152,10 +3252,10 @@ public Builder mergeFrom( * * *
-     * Output only. Name of the volume
+     * Identifier. Name of the volume
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -3174,10 +3274,10 @@ public java.lang.String getName() { * * *
-     * Output only. Name of the volume
+     * Identifier. Name of the volume
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -3196,10 +3296,10 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Output only. Name of the volume
+     * Identifier. Name of the volume
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @param value The name to set. * @return This builder for chaining. @@ -3217,10 +3317,10 @@ public Builder setName(java.lang.String value) { * * *
-     * Output only. Name of the volume
+     * Identifier. Name of the volume
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return This builder for chaining. */ @@ -3234,10 +3334,10 @@ public Builder clearName() { * * *
-     * Output only. Name of the volume
+     * Identifier. Name of the volume
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @param value The bytes for name to set. * @return This builder for chaining. @@ -6898,13 +6998,197 @@ public Builder clearHasReplication() { return this; } + private com.google.cloud.netapp.v1.BackupConfig backupConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.netapp.v1.BackupConfig, + com.google.cloud.netapp.v1.BackupConfig.Builder, + com.google.cloud.netapp.v1.BackupConfigOrBuilder> + backupConfigBuilder_; + /** + * + * + *
+     * BackupConfig of the volume.
+     * 
+ * + * optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; + * + * @return Whether the backupConfig field is set. + */ + public boolean hasBackupConfig() { + return ((bitField0_ & 0x20000000) != 0); + } + /** + * + * + *
+     * BackupConfig of the volume.
+     * 
+ * + * optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; + * + * @return The backupConfig. + */ + public com.google.cloud.netapp.v1.BackupConfig getBackupConfig() { + if (backupConfigBuilder_ == null) { + return backupConfig_ == null + ? com.google.cloud.netapp.v1.BackupConfig.getDefaultInstance() + : backupConfig_; + } else { + return backupConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * BackupConfig of the volume.
+     * 
+ * + * optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; + */ + public Builder setBackupConfig(com.google.cloud.netapp.v1.BackupConfig value) { + if (backupConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupConfig_ = value; + } else { + backupConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + /** + * + * + *
+     * BackupConfig of the volume.
+     * 
+ * + * optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; + */ + public Builder setBackupConfig( + com.google.cloud.netapp.v1.BackupConfig.Builder builderForValue) { + if (backupConfigBuilder_ == null) { + backupConfig_ = builderForValue.build(); + } else { + backupConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + /** + * + * + *
+     * BackupConfig of the volume.
+     * 
+ * + * optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; + */ + public Builder mergeBackupConfig(com.google.cloud.netapp.v1.BackupConfig value) { + if (backupConfigBuilder_ == null) { + if (((bitField0_ & 0x20000000) != 0) + && backupConfig_ != null + && backupConfig_ != com.google.cloud.netapp.v1.BackupConfig.getDefaultInstance()) { + getBackupConfigBuilder().mergeFrom(value); + } else { + backupConfig_ = value; + } + } else { + backupConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + /** + * + * + *
+     * BackupConfig of the volume.
+     * 
+ * + * optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; + */ + public Builder clearBackupConfig() { + bitField0_ = (bitField0_ & ~0x20000000); + backupConfig_ = null; + if (backupConfigBuilder_ != null) { + backupConfigBuilder_.dispose(); + backupConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * BackupConfig of the volume.
+     * 
+ * + * optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; + */ + public com.google.cloud.netapp.v1.BackupConfig.Builder getBackupConfigBuilder() { + bitField0_ |= 0x20000000; + onChanged(); + return getBackupConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * BackupConfig of the volume.
+     * 
+ * + * optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; + */ + public com.google.cloud.netapp.v1.BackupConfigOrBuilder getBackupConfigOrBuilder() { + if (backupConfigBuilder_ != null) { + return backupConfigBuilder_.getMessageOrBuilder(); + } else { + return backupConfig_ == null + ? com.google.cloud.netapp.v1.BackupConfig.getDefaultInstance() + : backupConfig_; + } + } + /** + * + * + *
+     * BackupConfig of the volume.
+     * 
+ * + * optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.netapp.v1.BackupConfig, + com.google.cloud.netapp.v1.BackupConfig.Builder, + com.google.cloud.netapp.v1.BackupConfigOrBuilder> + getBackupConfigFieldBuilder() { + if (backupConfigBuilder_ == null) { + backupConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.netapp.v1.BackupConfig, + com.google.cloud.netapp.v1.BackupConfig.Builder, + com.google.cloud.netapp.v1.BackupConfigOrBuilder>( + getBackupConfig(), getParentForChildren(), isClean()); + backupConfig_ = null; + } + return backupConfigBuilder_; + } + private java.util.List restrictedActions_ = java.util.Collections.emptyList(); private void ensureRestrictedActionsIsMutable() { - if (!((bitField0_ & 0x20000000) != 0)) { + if (!((bitField0_ & 0x40000000) != 0)) { restrictedActions_ = new java.util.ArrayList(restrictedActions_); - bitField0_ |= 0x20000000; + bitField0_ |= 0x40000000; } } /** @@ -7044,7 +7328,7 @@ public Builder addAllRestrictedActions( */ public Builder clearRestrictedActions() { restrictedActions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x20000000); + bitField0_ = (bitField0_ & ~0x40000000); onChanged(); return this; } diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/VolumeOrBuilder.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/VolumeOrBuilder.java index 8b0cc2803e6d..b88fdc2099c5 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/VolumeOrBuilder.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/VolumeOrBuilder.java @@ -27,10 +27,10 @@ public interface VolumeOrBuilder * * *
-   * Output only. Name of the volume
+   * Identifier. Name of the volume
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -39,10 +39,10 @@ public interface VolumeOrBuilder * * *
-   * Output only. Name of the volume
+   * Identifier. Name of the volume
    * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -935,6 +935,41 @@ java.lang.String getLabelsOrDefault( */ boolean getHasReplication(); + /** + * + * + *
+   * BackupConfig of the volume.
+   * 
+ * + * optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; + * + * @return Whether the backupConfig field is set. + */ + boolean hasBackupConfig(); + /** + * + * + *
+   * BackupConfig of the volume.
+   * 
+ * + * optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; + * + * @return The backupConfig. + */ + com.google.cloud.netapp.v1.BackupConfig getBackupConfig(); + /** + * + * + *
+   * BackupConfig of the volume.
+   * 
+ * + * optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; + */ + com.google.cloud.netapp.v1.BackupConfigOrBuilder getBackupConfigOrBuilder(); + /** * * diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/VolumeProto.java b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/VolumeProto.java index 88c4d5accaa7..08a1450cc525 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/VolumeProto.java +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/java/com/google/cloud/netapp/v1/VolumeProto.java @@ -99,6 +99,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_netapp_v1_RestoreParameters_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_netapp_v1_RestoreParameters_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_netapp_v1_BackupConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_netapp_v1_BackupConfig_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -134,8 +138,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "pis.com/Volume\022\r\n\005force\030\002 \001(\010\"e\n\023RevertV" + "olumeRequest\0223\n\004name\030\001 \001(\tB%\342A\001\002\372A\036\n\034net" + "app.googleapis.com/Volume\022\031\n\013snapshot_id" - + "\030\002 \001(\tB\004\342A\001\002\"\346\r\n\006Volume\022\022\n\004name\030\001 \001(\tB\004\342" - + "A\001\003\0229\n\005state\030\002 \001(\0162$.google.cloud.netapp" + + "\030\002 \001(\tB\004\342A\001\002\"\313\016\n\006Volume\022\022\n\004name\030\001 \001(\tB\004\342" + + "A\001\010\0229\n\005state\030\002 \001(\0162$.google.cloud.netapp" + ".v1.Volume.StateB\004\342A\001\003\022\033\n\rstate_details\030" + "\003 \001(\tB\004\342A\001\003\0225\n\013create_time\030\004 \001(\0132\032.googl" + "e.protobuf.TimestampB\004\342A\001\003\022\030\n\nshare_name" @@ -170,80 +174,89 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "apis.com/KmsConfig\022E\n\017encryption_type\030\034 " + "\001(\0162&.google.cloud.netapp.v1.EncryptionT" + "ypeB\004\342A\001\003\022\035\n\017has_replication\030\035 \001(\010B\004\342A\001\003" - + "\022J\n\022restricted_actions\030\037 \003(\0162(.google.cl" - + "oud.netapp.v1.RestrictedActionB\004\342A\001\001\032-\n\013" - + "LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" - + "\0028\001\"{\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\t\n\005R" - + "EADY\020\001\022\014\n\010CREATING\020\002\022\014\n\010DELETING\020\003\022\014\n\010UP" - + "DATING\020\004\022\r\n\tRESTORING\020\005\022\014\n\010DISABLED\020\006\022\t\n" - + "\005ERROR\020\007:[\352AX\n\034netapp.googleapis.com/Vol" - + "ume\0228projects/{project}/locations/{locat" - + "ion}/volumes/{volume}\"S\n\014ExportPolicy\022C\n" - + "\005rules\030\001 \003(\0132..google.cloud.netapp.v1.Si" - + "mpleExportPolicyRuleB\004\342A\001\002\"\374\004\n\026SimpleExp" - + "ortPolicyRule\022\034\n\017allowed_clients\030\001 \001(\tH\000" - + "\210\001\001\022\034\n\017has_root_access\030\002 \001(\tH\001\210\001\001\022<\n\013acc" - + "ess_type\030\003 \001(\0162\".google.cloud.netapp.v1." - + "AccessTypeH\002\210\001\001\022\022\n\005nfsv3\030\004 \001(\010H\003\210\001\001\022\022\n\005n" - + "fsv4\030\005 \001(\010H\004\210\001\001\022!\n\024kerberos_5_read_only\030" - + "\006 \001(\010H\005\210\001\001\022\"\n\025kerberos_5_read_write\030\007 \001(" - + "\010H\006\210\001\001\022\"\n\025kerberos_5i_read_only\030\010 \001(\010H\007\210" - + "\001\001\022#\n\026kerberos_5i_read_write\030\t \001(\010H\010\210\001\001\022" - + "\"\n\025kerberos_5p_read_only\030\n \001(\010H\t\210\001\001\022#\n\026k" - + "erberos_5p_read_write\030\013 \001(\010H\n\210\001\001B\022\n\020_all" - + "owed_clientsB\022\n\020_has_root_accessB\016\n\014_acc" - + "ess_typeB\010\n\006_nfsv3B\010\n\006_nfsv4B\027\n\025_kerbero" - + "s_5_read_onlyB\030\n\026_kerberos_5_read_writeB" - + "\030\n\026_kerberos_5i_read_onlyB\031\n\027_kerberos_5" - + "i_read_writeB\030\n\026_kerberos_5p_read_onlyB\031" - + "\n\027_kerberos_5p_read_write\"\232\003\n\016SnapshotPo" - + "licy\022\024\n\007enabled\030\001 \001(\010H\000\210\001\001\022D\n\017hourly_sch" - + "edule\030\002 \001(\0132&.google.cloud.netapp.v1.Hou" - + "rlyScheduleH\001\210\001\001\022B\n\016daily_schedule\030\003 \001(\013" - + "2%.google.cloud.netapp.v1.DailyScheduleH" - + "\002\210\001\001\022D\n\017weekly_schedule\030\004 \001(\0132&.google.c" - + "loud.netapp.v1.WeeklyScheduleH\003\210\001\001\022F\n\020mo" - + "nthly_schedule\030\005 \001(\0132\'.google.cloud.neta" - + "pp.v1.MonthlyScheduleH\004\210\001\001B\n\n\010_enabledB\022" - + "\n\020_hourly_scheduleB\021\n\017_daily_scheduleB\022\n" - + "\020_weekly_scheduleB\023\n\021_monthly_schedule\"f" - + "\n\016HourlySchedule\022\036\n\021snapshots_to_keep\030\001 " - + "\001(\001H\000\210\001\001\022\023\n\006minute\030\002 \001(\001H\001\210\001\001B\024\n\022_snapsh" - + "ots_to_keepB\t\n\007_minute\"\201\001\n\rDailySchedule" - + "\022\036\n\021snapshots_to_keep\030\001 \001(\001H\000\210\001\001\022\023\n\006minu" - + "te\030\002 \001(\001H\001\210\001\001\022\021\n\004hour\030\003 \001(\001H\002\210\001\001B\024\n\022_sna" - + "pshots_to_keepB\t\n\007_minuteB\007\n\005_hour\"\234\001\n\016W" - + "eeklySchedule\022\036\n\021snapshots_to_keep\030\001 \001(\001" - + "H\000\210\001\001\022\023\n\006minute\030\002 \001(\001H\001\210\001\001\022\021\n\004hour\030\003 \001(\001" - + "H\002\210\001\001\022\020\n\003day\030\004 \001(\tH\003\210\001\001B\024\n\022_snapshots_to" - + "_keepB\t\n\007_minuteB\007\n\005_hourB\006\n\004_day\"\261\001\n\017Mo" - + "nthlySchedule\022\036\n\021snapshots_to_keep\030\001 \001(\001" - + "H\000\210\001\001\022\023\n\006minute\030\002 \001(\001H\001\210\001\001\022\021\n\004hour\030\003 \001(\001" - + "H\002\210\001\001\022\032\n\rdays_of_month\030\004 \001(\tH\003\210\001\001B\024\n\022_sn" - + "apshots_to_keepB\t\n\007_minuteB\007\n\005_hourB\020\n\016_" - + "days_of_month\"}\n\013MountOption\022\016\n\006export\030\001" - + " \001(\t\022\023\n\013export_full\030\002 \001(\t\0223\n\010protocol\030\003 " - + "\001(\0162!.google.cloud.netapp.v1.Protocols\022\024" - + "\n\014instructions\030\004 \001(\t\"8\n\021RestoreParameter" - + "s\022\031\n\017source_snapshot\030\001 \001(\tH\000B\010\n\006source*E" - + "\n\tProtocols\022\031\n\025PROTOCOLS_UNSPECIFIED\020\000\022\t" - + "\n\005NFSV3\020\001\022\t\n\005NFSV4\020\002\022\007\n\003SMB\020\003*W\n\nAccessT" - + "ype\022\033\n\027ACCESS_TYPE_UNSPECIFIED\020\000\022\r\n\tREAD" - + "_ONLY\020\001\022\016\n\nREAD_WRITE\020\002\022\r\n\tREAD_NONE\020\003*\350" - + "\001\n\013SMBSettings\022\034\n\030SMB_SETTINGS_UNSPECIFI" - + "ED\020\000\022\020\n\014ENCRYPT_DATA\020\001\022\r\n\tBROWSABLE\020\002\022\021\n" - + "\rCHANGE_NOTIFY\020\003\022\021\n\rNON_BROWSABLE\020\004\022\013\n\007O" - + "PLOCKS\020\005\022\021\n\rSHOW_SNAPSHOT\020\006\022\032\n\026SHOW_PREV" - + "IOUS_VERSIONS\020\007\022\034\n\030ACCESS_BASED_ENUMERAT" - + "ION\020\010\022\032\n\026CONTINUOUSLY_AVAILABLE\020\t*C\n\rSec" - + "urityStyle\022\036\n\032SECURITY_STYLE_UNSPECIFIED" - + "\020\000\022\010\n\004NTFS\020\001\022\010\n\004UNIX\020\002*A\n\020RestrictedActi" - + "on\022!\n\035RESTRICTED_ACTION_UNSPECIFIED\020\000\022\n\n" - + "\006DELETE\020\001B\255\001\n\032com.google.cloud.netapp.v1" - + "B\013VolumeProtoP\001Z2cloud.google.com/go/net" - + "app/apiv1/netapppb;netapppb\252\002\026Google.Clo" - + "ud.NetApp.V1\312\002\026Google\\Cloud\\NetApp\\V1\352\002\031" - + "Google::Cloud::NetApp::V1b\006proto3" + + "\022@\n\rbackup_config\030\036 \001(\0132$.google.cloud.n" + + "etapp.v1.BackupConfigH\000\210\001\001\022J\n\022restricted" + + "_actions\030\037 \003(\0162(.google.cloud.netapp.v1." + + "RestrictedActionB\004\342A\001\001\032-\n\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"{\n\005State\022\025" + + "\n\021STATE_UNSPECIFIED\020\000\022\t\n\005READY\020\001\022\014\n\010CREA" + + "TING\020\002\022\014\n\010DELETING\020\003\022\014\n\010UPDATING\020\004\022\r\n\tRE" + + "STORING\020\005\022\014\n\010DISABLED\020\006\022\t\n\005ERROR\020\007:l\352Ai\n" + + "\034netapp.googleapis.com/Volume\0228projects/" + + "{project}/locations/{location}/volumes/{" + + "volume}*\007volumes2\006volumeB\020\n\016_backup_conf" + + "ig\"S\n\014ExportPolicy\022C\n\005rules\030\001 \003(\0132..goog" + + "le.cloud.netapp.v1.SimpleExportPolicyRul" + + "eB\004\342A\001\002\"\374\004\n\026SimpleExportPolicyRule\022\034\n\017al" + + "lowed_clients\030\001 \001(\tH\000\210\001\001\022\034\n\017has_root_acc" + + "ess\030\002 \001(\tH\001\210\001\001\022<\n\013access_type\030\003 \001(\0162\".go" + + "ogle.cloud.netapp.v1.AccessTypeH\002\210\001\001\022\022\n\005" + + "nfsv3\030\004 \001(\010H\003\210\001\001\022\022\n\005nfsv4\030\005 \001(\010H\004\210\001\001\022!\n\024" + + "kerberos_5_read_only\030\006 \001(\010H\005\210\001\001\022\"\n\025kerbe" + + "ros_5_read_write\030\007 \001(\010H\006\210\001\001\022\"\n\025kerberos_" + + "5i_read_only\030\010 \001(\010H\007\210\001\001\022#\n\026kerberos_5i_r" + + "ead_write\030\t \001(\010H\010\210\001\001\022\"\n\025kerberos_5p_read" + + "_only\030\n \001(\010H\t\210\001\001\022#\n\026kerberos_5p_read_wri" + + "te\030\013 \001(\010H\n\210\001\001B\022\n\020_allowed_clientsB\022\n\020_ha" + + "s_root_accessB\016\n\014_access_typeB\010\n\006_nfsv3B" + + "\010\n\006_nfsv4B\027\n\025_kerberos_5_read_onlyB\030\n\026_k" + + "erberos_5_read_writeB\030\n\026_kerberos_5i_rea" + + "d_onlyB\031\n\027_kerberos_5i_read_writeB\030\n\026_ke" + + "rberos_5p_read_onlyB\031\n\027_kerberos_5p_read" + + "_write\"\232\003\n\016SnapshotPolicy\022\024\n\007enabled\030\001 \001" + + "(\010H\000\210\001\001\022D\n\017hourly_schedule\030\002 \001(\0132&.googl" + + "e.cloud.netapp.v1.HourlyScheduleH\001\210\001\001\022B\n" + + "\016daily_schedule\030\003 \001(\0132%.google.cloud.net" + + "app.v1.DailyScheduleH\002\210\001\001\022D\n\017weekly_sche" + + "dule\030\004 \001(\0132&.google.cloud.netapp.v1.Week" + + "lyScheduleH\003\210\001\001\022F\n\020monthly_schedule\030\005 \001(" + + "\0132\'.google.cloud.netapp.v1.MonthlySchedu" + + "leH\004\210\001\001B\n\n\010_enabledB\022\n\020_hourly_scheduleB" + + "\021\n\017_daily_scheduleB\022\n\020_weekly_scheduleB\023" + + "\n\021_monthly_schedule\"f\n\016HourlySchedule\022\036\n" + + "\021snapshots_to_keep\030\001 \001(\001H\000\210\001\001\022\023\n\006minute\030" + + "\002 \001(\001H\001\210\001\001B\024\n\022_snapshots_to_keepB\t\n\007_min" + + "ute\"\201\001\n\rDailySchedule\022\036\n\021snapshots_to_ke" + + "ep\030\001 \001(\001H\000\210\001\001\022\023\n\006minute\030\002 \001(\001H\001\210\001\001\022\021\n\004ho" + + "ur\030\003 \001(\001H\002\210\001\001B\024\n\022_snapshots_to_keepB\t\n\007_" + + "minuteB\007\n\005_hour\"\234\001\n\016WeeklySchedule\022\036\n\021sn" + + "apshots_to_keep\030\001 \001(\001H\000\210\001\001\022\023\n\006minute\030\002 \001" + + "(\001H\001\210\001\001\022\021\n\004hour\030\003 \001(\001H\002\210\001\001\022\020\n\003day\030\004 \001(\tH" + + "\003\210\001\001B\024\n\022_snapshots_to_keepB\t\n\007_minuteB\007\n" + + "\005_hourB\006\n\004_day\"\261\001\n\017MonthlySchedule\022\036\n\021sn" + + "apshots_to_keep\030\001 \001(\001H\000\210\001\001\022\023\n\006minute\030\002 \001" + + "(\001H\001\210\001\001\022\021\n\004hour\030\003 \001(\001H\002\210\001\001\022\032\n\rdays_of_mo" + + "nth\030\004 \001(\tH\003\210\001\001B\024\n\022_snapshots_to_keepB\t\n\007" + + "_minuteB\007\n\005_hourB\020\n\016_days_of_month\"}\n\013Mo" + + "untOption\022\016\n\006export\030\001 \001(\t\022\023\n\013export_full" + + "\030\002 \001(\t\0223\n\010protocol\030\003 \001(\0162!.google.cloud." + + "netapp.v1.Protocols\022\024\n\014instructions\030\004 \001(" + + "\t\"Q\n\021RestoreParameters\022\031\n\017source_snapsho" + + "t\030\001 \001(\tH\000\022\027\n\rsource_backup\030\002 \001(\tH\000B\010\n\006so" + + "urce\"\340\001\n\014BackupConfig\022D\n\017backup_policies" + + "\030\001 \003(\tB+\342A\001\001\372A$\n\"netapp.googleapis.com/B" + + "ackupPolicy\022@\n\014backup_vault\030\002 \001(\tB*\342A\001\001\372" + + "A#\n!netapp.googleapis.com/BackupVault\022+\n" + + "\030scheduled_backup_enabled\030\003 \001(\010B\004\342A\001\001H\000\210" + + "\001\001B\033\n\031_scheduled_backup_enabled*E\n\tProto" + + "cols\022\031\n\025PROTOCOLS_UNSPECIFIED\020\000\022\t\n\005NFSV3" + + "\020\001\022\t\n\005NFSV4\020\002\022\007\n\003SMB\020\003*W\n\nAccessType\022\033\n\027" + + "ACCESS_TYPE_UNSPECIFIED\020\000\022\r\n\tREAD_ONLY\020\001" + + "\022\016\n\nREAD_WRITE\020\002\022\r\n\tREAD_NONE\020\003*\350\001\n\013SMBS" + + "ettings\022\034\n\030SMB_SETTINGS_UNSPECIFIED\020\000\022\020\n" + + "\014ENCRYPT_DATA\020\001\022\r\n\tBROWSABLE\020\002\022\021\n\rCHANGE" + + "_NOTIFY\020\003\022\021\n\rNON_BROWSABLE\020\004\022\013\n\007OPLOCKS\020" + + "\005\022\021\n\rSHOW_SNAPSHOT\020\006\022\032\n\026SHOW_PREVIOUS_VE" + + "RSIONS\020\007\022\034\n\030ACCESS_BASED_ENUMERATION\020\010\022\032" + + "\n\026CONTINUOUSLY_AVAILABLE\020\t*C\n\rSecuritySt" + + "yle\022\036\n\032SECURITY_STYLE_UNSPECIFIED\020\000\022\010\n\004N" + + "TFS\020\001\022\010\n\004UNIX\020\002*A\n\020RestrictedAction\022!\n\035R" + + "ESTRICTED_ACTION_UNSPECIFIED\020\000\022\n\n\006DELETE" + + "\020\001B\255\001\n\032com.google.cloud.netapp.v1B\013Volum" + + "eProtoP\001Z2cloud.google.com/go/netapp/api" + + "v1/netapppb;netapppb\252\002\026Google.Cloud.NetA" + + "pp.V1\312\002\026Google\\Cloud\\NetApp\\V1\352\002\031Google:" + + ":Cloud::NetApp::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -346,7 +359,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "KmsConfig", "EncryptionType", "HasReplication", + "BackupConfig", "RestrictedActions", + "BackupConfig", }); internal_static_google_cloud_netapp_v1_Volume_LabelsEntry_descriptor = internal_static_google_cloud_netapp_v1_Volume_descriptor.getNestedTypes().get(0); @@ -470,7 +485,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_netapp_v1_RestoreParameters_descriptor, new java.lang.String[] { - "SourceSnapshot", "Source", + "SourceSnapshot", "SourceBackup", "Source", + }); + internal_static_google_cloud_netapp_v1_BackupConfig_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_netapp_v1_BackupConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_netapp_v1_BackupConfig_descriptor, + new java.lang.String[] { + "BackupPolicies", "BackupVault", "ScheduledBackupEnabled", "ScheduledBackupEnabled", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/active_directory.proto b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/active_directory.proto index 79293e524fcc..19b5e3d91525 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/active_directory.proto +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/active_directory.proto @@ -123,6 +123,8 @@ message ActiveDirectory { option (google.api.resource) = { type: "netapp.googleapis.com/ActiveDirectory" pattern: "projects/{project}/locations/{location}/activeDirectories/{active_directory}" + plural: "activeDirectories" + singular: "activeDirectory" }; // The Active Directory States @@ -149,10 +151,10 @@ message ActiveDirectory { ERROR = 6; } - // Output only. The resource name of the active directory. + // Identifier. The resource name of the active directory. // Format: // `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Output only. Create time of the active directory. google.protobuf.Timestamp create_time = 2 diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/backup.proto b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/backup.proto new file mode 100644 index 000000000000..f74a72347383 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/backup.proto @@ -0,0 +1,234 @@ +// Copyright 2023 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 +// +// http://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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.netapp.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "BackupProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// A NetApp Backup. +message Backup { + option (google.api.resource) = { + type: "netapp.googleapis.com/Backup" + pattern: "projects/{project}/locations/{location}/backupVaults/{backup_vault}/backups/{backup}" + plural: "backups" + singular: "backup" + }; + + // The Backup States + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // Backup is being created. While in this state, the snapshot for the backup + // point-in-time may not have been created yet, and so the point-in-time may + // not have been fixed. + CREATING = 1; + + // Backup is being uploaded. While in this state, none of the writes to the + // volume will be included in the backup. + UPLOADING = 2; + + // Backup is available for use. + READY = 3; + + // Backup is being deleted. + DELETING = 4; + + // Backup is not valid and cannot be used for creating new volumes or + // restoring existing volumes. + ERROR = 5; + + // Backup is being updated. + UPDATING = 6; + } + + // Backup types. + enum Type { + // Unspecified backup type. + TYPE_UNSPECIFIED = 0; + + // Manual backup type. + MANUAL = 1; + + // Scheduled backup type. + SCHEDULED = 2; + } + + // Identifier. The resource name of the backup. + // Format: + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The backup state. + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A description of the backup with 2048 characters or less. + // Requests with longer descriptions will be rejected. + string description = 3; + + // Output only. Size of the file system when the backup was created. When + // creating a new volume from the backup, the volume capacity will have to be + // at least as big. + int64 volume_usage_bytes = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Type of backup, manually created or created by a backup + // policy. + Type backup_type = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Volume full name of this backup belongs to. + // Format: + // `projects/{projects_id}/locations/{location}/volumes/{volume_id}` + string source_volume = 6 [ + (google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" } + ]; + + // If specified, backup will be created from the given snapshot. + // If not specified, there will be a new snapshot taken to initiate the backup + // creation. Format: + // `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + optional string source_snapshot = 7 [ + (google.api.resource_reference) = { type: "netapp.googleapis.com/Snapshot" } + ]; + + // Output only. The time when the backup was created. + google.protobuf.Timestamp create_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Resource labels to represent user provided metadata. + map labels = 9; + + // Output only. Total size of all backups in a chain in bytes = baseline + // backup size + sum(incremental backup size) + int64 chain_storage_bytes = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ListBackupsRequest lists backups. +message ListBackupsRequest { + // Required. The backupVault for which to retrieve backup information, + // in the format + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + // To retrieve backup information for all locations, use "-" for the + // `{location}` value. + // To retrieve backup information for all backupVaults, use "-" for the + // `{backup_vault_id}` value. + // To retrieve backup information for a volume, use "-" for the + // `{backup_vault_id}` value and specify volume full name with the filter. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Backup" + } + ]; + + // The maximum number of items to return. The service may return fewer + // than this value. The maximum value + // is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3; + + // Sort results. Supported values are "name", "name desc" or "" (unsorted). + string order_by = 4; + + // The standard list filter. + // If specified, backups will be returned based on the attribute name that + // matches the filter expression. If empty, then no backups are filtered out. + // See https://google.aip.dev/160 + string filter = 5; +} + +// ListBackupsResponse is the result of ListBackupsRequest. +message ListBackupsResponse { + // A list of backups in the project. + repeated Backup backups = 1; + + // The token you can use to retrieve the next page of results. Not returned + // if there are no more results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// GetBackupRequest gets the state of a backup. +message GetBackupRequest { + // Required. The backup resource name, in the format + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Backup" } + ]; +} + +// CreateBackupRequest creates a backup. +message CreateBackupRequest { + // Required. The NetApp backupVault to create the backups of, in the format + // `projects/*/locations/*/backupVaults/{backup_vault_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/Backup" + } + ]; + + // Required. The ID to use for the backup. + // The ID must be unique within the specified backupVault. + // This value must start with a lowercase letter followed by up to 62 + // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + // Values that do not match this pattern will trigger an INVALID_ARGUMENT + // error. + string backup_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A backup resource + Backup backup = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// DeleteBackupRequest deletes a backup. +message DeleteBackupRequest { + // Required. The backup resource name, in the format + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "netapp.googleapis.com/Backup" } + ]; +} + +// UpdateBackupRequest updates description and/or labels for a backup. +message UpdateBackupRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // Backup resource to be updated. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The backup being updated + Backup backup = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/backup_policy.proto b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/backup_policy.proto new file mode 100644 index 000000000000..cfe1e4dd1e53 --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/backup_policy.proto @@ -0,0 +1,194 @@ +// Copyright 2023 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 +// +// http://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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.netapp.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "BackupPolicyProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// Backup Policy. +message BackupPolicy { + option (google.api.resource) = { + type: "netapp.googleapis.com/BackupPolicy" + pattern: "projects/{project}/locations/{location}/backupPolicies/{backup_policy}" + plural: "backupPolicies" + singular: "backupPolicy" + }; + + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // BackupPolicy is being created. + CREATING = 1; + + // BackupPolicy is available for use. + READY = 2; + + // BackupPolicy is being deleted. + DELETING = 3; + + // BackupPolicy is not valid and cannot be used. + ERROR = 4; + + // BackupPolicy is being updated. + UPDATING = 5; + } + + // Identifier. The resource name of the backup policy. + // Format: + // `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Number of daily backups to keep. Note that the minimum daily backup limit + // is 2. + optional int32 daily_backup_limit = 2; + + // Number of weekly backups to keep. Note that the sum of daily, weekly and + // monthly backups should be greater than 1. + optional int32 weekly_backup_limit = 3; + + // Number of monthly backups to keep. Note that the sum of daily, weekly and + // monthly backups should be greater than 1. + optional int32 monthly_backup_limit = 4; + + // Description of the backup policy. + optional string description = 5; + + // If enabled, make backups automatically according to the schedules. + // This will be applied to all volumes that have this policy attached and + // enforced on volume level. If not specified, default is true. + optional bool enabled = 6; + + // Output only. The total number of volumes assigned by this backup policy. + optional int32 assigned_volume_count = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the backup policy was created. + google.protobuf.Timestamp create_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Resource labels to represent user provided metadata. + map labels = 9; + + // Output only. The backup policy state. + State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// CreateBackupPolicyRequest creates a backupPolicy. +message CreateBackupPolicyRequest { + // Required. The location to create the backup policies of, in the format + // `projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/BackupPolicy" + } + ]; + + // Required. A backupPolicy resource + BackupPolicy backup_policy = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the backup policy. + // The ID must be unique within the specified location. + // This value must start with a lowercase letter followed by up to 62 + // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + string backup_policy_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// GetBackupPolicyRequest gets the state of a backupPolicy. +message GetBackupPolicyRequest { + // Required. The backupPolicy resource name, in the format + // `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/BackupPolicy" + } + ]; +} + +// ListBackupPoliciesRequest for requesting multiple backup policies. +message ListBackupPoliciesRequest { + // Required. Parent value for ListBackupPoliciesRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/BackupPolicy" + } + ]; + + // Requested page size. Server may return fewer items than requested. + // If unspecified, the server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. + string page_token = 3; + + // Filtering results + string filter = 4; + + // Hint for how to order the results + string order_by = 5; +} + +// ListBackupPoliciesResponse contains all the backup policies requested. +message ListBackupPoliciesResponse { + // The list of backup policies. + repeated BackupPolicy backup_policies = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// UpdateBackupPolicyRequest for updating a backup policy. +message UpdateBackupPolicyRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // Backup Policy resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The backup policy being updated + BackupPolicy backup_policy = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// DeleteBackupPolicyRequest deletes a backup policy. +message DeleteBackupPolicyRequest { + // Required. The backup policy resource name, in the format + // `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/BackupPolicy" + } + ]; +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/backup_vault.proto b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/backup_vault.proto new file mode 100644 index 000000000000..e5b759093deb --- /dev/null +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/backup_vault.proto @@ -0,0 +1,180 @@ +// Copyright 2023 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 +// +// http://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, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.netapp.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetApp.V1"; +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; +option java_multiple_files = true; +option java_outer_classname = "BackupVaultProto"; +option java_package = "com.google.cloud.netapp.v1"; +option php_namespace = "Google\\Cloud\\NetApp\\V1"; +option ruby_package = "Google::Cloud::NetApp::V1"; + +// A NetApp BackupVault. +message BackupVault { + option (google.api.resource) = { + type: "netapp.googleapis.com/BackupVault" + pattern: "projects/{project}/locations/{location}/backupVaults/{backup_vault}" + plural: "backupVaults" + singular: "backupVault" + }; + + // The Backup Vault States + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // BackupVault is being created. + CREATING = 1; + + // BackupVault is available for use. + READY = 2; + + // BackupVault is being deleted. + DELETING = 3; + + // BackupVault is not valid and cannot be used. + ERROR = 4; + + // BackupVault is being updated. + UPDATING = 5; + } + + // Identifier. The resource name of the backup vault. + // Format: + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The backup vault state. + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Create time of the backup vault. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Description of the backup vault. + string description = 4; + + // Resource labels to represent user provided metadata. + map labels = 5; +} + +// GetBackupVaultRequest gets the state of a backupVault. +message GetBackupVaultRequest { + // Required. The backupVault resource name, in the format + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/BackupVault" + } + ]; +} + +// ListBackupVaultsRequest lists backupVaults. +message ListBackupVaultsRequest { + // Required. The location for which to retrieve backupVault information, + // in the format + // `projects/{project_id}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/BackupVault" + } + ]; + + // The maximum number of items to return. + int32 page_size = 2; + + // The next_page_token value to use if there are additional + // results to retrieve for this list request. + string page_token = 3; + + // Sort results. Supported values are "name", "name desc" or "" (unsorted). + string order_by = 4; + + // List filter. + string filter = 5; +} + +// ListBackupVaultsResponse is the result of ListBackupVaultsRequest. +message ListBackupVaultsResponse { + // A list of backupVaults in the project for the specified location. + repeated BackupVault backup_vaults = 1; + + // The token you can use to retrieve the next page of results. Not returned + // if there are no more results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// CreateBackupVaultRequest creates a backup vault. +message CreateBackupVaultRequest { + // Required. The location to create the backup vaults, in the format + // `projects/{project_id}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "netapp.googleapis.com/BackupVault" + } + ]; + + // Required. The ID to use for the backupVault. + // The ID must be unique within the specified location. + // The max supported length is 63 characters. + // This value must start with a lowercase letter followed by up to 62 + // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + // Values that do not match this pattern will trigger an INVALID_ARGUMENT + // error. + string backup_vault_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A backupVault resource + BackupVault backup_vault = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// DeleteBackupVaultRequest deletes a backupVault. +message DeleteBackupVaultRequest { + // Required. The backupVault resource name, in the format + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/BackupVault" + } + ]; +} + +// UpdateBackupVaultRequest updates description and/or labels for a backupVault. +message UpdateBackupVaultRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // Backup resource to be updated. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The backupVault being updated + BackupVault backup_vault = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/cloud_netapp_service.proto b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/cloud_netapp_service.proto index 2eec5a18daca..48f125525070 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/cloud_netapp_service.proto +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/cloud_netapp_service.proto @@ -21,6 +21,9 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/netapp/v1/active_directory.proto"; +import "google/cloud/netapp/v1/backup.proto"; +import "google/cloud/netapp/v1/backup_policy.proto"; +import "google/cloud/netapp/v1/backup_vault.proto"; import "google/cloud/netapp/v1/kms.proto"; import "google/cloud/netapp/v1/replication.proto"; import "google/cloud/netapp/v1/snapshot.proto"; @@ -469,6 +472,181 @@ service NetApp { metadata_type: "OperationMetadata" }; } + + // Creates new backup vault + rpc CreateBackupVault(CreateBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/backupVaults" + body: "backup_vault" + }; + option (google.api.method_signature) = + "parent,backup_vault,backup_vault_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupVault" + metadata_type: "OperationMetadata" + }; + } + + // Returns the description of the specified backup vault + rpc GetBackupVault(GetBackupVaultRequest) returns (BackupVault) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupVaults/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns list of all available backup vaults. + rpc ListBackupVaults(ListBackupVaultsRequest) + returns (ListBackupVaultsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/backupVaults" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates the settings of a specific backup vault. + rpc UpdateBackupVault(UpdateBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}" + body: "backup_vault" + }; + option (google.api.method_signature) = "backup_vault,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "BackupVault" + metadata_type: "OperationMetadata" + }; + } + + // Warning! This operation will permanently delete the backup vault. + rpc DeleteBackupVault(DeleteBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupVaults/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Creates a backup from the volume specified in the request + // The backup can be created from the given snapshot if specified in the + // request. If no snapshot specified, there'll be a new snapshot taken to + // initiate the backup creation. + rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/backupVaults/*}/backups" + body: "backup" + }; + option (google.api.method_signature) = "parent,backup,backup_id"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "OperationMetadata" + }; + } + + // Returns the description of the specified backup + rpc GetBackup(GetBackupRequest) returns (Backup) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns descriptions of all backups for a backupVault. + rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/backupVaults/*}/backups" + }; + option (google.api.method_signature) = "parent"; + } + + // Warning! This operation will permanently delete the backup. + rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Update backup with full spec. + rpc UpdateBackup(UpdateBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{backup.name=projects/*/locations/*/backupVaults/*/backups/*}" + body: "backup" + }; + option (google.api.method_signature) = "backup,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "OperationMetadata" + }; + } + + // Creates new backup policy + rpc CreateBackupPolicy(CreateBackupPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/backupPolicies" + body: "backup_policy" + }; + option (google.api.method_signature) = + "parent,backup_policy,backup_policy_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupPolicy" + metadata_type: "OperationMetadata" + }; + } + + // Returns the description of the specified backup policy by backup_policy_id. + rpc GetBackupPolicy(GetBackupPolicyRequest) returns (BackupPolicy) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupPolicies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns list of all available backup policies. + rpc ListBackupPolicies(ListBackupPoliciesRequest) + returns (ListBackupPoliciesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/backupPolicies" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates settings of a specific backup policy. + rpc UpdateBackupPolicy(UpdateBackupPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{backup_policy.name=projects/*/locations/*/backupPolicies/*}" + body: "backup_policy" + }; + option (google.api.method_signature) = "backup_policy,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "BackupPolicy" + metadata_type: "OperationMetadata" + }; + } + + // Warning! This operation will permanently delete the backup policy. + rpc DeleteBackupPolicy(DeleteBackupPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupPolicies/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } } // Represents the metadata of the long-running operation. diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/common.proto b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/common.proto index 2aa2ba6a32ef..66b1525940a8 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/common.proto +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/common.proto @@ -26,10 +26,13 @@ option ruby_package = "Google::Cloud::NetApp::V1"; // The service levels - Storage Pool, Volumes enum ServiceLevel { + // Unspecified service level. SERVICE_LEVEL_UNSPECIFIED = 0; + // Premium service level. PREMIUM = 1; + // Extreme service level. EXTREME = 2; // Standard (Software offering) diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/kms.proto b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/kms.proto index 0547e49d31dd..0775435a9291 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/kms.proto +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/kms.proto @@ -162,6 +162,8 @@ message KmsConfig { option (google.api.resource) = { type: "netapp.googleapis.com/KmsConfig" pattern: "projects/{project}/locations/{location}/kmsConfigs/{kms_config}" + plural: "kmsConfigs" + singular: "kmsConfig" }; // The KmsConfig States @@ -205,8 +207,8 @@ message KmsConfig { MIGRATING = 11; } - // Output only. Name of the KmsConfig. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Identifier. Name of the KmsConfig. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Required. Customer managed crypto key resource full name. Format: // projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}. diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/replication.proto b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/replication.proto index b11f4497c681..d5db6a43157d 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/replication.proto +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/replication.proto @@ -65,6 +65,8 @@ message Replication { option (google.api.resource) = { type: "netapp.googleapis.com/Replication" pattern: "projects/{project}/locations/{location}/volumes/{volume}/replications/{replication}" + plural: "replications" + singular: "replication" }; // The replication states @@ -139,10 +141,10 @@ message Replication { TRANSFERRING = 4; } - // Output only. The resource name of the Replication. + // Identifier. The resource name of the Replication. // Format: // `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Output only. State of the replication. State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/snapshot.proto b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/snapshot.proto index a37ef7dd41d5..5687aee7b860 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/snapshot.proto +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/snapshot.proto @@ -124,6 +124,8 @@ message Snapshot { option (google.api.resource) = { type: "netapp.googleapis.com/Snapshot" pattern: "projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}" + plural: "snapshots" + singular: "snapshot" }; // The Snapshot States @@ -150,10 +152,10 @@ message Snapshot { ERROR = 6; } - // Output only. The resource name of the snapshot. + // Identifier. The resource name of the snapshot. // Format: // `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Output only. The snapshot state. State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/storage_pool.proto b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/storage_pool.proto index 1dcdbacf113c..8d49f3586d7e 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/storage_pool.proto +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/storage_pool.proto @@ -128,6 +128,8 @@ message StoragePool { option (google.api.resource) = { type: "netapp.googleapis.com/StoragePool" pattern: "projects/{project}/locations/{location}/storagePools/{storage_pool}" + plural: "storagePools" + singular: "storagePool" }; // The Storage Pool States @@ -157,8 +159,8 @@ message StoragePool { ERROR = 7; } - // Output only. Name of the storage pool - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Identifier. Name of the storage pool + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Required. Service level of the storage pool ServiceLevel service_level = 2 [(google.api.field_behavior) = REQUIRED]; @@ -216,7 +218,7 @@ message StoragePool { EncryptionType encryption_type = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. Allows SO pool to access AD or DNS server from other regions. - optional bool global_access_allowed = 17 - [(google.api.field_behavior) = OPTIONAL]; + // Deprecated. Used to allow SO pool to access AD or DNS server from other + // regions. + optional bool global_access_allowed = 17 [deprecated = true]; } diff --git a/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/volume.proto b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/volume.proto index b657dfa0d8e6..f727d027291a 100644 --- a/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/volume.proto +++ b/java-netapp/proto-google-cloud-netapp-v1/src/main/proto/google/cloud/netapp/v1/volume.proto @@ -30,6 +30,7 @@ option java_package = "com.google.cloud.netapp.v1"; option php_namespace = "Google\\Cloud\\NetApp\\V1"; option ruby_package = "Google::Cloud::NetApp::V1"; +// Protocols is an enum of all the supported network protocols for a volume. enum Protocols { // Unspecified protocol PROTOCOLS_UNSPECIFIED = 0; @@ -44,6 +45,7 @@ enum Protocols { SMB = 3; } +// AccessType is an enum of all the supported access types for a volume. enum AccessType { // Unspecified Access Type ACCESS_TYPE_UNSPECIFIED = 0; @@ -225,6 +227,8 @@ message Volume { option (google.api.resource) = { type: "netapp.googleapis.com/Volume" pattern: "projects/{project}/locations/{location}/volumes/{volume}" + plural: "volumes" + singular: "volume" }; // The volume states @@ -254,8 +258,8 @@ message Volume { ERROR = 7; } - // Output only. Name of the volume - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Identifier. Name of the volume + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Output only. State of the volume State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -373,6 +377,9 @@ message Volume { // relationship. bool has_replication = 29 [(google.api.field_behavior) = OUTPUT_ONLY]; + // BackupConfig of the volume. + optional BackupConfig backup_config = 30; + // Optional. List of actions that are restricted on this volume. repeated RestrictedAction restricted_actions = 31 [(google.api.field_behavior) = OPTIONAL]; @@ -536,5 +543,37 @@ message RestoreParameters { // Format: // projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} string source_snapshot = 1; + + // Full name of the backup resource. + // Format: + // projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id} + string source_backup = 2; } } + +// BackupConfig contains backup related config on a volume. +message BackupConfig { + // Optional. When specified, schedule backups will be created based on the + // policy configuration. + repeated string backup_policies = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/BackupPolicy" + } + ]; + + // Optional. Name of backup vault. + // Format: + // projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id} + string backup_vault = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "netapp.googleapis.com/BackupVault" + } + ]; + + // Optional. When set to true, scheduled backup is enabled on the volume. + // This field should be nil when there's no backup policy attached. + optional bool scheduled_backup_enabled = 3 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackup/AsyncCreateBackup.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackup/AsyncCreateBackup.java new file mode 100644 index 000000000000..59d25061587e --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackup/AsyncCreateBackup.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_CreateBackup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.BackupVaultName; +import com.google.cloud.netapp.v1.CreateBackupRequest; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.longrunning.Operation; + +public class AsyncCreateBackup { + + public static void main(String[] args) throws Exception { + asyncCreateBackup(); + } + + public static void asyncCreateBackup() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + CreateBackupRequest request = + CreateBackupRequest.newBuilder() + .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .setBackupId("backupId2121930365") + .setBackup(Backup.newBuilder().build()) + .build(); + ApiFuture future = netAppClient.createBackupCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END netapp_v1_generated_NetApp_CreateBackup_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackup/AsyncCreateBackupLRO.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackup/AsyncCreateBackupLRO.java new file mode 100644 index 000000000000..a0896841ee38 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackup/AsyncCreateBackupLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_CreateBackup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.BackupVaultName; +import com.google.cloud.netapp.v1.CreateBackupRequest; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.cloud.netapp.v1.OperationMetadata; + +public class AsyncCreateBackupLRO { + + public static void main(String[] args) throws Exception { + asyncCreateBackupLRO(); + } + + public static void asyncCreateBackupLRO() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + CreateBackupRequest request = + CreateBackupRequest.newBuilder() + .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .setBackupId("backupId2121930365") + .setBackup(Backup.newBuilder().build()) + .build(); + OperationFuture future = + netAppClient.createBackupOperationCallable().futureCall(request); + // Do something. + Backup response = future.get(); + } + } +} +// [END netapp_v1_generated_NetApp_CreateBackup_LRO_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackup/SyncCreateBackup.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackup/SyncCreateBackup.java new file mode 100644 index 000000000000..c2aa6b663007 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackup/SyncCreateBackup.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_CreateBackup_sync] +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.BackupVaultName; +import com.google.cloud.netapp.v1.CreateBackupRequest; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncCreateBackup { + + public static void main(String[] args) throws Exception { + syncCreateBackup(); + } + + public static void syncCreateBackup() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + CreateBackupRequest request = + CreateBackupRequest.newBuilder() + .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .setBackupId("backupId2121930365") + .setBackup(Backup.newBuilder().build()) + .build(); + Backup response = netAppClient.createBackupAsync(request).get(); + } + } +} +// [END netapp_v1_generated_NetApp_CreateBackup_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackup/SyncCreateBackupBackupvaultnameBackupString.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackup/SyncCreateBackupBackupvaultnameBackupString.java new file mode 100644 index 000000000000..3e88d1f817d2 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackup/SyncCreateBackupBackupvaultnameBackupString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_CreateBackup_BackupvaultnameBackupString_sync] +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.BackupVaultName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncCreateBackupBackupvaultnameBackupString { + + public static void main(String[] args) throws Exception { + syncCreateBackupBackupvaultnameBackupString(); + } + + public static void syncCreateBackupBackupvaultnameBackupString() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + Backup response = netAppClient.createBackupAsync(parent, backup, backupId).get(); + } + } +} +// [END netapp_v1_generated_NetApp_CreateBackup_BackupvaultnameBackupString_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackup/SyncCreateBackupStringBackupString.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackup/SyncCreateBackupStringBackupString.java new file mode 100644 index 000000000000..a35b1eafdd60 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackup/SyncCreateBackupStringBackupString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_CreateBackup_StringBackupString_sync] +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.BackupVaultName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncCreateBackupStringBackupString { + + public static void main(String[] args) throws Exception { + syncCreateBackupStringBackupString(); + } + + public static void syncCreateBackupStringBackupString() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + String parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString(); + Backup backup = Backup.newBuilder().build(); + String backupId = "backupId2121930365"; + Backup response = netAppClient.createBackupAsync(parent, backup, backupId).get(); + } + } +} +// [END netapp_v1_generated_NetApp_CreateBackup_StringBackupString_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackuppolicy/AsyncCreateBackupPolicy.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackuppolicy/AsyncCreateBackupPolicy.java new file mode 100644 index 000000000000..b21fc3aa2099 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackuppolicy/AsyncCreateBackupPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_CreateBackupPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.CreateBackupPolicyRequest; +import com.google.cloud.netapp.v1.LocationName; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.longrunning.Operation; + +public class AsyncCreateBackupPolicy { + + public static void main(String[] args) throws Exception { + asyncCreateBackupPolicy(); + } + + public static void asyncCreateBackupPolicy() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + CreateBackupPolicyRequest request = + CreateBackupPolicyRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setBackupPolicy(BackupPolicy.newBuilder().build()) + .setBackupPolicyId("backupPolicyId-1278533169") + .build(); + ApiFuture future = netAppClient.createBackupPolicyCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END netapp_v1_generated_NetApp_CreateBackupPolicy_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackuppolicy/AsyncCreateBackupPolicyLRO.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackuppolicy/AsyncCreateBackupPolicyLRO.java new file mode 100644 index 000000000000..8dbe10c66b15 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackuppolicy/AsyncCreateBackupPolicyLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_CreateBackupPolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.CreateBackupPolicyRequest; +import com.google.cloud.netapp.v1.LocationName; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.cloud.netapp.v1.OperationMetadata; + +public class AsyncCreateBackupPolicyLRO { + + public static void main(String[] args) throws Exception { + asyncCreateBackupPolicyLRO(); + } + + public static void asyncCreateBackupPolicyLRO() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + CreateBackupPolicyRequest request = + CreateBackupPolicyRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setBackupPolicy(BackupPolicy.newBuilder().build()) + .setBackupPolicyId("backupPolicyId-1278533169") + .build(); + OperationFuture future = + netAppClient.createBackupPolicyOperationCallable().futureCall(request); + // Do something. + BackupPolicy response = future.get(); + } + } +} +// [END netapp_v1_generated_NetApp_CreateBackupPolicy_LRO_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackuppolicy/SyncCreateBackupPolicy.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackuppolicy/SyncCreateBackupPolicy.java new file mode 100644 index 000000000000..05fb41975b4d --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackuppolicy/SyncCreateBackupPolicy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_CreateBackupPolicy_sync] +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.CreateBackupPolicyRequest; +import com.google.cloud.netapp.v1.LocationName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncCreateBackupPolicy { + + public static void main(String[] args) throws Exception { + syncCreateBackupPolicy(); + } + + public static void syncCreateBackupPolicy() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + CreateBackupPolicyRequest request = + CreateBackupPolicyRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setBackupPolicy(BackupPolicy.newBuilder().build()) + .setBackupPolicyId("backupPolicyId-1278533169") + .build(); + BackupPolicy response = netAppClient.createBackupPolicyAsync(request).get(); + } + } +} +// [END netapp_v1_generated_NetApp_CreateBackupPolicy_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackuppolicy/SyncCreateBackupPolicyLocationnameBackuppolicyString.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackuppolicy/SyncCreateBackupPolicyLocationnameBackuppolicyString.java new file mode 100644 index 000000000000..3c634418d902 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackuppolicy/SyncCreateBackupPolicyLocationnameBackuppolicyString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_CreateBackupPolicy_LocationnameBackuppolicyString_sync] +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.LocationName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncCreateBackupPolicyLocationnameBackuppolicyString { + + public static void main(String[] args) throws Exception { + syncCreateBackupPolicyLocationnameBackuppolicyString(); + } + + public static void syncCreateBackupPolicyLocationnameBackuppolicyString() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BackupPolicy backupPolicy = BackupPolicy.newBuilder().build(); + String backupPolicyId = "backupPolicyId-1278533169"; + BackupPolicy response = + netAppClient.createBackupPolicyAsync(parent, backupPolicy, backupPolicyId).get(); + } + } +} +// [END netapp_v1_generated_NetApp_CreateBackupPolicy_LocationnameBackuppolicyString_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackuppolicy/SyncCreateBackupPolicyStringBackuppolicyString.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackuppolicy/SyncCreateBackupPolicyStringBackuppolicyString.java new file mode 100644 index 000000000000..25d3f188d0a5 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackuppolicy/SyncCreateBackupPolicyStringBackuppolicyString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_CreateBackupPolicy_StringBackuppolicyString_sync] +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.LocationName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncCreateBackupPolicyStringBackuppolicyString { + + public static void main(String[] args) throws Exception { + syncCreateBackupPolicyStringBackuppolicyString(); + } + + public static void syncCreateBackupPolicyStringBackuppolicyString() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + BackupPolicy backupPolicy = BackupPolicy.newBuilder().build(); + String backupPolicyId = "backupPolicyId-1278533169"; + BackupPolicy response = + netAppClient.createBackupPolicyAsync(parent, backupPolicy, backupPolicyId).get(); + } + } +} +// [END netapp_v1_generated_NetApp_CreateBackupPolicy_StringBackuppolicyString_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackupvault/AsyncCreateBackupVault.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackupvault/AsyncCreateBackupVault.java new file mode 100644 index 000000000000..4f821600ede9 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackupvault/AsyncCreateBackupVault.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_CreateBackupVault_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.netapp.v1.BackupVault; +import com.google.cloud.netapp.v1.CreateBackupVaultRequest; +import com.google.cloud.netapp.v1.LocationName; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.longrunning.Operation; + +public class AsyncCreateBackupVault { + + public static void main(String[] args) throws Exception { + asyncCreateBackupVault(); + } + + public static void asyncCreateBackupVault() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + CreateBackupVaultRequest request = + CreateBackupVaultRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setBackupVaultId("backupVaultId-1897432373") + .setBackupVault(BackupVault.newBuilder().build()) + .build(); + ApiFuture future = netAppClient.createBackupVaultCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END netapp_v1_generated_NetApp_CreateBackupVault_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackupvault/AsyncCreateBackupVaultLRO.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackupvault/AsyncCreateBackupVaultLRO.java new file mode 100644 index 000000000000..8274a71bc89b --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackupvault/AsyncCreateBackupVaultLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_CreateBackupVault_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.netapp.v1.BackupVault; +import com.google.cloud.netapp.v1.CreateBackupVaultRequest; +import com.google.cloud.netapp.v1.LocationName; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.cloud.netapp.v1.OperationMetadata; + +public class AsyncCreateBackupVaultLRO { + + public static void main(String[] args) throws Exception { + asyncCreateBackupVaultLRO(); + } + + public static void asyncCreateBackupVaultLRO() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + CreateBackupVaultRequest request = + CreateBackupVaultRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setBackupVaultId("backupVaultId-1897432373") + .setBackupVault(BackupVault.newBuilder().build()) + .build(); + OperationFuture future = + netAppClient.createBackupVaultOperationCallable().futureCall(request); + // Do something. + BackupVault response = future.get(); + } + } +} +// [END netapp_v1_generated_NetApp_CreateBackupVault_LRO_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackupvault/SyncCreateBackupVault.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackupvault/SyncCreateBackupVault.java new file mode 100644 index 000000000000..871032f5547a --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackupvault/SyncCreateBackupVault.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_CreateBackupVault_sync] +import com.google.cloud.netapp.v1.BackupVault; +import com.google.cloud.netapp.v1.CreateBackupVaultRequest; +import com.google.cloud.netapp.v1.LocationName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncCreateBackupVault { + + public static void main(String[] args) throws Exception { + syncCreateBackupVault(); + } + + public static void syncCreateBackupVault() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + CreateBackupVaultRequest request = + CreateBackupVaultRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setBackupVaultId("backupVaultId-1897432373") + .setBackupVault(BackupVault.newBuilder().build()) + .build(); + BackupVault response = netAppClient.createBackupVaultAsync(request).get(); + } + } +} +// [END netapp_v1_generated_NetApp_CreateBackupVault_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackupvault/SyncCreateBackupVaultLocationnameBackupvaultString.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackupvault/SyncCreateBackupVaultLocationnameBackupvaultString.java new file mode 100644 index 000000000000..2bd3d7a611a5 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackupvault/SyncCreateBackupVaultLocationnameBackupvaultString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_CreateBackupVault_LocationnameBackupvaultString_sync] +import com.google.cloud.netapp.v1.BackupVault; +import com.google.cloud.netapp.v1.LocationName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncCreateBackupVaultLocationnameBackupvaultString { + + public static void main(String[] args) throws Exception { + syncCreateBackupVaultLocationnameBackupvaultString(); + } + + public static void syncCreateBackupVaultLocationnameBackupvaultString() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BackupVault backupVault = BackupVault.newBuilder().build(); + String backupVaultId = "backupVaultId-1897432373"; + BackupVault response = + netAppClient.createBackupVaultAsync(parent, backupVault, backupVaultId).get(); + } + } +} +// [END netapp_v1_generated_NetApp_CreateBackupVault_LocationnameBackupvaultString_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackupvault/SyncCreateBackupVaultStringBackupvaultString.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackupvault/SyncCreateBackupVaultStringBackupvaultString.java new file mode 100644 index 000000000000..183b51cf667a --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/createbackupvault/SyncCreateBackupVaultStringBackupvaultString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_CreateBackupVault_StringBackupvaultString_sync] +import com.google.cloud.netapp.v1.BackupVault; +import com.google.cloud.netapp.v1.LocationName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncCreateBackupVaultStringBackupvaultString { + + public static void main(String[] args) throws Exception { + syncCreateBackupVaultStringBackupvaultString(); + } + + public static void syncCreateBackupVaultStringBackupvaultString() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + BackupVault backupVault = BackupVault.newBuilder().build(); + String backupVaultId = "backupVaultId-1897432373"; + BackupVault response = + netAppClient.createBackupVaultAsync(parent, backupVault, backupVaultId).get(); + } + } +} +// [END netapp_v1_generated_NetApp_CreateBackupVault_StringBackupvaultString_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackup/AsyncDeleteBackup.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackup/AsyncDeleteBackup.java new file mode 100644 index 000000000000..dcdaf9985e3e --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackup/AsyncDeleteBackup.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_DeleteBackup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.netapp.v1.BackupName; +import com.google.cloud.netapp.v1.DeleteBackupRequest; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteBackup { + + public static void main(String[] args) throws Exception { + asyncDeleteBackup(); + } + + public static void asyncDeleteBackup() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + DeleteBackupRequest request = + DeleteBackupRequest.newBuilder() + .setName( + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) + .build(); + ApiFuture future = netAppClient.deleteBackupCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END netapp_v1_generated_NetApp_DeleteBackup_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackup/AsyncDeleteBackupLRO.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackup/AsyncDeleteBackupLRO.java new file mode 100644 index 000000000000..ad910e7e8b61 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackup/AsyncDeleteBackupLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_DeleteBackup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.netapp.v1.BackupName; +import com.google.cloud.netapp.v1.DeleteBackupRequest; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.cloud.netapp.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteBackupLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteBackupLRO(); + } + + public static void asyncDeleteBackupLRO() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + DeleteBackupRequest request = + DeleteBackupRequest.newBuilder() + .setName( + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) + .build(); + OperationFuture future = + netAppClient.deleteBackupOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END netapp_v1_generated_NetApp_DeleteBackup_LRO_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackup/SyncDeleteBackup.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackup/SyncDeleteBackup.java new file mode 100644 index 000000000000..10eef75b16f8 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackup/SyncDeleteBackup.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_DeleteBackup_sync] +import com.google.cloud.netapp.v1.BackupName; +import com.google.cloud.netapp.v1.DeleteBackupRequest; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.protobuf.Empty; + +public class SyncDeleteBackup { + + public static void main(String[] args) throws Exception { + syncDeleteBackup(); + } + + public static void syncDeleteBackup() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + DeleteBackupRequest request = + DeleteBackupRequest.newBuilder() + .setName( + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) + .build(); + netAppClient.deleteBackupAsync(request).get(); + } + } +} +// [END netapp_v1_generated_NetApp_DeleteBackup_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackup/SyncDeleteBackupBackupname.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackup/SyncDeleteBackupBackupname.java new file mode 100644 index 000000000000..9830f5dca0c2 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackup/SyncDeleteBackupBackupname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_DeleteBackup_Backupname_sync] +import com.google.cloud.netapp.v1.BackupName; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.protobuf.Empty; + +public class SyncDeleteBackupBackupname { + + public static void main(String[] args) throws Exception { + syncDeleteBackupBackupname(); + } + + public static void syncDeleteBackupBackupname() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]"); + netAppClient.deleteBackupAsync(name).get(); + } + } +} +// [END netapp_v1_generated_NetApp_DeleteBackup_Backupname_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackup/SyncDeleteBackupString.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackup/SyncDeleteBackupString.java new file mode 100644 index 000000000000..1926664cc7d5 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackup/SyncDeleteBackupString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_DeleteBackup_String_sync] +import com.google.cloud.netapp.v1.BackupName; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.protobuf.Empty; + +public class SyncDeleteBackupString { + + public static void main(String[] args) throws Exception { + syncDeleteBackupString(); + } + + public static void syncDeleteBackupString() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + String name = + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString(); + netAppClient.deleteBackupAsync(name).get(); + } + } +} +// [END netapp_v1_generated_NetApp_DeleteBackup_String_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackuppolicy/AsyncDeleteBackupPolicy.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackuppolicy/AsyncDeleteBackupPolicy.java new file mode 100644 index 000000000000..e2df8ec13986 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackuppolicy/AsyncDeleteBackupPolicy.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_DeleteBackupPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.netapp.v1.BackupPolicyName; +import com.google.cloud.netapp.v1.DeleteBackupPolicyRequest; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteBackupPolicy { + + public static void main(String[] args) throws Exception { + asyncDeleteBackupPolicy(); + } + + public static void asyncDeleteBackupPolicy() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + DeleteBackupPolicyRequest request = + DeleteBackupPolicyRequest.newBuilder() + .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) + .build(); + ApiFuture future = netAppClient.deleteBackupPolicyCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END netapp_v1_generated_NetApp_DeleteBackupPolicy_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackuppolicy/AsyncDeleteBackupPolicyLRO.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackuppolicy/AsyncDeleteBackupPolicyLRO.java new file mode 100644 index 000000000000..3d63e81ae9b1 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackuppolicy/AsyncDeleteBackupPolicyLRO.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_DeleteBackupPolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.netapp.v1.BackupPolicyName; +import com.google.cloud.netapp.v1.DeleteBackupPolicyRequest; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.cloud.netapp.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteBackupPolicyLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteBackupPolicyLRO(); + } + + public static void asyncDeleteBackupPolicyLRO() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + DeleteBackupPolicyRequest request = + DeleteBackupPolicyRequest.newBuilder() + .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) + .build(); + OperationFuture future = + netAppClient.deleteBackupPolicyOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END netapp_v1_generated_NetApp_DeleteBackupPolicy_LRO_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackuppolicy/SyncDeleteBackupPolicy.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackuppolicy/SyncDeleteBackupPolicy.java new file mode 100644 index 000000000000..bf2f51798387 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackuppolicy/SyncDeleteBackupPolicy.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_DeleteBackupPolicy_sync] +import com.google.cloud.netapp.v1.BackupPolicyName; +import com.google.cloud.netapp.v1.DeleteBackupPolicyRequest; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.protobuf.Empty; + +public class SyncDeleteBackupPolicy { + + public static void main(String[] args) throws Exception { + syncDeleteBackupPolicy(); + } + + public static void syncDeleteBackupPolicy() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + DeleteBackupPolicyRequest request = + DeleteBackupPolicyRequest.newBuilder() + .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) + .build(); + netAppClient.deleteBackupPolicyAsync(request).get(); + } + } +} +// [END netapp_v1_generated_NetApp_DeleteBackupPolicy_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackuppolicy/SyncDeleteBackupPolicyBackuppolicyname.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackuppolicy/SyncDeleteBackupPolicyBackuppolicyname.java new file mode 100644 index 000000000000..957b59d43c6d --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackuppolicy/SyncDeleteBackupPolicyBackuppolicyname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_DeleteBackupPolicy_Backuppolicyname_sync] +import com.google.cloud.netapp.v1.BackupPolicyName; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.protobuf.Empty; + +public class SyncDeleteBackupPolicyBackuppolicyname { + + public static void main(String[] args) throws Exception { + syncDeleteBackupPolicyBackuppolicyname(); + } + + public static void syncDeleteBackupPolicyBackuppolicyname() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + BackupPolicyName name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]"); + netAppClient.deleteBackupPolicyAsync(name).get(); + } + } +} +// [END netapp_v1_generated_NetApp_DeleteBackupPolicy_Backuppolicyname_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackuppolicy/SyncDeleteBackupPolicyString.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackuppolicy/SyncDeleteBackupPolicyString.java new file mode 100644 index 000000000000..b2d8adaf30d5 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackuppolicy/SyncDeleteBackupPolicyString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_DeleteBackupPolicy_String_sync] +import com.google.cloud.netapp.v1.BackupPolicyName; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.protobuf.Empty; + +public class SyncDeleteBackupPolicyString { + + public static void main(String[] args) throws Exception { + syncDeleteBackupPolicyString(); + } + + public static void syncDeleteBackupPolicyString() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + String name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString(); + netAppClient.deleteBackupPolicyAsync(name).get(); + } + } +} +// [END netapp_v1_generated_NetApp_DeleteBackupPolicy_String_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackupvault/AsyncDeleteBackupVault.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackupvault/AsyncDeleteBackupVault.java new file mode 100644 index 000000000000..06b01b0b7af9 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackupvault/AsyncDeleteBackupVault.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_DeleteBackupVault_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.netapp.v1.BackupVaultName; +import com.google.cloud.netapp.v1.DeleteBackupVaultRequest; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteBackupVault { + + public static void main(String[] args) throws Exception { + asyncDeleteBackupVault(); + } + + public static void asyncDeleteBackupVault() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + DeleteBackupVaultRequest request = + DeleteBackupVaultRequest.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .build(); + ApiFuture future = netAppClient.deleteBackupVaultCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END netapp_v1_generated_NetApp_DeleteBackupVault_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackupvault/AsyncDeleteBackupVaultLRO.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackupvault/AsyncDeleteBackupVaultLRO.java new file mode 100644 index 000000000000..9f863a4a6ac9 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackupvault/AsyncDeleteBackupVaultLRO.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_DeleteBackupVault_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.netapp.v1.BackupVaultName; +import com.google.cloud.netapp.v1.DeleteBackupVaultRequest; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.cloud.netapp.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteBackupVaultLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteBackupVaultLRO(); + } + + public static void asyncDeleteBackupVaultLRO() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + DeleteBackupVaultRequest request = + DeleteBackupVaultRequest.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .build(); + OperationFuture future = + netAppClient.deleteBackupVaultOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END netapp_v1_generated_NetApp_DeleteBackupVault_LRO_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackupvault/SyncDeleteBackupVault.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackupvault/SyncDeleteBackupVault.java new file mode 100644 index 000000000000..096991414928 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackupvault/SyncDeleteBackupVault.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_DeleteBackupVault_sync] +import com.google.cloud.netapp.v1.BackupVaultName; +import com.google.cloud.netapp.v1.DeleteBackupVaultRequest; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.protobuf.Empty; + +public class SyncDeleteBackupVault { + + public static void main(String[] args) throws Exception { + syncDeleteBackupVault(); + } + + public static void syncDeleteBackupVault() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + DeleteBackupVaultRequest request = + DeleteBackupVaultRequest.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .build(); + netAppClient.deleteBackupVaultAsync(request).get(); + } + } +} +// [END netapp_v1_generated_NetApp_DeleteBackupVault_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackupvault/SyncDeleteBackupVaultBackupvaultname.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackupvault/SyncDeleteBackupVaultBackupvaultname.java new file mode 100644 index 000000000000..1bc1abf7b15e --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackupvault/SyncDeleteBackupVaultBackupvaultname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_DeleteBackupVault_Backupvaultname_sync] +import com.google.cloud.netapp.v1.BackupVaultName; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.protobuf.Empty; + +public class SyncDeleteBackupVaultBackupvaultname { + + public static void main(String[] args) throws Exception { + syncDeleteBackupVaultBackupvaultname(); + } + + public static void syncDeleteBackupVaultBackupvaultname() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); + netAppClient.deleteBackupVaultAsync(name).get(); + } + } +} +// [END netapp_v1_generated_NetApp_DeleteBackupVault_Backupvaultname_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackupvault/SyncDeleteBackupVaultString.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackupvault/SyncDeleteBackupVaultString.java new file mode 100644 index 000000000000..e2b426b47db4 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/deletebackupvault/SyncDeleteBackupVaultString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_DeleteBackupVault_String_sync] +import com.google.cloud.netapp.v1.BackupVaultName; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.protobuf.Empty; + +public class SyncDeleteBackupVaultString { + + public static void main(String[] args) throws Exception { + syncDeleteBackupVaultString(); + } + + public static void syncDeleteBackupVaultString() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + String name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString(); + netAppClient.deleteBackupVaultAsync(name).get(); + } + } +} +// [END netapp_v1_generated_NetApp_DeleteBackupVault_String_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackup/AsyncGetBackup.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackup/AsyncGetBackup.java new file mode 100644 index 000000000000..446bf20a4c1a --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackup/AsyncGetBackup.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_GetBackup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.BackupName; +import com.google.cloud.netapp.v1.GetBackupRequest; +import com.google.cloud.netapp.v1.NetAppClient; + +public class AsyncGetBackup { + + public static void main(String[] args) throws Exception { + asyncGetBackup(); + } + + public static void asyncGetBackup() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + GetBackupRequest request = + GetBackupRequest.newBuilder() + .setName( + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) + .build(); + ApiFuture future = netAppClient.getBackupCallable().futureCall(request); + // Do something. + Backup response = future.get(); + } + } +} +// [END netapp_v1_generated_NetApp_GetBackup_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackup/SyncGetBackup.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackup/SyncGetBackup.java new file mode 100644 index 000000000000..ae5e0e68cdaa --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackup/SyncGetBackup.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_GetBackup_sync] +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.BackupName; +import com.google.cloud.netapp.v1.GetBackupRequest; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncGetBackup { + + public static void main(String[] args) throws Exception { + syncGetBackup(); + } + + public static void syncGetBackup() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + GetBackupRequest request = + GetBackupRequest.newBuilder() + .setName( + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) + .build(); + Backup response = netAppClient.getBackup(request); + } + } +} +// [END netapp_v1_generated_NetApp_GetBackup_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackup/SyncGetBackupBackupname.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackup/SyncGetBackupBackupname.java new file mode 100644 index 000000000000..ac71a122ce40 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackup/SyncGetBackupBackupname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_GetBackup_Backupname_sync] +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.BackupName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncGetBackupBackupname { + + public static void main(String[] args) throws Exception { + syncGetBackupBackupname(); + } + + public static void syncGetBackupBackupname() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]"); + Backup response = netAppClient.getBackup(name); + } + } +} +// [END netapp_v1_generated_NetApp_GetBackup_Backupname_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackup/SyncGetBackupString.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackup/SyncGetBackupString.java new file mode 100644 index 000000000000..f24741654a0b --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackup/SyncGetBackupString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_GetBackup_String_sync] +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.BackupName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncGetBackupString { + + public static void main(String[] args) throws Exception { + syncGetBackupString(); + } + + public static void syncGetBackupString() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + String name = + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString(); + Backup response = netAppClient.getBackup(name); + } + } +} +// [END netapp_v1_generated_NetApp_GetBackup_String_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackuppolicy/AsyncGetBackupPolicy.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackuppolicy/AsyncGetBackupPolicy.java new file mode 100644 index 000000000000..8472a6a520ef --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackuppolicy/AsyncGetBackupPolicy.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_GetBackupPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.BackupPolicyName; +import com.google.cloud.netapp.v1.GetBackupPolicyRequest; +import com.google.cloud.netapp.v1.NetAppClient; + +public class AsyncGetBackupPolicy { + + public static void main(String[] args) throws Exception { + asyncGetBackupPolicy(); + } + + public static void asyncGetBackupPolicy() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + GetBackupPolicyRequest request = + GetBackupPolicyRequest.newBuilder() + .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) + .build(); + ApiFuture future = netAppClient.getBackupPolicyCallable().futureCall(request); + // Do something. + BackupPolicy response = future.get(); + } + } +} +// [END netapp_v1_generated_NetApp_GetBackupPolicy_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackuppolicy/SyncGetBackupPolicy.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackuppolicy/SyncGetBackupPolicy.java new file mode 100644 index 000000000000..658773229300 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackuppolicy/SyncGetBackupPolicy.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_GetBackupPolicy_sync] +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.BackupPolicyName; +import com.google.cloud.netapp.v1.GetBackupPolicyRequest; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncGetBackupPolicy { + + public static void main(String[] args) throws Exception { + syncGetBackupPolicy(); + } + + public static void syncGetBackupPolicy() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + GetBackupPolicyRequest request = + GetBackupPolicyRequest.newBuilder() + .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) + .build(); + BackupPolicy response = netAppClient.getBackupPolicy(request); + } + } +} +// [END netapp_v1_generated_NetApp_GetBackupPolicy_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackuppolicy/SyncGetBackupPolicyBackuppolicyname.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackuppolicy/SyncGetBackupPolicyBackuppolicyname.java new file mode 100644 index 000000000000..ddcdd0572ed7 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackuppolicy/SyncGetBackupPolicyBackuppolicyname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_GetBackupPolicy_Backuppolicyname_sync] +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.BackupPolicyName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncGetBackupPolicyBackuppolicyname { + + public static void main(String[] args) throws Exception { + syncGetBackupPolicyBackuppolicyname(); + } + + public static void syncGetBackupPolicyBackuppolicyname() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + BackupPolicyName name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]"); + BackupPolicy response = netAppClient.getBackupPolicy(name); + } + } +} +// [END netapp_v1_generated_NetApp_GetBackupPolicy_Backuppolicyname_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackuppolicy/SyncGetBackupPolicyString.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackuppolicy/SyncGetBackupPolicyString.java new file mode 100644 index 000000000000..93531c7af29a --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackuppolicy/SyncGetBackupPolicyString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_GetBackupPolicy_String_sync] +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.BackupPolicyName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncGetBackupPolicyString { + + public static void main(String[] args) throws Exception { + syncGetBackupPolicyString(); + } + + public static void syncGetBackupPolicyString() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + String name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString(); + BackupPolicy response = netAppClient.getBackupPolicy(name); + } + } +} +// [END netapp_v1_generated_NetApp_GetBackupPolicy_String_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackupvault/AsyncGetBackupVault.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackupvault/AsyncGetBackupVault.java new file mode 100644 index 000000000000..3bd6b6627729 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackupvault/AsyncGetBackupVault.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_GetBackupVault_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.netapp.v1.BackupVault; +import com.google.cloud.netapp.v1.BackupVaultName; +import com.google.cloud.netapp.v1.GetBackupVaultRequest; +import com.google.cloud.netapp.v1.NetAppClient; + +public class AsyncGetBackupVault { + + public static void main(String[] args) throws Exception { + asyncGetBackupVault(); + } + + public static void asyncGetBackupVault() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + GetBackupVaultRequest request = + GetBackupVaultRequest.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .build(); + ApiFuture future = netAppClient.getBackupVaultCallable().futureCall(request); + // Do something. + BackupVault response = future.get(); + } + } +} +// [END netapp_v1_generated_NetApp_GetBackupVault_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackupvault/SyncGetBackupVault.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackupvault/SyncGetBackupVault.java new file mode 100644 index 000000000000..f0050c20aab0 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackupvault/SyncGetBackupVault.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_GetBackupVault_sync] +import com.google.cloud.netapp.v1.BackupVault; +import com.google.cloud.netapp.v1.BackupVaultName; +import com.google.cloud.netapp.v1.GetBackupVaultRequest; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncGetBackupVault { + + public static void main(String[] args) throws Exception { + syncGetBackupVault(); + } + + public static void syncGetBackupVault() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + GetBackupVaultRequest request = + GetBackupVaultRequest.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .build(); + BackupVault response = netAppClient.getBackupVault(request); + } + } +} +// [END netapp_v1_generated_NetApp_GetBackupVault_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackupvault/SyncGetBackupVaultBackupvaultname.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackupvault/SyncGetBackupVaultBackupvaultname.java new file mode 100644 index 000000000000..e74e87771919 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackupvault/SyncGetBackupVaultBackupvaultname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_GetBackupVault_Backupvaultname_sync] +import com.google.cloud.netapp.v1.BackupVault; +import com.google.cloud.netapp.v1.BackupVaultName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncGetBackupVaultBackupvaultname { + + public static void main(String[] args) throws Exception { + syncGetBackupVaultBackupvaultname(); + } + + public static void syncGetBackupVaultBackupvaultname() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); + BackupVault response = netAppClient.getBackupVault(name); + } + } +} +// [END netapp_v1_generated_NetApp_GetBackupVault_Backupvaultname_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackupvault/SyncGetBackupVaultString.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackupvault/SyncGetBackupVaultString.java new file mode 100644 index 000000000000..b153fb91da30 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/getbackupvault/SyncGetBackupVaultString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_GetBackupVault_String_sync] +import com.google.cloud.netapp.v1.BackupVault; +import com.google.cloud.netapp.v1.BackupVaultName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncGetBackupVaultString { + + public static void main(String[] args) throws Exception { + syncGetBackupVaultString(); + } + + public static void syncGetBackupVaultString() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + String name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString(); + BackupVault response = netAppClient.getBackupVault(name); + } + } +} +// [END netapp_v1_generated_NetApp_GetBackupVault_String_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackuppolicies/AsyncListBackupPolicies.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackuppolicies/AsyncListBackupPolicies.java new file mode 100644 index 000000000000..8776a385b1a3 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackuppolicies/AsyncListBackupPolicies.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_ListBackupPolicies_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.ListBackupPoliciesRequest; +import com.google.cloud.netapp.v1.LocationName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class AsyncListBackupPolicies { + + public static void main(String[] args) throws Exception { + asyncListBackupPolicies(); + } + + public static void asyncListBackupPolicies() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + ListBackupPoliciesRequest request = + ListBackupPoliciesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + netAppClient.listBackupPoliciesPagedCallable().futureCall(request); + // Do something. + for (BackupPolicy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END netapp_v1_generated_NetApp_ListBackupPolicies_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackuppolicies/AsyncListBackupPoliciesPaged.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackuppolicies/AsyncListBackupPoliciesPaged.java new file mode 100644 index 000000000000..4b3686aad892 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackuppolicies/AsyncListBackupPoliciesPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_ListBackupPolicies_Paged_async] +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.ListBackupPoliciesRequest; +import com.google.cloud.netapp.v1.ListBackupPoliciesResponse; +import com.google.cloud.netapp.v1.LocationName; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.common.base.Strings; + +public class AsyncListBackupPoliciesPaged { + + public static void main(String[] args) throws Exception { + asyncListBackupPoliciesPaged(); + } + + public static void asyncListBackupPoliciesPaged() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + ListBackupPoliciesRequest request = + ListBackupPoliciesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListBackupPoliciesResponse response = + netAppClient.listBackupPoliciesCallable().call(request); + for (BackupPolicy element : response.getBackupPoliciesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END netapp_v1_generated_NetApp_ListBackupPolicies_Paged_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackuppolicies/SyncListBackupPolicies.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackuppolicies/SyncListBackupPolicies.java new file mode 100644 index 000000000000..bd5b07694a8e --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackuppolicies/SyncListBackupPolicies.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_ListBackupPolicies_sync] +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.ListBackupPoliciesRequest; +import com.google.cloud.netapp.v1.LocationName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncListBackupPolicies { + + public static void main(String[] args) throws Exception { + syncListBackupPolicies(); + } + + public static void syncListBackupPolicies() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + ListBackupPoliciesRequest request = + ListBackupPoliciesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (BackupPolicy element : netAppClient.listBackupPolicies(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END netapp_v1_generated_NetApp_ListBackupPolicies_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackuppolicies/SyncListBackupPoliciesLocationname.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackuppolicies/SyncListBackupPoliciesLocationname.java new file mode 100644 index 000000000000..7bab028ba4d4 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackuppolicies/SyncListBackupPoliciesLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_ListBackupPolicies_Locationname_sync] +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.LocationName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncListBackupPoliciesLocationname { + + public static void main(String[] args) throws Exception { + syncListBackupPoliciesLocationname(); + } + + public static void syncListBackupPoliciesLocationname() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (BackupPolicy element : netAppClient.listBackupPolicies(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END netapp_v1_generated_NetApp_ListBackupPolicies_Locationname_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackuppolicies/SyncListBackupPoliciesString.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackuppolicies/SyncListBackupPoliciesString.java new file mode 100644 index 000000000000..2364af0b2200 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackuppolicies/SyncListBackupPoliciesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_ListBackupPolicies_String_sync] +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.LocationName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncListBackupPoliciesString { + + public static void main(String[] args) throws Exception { + syncListBackupPoliciesString(); + } + + public static void syncListBackupPoliciesString() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (BackupPolicy element : netAppClient.listBackupPolicies(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END netapp_v1_generated_NetApp_ListBackupPolicies_String_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackups/AsyncListBackups.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackups/AsyncListBackups.java new file mode 100644 index 000000000000..93793cefa81d --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackups/AsyncListBackups.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_ListBackups_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.BackupVaultName; +import com.google.cloud.netapp.v1.ListBackupsRequest; +import com.google.cloud.netapp.v1.NetAppClient; + +public class AsyncListBackups { + + public static void main(String[] args) throws Exception { + asyncListBackups(); + } + + public static void asyncListBackups() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + ListBackupsRequest request = + ListBackupsRequest.newBuilder() + .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = netAppClient.listBackupsPagedCallable().futureCall(request); + // Do something. + for (Backup element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END netapp_v1_generated_NetApp_ListBackups_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackups/AsyncListBackupsPaged.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackups/AsyncListBackupsPaged.java new file mode 100644 index 000000000000..639f28d103cf --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackups/AsyncListBackupsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_ListBackups_Paged_async] +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.BackupVaultName; +import com.google.cloud.netapp.v1.ListBackupsRequest; +import com.google.cloud.netapp.v1.ListBackupsResponse; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.common.base.Strings; + +public class AsyncListBackupsPaged { + + public static void main(String[] args) throws Exception { + asyncListBackupsPaged(); + } + + public static void asyncListBackupsPaged() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + ListBackupsRequest request = + ListBackupsRequest.newBuilder() + .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListBackupsResponse response = netAppClient.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; + } + } + } + } +} +// [END netapp_v1_generated_NetApp_ListBackups_Paged_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackups/SyncListBackups.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackups/SyncListBackups.java new file mode 100644 index 000000000000..7033a59988d9 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackups/SyncListBackups.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_ListBackups_sync] +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.BackupVaultName; +import com.google.cloud.netapp.v1.ListBackupsRequest; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncListBackups { + + public static void main(String[] args) throws Exception { + syncListBackups(); + } + + public static void syncListBackups() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + ListBackupsRequest request = + ListBackupsRequest.newBuilder() + .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .setFilter("filter-1274492040") + .build(); + for (Backup element : netAppClient.listBackups(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END netapp_v1_generated_NetApp_ListBackups_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackups/SyncListBackupsBackupvaultname.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackups/SyncListBackupsBackupvaultname.java new file mode 100644 index 000000000000..0bc5ec5bd5c2 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackups/SyncListBackupsBackupvaultname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_ListBackups_Backupvaultname_sync] +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.BackupVaultName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncListBackupsBackupvaultname { + + public static void main(String[] args) throws Exception { + syncListBackupsBackupvaultname(); + } + + public static void syncListBackupsBackupvaultname() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); + for (Backup element : netAppClient.listBackups(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END netapp_v1_generated_NetApp_ListBackups_Backupvaultname_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackups/SyncListBackupsString.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackups/SyncListBackupsString.java new file mode 100644 index 000000000000..84a0404db516 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackups/SyncListBackupsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_ListBackups_String_sync] +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.BackupVaultName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncListBackupsString { + + public static void main(String[] args) throws Exception { + syncListBackupsString(); + } + + public static void syncListBackupsString() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + String parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString(); + for (Backup element : netAppClient.listBackups(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END netapp_v1_generated_NetApp_ListBackups_String_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackupvaults/AsyncListBackupVaults.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackupvaults/AsyncListBackupVaults.java new file mode 100644 index 000000000000..f7a18e865936 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackupvaults/AsyncListBackupVaults.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_ListBackupVaults_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.netapp.v1.BackupVault; +import com.google.cloud.netapp.v1.ListBackupVaultsRequest; +import com.google.cloud.netapp.v1.LocationName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class AsyncListBackupVaults { + + public static void main(String[] args) throws Exception { + asyncListBackupVaults(); + } + + public static void asyncListBackupVaults() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + ListBackupVaultsRequest request = + ListBackupVaultsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = + netAppClient.listBackupVaultsPagedCallable().futureCall(request); + // Do something. + for (BackupVault element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END netapp_v1_generated_NetApp_ListBackupVaults_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackupvaults/AsyncListBackupVaultsPaged.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackupvaults/AsyncListBackupVaultsPaged.java new file mode 100644 index 000000000000..f9ffa125039c --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackupvaults/AsyncListBackupVaultsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_ListBackupVaults_Paged_async] +import com.google.cloud.netapp.v1.BackupVault; +import com.google.cloud.netapp.v1.ListBackupVaultsRequest; +import com.google.cloud.netapp.v1.ListBackupVaultsResponse; +import com.google.cloud.netapp.v1.LocationName; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.common.base.Strings; + +public class AsyncListBackupVaultsPaged { + + public static void main(String[] args) throws Exception { + asyncListBackupVaultsPaged(); + } + + public static void asyncListBackupVaultsPaged() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + ListBackupVaultsRequest request = + ListBackupVaultsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListBackupVaultsResponse response = netAppClient.listBackupVaultsCallable().call(request); + for (BackupVault element : response.getBackupVaultsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END netapp_v1_generated_NetApp_ListBackupVaults_Paged_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackupvaults/SyncListBackupVaults.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackupvaults/SyncListBackupVaults.java new file mode 100644 index 000000000000..04a0fa61ac25 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackupvaults/SyncListBackupVaults.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_ListBackupVaults_sync] +import com.google.cloud.netapp.v1.BackupVault; +import com.google.cloud.netapp.v1.ListBackupVaultsRequest; +import com.google.cloud.netapp.v1.LocationName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncListBackupVaults { + + public static void main(String[] args) throws Exception { + syncListBackupVaults(); + } + + public static void syncListBackupVaults() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + ListBackupVaultsRequest request = + ListBackupVaultsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .setFilter("filter-1274492040") + .build(); + for (BackupVault element : netAppClient.listBackupVaults(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END netapp_v1_generated_NetApp_ListBackupVaults_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackupvaults/SyncListBackupVaultsLocationname.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackupvaults/SyncListBackupVaultsLocationname.java new file mode 100644 index 000000000000..f39b5725eb43 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackupvaults/SyncListBackupVaultsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_ListBackupVaults_Locationname_sync] +import com.google.cloud.netapp.v1.BackupVault; +import com.google.cloud.netapp.v1.LocationName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncListBackupVaultsLocationname { + + public static void main(String[] args) throws Exception { + syncListBackupVaultsLocationname(); + } + + public static void syncListBackupVaultsLocationname() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (BackupVault element : netAppClient.listBackupVaults(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END netapp_v1_generated_NetApp_ListBackupVaults_Locationname_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackupvaults/SyncListBackupVaultsString.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackupvaults/SyncListBackupVaultsString.java new file mode 100644 index 000000000000..a7f8d0bf2070 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/listbackupvaults/SyncListBackupVaultsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_ListBackupVaults_String_sync] +import com.google.cloud.netapp.v1.BackupVault; +import com.google.cloud.netapp.v1.LocationName; +import com.google.cloud.netapp.v1.NetAppClient; + +public class SyncListBackupVaultsString { + + public static void main(String[] args) throws Exception { + syncListBackupVaultsString(); + } + + public static void syncListBackupVaultsString() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (BackupVault element : netAppClient.listBackupVaults(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END netapp_v1_generated_NetApp_ListBackupVaults_String_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackup/AsyncUpdateBackup.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackup/AsyncUpdateBackup.java new file mode 100644 index 000000000000..15b8c4145ef8 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackup/AsyncUpdateBackup.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_UpdateBackup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.cloud.netapp.v1.UpdateBackupRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateBackup { + + public static void main(String[] args) throws Exception { + asyncUpdateBackup(); + } + + public static void asyncUpdateBackup() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + UpdateBackupRequest request = + UpdateBackupRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setBackup(Backup.newBuilder().build()) + .build(); + ApiFuture future = netAppClient.updateBackupCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END netapp_v1_generated_NetApp_UpdateBackup_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackup/AsyncUpdateBackupLRO.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackup/AsyncUpdateBackupLRO.java new file mode 100644 index 000000000000..efdf3f426f46 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackup/AsyncUpdateBackupLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_UpdateBackup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.cloud.netapp.v1.OperationMetadata; +import com.google.cloud.netapp.v1.UpdateBackupRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateBackupLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateBackupLRO(); + } + + public static void asyncUpdateBackupLRO() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + UpdateBackupRequest request = + UpdateBackupRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setBackup(Backup.newBuilder().build()) + .build(); + OperationFuture future = + netAppClient.updateBackupOperationCallable().futureCall(request); + // Do something. + Backup response = future.get(); + } + } +} +// [END netapp_v1_generated_NetApp_UpdateBackup_LRO_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackup/SyncUpdateBackup.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackup/SyncUpdateBackup.java new file mode 100644 index 000000000000..7ee0da3f3cc1 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackup/SyncUpdateBackup.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_UpdateBackup_sync] +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.cloud.netapp.v1.UpdateBackupRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateBackup { + + public static void main(String[] args) throws Exception { + syncUpdateBackup(); + } + + public static void syncUpdateBackup() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + UpdateBackupRequest request = + UpdateBackupRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setBackup(Backup.newBuilder().build()) + .build(); + Backup response = netAppClient.updateBackupAsync(request).get(); + } + } +} +// [END netapp_v1_generated_NetApp_UpdateBackup_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackup/SyncUpdateBackupBackupFieldmask.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackup/SyncUpdateBackupBackupFieldmask.java new file mode 100644 index 000000000000..b3104db00043 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackup/SyncUpdateBackupBackupFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_UpdateBackup_BackupFieldmask_sync] +import com.google.cloud.netapp.v1.Backup; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateBackupBackupFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateBackupBackupFieldmask(); + } + + public static void syncUpdateBackupBackupFieldmask() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + Backup backup = Backup.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Backup response = netAppClient.updateBackupAsync(backup, updateMask).get(); + } + } +} +// [END netapp_v1_generated_NetApp_UpdateBackup_BackupFieldmask_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackuppolicy/AsyncUpdateBackupPolicy.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackuppolicy/AsyncUpdateBackupPolicy.java new file mode 100644 index 000000000000..2333b52b83d2 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackuppolicy/AsyncUpdateBackupPolicy.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_UpdateBackupPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.cloud.netapp.v1.UpdateBackupPolicyRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateBackupPolicy { + + public static void main(String[] args) throws Exception { + asyncUpdateBackupPolicy(); + } + + public static void asyncUpdateBackupPolicy() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + UpdateBackupPolicyRequest request = + UpdateBackupPolicyRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setBackupPolicy(BackupPolicy.newBuilder().build()) + .build(); + ApiFuture future = netAppClient.updateBackupPolicyCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END netapp_v1_generated_NetApp_UpdateBackupPolicy_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackuppolicy/AsyncUpdateBackupPolicyLRO.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackuppolicy/AsyncUpdateBackupPolicyLRO.java new file mode 100644 index 000000000000..5a86f68697fd --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackuppolicy/AsyncUpdateBackupPolicyLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_UpdateBackupPolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.cloud.netapp.v1.OperationMetadata; +import com.google.cloud.netapp.v1.UpdateBackupPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateBackupPolicyLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateBackupPolicyLRO(); + } + + public static void asyncUpdateBackupPolicyLRO() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + UpdateBackupPolicyRequest request = + UpdateBackupPolicyRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setBackupPolicy(BackupPolicy.newBuilder().build()) + .build(); + OperationFuture future = + netAppClient.updateBackupPolicyOperationCallable().futureCall(request); + // Do something. + BackupPolicy response = future.get(); + } + } +} +// [END netapp_v1_generated_NetApp_UpdateBackupPolicy_LRO_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackuppolicy/SyncUpdateBackupPolicy.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackuppolicy/SyncUpdateBackupPolicy.java new file mode 100644 index 000000000000..ed1ad953ebd4 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackuppolicy/SyncUpdateBackupPolicy.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_UpdateBackupPolicy_sync] +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.cloud.netapp.v1.UpdateBackupPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateBackupPolicy { + + public static void main(String[] args) throws Exception { + syncUpdateBackupPolicy(); + } + + public static void syncUpdateBackupPolicy() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + UpdateBackupPolicyRequest request = + UpdateBackupPolicyRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setBackupPolicy(BackupPolicy.newBuilder().build()) + .build(); + BackupPolicy response = netAppClient.updateBackupPolicyAsync(request).get(); + } + } +} +// [END netapp_v1_generated_NetApp_UpdateBackupPolicy_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackuppolicy/SyncUpdateBackupPolicyBackuppolicyFieldmask.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackuppolicy/SyncUpdateBackupPolicyBackuppolicyFieldmask.java new file mode 100644 index 000000000000..82538cc59145 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackuppolicy/SyncUpdateBackupPolicyBackuppolicyFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_UpdateBackupPolicy_BackuppolicyFieldmask_sync] +import com.google.cloud.netapp.v1.BackupPolicy; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateBackupPolicyBackuppolicyFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateBackupPolicyBackuppolicyFieldmask(); + } + + public static void syncUpdateBackupPolicyBackuppolicyFieldmask() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + BackupPolicy backupPolicy = BackupPolicy.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + BackupPolicy response = netAppClient.updateBackupPolicyAsync(backupPolicy, updateMask).get(); + } + } +} +// [END netapp_v1_generated_NetApp_UpdateBackupPolicy_BackuppolicyFieldmask_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackupvault/AsyncUpdateBackupVault.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackupvault/AsyncUpdateBackupVault.java new file mode 100644 index 000000000000..26199a8ec70d --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackupvault/AsyncUpdateBackupVault.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_UpdateBackupVault_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.netapp.v1.BackupVault; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.cloud.netapp.v1.UpdateBackupVaultRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateBackupVault { + + public static void main(String[] args) throws Exception { + asyncUpdateBackupVault(); + } + + public static void asyncUpdateBackupVault() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + UpdateBackupVaultRequest request = + UpdateBackupVaultRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setBackupVault(BackupVault.newBuilder().build()) + .build(); + ApiFuture future = netAppClient.updateBackupVaultCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END netapp_v1_generated_NetApp_UpdateBackupVault_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackupvault/AsyncUpdateBackupVaultLRO.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackupvault/AsyncUpdateBackupVaultLRO.java new file mode 100644 index 000000000000..b04e08abeb73 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackupvault/AsyncUpdateBackupVaultLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_UpdateBackupVault_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.netapp.v1.BackupVault; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.cloud.netapp.v1.OperationMetadata; +import com.google.cloud.netapp.v1.UpdateBackupVaultRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateBackupVaultLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateBackupVaultLRO(); + } + + public static void asyncUpdateBackupVaultLRO() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + UpdateBackupVaultRequest request = + UpdateBackupVaultRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setBackupVault(BackupVault.newBuilder().build()) + .build(); + OperationFuture future = + netAppClient.updateBackupVaultOperationCallable().futureCall(request); + // Do something. + BackupVault response = future.get(); + } + } +} +// [END netapp_v1_generated_NetApp_UpdateBackupVault_LRO_async] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackupvault/SyncUpdateBackupVault.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackupvault/SyncUpdateBackupVault.java new file mode 100644 index 000000000000..4c6c33f59171 --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackupvault/SyncUpdateBackupVault.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_UpdateBackupVault_sync] +import com.google.cloud.netapp.v1.BackupVault; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.cloud.netapp.v1.UpdateBackupVaultRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateBackupVault { + + public static void main(String[] args) throws Exception { + syncUpdateBackupVault(); + } + + public static void syncUpdateBackupVault() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + UpdateBackupVaultRequest request = + UpdateBackupVaultRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setBackupVault(BackupVault.newBuilder().build()) + .build(); + BackupVault response = netAppClient.updateBackupVaultAsync(request).get(); + } + } +} +// [END netapp_v1_generated_NetApp_UpdateBackupVault_sync] diff --git a/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackupvault/SyncUpdateBackupVaultBackupvaultFieldmask.java b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackupvault/SyncUpdateBackupVaultBackupvaultFieldmask.java new file mode 100644 index 000000000000..5ba10506a48e --- /dev/null +++ b/java-netapp/samples/snippets/generated/com/google/cloud/netapp/v1/netapp/updatebackupvault/SyncUpdateBackupVaultBackupvaultFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.netapp.v1.samples; + +// [START netapp_v1_generated_NetApp_UpdateBackupVault_BackupvaultFieldmask_sync] +import com.google.cloud.netapp.v1.BackupVault; +import com.google.cloud.netapp.v1.NetAppClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateBackupVaultBackupvaultFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateBackupVaultBackupvaultFieldmask(); + } + + public static void syncUpdateBackupVaultBackupvaultFieldmask() throws Exception { + // 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 (NetAppClient netAppClient = NetAppClient.create()) { + BackupVault backupVault = BackupVault.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + BackupVault response = netAppClient.updateBackupVaultAsync(backupVault, updateMask).get(); + } + } +} +// [END netapp_v1_generated_NetApp_UpdateBackupVault_BackupvaultFieldmask_sync]